Commit 340de7a7 by liuyang

Merge branch 'dev' of http://git.pseer.com/platform/hp-smart into dev-ly

parents 2afb21b7 eb7463c2
...@@ -56,6 +56,7 @@ public class HPCG002 extends DaoEPBase { ...@@ -56,6 +56,7 @@ public class HPCG002 extends DaoEPBase {
public static final String INSERT = "HPCG002.insert"; public static final String INSERT = "HPCG002.insert";
public static final String UPDATE = "HPCG002.update"; public static final String UPDATE = "HPCG002.update";
public static final String DELETE = "HPCG002.delete"; public static final String DELETE = "HPCG002.delete";
public static final String CHECK = "HPCG002.check";
private Long id = new Long(0); /* ID*/ private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
...@@ -66,11 +67,11 @@ public class HPCG002 extends DaoEPBase { ...@@ -66,11 +67,11 @@ public class HPCG002 extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/ private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/ private String updatedTime = " "; /* 修改时间*/
private Integer deleteFlag = 0; /* 是否删除 0-否1-是*/ private Integer deleteFlag; /* 是否删除 0-否1-是*/
private String proPlanDate = " "; /* 采购计划日期*/ private String proPlanDate = " "; /* 采购计划日期*/
private String proPlanNo = " "; /* 采购计划单号*/ private String proPlanNo = " "; /* 采购计划单号*/
private String inventType = " "; /* 存货类型*/ private String inventType = " "; /* 存货类型*/
private Integer proPlanStatus = 0; /* 提交状态 0-未提交 1-部分提交 2-全部提交*/ private Integer proPlanStatus; /* 提交状态 0-未提交 1-部分提交 2-全部提交*/
/** /**
* initialize the metadata. * initialize the metadata.
......
...@@ -16,7 +16,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,7 +16,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-04-26 17:16:55 create * @history 2024-04-26 16:57:22 create
*/ */
public class HPCG002A extends DaoEPBase { public class HPCG002A extends DaoEPBase {
...@@ -46,11 +46,16 @@ public class HPCG002A extends DaoEPBase { ...@@ -46,11 +46,16 @@ public class HPCG002A extends DaoEPBase {
public static final String FIELD_APPLY_WEIGHT = "applyWeight"; /* 重量*/ public static final String FIELD_APPLY_WEIGHT = "applyWeight"; /* 重量*/
public static final String FIELD_PLAN_AMOUNT = "planAmount"; /* 计划数量*/ public static final String FIELD_PLAN_AMOUNT = "planAmount"; /* 计划数量*/
public static final String FIELD_PLAN_WEIGHT = "planWeight"; /* 计划重量*/ public static final String FIELD_PLAN_WEIGHT = "planWeight"; /* 计划重量*/
public static final String FIELD_INV_AMOUNT = "invAmount"; /* 库存数量*/
public static final String FIELD_INV_WEIGHT = "invWeight"; /* 库存重量*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_PRO_APPLY_STATUS = "proApplyStatus"; /* 提交状态 0-未提交 1-已提交*/ public static final String FIELD_PRO_APPLY_STATUS = "proApplyStatus"; /* 提交状态 0-未提交 1-已提交*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/ public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/ public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_PARENT_ID = "parentId"; /* 父级ID*/ public static final String FIELD_PARENT_ID = "parentId"; /* 父级ID*/
public static final String FIELD_PRO_PLAN_STATUS = "proPlanStatus"; /* 提交状态 0-未提交 1-部分提交 2-全部提交*/
public static final String COL_ID = "ID"; /* ID*/ public static final String COL_ID = "ID"; /* ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
...@@ -82,11 +87,20 @@ public class HPCG002A extends DaoEPBase { ...@@ -82,11 +87,20 @@ public class HPCG002A extends DaoEPBase {
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/ public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 父级ID*/ public static final String COL_PARENT_ID = "PARENT_ID"; /* 父级ID*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String QUERY = "HPCG002A.query"; public static final String QUERY = "HPCG002A.query";
public static final String COUNT = "HPCG002A.count"; public static final String COUNT = "HPCG002A.count";
public static final String INSERT = "HPCG002A.insert"; public static final String INSERT = "HPCG002A.insert";
public static final String UPDATE = "HPCG002A.update"; public static final String UPDATE = "HPCG002A.update";
public static final String DELETE = "HPCG002A.delete"; public static final String DELETE = "HPCG002A.delete";
public static final String CHECK = "HPCG002A.check";
private Long id = new Long(0); /* ID*/ private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
...@@ -97,7 +111,7 @@ public class HPCG002A extends DaoEPBase { ...@@ -97,7 +111,7 @@ public class HPCG002A extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/ private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/ private String updatedTime = " "; /* 修改时间*/
private Integer deleteFlag = 0; /* 是否删除 0-否1-是*/ private Integer deleteFlag; /* 是否删除 0-否1-是*/
private String custCode = " "; /* 供应商编码*/ private String custCode = " "; /* 供应商编码*/
private String proApplyDate = " "; /* 采购申请日期*/ private String proApplyDate = " "; /* 采购申请日期*/
private String proApplyNo = " "; /* 采购申请单号*/ private String proApplyNo = " "; /* 采购申请单号*/
...@@ -112,12 +126,26 @@ public class HPCG002A extends DaoEPBase { ...@@ -112,12 +126,26 @@ public class HPCG002A extends DaoEPBase {
private BigDecimal applyWeight = new BigDecimal(0.000); /* 重量*/ private BigDecimal applyWeight = new BigDecimal(0.000); /* 重量*/
private BigDecimal planAmount = new BigDecimal(0); /* 计划数量*/ private BigDecimal planAmount = new BigDecimal(0); /* 计划数量*/
private BigDecimal planWeight = new BigDecimal(0.000); /* 计划重量*/ private BigDecimal planWeight = new BigDecimal(0.000); /* 计划重量*/
private BigDecimal invAmount = new BigDecimal(0); /* 库存数量*/
private BigDecimal invWeight = new BigDecimal(0.000); /* 库存重量*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Integer proApplyStatus = 0; /* 提交状态 0-未提交 1-已提交*/ private Integer proApplyStatus; /* 提交状态 0-未提交 1-已提交*/
private String factoryCode = " "; /* 厂区编码*/ private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/ private String factoryName = " "; /* 厂区名称*/
private Long parentId = new Long(0); /* 父级ID*/ private Long parentId = new Long(0); /* 父级ID*/
private Integer proPlanStatus; /* 采购计划提交状态 0-未提交 1-部分提交 2-全部提交*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.000); /* 长*/
private BigDecimal width = new BigDecimal(0.000); /* 宽*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚*/
private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/
private String unit = " "; /* 单位*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -236,6 +264,20 @@ public class HPCG002A extends DaoEPBase { ...@@ -236,6 +264,20 @@ public class HPCG002A extends DaoEPBase {
eiColumn.setDescName("计划重量"); eiColumn.setDescName("计划重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INV_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INV_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK); eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -256,7 +298,49 @@ public class HPCG002A extends DaoEPBase { ...@@ -256,7 +298,49 @@ public class HPCG002A extends DaoEPBase {
eiColumn.setDescName("父级ID"); eiColumn.setDescName("父级ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRO_PLAN_STATUS);
eiColumn.setDescName("采购计划提交状态 0-未提交 1-部分提交 2-全部提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -650,6 +734,41 @@ public class HPCG002A extends DaoEPBase { ...@@ -650,6 +734,41 @@ public class HPCG002A extends DaoEPBase {
public void setPlanWeight(BigDecimal planWeight) { public void setPlanWeight(BigDecimal planWeight) {
this.planWeight = planWeight; this.planWeight = planWeight;
} }
/**
* set the invAmount - 库存数量.
*
* @param invAmount - 库存数量.
*/
public void setInvAmount(BigDecimal invAmount) {
this.invAmount = invAmount;
}
/**
* get the invAmount - 库存数量
* @return the invAmount
*/
public BigDecimal getInvAmount() {
return this.invAmount;
}
/**
* get the invWeight - 库存重量.
* @return the invWeight
*/
public BigDecimal getInvWeight() {
return this.invWeight;
}
/**
* set the invWeight - 库存重量.
*
* @param invWeight - 库存重量
*/
public void setInvWeight(BigDecimal invWeight) {
this.invWeight = invWeight;
}
/** /**
* get the remark - 备注. * get the remark - 备注.
* @return the remark * @return the remark
...@@ -730,6 +849,138 @@ public class HPCG002A extends DaoEPBase { ...@@ -730,6 +849,138 @@ public class HPCG002A extends DaoEPBase {
public void setParentId(Long parentId) { public void setParentId(Long parentId) {
this.parentId = parentId; this.parentId = parentId;
} }
/**
* get the proPlanStatus - 提交状态 0-未提交 1-部分提交 2-全部提交.
* @return the proPlanStatus
*/
public Integer getProPlanStatus() {
return this.proPlanStatus;
}
/**
* set the proPlanStatus - 提交状态 0-未提交 1-部分提交 2-全部提交.
*
* @param proPlanStatus - 提交状态 0-未提交 1-部分提交 2-全部提交
*/
public void setProPlanStatus(Integer proPlanStatus) {
this.proPlanStatus = proPlanStatus;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the coefficient - 系数.
* @return the coefficient
*/
public BigDecimal getCoefficient() {
return this.coefficient;
}
/**
* set the coefficient - 系数.
*
* @param coefficient - 系数
*/
public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -762,11 +1013,24 @@ public class HPCG002A extends DaoEPBase { ...@@ -762,11 +1013,24 @@ public class HPCG002A extends DaoEPBase {
setApplyWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_APPLY_WEIGHT)), applyWeight)); setApplyWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_APPLY_WEIGHT)), applyWeight));
setPlanAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_AMOUNT)), planAmount)); setPlanAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_AMOUNT)), planAmount));
setPlanWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_WEIGHT)), planWeight)); setPlanWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_WEIGHT)), planWeight));
setInvAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_AMOUNT)), invAmount));
setInvWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_WEIGHT)), invWeight));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setProApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRO_APPLY_STATUS)), proApplyStatus)); setProApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRO_APPLY_STATUS)), proApplyStatus));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode)); setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId)); setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setProPlanStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRO_PLAN_STATUS)), proPlanStatus));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
} }
/** /**
...@@ -800,11 +1064,24 @@ public class HPCG002A extends DaoEPBase { ...@@ -800,11 +1064,24 @@ public class HPCG002A extends DaoEPBase {
map.put(FIELD_APPLY_WEIGHT, StringUtils.toString(applyWeight, eiMetadata.getMeta(FIELD_APPLY_WEIGHT))); map.put(FIELD_APPLY_WEIGHT, StringUtils.toString(applyWeight, eiMetadata.getMeta(FIELD_APPLY_WEIGHT)));
map.put(FIELD_PLAN_AMOUNT, StringUtils.toString(planAmount, eiMetadata.getMeta(FIELD_PLAN_AMOUNT))); map.put(FIELD_PLAN_AMOUNT, StringUtils.toString(planAmount, eiMetadata.getMeta(FIELD_PLAN_AMOUNT)));
map.put(FIELD_PLAN_WEIGHT, StringUtils.toString(planWeight, eiMetadata.getMeta(FIELD_PLAN_WEIGHT))); map.put(FIELD_PLAN_WEIGHT, StringUtils.toString(planWeight, eiMetadata.getMeta(FIELD_PLAN_WEIGHT)));
map.put(FIELD_INV_AMOUNT, StringUtils.toString(invAmount, eiMetadata.getMeta(FIELD_INV_AMOUNT)));
map.put(FIELD_INV_WEIGHT, StringUtils.toString(invWeight, eiMetadata.getMeta(FIELD_INV_WEIGHT)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_PRO_APPLY_STATUS, StringUtils.toString(proApplyStatus, eiMetadata.getMeta(FIELD_PRO_APPLY_STATUS))); map.put(FIELD_PRO_APPLY_STATUS, StringUtils.toString(proApplyStatus, eiMetadata.getMeta(FIELD_PRO_APPLY_STATUS)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE))); map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME))); map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID))); map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_PRO_PLAN_STATUS, StringUtils.toString(proPlanStatus, eiMetadata.getMeta(FIELD_PRO_PLAN_STATUS)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
return map; return map;
} }
......
...@@ -4,6 +4,7 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; ...@@ -4,6 +4,7 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.cg.domain.HPCG002;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.xs.domain.HPXS006; import com.baosight.hpjx.hp.xs.domain.HPXS006;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
...@@ -28,17 +29,10 @@ public class ServiceHPCG002 extends ServiceBase { ...@@ -28,17 +29,10 @@ public class ServiceHPCG002 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "售后维修",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "采购计划",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
/*inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0, "userId",UserSessionUtils.getFactoryCode().get(0));*/ inInfo = super.query(inInfo, HPCG002.QUERY, new HPCG002());
inInfo = super.query(inInfo, HPXS006.QUERY, new HPXS006());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
map.put("factoryCodes", getFactoryCode(inInfo));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.REP_USER_ID_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -50,150 +44,15 @@ public class ServiceHPCG002 extends ServiceBase { ...@@ -50,150 +44,15 @@ public class ServiceHPCG002 extends ServiceBase {
* 查询操作. * 查询操作.
*/ */
@Override @Override
@OperationLogAnnotation(operModul = "售后维修",operType = "查询") @OperationLogAnnotation(operModul = "采购计划",operType = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXS006.FIELD_REP_DATE, inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "createdDateFrom",
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXS006.FIELD_REP_DATE))); DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "createdDateFrom")));
EiInfo outInfo = super.query(inInfo, HPXS006.QUERY, new HPXS006()); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "createdDateTo",
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "createdDateTo")));
EiInfo outInfo = super.query(inInfo, HPCG002.QUERY, new HPCG002());
return outInfo; return outInfo;
} }
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPXS006 hpsc006 = new HPXS006();
hpsc006.fromMap(resultRows.get(i));
hpsc006.setRepDate(DateUtils.formatShort(hpsc006.getRepDate()));
/* HPPZ003 fPz003 = new HPPZ003();
if (hpsc001.getPrinc2().trim().isEmpty()) {
fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE));
fPz003.setCustType(CompanyTypeEnum.GQ.getCode());
fPz003.setCustName(resultRows.get(i).get("princ2Name").toString());
fPz003.setCompanyName(resultRows.get(i).get("princ2Name").toString());
DaoUtils.insert("HPPZ003.insert", fPz003);
hpsc001.setPrinc2(fPz003.getCustCode());
}*/
if (hpsc006.getId() == null || hpsc006.getId() == 0) {
this.add(hpsc006);
} else {
this.modify(hpsc006);
}
}
//inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param hpxs006
* @throws Exception
*/
private void add(HPXS006 hpxs006) throws Exception {
hpxs006.setRepOrderNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPXS006_PROD_NO));
DaoUtils.insert(HPXS006.INSERT, hpxs006);
}
/**
* 修改数据
*
* @param hpxs006
*/
private void modify(HPXS006 hpxs006) {
DaoUtils.update(HPXS006.UPDATE, hpxs006);
}
/**
* 删除操作.
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "删除")
public EiInfo delete(EiInfo eiInfo) {
HPXS006 hpxs006 = new HPXS006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxs006.fromMap(map);
this.dao.delete(HPXS006.DELETE, hpxs006.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return query(eiInfo);
}
/**
*审核
*/
@OperationLogAnnotation(operModul = "售后维修",operType = "审核")
public EiInfo check(EiInfo eiInfo) {
HPXS006 hpxs006 = new HPXS006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxs006.fromMap(map);
DaoUtils.update(HPXS006.CHECK, hpxs006.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("审核失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("审核失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("审核成功!");
return eiInfo;
}
/**
* @param inInfo
* @return
*/
public List<String> getFactoryCode(EiInfo inInfo) {
List<String> factorycodes = new ArrayList();
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "userId", UserSessionUtils.getUserId());
inInfo = super.query(inInfo, HPXS006.QUERYFACTORY);
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List rows = new ArrayList();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
String factory = (String) map.get("factoryCode");
factorycodes.add(factory);
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询组失败");
}
return factorycodes;
}
} }
package com.baosight.hpjx.hp.cg.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.cg.domain.HPCG002;
import com.baosight.hpjx.hp.cg.domain.HPCG002A;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.xs.domain.HPXS006;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*;
/**
*
*/
public class ServiceHPCG002A extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "采购计划详情",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCG002A.QUERY, new HPCG002A());
Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_ALL_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCG002A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "采购计划详情",operType = "查询")
public EiInfo query(EiInfo inInfo) {
EiInfo outInfo = super.query(inInfo, HPCG002A.QUERY, new HPCG002A());
return outInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购计划详情",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPCG002A hpcg002A = new HPCG002A();
hpcg002A.fromMap(resultRows.get(i));
if (hpcg002A.getId() == null || hpcg002A.getId() == 0) {
this.add(hpcg002A);
} else {
this.modify(hpcg002A);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param hpcg002A
* @throws Exception
*/
private void add(HPCG002A hpcg002A) throws Exception {
DaoUtils.insert(HPCG002A.INSERT, hpcg002A);
}
/**
* 修改数据
*
* @param hpcg002A
*/
private void modify(HPCG002A hpcg002A) {
DaoUtils.update(HPCG002A.UPDATE, hpcg002A);
}
/**
* 删除操作.
*/
@OperationLogAnnotation(operModul = "采购计划详情",operType = "删除")
public EiInfo delete(EiInfo eiInfo) {
HPCG002A hpcg002A = new HPCG002A();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpcg002A.fromMap(map);
this.dao.delete(HPXS006.DELETE, hpcg002A.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return query(eiInfo);
}
/**
*审核
*/
@OperationLogAnnotation(operModul = "采购计划详情",operType = "提交")
public EiInfo check(EiInfo eiInfo) {
HPCG002A hpcg002A = new HPCG002A();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
EiInfo inInfo = new EiInfo();
HPCG002 hpcg002 = new HPCG002();
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpcg002A.fromMap(map);
hpcg002.setId(hpcg002A.getParentId());
hpcg002.setProPlanStatus(hpcg002A.getProPlanStatus());
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0, HPCG002A.FIELD_PARENT_ID,hpcg002A.getParentId());
DaoUtils.update(HPCG002A.CHECK, hpcg002A.toMap());
}
EiInfo outInfo = super.query(inInfo, HPCG002A.QUERY, new HPCG002A());
EiBlock outBlock = outInfo.getBlock(EiConstant.resultBlock);
Integer num = 0;
for (int i = 0; i < outBlock.getRowCount(); i++) {
Map<?, ?> map = outBlock.getRow(i);
hpcg002A.fromMap(map);
if(hpcg002A.getProApplyStatus()==1){
num = num+1;
}
DaoUtils.update(HPCG002A.CHECK, hpcg002A.toMap());
}
if(num==outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=2){
hpcg002.setProPlanStatus(2);
DaoUtils.update(HPCG002.CHECK, hpcg002.toMap());
}else if(num!=outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=1){
hpcg002.setProPlanStatus(1);
DaoUtils.update(HPCG002.CHECK, hpcg002.toMap());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("提交失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("提交失败!", e.getMessage());
return eiInfo;
}
return eiInfo;
}
/**
* @param inInfo
* @return
*/
public List<String> getFactoryCode(EiInfo inInfo) {
List<String> factorycodes = new ArrayList();
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "userId", UserSessionUtils.getUserId());
inInfo = super.query(inInfo, HPXS006.QUERYFACTORY);
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List rows = new ArrayList();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
String factory = (String) map.get("factoryCode");
factorycodes.add(factory);
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询组失败");
}
return factorycodes;
}
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-04-26 17:16:55 Generate time : 2024-04-26 16:24:58
Version : 1.0 Version : 1.0
schema : hpjx schema : hpjx
tableName : T_HPCG002 tableName : T_HPCG002
...@@ -21,34 +21,22 @@ ...@@ -21,34 +21,22 @@
--> -->
<sqlMap namespace="HPCG002"> <sqlMap namespace="HPCG002">
<sql id="condition"> <sql id="authCondition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="depCode">
ID = #id# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
</isNotEmpty> </isNotEmpty>
...@@ -64,12 +52,6 @@ ...@@ -64,12 +52,6 @@
<isNotEmpty prepend=" AND " property="proPlanStatus"> <isNotEmpty prepend=" AND " property="proPlanStatus">
PRO_PLAN_STATUS = #proPlanStatus# PRO_PLAN_STATUS = #proPlanStatus#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
PRO_PLAN_DATE &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
PRO_PLAN_DATE &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -91,6 +73,7 @@ ...@@ -91,6 +73,7 @@
PRO_PLAN_STATUS as "proPlanStatus" <!-- 提交状态 0-未提交 1-部分提交 2-全部提交 --> PRO_PLAN_STATUS as "proPlanStatus" <!-- 提交状态 0-未提交 1-部分提交 2-全部提交 -->
FROM ${hpjxSchema}.T_HPCG002 WHERE 1=1 FROM ${hpjxSchema}.T_HPCG002 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -104,7 +87,8 @@ ...@@ -104,7 +87,8 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCG002 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCG002 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
...@@ -196,4 +180,12 @@ ...@@ -196,4 +180,12 @@
ID = #id# ID = #id#
</update> </update>
<update id="check">
UPDATE ${hpjxSchema}.T_HPCG002
SET
PRO_PLAN_STATUS = #proPlanStatus# <!-- 提交状态 0-未提交 1-部分提交 2-全部提交 -->
WHERE
ID = #id#
</update>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-04-26 17:16:55 Generate time : 2024-04-26 16:57:22
Version : 1.0 Version : 1.0
schema : hpjx schema : hpjx
tableName : T_HPCG002A tableName : T_HPCG002A
...@@ -38,142 +38,123 @@ ...@@ -38,142 +38,123 @@
<sql id="authCondition"> <sql id="authCondition">
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# A.DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes"> <isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate> A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="condition"> <sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# A.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# A.DELETE_FLAG = #deleteFlag#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode"> <isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode# A.CUST_CODE = #custCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyDate"> <isNotEmpty prepend=" AND " property="proApplyDate">
PRO_APPLY_DATE = #proApplyDate# A.PRO_APPLY_DATE = #proApplyDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyNo"> <isNotEmpty prepend=" AND " property="proApplyNo">
PRO_APPLY_NO = #proApplyNo# A.PRO_APPLY_NO = #proApplyNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode"> <isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode# A.WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName# A.WH_NAME = #whName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType"> <isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType# A.INVENT_TYPE = #inventType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode"> <isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode# A.INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# A.INVENT_NAME = #inventName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId"> <isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId# A.INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyAmount">
APPLY_AMOUNT = #applyAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyUnitWeight">
APPLY_UNIT_WEIGHT = #applyUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyWeight">
APPLY_WEIGHT = #applyWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planAmount">
PLAN_AMOUNT = #planAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planWeight">
PLAN_WEIGHT = #planWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus"> <isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus# A.PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode"> <isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode# A.FACTORY_CODE = #factoryCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName# A.FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId# A.PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.cg.domain.HPCG002A"> resultClass="com.baosight.hpjx.hp.cg.domain.HPCG002A">
SELECT SELECT
ID as "id", <!-- ID --> A.ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 --> A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> A.DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 --> A.CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 --> A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 --> A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 --> A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 --> A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 --> A.DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
CUST_CODE as "custCode", <!-- 供应商编码 --> A.CUST_CODE as "custCode", <!-- 供应商编码 -->
PRO_APPLY_DATE as "proApplyDate", <!-- 采购申请日期 --> A.PRO_APPLY_DATE as "proApplyDate", <!-- 采购申请日期 -->
PRO_APPLY_NO as "proApplyNo", <!-- 采购申请单号 --> A.PRO_APPLY_NO as "proApplyNo", <!-- 采购申请单号 -->
WH_CODE as "whCode", <!-- 仓库编码 --> A.WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 --> A.WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> A.INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 --> A.INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> A.INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> A.INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
APPLY_AMOUNT as "applyAmount", <!-- 申请数量 --> D.SPEC as "spec", <!-- 规格 -->
APPLY_UNIT_WEIGHT as "applyUnitWeight", <!-- 申请单重 --> D.LENGTH as "length", <!-- 长 -->
APPLY_WEIGHT as "applyWeight", <!-- 重量 --> D.WIDTH as "width", <!-- 宽 -->
PLAN_AMOUNT as "planAmount", <!-- 计划数量 --> D.THICK as "thick", <!-- 厚 -->
PLAN_WEIGHT as "planWeight", <!-- 计划重量 --> D.MATERIAL as "material", <!-- 材质 -->
REMARK as "remark", <!-- 备注 --> D.COEFFICIENT as "coefficient", <!-- 系数 -->
PRO_APPLY_STATUS as "proApplyStatus", <!-- 提交状态 0-未提交 1-已提交 --> D.UNIT as "unit", <!-- 单位 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> A.APPLY_AMOUNT as "applyAmount", <!-- 申请数量 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 --> A.APPLY_UNIT_WEIGHT as "applyUnitWeight", <!-- 申请单重 -->
PARENT_ID as "parentId" <!-- 父级ID --> A.APPLY_WEIGHT as "applyWeight", <!-- 重量 -->
FROM ${hpjxSchema}.T_HPCG002A WHERE 1=1 A.REMARK as "remark", <!-- 备注 -->
<include refid="condition" /> A.PRO_APPLY_STATUS as "proApplyStatus", <!-- 提交状态 0-未提交 1-已提交 -->
A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
A.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
A.PARENT_ID as "parentId", <!-- 父级ID -->
ifnull(B.AMOUNT,0) as "invAmount", <!-- 库存数量 -->
ifnull(B.WEIGHT,0) as "invWeight", <!-- 库存重量 -->
case when A.APPLY_AMOUNT > ifnull(B.AMOUNT,0)
then A.APPLY_AMOUNT - ifnull(B.AMOUNT,0)
else A.APPLY_AMOUNT end as "planAmount", <!-- 计划数量 -->
case when A.PLAN_WEIGHT != 0 then A.PLAN_WEIGHT
when A.PLAN_WEIGHT != 0 and A.APPLY_AMOUNT > ifnull(B.AMOUNT,0)
then (A.APPLY_AMOUNT - ifnull(B.AMOUNT,0))*A.APPLY_UNIT_WEIGHT
else A.APPLY_WEIGHT end as "planWeight", <!-- 计划重量 -->
C.PRO_PLAN_STATUS as "proPlanStatus" <!-- 采购计划提交状态 0-未提交 1-部分提交 2-全部提交 -->
FROM ${hpjxSchema}.T_HPCG002A A
LEFT JOIN ${hpjxSchema}.T_HPKC010 B ON A.WH_CODE = B.WH_CODE AND A.INVENT_CODE = B.INVENT_CODE AND A.INVENT_RECORD_ID = B.INVENT_RECORD_ID
LEFT JOIN ${hpjxSchema}.T_HPCG002 C ON C.ID = A.PARENT_ID
LEFT JOIN ${hpjxSchema}.T_HPPZ006 D ON D.ID = A.INVENT_RECORD_ID
WHERE 1=1
<include refid="condition" />
<include refid="authCondition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -181,7 +162,8 @@ ...@@ -181,7 +162,8 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCG002A WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCG002A WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" />
</select> </select>
<!-- <!--
...@@ -276,36 +258,36 @@ ...@@ -276,36 +258,36 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCG002A (ID, <!-- ID --> INSERT INTO ${hpjxSchema}.T_HPCG002A (ID, <!-- ID -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 --> UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 --> UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 --> UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 --> DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
CUST_CODE, <!-- 供应商编码 --> CUST_CODE, <!-- 供应商编码 -->
PRO_APPLY_DATE, <!-- 采购申请日期 --> PRO_APPLY_DATE, <!-- 采购申请日期 -->
PRO_APPLY_NO, <!-- 采购申请单号 --> PRO_APPLY_NO, <!-- 采购申请单号 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 --> WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 --> INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 --> INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID --> INVENT_RECORD_ID, <!-- 存货档案ID -->
APPLY_AMOUNT, <!-- 申请数量 --> APPLY_AMOUNT, <!-- 申请数量 -->
APPLY_UNIT_WEIGHT, <!-- 申请单重 --> APPLY_UNIT_WEIGHT, <!-- 申请单重 -->
APPLY_WEIGHT, <!-- 重量 --> APPLY_WEIGHT, <!-- 重量 -->
PLAN_AMOUNT, <!-- 计划数量 --> PLAN_AMOUNT, <!-- 计划数量 -->
PLAN_WEIGHT, <!-- 计划重量 --> PLAN_WEIGHT, <!-- 计划重量 -->
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
PRO_APPLY_STATUS, <!-- 提交状态 0-未提交 1-已提交 --> PRO_APPLY_STATUS, <!-- 提交状态 0-未提交 1-已提交 -->
FACTORY_CODE, <!-- 厂区编码 --> FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 --> FACTORY_NAME, <!-- 厂区名称 -->
PARENT_ID <!-- 父级ID --> PARENT_ID <!-- 父级ID -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #custCode#, #proApplyDate#, #proApplyNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #applyAmount#, #applyUnitWeight#, #applyWeight#, #planAmount#, #planWeight#, #remark#, #proApplyStatus#, #factoryCode#, #factoryName#, #parentId#) VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #custCode#, #proApplyDate#, #proApplyNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #applyAmount#, #applyUnitWeight#, #applyWeight#, #planAmount#, #planWeight#, #remark#, #proApplyStatus#, #factoryCode#, #factoryName#, #parentId#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -316,36 +298,44 @@ ...@@ -316,36 +298,44 @@
<update id="update"> <update id="update">
UPDATE ${hpjxSchema}.T_HPCG002A UPDATE ${hpjxSchema}.T_HPCG002A
SET SET
COMPANY_CODE = #companyCode#, <!-- 公司编码 --> COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 --> CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 --> UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 --> UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
CUST_CODE = #custCode#, <!-- 供应商编码 --> CUST_CODE = #custCode#, <!-- 供应商编码 -->
PRO_APPLY_DATE = #proApplyDate#, <!-- 采购申请日期 --> PRO_APPLY_DATE = #proApplyDate#, <!-- 采购申请日期 -->
PRO_APPLY_NO = #proApplyNo#, <!-- 采购申请单号 --> PRO_APPLY_NO = #proApplyNo#, <!-- 采购申请单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 --> WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 --> WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 --> INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 --> INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 --> INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID --> INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
APPLY_AMOUNT = #applyAmount#, <!-- 申请数量 --> APPLY_AMOUNT = #applyAmount#, <!-- 申请数量 -->
APPLY_UNIT_WEIGHT = #applyUnitWeight#, <!-- 申请单重 --> APPLY_UNIT_WEIGHT = #applyUnitWeight#, <!-- 申请单重 -->
APPLY_WEIGHT = #applyWeight#, <!-- 重量 --> APPLY_WEIGHT = #applyWeight#, <!-- 重量 -->
PLAN_AMOUNT = #planAmount#, <!-- 计划数量 --> PLAN_AMOUNT = #planAmount#, <!-- 计划数量 -->
PLAN_WEIGHT = #planWeight#, <!-- 计划重量 --> PLAN_WEIGHT = #planWeight#, <!-- 计划重量 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
PRO_APPLY_STATUS = #proApplyStatus#, <!-- 提交状态 0-未提交 1-已提交 --> PRO_APPLY_STATUS = #proApplyStatus#, <!-- 提交状态 0-未提交 1-已提交 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
PARENT_ID = #parentId# <!-- 父级ID --> PARENT_ID = #parentId# <!-- 父级ID -->
WHERE WHERE
ID = #id# ID = #id#
</update>
<update id="check">
UPDATE ${hpjxSchema}.T_HPCG002A
SET
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update> </update>
</sqlMap> </sqlMap>
...@@ -233,6 +233,12 @@ ...@@ -233,6 +233,12 @@
SELECT NODE_ENAME as "memberId",TREE_ENAME as "parentId" FROM ${platSchema}.TEDPI10 WHERE NODE_ENAME = #memberId# SELECT NODE_ENAME as "memberId",TREE_ENAME as "parentId" FROM ${platSchema}.TEDPI10 WHERE NODE_ENAME = #memberId#
</select> </select>
<!-- 更新图片地址 -->
<update id="updateImage">
UPDATE ${platSchema}.TEDPI10
SET NODE_IMAGE_PATH = #nodeImagePath#
WHERE 1=1
AND NODE_ENAME = #nodeEname#
</update>
</sqlMap> </sqlMap>
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
package com.baosight.iplat4j.ef.service; package com.baosight.iplat4j.ef.service;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils; import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -15,6 +18,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase; ...@@ -15,6 +18,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager; import com.baosight.iplat4j.core.service.soa.XServiceManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -61,4 +65,27 @@ public class ServiceEF0000 extends ServiceEPBase { ...@@ -61,4 +65,27 @@ public class ServiceEF0000 extends ServiceEPBase {
return outInfo; return outInfo;
} }
/**
* 上传图标
*
* @param inInfo
* @return
*/
public EiInfo uploadIcon(EiInfo inInfo) {
try {
String nodeEname = inInfo.getString("nodeEname");
String docId = inInfo.getString("docId");
AssertUtils.isEmpty(nodeEname, "请选择菜单");
AssertUtils.isEmpty(docId, "请上传图标");
Map updateMap = new HashMap();
updateMap.put("nodeEname", nodeEname);
updateMap.put("nodeImagePath", docId);
dao.update("EDPI10.updateImage", updateMap);
inInfo.setMsg("上传图标成功");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "上传图标失败");
}
return inInfo;
}
} }
...@@ -75,6 +75,8 @@ $(function () { ...@@ -75,6 +75,8 @@ $(function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
$("#UPLOAD_ICON").on("click", uploadIcon);
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
loadComplete:function (e){ loadComplete:function (e){
...@@ -128,3 +130,46 @@ $(function () { ...@@ -128,3 +130,46 @@ $(function () {
} }
}); });
/**
* 上传图标
*/
let uploadIcon = function () {
let rows = resultGrid.getCheckedRows()
if (rows.length != 1) {
message("请选择一条菜单数据");
return;
}
JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>图标上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let rows = resultGrid.getCheckedRows();
let inEiInfo = new EiInfo();
inEiInfo.set("nodeEname", rows[0]['node_ename']);
inEiInfo.set("docId", docId);
EiCommunicator.send('EF0000', 'uploadIcon', inEiInfo, {
onSuccess(res) {
message(res.msg);
if (res.status > -1) {
resultGrid.dataSource.page(1);
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
...@@ -2,10 +2,33 @@ $(function () { ...@@ -2,10 +2,33 @@ $(function () {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump(' + item.id + ')" >计划详情</a>';
return template;
}
}
],
}
}); });
let query = function () { resultGrid.dataSource.page(1);} let query = function () { resultGrid.dataSource.page(1);}
function jump(id) {
var herf = ctx + "\\web\\" + "HPCG002A?inqu_status-0-parentId=" + id + "&efParentFormEname=HPCG002";
window.open(herf);
}
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="采购计划"> <EF:EFPage title="采购计划">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
...@@ -23,12 +25,11 @@ ...@@ -23,12 +25,11 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="proPlanStatus" cname="提交状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcg.proPlanStatus"/>
</EF:EFSelect>
</div> </div>
<EF:EFSelect blockId="inqu_status" row="0" ename="proPlanStatus" cname="提交状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpxs.repStatus"/>
</EF:EFSelect>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
...@@ -43,8 +44,8 @@ ...@@ -43,8 +44,8 @@
readonly="true"> readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="repStatus" cname="维修状态" width="80" align="center" readonly="true" required="true" defaultValue="0"> <EF:EFComboColumn ename="proPlanStatus" cname="提交状态" width="80" align="center" readonly="true" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpxs.repStatus"/> <EF:EFCodeOption codeName="hpjx.hpcg.proPlanStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<%-- <EF:EFColumn cname="创建人" ename="createdName" align="center" width="150" readonly="true" required="false" enable="false"/> <%-- <EF:EFColumn cname="创建人" ename="createdName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime" <EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
......
let whNameGlobalData = [];
let inventNameGlobalData = [];
let inventAllGlobalData = [];
$(function () { $(function () {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
...@@ -11,18 +14,19 @@ $(function () { ...@@ -11,18 +14,19 @@ $(function () {
columns: [{ columns: [{
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let auditStatus = item.repStatus; let auditStatus = item.proApplyStatus;
let template = ''; let template = '';
if (auditStatus) { if (auditStatus) {
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >审核</a>'; 'onclick="check(' + item.id + ',1, \''+ item.custCode + '\',\''+ item.parentId + '\',\''+ item.proPlanStatus + '\')" >提交</a>';
} }
} }
return template; return template;
} }
}], }],
loadComplete: function(grid) { loadComplete: function (grid) {
}, },
onSave: function (e) { onSave: function (e) {
...@@ -45,19 +49,43 @@ $(function () { ...@@ -45,19 +49,43 @@ $(function () {
} }
} }
downKeyUp(); downKeyUp();
// 规格
initSpec();
}); });
let query = function () { resultGrid.dataSource.page(1);} let query = function () { resultGrid.dataSource.page(1);}
/**
* 初始化规格
*/
let initSpec = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HPPZ006", "queryComboBoxAll", inInfo, {
onSuccess: function (ei) {
inventAllGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
}
function check(id, auditStatus) { function check(id, auditStatus,custCode,parentid,proPlanStatus) {
if (isBlank(custCode)) {
message("行供应商不能为空");
return;
}
const inEiInfo = new EiInfo(); const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id); inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-repStatus", auditStatus); inEiInfo.set("result-0-parentId", parentid);
EiCommunicator.send('HPXS006', 'check', inEiInfo, { inEiInfo.set("result-0-proApplyStatus", auditStatus);
inEiInfo.set("result-0-proPlanStatus", proPlanStatus);
EiCommunicator.send('HPCG002A', 'check', inEiInfo, {
onSuccess(response) { onSuccess(response) {
//NotificationUtil(response.msg); //NotificationUtil(response.msg);
message("审核成功"); message("提交成功");
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}, },
onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
...@@ -94,30 +122,26 @@ function save() { ...@@ -94,30 +122,26 @@ function save() {
return; return;
} }
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
if (rows[i]['repStatus']==1) { if (rows[i]['proApplyStatus']==1) {
message("勾选的第" + (i + 1) + "行已维修不允许修改!"); message("勾选的第" + (i + 1) + "行已提交不允许修改!");
return; return;
} }
if (isBlank(rows[i]['repDate'])) { if (isBlank(rows[i]['custCode'])) {
message("勾选的第" + (i + 1) + "行维修日期不能为空"); message("勾选的第" + (i + 1) + "行供应商不能为空");
return; return;
} }
if (isBlank(rows[i]['repCustomId'])) { if (!isPositiveInteger(rows[i]['planAmount'])) {
message("勾选的第" + (i + 1) + "行客户名称不能为空"); message("勾选的第" + (index + 1) + "行\"计划数量\"必须是大于0的整数");
return; return;
} }
if (isBlank(rows[i]['repUserId'])) { if(!isPositiveNumber(rows[i]['planWeight'])){
message("勾选的第" + (i + 1) + "行维修人员不能为空"); message("选中的第"+(index+1)+"行\"计划重量\"必须是大于0的数");
return; return ;
}
if (isBlank(rows[i]['repStatus'])) {
message("勾选的第" + (i + 1) + "行维修状态不能为空");
return;
} }
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作?", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作?", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HPXS006", "save", true); JSUtils.submitGridsData("result", "HPCG002A", "save", true);
} }
}) })
} }
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="采购申请单号" ename="inqu_status-0-proApplyNo" colWidth="3"/> <EF:EFInput cname="采购申请单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect cname="供应商名称" ename="inqu_status-0-repCustomId" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -26,15 +30,15 @@ ...@@ -26,15 +30,15 @@
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true" <EF:EFComboColumn ename="custCode" cname="供应商名称" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField" blockName="supplier_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="proApplyDate" cname="采购申请单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="proApplyNo" cname="采购申请单号" enable="false" width="140" align="center" readonly="true"/>
<EF:EFColumn ename="proApplyDate" cname="采购申请日期" width="100" align="center" editType="date" readonly="false" <EF:EFColumn ename="proApplyDate" cname="采购申请日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" />
<EF:EFComboColumn ename="factoryCode" required="true" cname="厂区" width="110" align="center" defaultValue="" <EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue=""
filter="contains" readonly="true"> filter="contains" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
...@@ -42,9 +46,9 @@ ...@@ -42,9 +46,9 @@
readonly="true"> readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/> <EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="150" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="150" align="center" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/> <EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/> <EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="length" cname="长(MM)" width="80" align="right" format="{0:N3}" readonly="true"/> <EF:EFColumn ename="length" cname="长(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
...@@ -54,16 +58,17 @@ ...@@ -54,16 +58,17 @@
<EF:EFColumn ename="material" cname="材质" width="80" align="center" readonly="true"/> <EF:EFColumn ename="material" cname="材质" width="80" align="center" readonly="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" align="center" readonly="true"/> <EF:EFColumn ename="unit" cname="单位" width="80" align="center" readonly="true"/>
<EF:EFColumn ename="applyAmount" cname="申请数量" format="{0:N0}" maxLength="20" width="100" align="right" <EF:EFColumn ename="applyAmount" cname="申请数量" format="{0:N0}" maxLength="20" width="100" align="right"
required="true" readonly="true"/> readonly="true"/>
<EF:EFColumn ename="applyWeight" cname="申请重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="applyWeight" cname="申请重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="applyAmount" cname="现有库存数量" format="{0:N0}" maxLength="20" width="100" align="right" <EF:EFColumn ename="invAmount" cname="现有库存数量" format="{0:N0}" maxLength="20" width="100" align="right"
required="true" readonly="true"/> readonly="true"/>
<EF:EFColumn ename="applyWeight" cname="现有库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="invWeight" cname="现有库存重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="planAmount" cname="计划数量" format="{0:N0}" maxLength="20" width="100" align="right" <EF:EFColumn ename="planAmount" cname="计划数量" format="{0:N0}" maxLength="20" width="100" align="right"
required="true" readonly="true"/> enable="false"/>
<EF:EFColumn ename="planWeight" cname="计划重量(T)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="planWeight" cname="计划重量(T)" width="120" align="right" format="{0:N3}"
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" readonly="true" required="true" defaultValue="0"> required="true"/>
<EF:EFCodeOption codeName="hpjx.hpxs.repStatus"/> <EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" readonly="true" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<%-- <EF:EFColumn cname="创建人" ename="createdName" align="center" width="150" readonly="true" required="false" enable="false"/> <%-- <EF:EFColumn cname="创建人" ename="createdName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime" <EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment