Commit d88e7415 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents 41d649a9 9398df0b
...@@ -56,8 +56,16 @@ public enum DdynamicEnum { ...@@ -56,8 +56,16 @@ public enum DdynamicEnum {
* 编写:wwl * 编写:wwl
*/ */
INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "HPPZ006.queryComboBoxAll"), INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "HPPZ006.queryComboBoxAll"),
/** /**
* 模块:存货档案产品名称
* 用途:存货档案产品名称下拉框
* 编写:wwl
*/
INVENT_PRDT_NAME_BLOCK_ID("invent_prdt_name_block_id","id","inventCode","inventName","HPPZ006.queryPrdtComboBoxAll"),
/**
* 模块:存货档案(规格) * 模块:存货档案(规格)
* 用途:存货档案下拉框 * 用途:存货档案下拉框
* 编写:wwl * 编写:wwl
......
...@@ -180,7 +180,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -180,7 +180,7 @@ public class ServiceHPKC003 extends ServiceBase {
public HPSC004 synchronousPlan(HPKC003 hpkc003) { public HPSC004 synchronousPlan(HPKC003 hpkc003) {
HPSC004 hpsc004 = (HPSC004) this.dao.get("HPSC004.queryDetail","productionOrderNo",hpkc003.getProductionOrderNo()); HPSC004 hpsc004 = (HPSC004) this.dao.get("HPSC004.queryDetail","productionOrderNo",hpkc003.getProductionOrderNo());
if (hpsc004 != null) { if (hpsc004 != null) {
BigDecimal actualCompletionNum = hpkc003.getAmount().add(hpsc004.getNum()); BigDecimal actualCompletionNum = hpkc003.getAmount().add(hpsc004.getActualCompletionNum());
BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(hpsc004.getActualCompletionUnitWt()); BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(hpsc004.getActualCompletionUnitWt());
hpsc004.setActualCompletionNum(actualCompletionNum); hpsc004.setActualCompletionNum(actualCompletionNum);
hpsc004.setActualCompletionUnitWt(actualCompletionUnitWt); hpsc004.setActualCompletionUnitWt(actualCompletionUnitWt);
......
...@@ -223,5 +223,21 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -223,5 +223,21 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/**
* 下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryPrdtComboBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_PRDT_NAME_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
} }
...@@ -209,4 +209,18 @@ ...@@ -209,4 +209,18 @@
ORDER BY ID ORDER BY ID
</select> </select>
<!-- 存货档案产品下拉框 -->
<select id="queryPrdtComboBoxAll" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
ID AS "id",
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz006
WHERE DELETE_FLAG = 0
AND STATUS = 1
AND IFNULL(SPEC,'') = ''
<include refid="condition"/>
<include refid="customCondition"/>
ORDER BY ID
</select>
</sqlMap> </sqlMap>
...@@ -27,7 +27,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -27,7 +27,7 @@ public class HPSC002 extends DaoEPBase {
private String deptCode = " "; /* 部门编码 预留*/ private String deptCode = " "; /* 部门编码 预留*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String parentPrdtCode = " "; /* 父节点-产品编码*/ private String parentId = ""; /* 父节点-产品编码*/
private String parentPrdtName = " "; /* 父节点-产品名称*/ private String parentPrdtName = " "; /* 父节点-产品名称*/
private String type = " "; /* 类别*/ private String type = " "; /* 类别*/
private String leaf = "1"; /* 是否有叶子节点*/ private String leaf = "1"; /* 是否有叶子节点*/
...@@ -36,6 +36,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -36,6 +36,7 @@ public class HPSC002 extends DaoEPBase {
private Integer prdtType = 0; /*产品类型*/ private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/ private BigDecimal num = new BigDecimal(0.000); /* 数量*/
private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/ private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/ private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/
...@@ -79,7 +80,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -79,7 +80,7 @@ public class HPSC002 extends DaoEPBase {
eiColumn.setDescName("项目名称"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("parentPrdtCode"); eiColumn = new EiColumn("parentId");
eiColumn.setDescName("父节点-产品编码"); eiColumn.setDescName("父节点-产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -115,6 +116,10 @@ public class HPSC002 extends DaoEPBase { ...@@ -115,6 +116,10 @@ public class HPSC002 extends DaoEPBase {
eiColumn.setDescName("产品名称"); eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventRecordId");
eiColumn.setDescName("存货档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("num"); eiColumn = new EiColumn("num");
eiColumn.setDescName("数量"); eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -267,18 +272,18 @@ public class HPSC002 extends DaoEPBase { ...@@ -267,18 +272,18 @@ public class HPSC002 extends DaoEPBase {
} }
/** /**
* get the parentPrdtCode - 父节点-产品编码 * get the parentId - 父节点-产品编码
* @return the parentPrdtCode * @return the parentId
*/ */
public String getParentPrdtCode() { public String getParentId() {
return this.parentPrdtCode; return this.parentId;
} }
/** /**
* set the parentPrdtCode - 父节点-产品编码 * set the parentId - 父节点-产品编码
*/ */
public void setParentPrdtCode(String parentPrdtCode) { public void setParentId(String parentId) {
this.parentPrdtCode = parentPrdtCode; this.parentId = parentId;
} }
/** /**
...@@ -400,8 +405,23 @@ public class HPSC002 extends DaoEPBase { ...@@ -400,8 +405,23 @@ public class HPSC002 extends DaoEPBase {
public void setPrdtName(String prdtName) { public void setPrdtName(String prdtName) {
this.prdtName = prdtName; this.prdtName = prdtName;
} }
/**
* get the inventRecordId - 存货档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/** /**
* set the inventRecordId - 存货档案ID.
*
* @param inventRecordId - 存货档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the num - 数量 * get the num - 数量
* @return the num * @return the num
*/ */
...@@ -636,7 +656,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -636,7 +656,7 @@ public class HPSC002 extends DaoEPBase {
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("deptCode")), deptCode)); setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("deptCode")), deptCode));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projCode")), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projCode")), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projName")), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projName")), projName));
setParentPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("parentPrdtCode")), parentPrdtCode)); setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("parentId")), parentId));
setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("parentPrdtName")), parentPrdtName)); setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("parentPrdtName")), parentPrdtName));
setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("type")), type)); setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("type")), type));
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("leaf")), leaf)); setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("leaf")), leaf));
...@@ -645,6 +665,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -645,6 +665,7 @@ public class HPSC002 extends DaoEPBase {
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get("prdtType")), prdtType)); setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get("prdtType")), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode)); setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get("inventRecordId")), inventRecordId));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num)); setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("unitWt")), unitWt)); setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("unitWt")), unitWt));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("totalWt")), totalWt)); setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("totalWt")), totalWt));
...@@ -673,7 +694,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -673,7 +694,7 @@ public class HPSC002 extends DaoEPBase {
map.put("deptCode", StringUtils.toString(deptCode, eiMetadata.getMeta("deptCode"))); map.put("deptCode", StringUtils.toString(deptCode, eiMetadata.getMeta("deptCode")));
map.put("projCode", StringUtils.toString(projCode, eiMetadata.getMeta("projCode"))); map.put("projCode", StringUtils.toString(projCode, eiMetadata.getMeta("projCode")));
map.put("projName", StringUtils.toString(projName, eiMetadata.getMeta("projName"))); map.put("projName", StringUtils.toString(projName, eiMetadata.getMeta("projName")));
map.put("parentPrdtCode", StringUtils.toString(parentPrdtCode, eiMetadata.getMeta("parentPrdtCode"))); map.put("parentId", StringUtils.toString(parentId, eiMetadata.getMeta("parentId")));
map.put("parentPrdtName", StringUtils.toString(parentPrdtName, eiMetadata.getMeta("parentPrdtName"))); map.put("parentPrdtName", StringUtils.toString(parentPrdtName, eiMetadata.getMeta("parentPrdtName")));
map.put("type", StringUtils.toString(type, eiMetadata.getMeta("type"))); map.put("type", StringUtils.toString(type, eiMetadata.getMeta("type")));
map.put("leaf", StringUtils.toString(leaf, eiMetadata.getMeta("leaf"))); map.put("leaf", StringUtils.toString(leaf, eiMetadata.getMeta("leaf")));
...@@ -682,6 +703,7 @@ public class HPSC002 extends DaoEPBase { ...@@ -682,6 +703,7 @@ public class HPSC002 extends DaoEPBase {
map.put("prdtType", StringUtils.toString(prdtType, eiMetadata.getMeta("prdtType"))); map.put("prdtType", StringUtils.toString(prdtType, eiMetadata.getMeta("prdtType")));
map.put("prdtCode", StringUtils.toString(prdtCode, eiMetadata.getMeta("prdtCode"))); map.put("prdtCode", StringUtils.toString(prdtCode, eiMetadata.getMeta("prdtCode")));
map.put("prdtName", StringUtils.toString(prdtName, eiMetadata.getMeta("prdtName"))); map.put("prdtName", StringUtils.toString(prdtName, eiMetadata.getMeta("prdtName")));
map.put("inventRecordId", StringUtils.toString(inventRecordId, eiMetadata.getMeta("inventRecordId")));
map.put("num", StringUtils.toString(num, eiMetadata.getMeta("num"))); map.put("num", StringUtils.toString(num, eiMetadata.getMeta("num")));
map.put("unitWt", StringUtils.toString(unitWt, eiMetadata.getMeta("unitWt"))); map.put("unitWt", StringUtils.toString(unitWt, eiMetadata.getMeta("unitWt")));
map.put("totalWt", StringUtils.toString(totalWt, eiMetadata.getMeta("totalWt"))); map.put("totalWt", StringUtils.toString(totalWt, eiMetadata.getMeta("totalWt")));
......
...@@ -40,6 +40,9 @@ public class HPSC003 extends DaoEPBase { ...@@ -40,6 +40,9 @@ public class HPSC003 extends DaoEPBase {
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_SCHEDULE = "schedule"; public static final String FIELD_SCHEDULE = "schedule";
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目类型*/ public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目类型*/
...@@ -57,6 +60,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -57,6 +60,7 @@ public class HPSC003 extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String QUERY = "t_hpsc003.query"; public static final String QUERY = "t_hpsc003.query";
public static final String COUNT = "t_hpsc003.count"; public static final String COUNT = "t_hpsc003.count";
...@@ -84,6 +88,8 @@ public class HPSC003 extends DaoEPBase { ...@@ -84,6 +88,8 @@ public class HPSC003 extends DaoEPBase {
private String schedule = ""; private String schedule = "";
private Long inventRecordId = new Long(0);
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -163,6 +169,10 @@ public class HPSC003 extends DaoEPBase { ...@@ -163,6 +169,10 @@ public class HPSC003 extends DaoEPBase {
eiColumn.setDescName("生产完工进度"); eiColumn.setDescName("生产完工进度");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
} }
...@@ -438,6 +448,23 @@ public class HPSC003 extends DaoEPBase { ...@@ -438,6 +448,23 @@ public class HPSC003 extends DaoEPBase {
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
/**
* get the inventRecordId - 项目档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 项目档案ID.
*
* @param inventRecordId - 项目档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -464,6 +491,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -464,6 +491,7 @@ public class HPSC003 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SCHEDULE)), schedule)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SCHEDULE)), schedule));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
} }
...@@ -492,6 +520,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -492,6 +520,7 @@ public class HPSC003 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
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_SCHEDULE, StringUtils.toString(schedule, eiMetadata.getMeta(FIELD_SCHEDULE))); map.put(FIELD_SCHEDULE, StringUtils.toString(schedule, eiMetadata.getMeta(FIELD_SCHEDULE)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
return map; return map;
} }
......
...@@ -28,7 +28,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -28,7 +28,7 @@ public class HPSC004 extends DaoEPBase {
public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/ public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PARENT_PRDT_CODE = "parentPrdtCode"; /* 父节点-产品编码*/ public static final String FIELD_PARENT_ID = "parentId"; /* 父节点-产品编码*/
public static final String FIELD_PARENT_PRDT_NAME = "parentPrdtName"; /* 父节点-产品名称*/ public static final String FIELD_PARENT_PRDT_NAME = "parentPrdtName"; /* 父节点-产品名称*/
public static final String FIELD_TYPE = "type"; /* 类别*/ public static final String FIELD_TYPE = "type"; /* 类别*/
public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/ public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/
...@@ -58,6 +58,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -58,6 +58,7 @@ public class HPSC004 extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -65,7 +66,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -65,7 +66,7 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目编码*/ public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目编码*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PARENT_PRDT_CODE = "PARENT_PRDT_CODE"; /* 父节点-产品编码*/ public static final String COL_PARENT_ID = "PARENT_ID"; /* 父节点-产品编码*/
public static final String COL_PARENT_PRDT_NAME = "PARENT_PRDT_NAME"; /* 父节点-产品名称*/ public static final String COL_PARENT_PRDT_NAME = "PARENT_PRDT_NAME"; /* 父节点-产品名称*/
public static final String COL_TYPE = "TYPE"; /* 类别*/ public static final String COL_TYPE = "TYPE"; /* 类别*/
public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/ public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/
...@@ -95,6 +96,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -95,6 +96,7 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String QUERY = "t_hpsc004.query"; public static final String QUERY = "t_hpsc004.query";
public static final String COUNT = "t_hpsc004.count"; public static final String COUNT = "t_hpsc004.count";
...@@ -107,7 +109,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -107,7 +109,7 @@ public class HPSC004 extends DaoEPBase {
private String deptCode = " "; /* 部门编码 预留*/ private String deptCode = " "; /* 部门编码 预留*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String parentPrdtCode = " "; /* 父节点-产品编码*/ private String parentId = " "; /* 父节点-产品编码*/
private String parentPrdtName = " "; /* 父节点-产品名称*/ private String parentPrdtName = " "; /* 父节点-产品名称*/
private String type = " "; /* 类别*/ private String type = " "; /* 类别*/
private String leaf = "1"; /* 是否有叶子节点*/ private String leaf = "1"; /* 是否有叶子节点*/
...@@ -137,6 +139,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -137,6 +139,7 @@ public class HPSC004 extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedTime ; /* 更新时间*/ private String updatedTime ; /* 更新时间*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Long inventRecordId = new Long(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -165,7 +168,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -165,7 +168,7 @@ public class HPSC004 extends DaoEPBase {
eiColumn.setDescName("项目名称"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_PRDT_CODE); eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("父节点-产品编码"); eiColumn.setDescName("父节点-产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -294,6 +297,9 @@ public class HPSC004 extends DaoEPBase { ...@@ -294,6 +297,9 @@ public class HPSC004 extends DaoEPBase {
eiColumn.setDescName("备注"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
} }
...@@ -385,20 +391,20 @@ public class HPSC004 extends DaoEPBase { ...@@ -385,20 +391,20 @@ public class HPSC004 extends DaoEPBase {
this.projName = projName; this.projName = projName;
} }
/** /**
* get the parentPrdtCode - 父节点-产品编码. * get the parentId - 父节点-产品编码.
* @return the parentPrdtCode * @return the parentId
*/ */
public String getParentPrdtCode() { public String getParentId() {
return this.parentPrdtCode; return this.parentId;
} }
/** /**
* set the parentPrdtCode - 父节点-产品编码. * set the parentId - 父节点-产品编码.
* *
* @param parentPrdtCode - 父节点-产品编码 * @param parentId - 父节点-产品编码
*/ */
public void setParentPrdtCode(String parentPrdtCode) { public void setParentId(String parentId) {
this.parentPrdtCode = parentPrdtCode; this.parentId = parentId;
} }
/** /**
* get the parentPrdtName - 父节点-产品名称. * get the parentPrdtName - 父节点-产品名称.
...@@ -864,6 +870,23 @@ public class HPSC004 extends DaoEPBase { ...@@ -864,6 +870,23 @@ public class HPSC004 extends DaoEPBase {
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
/**
* get the inventRecordId - 项目档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 项目档案ID.
*
* @param inventRecordId - 项目档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -877,7 +900,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -877,7 +900,7 @@ public class HPSC004 extends DaoEPBase {
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode)); setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setParentPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_PRDT_CODE)), parentPrdtCode)); setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_PRDT_NAME)), parentPrdtName)); setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_PRDT_NAME)), parentPrdtName));
setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TYPE)), type)); setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TYPE)), type));
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf)); setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf));
...@@ -907,6 +930,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -907,6 +930,7 @@ public class HPSC004 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedTime(StringUtils.toString(map.get(FIELD_UPDATED_TIME))); setUpdatedTime(StringUtils.toString(map.get(FIELD_UPDATED_TIME)));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
} }
/** /**
...@@ -921,7 +945,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -921,7 +945,7 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE))); map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PARENT_PRDT_CODE, StringUtils.toString(parentPrdtCode, eiMetadata.getMeta(FIELD_PARENT_PRDT_CODE))); map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_PARENT_PRDT_NAME, StringUtils.toString(parentPrdtName, eiMetadata.getMeta(FIELD_PARENT_PRDT_NAME))); map.put(FIELD_PARENT_PRDT_NAME, StringUtils.toString(parentPrdtName, eiMetadata.getMeta(FIELD_PARENT_PRDT_NAME)));
map.put(FIELD_TYPE, StringUtils.toString(type, eiMetadata.getMeta(FIELD_TYPE))); map.put(FIELD_TYPE, StringUtils.toString(type, eiMetadata.getMeta(FIELD_TYPE)));
map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF))); map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF)));
...@@ -951,6 +975,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -951,6 +975,7 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
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_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
return map; return map;
} }
......
...@@ -47,6 +47,8 @@ public class HPSC005 extends DaoEPBase { ...@@ -47,6 +47,8 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_FILE_PATH3 = "filePath3"; /* 文件地址3*/ public static final String FIELD_FILE_PATH3 = "filePath3"; /* 文件地址3*/
public static final String FIELD_FILE_PATH4 = "filePath4"; /* 文件地址4*/ public static final String FIELD_FILE_PATH4 = "filePath4"; /* 文件地址4*/
public static final String FIELD_FILE_PATH5 = "filePath5"; /* 文件地址5*/ public static final String FIELD_FILE_PATH5 = "filePath5"; /* 文件地址5*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
...@@ -72,6 +74,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -72,6 +74,7 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_FILE_PATH3 = "FILE_PATH3"; /* 文件地址3*/ public static final String COL_FILE_PATH3 = "FILE_PATH3"; /* 文件地址3*/
public static final String COL_FILE_PATH4 = "FILE_PATH4"; /* 文件地址4*/ public static final String COL_FILE_PATH4 = "FILE_PATH4"; /* 文件地址4*/
public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/ public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String QUERY = "t_hpsc005.query"; public static final String QUERY = "t_hpsc005.query";
public static final String COUNT = "t_hpsc005.count"; public static final String COUNT = "t_hpsc005.count";
...@@ -104,6 +107,8 @@ public class HPSC005 extends DaoEPBase { ...@@ -104,6 +107,8 @@ public class HPSC005 extends DaoEPBase {
private String filePath3 = " "; /* 文件地址3*/ private String filePath3 = " "; /* 文件地址3*/
private String filePath4 = " "; /* 文件地址4*/ private String filePath4 = " "; /* 文件地址4*/
private String filePath5 = " "; /* 文件地址5*/ private String filePath5 = " "; /* 文件地址5*/
private Long inventRecordId = new Long(0);
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -213,6 +218,10 @@ public class HPSC005 extends DaoEPBase { ...@@ -213,6 +218,10 @@ public class HPSC005 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_FILE_PATH5); eiColumn = new EiColumn(FIELD_FILE_PATH5);
eiColumn.setDescName("文件地址5"); eiColumn.setDescName("文件地址5");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -624,6 +633,23 @@ public class HPSC005 extends DaoEPBase { ...@@ -624,6 +633,23 @@ public class HPSC005 extends DaoEPBase {
} }
/** /**
* get the inventRecordId - 项目档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 项目档案ID.
*
* @param inventRecordId - 项目档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -656,6 +682,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -656,6 +682,7 @@ public class HPSC005 extends DaoEPBase {
setFilePath3(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH3)), filePath3)); setFilePath3(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH3)), filePath3));
setFilePath4(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH4)), filePath4)); setFilePath4(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH4)), filePath4));
setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH5)), filePath5)); setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH5)), filePath5));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
} }
/** /**
...@@ -690,6 +717,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -690,6 +717,7 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_FILE_PATH3, StringUtils.toString(filePath3, eiMetadata.getMeta(FIELD_FILE_PATH3))); map.put(FIELD_FILE_PATH3, StringUtils.toString(filePath3, eiMetadata.getMeta(FIELD_FILE_PATH3)));
map.put(FIELD_FILE_PATH4, StringUtils.toString(filePath4, eiMetadata.getMeta(FIELD_FILE_PATH4))); map.put(FIELD_FILE_PATH4, StringUtils.toString(filePath4, eiMetadata.getMeta(FIELD_FILE_PATH4)));
map.put(FIELD_FILE_PATH5, StringUtils.toString(filePath5, eiMetadata.getMeta(FIELD_FILE_PATH5))); map.put(FIELD_FILE_PATH5, StringUtils.toString(filePath5, eiMetadata.getMeta(FIELD_FILE_PATH5)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
return map; return map;
} }
......
...@@ -177,7 +177,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -177,7 +177,7 @@ public class ServiceHPSC001 extends ServiceBase {
hpsc002.put("deptCode", hpsc001.getDepCode()); hpsc002.put("deptCode", hpsc001.getDepCode());
hpsc002.put("projCode", hpsc001.getProjCode()); hpsc002.put("projCode", hpsc001.getProjCode());
hpsc002.put("projName", hpsc001.getProjName()); hpsc002.put("projName", hpsc001.getProjName());
hpsc002.put("parentPrdtCode", "root"); //固定写死 hpsc002.put("parentId", "root"); //固定写死
hpsc002.put("parentPrdtName", hpsc001.getProjName()); hpsc002.put("parentPrdtName", hpsc001.getProjName());
hpsc002.put("type", ""); hpsc002.put("type", "");
hpsc002.put("leaf", "0"); hpsc002.put("leaf", "0");
......
...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.kc.domain.HPKC003;
...@@ -19,9 +20,9 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -19,9 +20,9 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.DateUtil; import com.baosight.iplat4j.core.util.DateUtil;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.lang.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
...@@ -82,14 +83,14 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -82,14 +83,14 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal unitWt = hppz002.getUnitWt(); BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(1); hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentPrdtCode().equals("root")) { if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName()); hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
} }
DaoUtils.insert("HPSC002.insert", hppz002.toMap()); DaoUtils.insert("HPSC002.insert", hppz002.toMap());
if (!hppz002.getParentPrdtCode().equals("root")) { if (!hppz002.getParentId().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentPrdtCode())); this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
} }
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -141,7 +142,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -141,7 +142,7 @@ public class ServiceHPSC002 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); hppz002.fromMap(map);
this.dao.delete("HPSC002.delete", hppz002.toMap()); this.dao.delete("HPSC002.delete", hppz002.toMap());
this.checkTreeNodeLeaf(new Long(hppz002.getParentPrdtCode())); this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
//TODO 删除时 修改树结构 //TODO 删除时 修改树结构
this.checkTreeNodeLeaf(new Long(hppz002.getId())); this.checkTreeNodeLeaf(new Long(hppz002.getId()));
} }
...@@ -180,6 +181,9 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -180,6 +181,9 @@ public class ServiceHPSC002 extends ServiceBase {
public EiInfo queryTreeNode(EiInfo inInfo) { public EiInfo queryTreeNode(EiInfo inInfo) {
//1 获取参数 //1 获取参数
String pEname = inInfo.getCellStr(EiConstant.queryBlock, 0, "node"); String pEname = inInfo.getCellStr(EiConstant.queryBlock, 0, "node");
if(StringUtils.equals("$",pEname)){
pEname = "root";
}
Long projId = NumberUtils.toLong(inInfo.get("projId")); Long projId = NumberUtils.toLong(inInfo.get("projId"));
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("pEname", pEname); queryMap.put("pEname", pEname);
...@@ -249,19 +253,19 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -249,19 +253,19 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002.fromMap(map); hppz002.fromMap(map);
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.query","id",hppz002.getId()); HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.query","id",hppz002.getId());
Map map1 = new HashMap(); Map map1 = new HashMap();
map1.put("parentPrdtCode",THPSC002.getParentPrdtCode()); map1.put("parentId",THPSC002.getParentId());
List list = dao.query("HPSC002.checkExamineNum", map1); List list = dao.query("HPSC002.checkExamineNum", map1);
int num = NumberUtils.toint(list.get(0)); int num = NumberUtils.toint(list.get(0));
Map map2 = new HashMap(); Map map2 = new HashMap();
if (num == 0) { if (num == 0) {
map2.put("status",1); map2.put("status",1);
map2.put("id",THPSC002.getParentPrdtCode()); map2.put("id",THPSC002.getParentId());
// 自动生成生产计划 // 自动生成生产计划
this.autoPlanInfo(THPSC002.getParentPrdtCode()); this.autoPlanInfo(THPSC002.getParentId());
} else { } else {
map2.put("status",0); map2.put("status",0);
map2.put("id",THPSC002.getParentPrdtCode()); map2.put("id",THPSC002.getParentId());
} }
DaoUtils.update("HPSC002.check",map2); DaoUtils.update("HPSC002.check",map2);
...@@ -368,7 +372,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -368,7 +372,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setDeptCode(""); HPSC004.setDeptCode("");
HPSC004.setProjCode(HPSC002.getProjCode()); HPSC004.setProjCode(HPSC002.getProjCode());
HPSC004.setProjName(HPSC002.getProjName()); HPSC004.setProjName(HPSC002.getProjName());
HPSC004.setParentPrdtCode(SCJHD); HPSC004.setParentId(SCJHD);
HPSC004.setParentPrdtName(HPSC002.getParentPrdtName()); HPSC004.setParentPrdtName(HPSC002.getParentPrdtName());
HPSC004.setPrdtType(HPSC002.getPrdtType()); HPSC004.setPrdtType(HPSC002.getPrdtType());
HPSC004.setPrdtCode(HPSC002.getPrdtCode()); HPSC004.setPrdtCode(HPSC002.getPrdtCode());
......
...@@ -184,7 +184,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -184,7 +184,7 @@ public class ServiceHPSC003 extends ServiceBase {
DaoUtils.update("HPSC003.update", HPSC003.toMap()); DaoUtils.update("HPSC003.update", HPSC003.toMap());
//生成生产订单 //生成生产订单
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("parentPrdtCode",HPSC003.getPlanInfoNo()); params.put("parentId",HPSC003.getId());
List list = dao.query("HPSC004.queryDetail",params,0,-999999); List list = dao.query("HPSC004.queryDetail",params,0,-999999);
for (int i = 0; i < list.size(); i ++) { for (int i = 0; i < list.size(); i ++) {
HPSC004 HPSC004 = (HPSC004) list.get(i); HPSC004 HPSC004 = (HPSC004) list.get(i);
......
...@@ -123,7 +123,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -123,7 +123,7 @@ public class ServiceHPSC004 extends ServiceBase {
//添加返回到前台的块,块名和前台的对应 //添加返回到前台的块,块名和前台的对应
EiBlock eiBlock = outInfo.addBlock("result"); EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("parentPrdtCode",inInfo.get("parentPrdtCode")); params.put("parentId",inInfo.get("parentId"));
List list = dao.query("HPSC004.queryDetail",params,0,-999999); List list = dao.query("HPSC004.queryDetail",params,0,-999999);
outInfo.addBlock("detail").addBlockMeta(HPSC004.eiMetadata); outInfo.addBlock("detail").addBlockMeta(HPSC004.eiMetadata);
outInfo.addBlock("detail").addRows(list); outInfo.addBlock("detail").addRows(list);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
DEPT_CODE VARCHAR NOT NULL, DEPT_CODE VARCHAR NOT NULL,
PROJ_CODE VARCHAR, PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR, PROJ_NAME VARCHAR,
PARENT_PRDT_CODE VARCHAR, PARENT_ID VARCHAR,
PARENT_PRDT_NAME VARCHAR, PARENT_PRDT_NAME VARCHAR,
TYPE VARCHAR NOT NULL, TYPE VARCHAR NOT NULL,
LEAF VARCHAR NOT NULL, LEAF VARCHAR NOT NULL,
...@@ -43,15 +43,16 @@ ...@@ -43,15 +43,16 @@
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 --> PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 --> TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 --> ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
NUM as "num", <!-- 数量 --> NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 --> UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 --> TOTAL_WT as "totalWt", <!-- 总重 -->
...@@ -68,13 +69,13 @@ ...@@ -68,13 +69,13 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 --> REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE 1=1 FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_PRDT_CODE NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 1 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
...@@ -85,6 +86,9 @@ ...@@ -85,6 +86,9 @@
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%') PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%') PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty> </isNotEmpty>
...@@ -101,13 +105,13 @@ ...@@ -101,13 +105,13 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_PRDT_CODE NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 1 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
...@@ -121,6 +125,9 @@ ...@@ -121,6 +125,9 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%') PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
...@@ -142,8 +149,8 @@ ...@@ -142,8 +149,8 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME = #projName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName"> <isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName# PARENT_PRDT_NAME = #parentPrdtName#
...@@ -219,7 +226,7 @@ ...@@ -219,7 +226,7 @@
DEPT_CODE, <!-- 部门编码 预留 --> DEPT_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PARENT_PRDT_CODE, <!-- 父节点-产品编码 --> PARENT_ID, <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME, <!-- 父节点-产品名称 --> PARENT_PRDT_NAME, <!-- 父节点-产品名称 -->
TYPE, <!-- 类别 --> TYPE, <!-- 类别 -->
LEAF, <!-- 是否有叶子节点 --> LEAF, <!-- 是否有叶子节点 -->
...@@ -228,6 +235,7 @@ ...@@ -228,6 +235,7 @@
PRDT_TYPE, PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID -->
NUM, <!-- 数量 --> NUM, <!-- 数量 -->
UNIT_WT, <!-- 单重 --> UNIT_WT, <!-- 单重 -->
TOTAL_WT, <!-- 总重 --> TOTAL_WT, <!-- 总重 -->
...@@ -244,7 +252,7 @@ ...@@ -244,7 +252,7 @@
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#) VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -259,7 +267,7 @@ ...@@ -259,7 +267,7 @@
DEPT_CODE = #deptCode#, <!-- 部门编码 预留 --> DEPT_CODE = #deptCode#, <!-- 部门编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PARENT_PRDT_CODE = #parentPrdtCode#, <!-- 父节点-产品编码 --> PARENT_ID = #parentId#, <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-产品名称 --> PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-产品名称 -->
TYPE = #type#, <!-- 类别 --> TYPE = #type#, <!-- 类别 -->
LEAF = #leaf#, <!-- 是否有叶子节点 --> LEAF = #leaf#, <!-- 是否有叶子节点 -->
...@@ -267,8 +275,9 @@ ...@@ -267,8 +275,9 @@
ICON = #icon#, <!-- 图片地址 --> ICON = #icon#, <!-- 图片地址 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_TYPE = #prdtType#, PRDT_TYPE = #prdtType#,
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
NUM = #num#, <!-- 数量 --> INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
NUM = #num#, <!-- 数量 -->
UNIT_WT = #unitWt#, <!-- 单重 --> UNIT_WT = #unitWt#, <!-- 单重 -->
TOTAL_WT = #totalWt#, <!-- 总重 --> TOTAL_WT = #totalWt#, <!-- 总重 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 --> FILE_PATH1 = #filePath1#, <!-- 文件地址1 -->
...@@ -298,7 +307,8 @@ ...@@ -298,7 +307,8 @@
PROJ_NAME as "projName",<!-- 项目名称 --> PROJ_NAME as "projName",<!-- 项目名称 -->
ID as "label", <!-- 名产品编码--> ID as "label", <!-- 名产品编码-->
PRDT_NAME as "text", <!-- 产品名称 --> PRDT_NAME as "text", <!-- 产品名称 -->
PARENT_PRDT_CODE as "pId", <!-- 父节点编码 --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
PARENT_ID as "pId", <!-- 父节点编码 -->
TYPE as "type", <!-- 类别 --> TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
...@@ -308,7 +318,7 @@ ...@@ -308,7 +318,7 @@
WHERE WHERE
1=1 1=1
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_PRDT_CODE = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
...@@ -323,7 +333,7 @@ ...@@ -323,7 +333,7 @@
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 --> PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 --> TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
...@@ -332,6 +342,7 @@ ...@@ -332,6 +342,7 @@
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
NUM as "num", <!-- 数量 --> NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 --> UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 --> TOTAL_WT as "totalWt", <!-- 总重 -->
...@@ -347,7 +358,9 @@ ...@@ -347,7 +358,9 @@
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 --> REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE PARENT_PRDT_CODE = #id# FROM hpjx.t_hpsc002
WHERE PARENT_ID = #id#
AND PROJ_CODE = #projCode#
</select> </select>
...@@ -359,7 +372,7 @@ ...@@ -359,7 +372,7 @@
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 --> PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 --> TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
...@@ -368,6 +381,7 @@ ...@@ -368,6 +381,7 @@
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
NUM as "num", <!-- 数量 --> NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 --> UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 --> TOTAL_WT as "totalWt", <!-- 总重 -->
...@@ -383,7 +397,7 @@ ...@@ -383,7 +397,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 --> REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE PARENT_PRDT_CODE = #id# FROM hpjx.t_hpsc002 WHERE PARENT_ID = #id#
</select> </select>
<update id="updateTreeNodeLeaf"> <update id="updateTreeNodeLeaf">
...@@ -402,9 +416,9 @@ ...@@ -402,9 +416,9 @@
<select id="checkExamineNum1" resultClass="int"> <select id="checkExamineNum1" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002 SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1 WHERE 1 = 1
AND PARENT_PRDT_CODE != 'root' AND PARENT_ID != 'root'
AND `STATUS` = 0 AND `STATUS` = 0
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
</select> </select>
...@@ -412,8 +426,8 @@ ...@@ -412,8 +426,8 @@
<select id="checkExamineNum1Count" resultClass="int"> <select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002 SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1 WHERE 1 = 1
AND PARENT_PRDT_CODE != 'root' AND PARENT_ID != 'root'
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
</select> </select>
...@@ -421,9 +435,9 @@ ...@@ -421,9 +435,9 @@
<select id="checkExamineNum" resultClass="int"> <select id="checkExamineNum" resultClass="int">
SELECT COUNT(1) FROM hpjx.t_hpsc002 SELECT COUNT(1) FROM hpjx.t_hpsc002
WHERE LEAF = '1' WHERE LEAF = '1'
AND STATUS = 0 AND DEL_STATUS = 1 AND STATUS = 0 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
</select> </select>
</sqlMap> </sqlMap>
\ No newline at end of file
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 --> PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
...@@ -178,6 +179,7 @@ ...@@ -178,6 +179,7 @@
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PLAN_INFO_NO, <!-- 生产计划单号 --> PLAN_INFO_NO, <!-- 生产计划单号 -->
INVENT_RECORD_ID,
PRDT_TYPE, PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
...@@ -190,7 +192,7 @@ ...@@ -190,7 +192,7 @@
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#) VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
DEPT_CODE VARCHAR NOT NULL, DEPT_CODE VARCHAR NOT NULL,
PROJ_CODE VARCHAR, PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR, PROJ_NAME VARCHAR,
PARENT_PRDT_CODE VARCHAR, PARENT_ID VARCHAR,
PARENT_PRDT_NAME VARCHAR, PARENT_PRDT_NAME VARCHAR,
TYPE VARCHAR NOT NULL, TYPE VARCHAR NOT NULL,
LEAF VARCHAR NOT NULL, LEAF VARCHAR NOT NULL,
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME = #projName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName"> <isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName# PARENT_PRDT_NAME = #parentPrdtName#
...@@ -156,12 +156,13 @@ ...@@ -156,12 +156,13 @@
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 --> PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 --> TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 --> ICON as "icon", <!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
...@@ -219,8 +220,8 @@ ...@@ -219,8 +220,8 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME = #projName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName"> <isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName# PARENT_PRDT_NAME = #parentPrdtName#
...@@ -311,12 +312,13 @@ ...@@ -311,12 +312,13 @@
DEPT_CODE, <!-- 部门编码 预留 --> DEPT_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PARENT_PRDT_CODE, <!-- 父节点-产品编码 --> PARENT_ID, <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME, <!-- 父节点-产品名称 --> PARENT_PRDT_NAME, <!-- 父节点-产品名称 -->
TYPE, <!-- 类别 --> TYPE, <!-- 类别 -->
LEAF, <!-- 是否有叶子节点 --> LEAF, <!-- 是否有叶子节点 -->
SORT, <!-- 排序字段 --> SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 --> ICON, <!-- 图片地址 -->
INVENT_RECORD_ID,
PRDT_TYPE, PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
...@@ -341,7 +343,7 @@ ...@@ -341,7 +343,7 @@
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#) VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#,#inventRecordId#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -356,7 +358,7 @@ ...@@ -356,7 +358,7 @@
DEPT_CODE = #deptCode#, <!-- 部门编码 预留 --> DEPT_CODE = #deptCode#, <!-- 部门编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PARENT_PRDT_CODE = #parentPrdtCode#, <!-- 父节点-产品编码 --> PARENT_ID = #parentId#, <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-产品名称 --> PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-产品名称 -->
TYPE = #type#, <!-- 类别 --> TYPE = #type#, <!-- 类别 -->
LEAF = #leaf#, <!-- 是否有叶子节点 --> LEAF = #leaf#, <!-- 是否有叶子节点 -->
...@@ -409,12 +411,13 @@ ...@@ -409,12 +411,13 @@
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 --> PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 --> TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 --> ICON as "icon", <!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
...@@ -445,7 +448,7 @@ ...@@ -445,7 +448,7 @@
<select id="inspectDetail" resultClass="int"> <select id="inspectDetail" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1 SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
AND PARENT_PRDT_CODE = #id# AND (PLAN_COMMENT_DATE = '' OR PLAN_COMMENT_DATE IS NULL AND PARENT_ID = #id# AND (PLAN_COMMENT_DATE = '' OR PLAN_COMMENT_DATE IS NULL
OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL ) OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL )
</select> </select>
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
...@@ -221,6 +222,7 @@ ...@@ -221,6 +222,7 @@
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 --> PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
INVENT_RECORD_ID,
PRDT_TYPE, PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
...@@ -242,7 +244,7 @@ ...@@ -242,7 +244,7 @@
FILE_PATH4, <!-- 文件地址4 --> FILE_PATH4, <!-- 文件地址4 -->
FILE_PATH5 <!-- 文件地址5 --> FILE_PATH5 <!-- 文件地址5 -->
) )
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#) VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
let inventNameGlobalData = []; var inventNameGlobalData = [];
// 传递参数 将附件ID与当前记录ID进行绑定 // 传递参数 将附件ID与当前记录ID进行绑定
let rowId = ''; // let rowId = '';
let parentPrdtCode = ''; let parentId = '';
let projCode = '';
var strs; var strs;
var url = location.search; //获取url中"?"符后的字串 var url = location.search; //获取url中"?"符后的字串
if (url.indexOf("?") != -1) { //判断是否有参数 if (url.indexOf("?") != -1) { //判断是否有参数
var str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串 var str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串
strs = str.split("="); //用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔) strs = str.split("="); //用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔)
console.log('strs=' + strs) //直接弹出第一个参数 (如果有多个参数 还要进行循环的) // console.log('strs=' + strs) //直接弹出第一个参数 (如果有多个参数 还要进行循环的)
} }
$(function () { $(function () {
IPLATUI.EFTree = { IPLATUI.EFTree = {
"materialTree": { "materialTree": {
ROOT: "root:项目列表", ROOT: "root:项目列表",
/** /**
* 树加载完成后的回调函数 * 树加载完成后的回调函数
* @param options: 树的配置项 * @param options: 树的配置项
...@@ -45,7 +46,7 @@ $(function () { ...@@ -45,7 +46,7 @@ $(function () {
IPLATUI.EFTree.materialTree.selectTreeNode.prdtName = nodeData.prdtName; IPLATUI.EFTree.materialTree.selectTreeNode.prdtName = nodeData.prdtName;
IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName; IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName;
// 重新查询EFGrid // 重新查询EFGrid
parentPrdtCode = nodeData.nodeId; parentId = nodeData.nodeId;
query(); query();
}, },
selectTreeNode: {} selectTreeNode: {}
...@@ -83,7 +84,8 @@ $(function () { ...@@ -83,7 +84,8 @@ $(function () {
ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val()); ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val());
ei.set("inqu_status-0-prdtCode",$("#inqu_status-0-prdtCode").val()); ei.set("inqu_status-0-prdtCode",$("#inqu_status-0-prdtCode").val());
ei.set("inqu_status-0-status",$("#inqu_status-0-status").val()); ei.set("inqu_status-0-status",$("#inqu_status-0-status").val());
ei.set("inqu_status-0-parentPrdtCode",parentPrdtCode? parentPrdtCode : strs[1]); ei.set("inqu_status-0-parentId",parentId? parentId : strs[1]);
// ei.set("inqu_status-0-parentId",-1);
return ei; return ei;
}, },
...@@ -134,7 +136,7 @@ $(function () { ...@@ -134,7 +136,7 @@ $(function () {
$.each(e.items, function (index, item) { $.each(e.items, function (index, item) {
item['projCode'] = selectTreeNode.projCode; item['projCode'] = selectTreeNode.projCode;
item['projName'] = selectTreeNode.projName; item['projName'] = selectTreeNode.projName;
item['parentPrdtCode'] = selectTreeNode.nodeId; item['parentId'] = selectTreeNode.nodeId;
item['parentPrdtName'] = selectTreeNode.prdtName; item['parentPrdtName'] = selectTreeNode.prdtName;
}); });
}, },
...@@ -200,11 +202,11 @@ $(function () { ...@@ -200,11 +202,11 @@ $(function () {
return template; return template;
} }
},{ },{
field: "prdtCode", field: "inventRecordId",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['prdtCode']) { if (inventNameGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventNameGlobalData[i]['textField']; return inventNameGlobalData[i]['textField']+'-'+inventNameGlobalData[i]['param1Field'];
} }
} }
return ""; return "";
...@@ -217,11 +219,12 @@ $(function () { ...@@ -217,11 +219,12 @@ $(function () {
input.attr("id", options.field); input.attr("id", options.field);
input.appendTo(container); input.appendTo(container);
let eiInfo = new EiInfo(); let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["prdtType"]); eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
var dataSource; var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, { EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows(); dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
inventNameGlobalData = dataSource; inventNameGlobalData = dataSource;
}, },
onFail: function (ei) { onFail: function (ei) {
...@@ -230,13 +233,29 @@ $(function () { ...@@ -230,13 +233,29 @@ $(function () {
input.kendoDropDownList({ input.kendoDropDownList({
valuePrimitive: true, valuePrimitive: true,
dataTextField: "textField", dataTextField: "textField",
dataParam1Field: "param1Field",
dataValueField: "valueField", dataValueField: "valueField",
dataSource: dataSource, dataSource: dataSource,
template: "#=textField#" template: "#=textField#-#=param1Field#"
}); });
} }
} }
], ],
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field == "inventRecordId") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === item.inventRecordId) {
resultGrid.setCellValue(item, 'prdtCode', inventNameGlobalData[i]['textField'])
}
}
}
});
}
}, },
}; };
...@@ -251,7 +270,7 @@ $(function () { ...@@ -251,7 +270,7 @@ $(function () {
return; return;
} }
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId); // inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-filePath1", uploadFile); inEiInfo.set("result-0-filePath1", uploadFile);
EiCommunicator.send('HPSC002', 'bindDocIdById', inEiInfo, { EiCommunicator.send('HPSC002', 'bindDocIdById', inEiInfo, {
onSuccess(response) { onSuccess(response) {
...@@ -294,9 +313,10 @@ $(function () { ...@@ -294,9 +313,10 @@ $(function () {
$(window).load(function () { $(window).load(function () {
// 存货名称 // 存货名称
let inInfo = new EiInfo(); let inInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, { inInfo.set("inqu_status-0-inventTypes", [3, 4]);
EiCommunicator.send("HPPZ006", "queryPrdtComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows(); inventNameGlobalData = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
...@@ -313,7 +333,7 @@ let query = function () { ...@@ -313,7 +333,7 @@ let query = function () {
} }
function openUploadFile(id) { function openUploadFile(id) {
uploadFileWindow.open().center(); uploadFileWindow.open().center();
rowId = id; // rowId = id;
} }
/** /**
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="产品名称" filter="contains" required="false" <EF:EFSelect cname="产品名称" ename="inqu_status-0-prdtCode" filter="contains" defultValue="">
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择"> <EF:EFOption label="全部" value=""/>
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3"> <EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
...@@ -49,9 +48,9 @@ ...@@ -49,9 +48,9 @@
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true"> <EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" required="true" cname="产品名称"/> <EF:EFColumn ename="inventRecordId" required="true" cname="产品名称"/>
<%-- <EF:EFColumn ename="prdtName" required="true" cname="产品名称"/>--%> <EF:EFColumn ename="prdtCode" required="true" cname="产品编码" hidden="true"/>
<EF:EFColumn enable="false" ename="parentPrdtCode" hidden="true" cname="上级产品名称"/> <EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/> <EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/> <EF:EFColumn ename="num" required="true" cname="数量"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/> <EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/>
......
...@@ -49,8 +49,8 @@ $(function () { ...@@ -49,8 +49,8 @@ $(function () {
detailGrid.setEiBlock(block); detailGrid.setEiBlock(block);
} }
var info = new EiInfo() var info = new EiInfo()
var planInfoNo = e.model['planInfoNo']; var parentId = e.model['id'];
info.set("parentPrdtCode",planInfoNo); info.set("parentId",parentId);
EiCommunicator.send("HPSC004","queryDetail",info,{ EiCommunicator.send("HPSC004","queryDetail",info,{
onSuccess:function(ei){//返回结果集 onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei); detailGrid.setEiInfo(ei);
......
...@@ -25,6 +25,6 @@ $(function () { ...@@ -25,6 +25,6 @@ $(function () {
}); });
function jump(id) { function jump(id) {
var herf= ctx + "\\web\\"+ "HPSC002?inqu_status-0-parentPrdtCode=" + id; var herf= ctx + "\\web\\"+ "HPSC002?inqu_status-0-projId=" + id;
window.open(herf); window.open(herf);
} }
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