Commit 805b8311 by liuyang

2024-07-05 工序设置添加费用权重

parent abb92179
...@@ -43,6 +43,7 @@ public class HGPZ005A extends DaoEPBase { ...@@ -43,6 +43,7 @@ public class HGPZ005A extends DaoEPBase {
public static final String FIELD_PROCESS_CLASS = "processClass"; /* 工序类别*/ public static final String FIELD_PROCESS_CLASS = "processClass"; /* 工序类别*/
public static final String FIELD_PARENT_ID = "parentId"; /* 上级ID*/ public static final String FIELD_PARENT_ID = "parentId"; /* 上级ID*/
public static final String FIELD_PROCESS_ORDER = "processOrder"; /* 加工顺序*/ public static final String FIELD_PROCESS_ORDER = "processOrder"; /* 加工顺序*/
public static final String FIELD_COST_WEIGHT = "costWeight";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
...@@ -89,6 +90,7 @@ public class HGPZ005A extends DaoEPBase { ...@@ -89,6 +90,7 @@ public class HGPZ005A extends DaoEPBase {
private String processClass = " "; /* 工序分类*/ private String processClass = " "; /* 工序分类*/
private Long parentId = new Long(0); /* 上级ID*/ private Long parentId = new Long(0); /* 上级ID*/
private Long processOrder = new Long(0); /* 加工顺序*/ private Long processOrder = new Long(0); /* 加工顺序*/
private BigDecimal costWeight = new BigDecimal(0.000);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -183,7 +185,12 @@ public class HGPZ005A extends DaoEPBase { ...@@ -183,7 +185,12 @@ public class HGPZ005A extends DaoEPBase {
eiColumn.setDescName("加工顺序"); eiColumn.setDescName("加工顺序");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COST_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("费用权重");
eiMetadata.addMeta(eiColumn);
} }
...@@ -484,6 +491,14 @@ public class HGPZ005A extends DaoEPBase { ...@@ -484,6 +491,14 @@ public class HGPZ005A extends DaoEPBase {
this.processOrder = processOrder; this.processOrder = processOrder;
} }
public BigDecimal getCostWeight() {
return costWeight;
}
public void setCostWeight(BigDecimal costWeight) {
this.costWeight = costWeight;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -512,6 +527,7 @@ public class HGPZ005A extends DaoEPBase { ...@@ -512,6 +527,7 @@ public class HGPZ005A extends DaoEPBase {
setProcessClass(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CLASS)), processClass)); setProcessClass(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CLASS)), processClass));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId)); setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setProcessOrder(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PROCESS_ORDER)), processOrder)); setProcessOrder(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PROCESS_ORDER)), processOrder));
setCostWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COST_WEIGHT)), costWeight));
} }
/** /**
...@@ -541,6 +557,8 @@ public class HGPZ005A extends DaoEPBase { ...@@ -541,6 +557,8 @@ public class HGPZ005A extends DaoEPBase {
map.put(FIELD_PROCESS_CLASS, StringUtils.toString(processClass, eiMetadata.getMeta(FIELD_PROCESS_CLASS))); map.put(FIELD_PROCESS_CLASS, StringUtils.toString(processClass, eiMetadata.getMeta(FIELD_PROCESS_CLASS)));
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_PROCESS_ORDER, StringUtils.toString(processOrder, eiMetadata.getMeta(FIELD_PROCESS_ORDER))); map.put(FIELD_PROCESS_ORDER, StringUtils.toString(processOrder, eiMetadata.getMeta(FIELD_PROCESS_ORDER)));
map.put(FIELD_COST_WEIGHT,StringUtils.toString(costWeight, eiMetadata.getMeta(FIELD_COST_WEIGHT)));
return map; return map;
} }
......
...@@ -400,6 +400,7 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -400,6 +400,7 @@ public class ServiceHGPZ005 extends ServiceBase {
hgpz005A.setComposingCoeff(BigDecimal.ONE); hgpz005A.setComposingCoeff(BigDecimal.ONE);
hgpz005A.setParentId(hppz005.getId()); hgpz005A.setParentId(hppz005.getId());
hgpz005A.setProcessOrder(hgsj002a.getProcessOrder()); hgpz005A.setProcessOrder(hgsj002a.getProcessOrder());
hgpz005A.setCostWeight(hgsj002a.getCostWeight());
DaoUtils.insert(HGPZ005A.INSERT,hgpz005A.toMap()); DaoUtils.insert(HGPZ005A.INSERT,hgpz005A.toMap());
} }
} }
......
...@@ -112,7 +112,8 @@ ...@@ -112,7 +112,8 @@
UNIT_COEFF as "unitCoeff", <!-- 单价系数 --> UNIT_COEFF as "unitCoeff", <!-- 单价系数 -->
PROCESS_CLASS as "processClass", <!-- 工序类别 --> PROCESS_CLASS as "processClass", <!-- 工序类别 -->
PARENT_ID as "parentId", <!-- 上级ID --> PARENT_ID as "parentId", <!-- 上级ID -->
PROCESS_ORDER as "processOrder" PROCESS_ORDER as "processOrder",
COST_WEIGHT as "costWeight" <!-- 费用权重 -->
FROM ${hggpSchema}.HGPZ005A WHERE 1=1 FROM ${hggpSchema}.HGPZ005A WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -202,9 +203,10 @@ ...@@ -202,9 +203,10 @@
UNIT_COEFF, <!-- 单价系数 --> UNIT_COEFF, <!-- 单价系数 -->
PROCESS_CLASS, <!-- 工序类别 --> PROCESS_CLASS, <!-- 工序类别 -->
PARENT_ID, <!-- 上级ID --> PARENT_ID, <!-- 上级ID -->
PROCESS_ORDER PROCESS_ORDER,
COST_WEIGHT
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventCode#, #processCode#, #processName#, #composingCoeff#, #unitCoeff#, #processClass#, #parentId#,#processOrder#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventCode#, #processCode#, #processName#, #composingCoeff#, #unitCoeff#, #processClass#, #parentId#,#processOrder#, #costWeight#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -237,7 +239,8 @@ ...@@ -237,7 +239,8 @@
UNIT_COEFF = #unitCoeff#, <!-- 单价系数 --> UNIT_COEFF = #unitCoeff#, <!-- 单价系数 -->
PROCESS_CLASS = #processClass#, <!-- 工序类别 --> PROCESS_CLASS = #processClass#, <!-- 工序类别 -->
PARENT_ID = #parentId#, <!-- 上级ID --> PARENT_ID = #parentId#, <!-- 上级ID -->
PROCESS_ORDER = #processOrder# PROCESS_ORDER = #processOrder#,
COMPUTE_TYPE = #computeType#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -45,6 +45,7 @@ public class HGSJ001 extends DaoEPBase { ...@@ -45,6 +45,7 @@ public class HGSJ001 extends DaoEPBase {
public static final String FIELD_PRINC_NAME = "princName"; /* 负责人名称*/ public static final String FIELD_PRINC_NAME = "princName"; /* 负责人名称*/
public static final String FIELD_STATUS = "status"; /* 状态0.停止1.启用*/ public static final String FIELD_STATUS = "status"; /* 状态0.停止1.启用*/
public static final String FIELD_COMPUTE_TYPE = "computeType"; /* 计算类型*/ public static final String FIELD_COMPUTE_TYPE = "computeType"; /* 计算类型*/
public static final String FIELD_COST_WEIGHT = "costWeight";
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
...@@ -97,6 +98,7 @@ public class HGSJ001 extends DaoEPBase { ...@@ -97,6 +98,7 @@ public class HGSJ001 extends DaoEPBase {
private String princName = " "; /* 负责人名称*/ private String princName = " "; /* 负责人名称*/
private Integer status = 0; /* 状态0.停止1.启用*/ private Integer status = 0; /* 状态0.停止1.启用*/
private Integer computeType = 0; private Integer computeType = 0;
private BigDecimal costWeight = new BigDecimal(0.000);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -202,6 +204,13 @@ public class HGSJ001 extends DaoEPBase { ...@@ -202,6 +204,13 @@ public class HGSJ001 extends DaoEPBase {
eiColumn.setDescName("计算类型"); eiColumn.setDescName("计算类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COST_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("费用权重");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -549,6 +558,13 @@ public class HGSJ001 extends DaoEPBase { ...@@ -549,6 +558,13 @@ public class HGSJ001 extends DaoEPBase {
this.computeType = computeType; this.computeType = computeType;
} }
public BigDecimal getCostWeight() {
return costWeight;
}
public void setCostWeight(BigDecimal costWeight) {
this.costWeight = costWeight;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -579,6 +595,7 @@ public class HGSJ001 extends DaoEPBase { ...@@ -579,6 +595,7 @@ public class HGSJ001 extends DaoEPBase {
setPrincName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRINC_NAME)), princName)); setPrincName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRINC_NAME)), princName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setComputeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPUTE_TYPE)), computeType)); setComputeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPUTE_TYPE)), computeType));
setCostWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COST_WEIGHT)), costWeight));
} }
/** /**
...@@ -610,6 +627,7 @@ public class HGSJ001 extends DaoEPBase { ...@@ -610,6 +627,7 @@ public class HGSJ001 extends DaoEPBase {
map.put(FIELD_PRINC_NAME, StringUtils.toString(princName, eiMetadata.getMeta(FIELD_PRINC_NAME))); map.put(FIELD_PRINC_NAME, StringUtils.toString(princName, eiMetadata.getMeta(FIELD_PRINC_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_COMPUTE_TYPE, StringUtils.toString(computeType, eiMetadata.getMeta(FIELD_COMPUTE_TYPE))); map.put(FIELD_COMPUTE_TYPE, StringUtils.toString(computeType, eiMetadata.getMeta(FIELD_COMPUTE_TYPE)));
map.put(FIELD_COST_WEIGHT,StringUtils.toString(costWeight, eiMetadata.getMeta(FIELD_COST_WEIGHT)));
return map; return map;
} }
......
...@@ -5,6 +5,7 @@ import com.baosight.iplat4j.core.ei.EiColumn; ...@@ -5,6 +5,7 @@ import com.baosight.iplat4j.core.ei.EiColumn;
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.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -40,6 +41,7 @@ public class HGSJ002A extends DaoEPBase { ...@@ -40,6 +41,7 @@ public class HGSJ002A extends DaoEPBase {
public static final String FIELD_PROCESS_CODE = "processCode"; /* 工序编码*/ public static final String FIELD_PROCESS_CODE = "processCode"; /* 工序编码*/
public static final String FIELD_PROCESS_NAME = "processName"; /* 工序名称*/ public static final String FIELD_PROCESS_NAME = "processName"; /* 工序名称*/
public static final String FIELD_PAREND_ID = "parendId"; public static final String FIELD_PAREND_ID = "parendId";
public static final String FIELD_COST_WEIGHT = "costWeight";
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
...@@ -84,6 +86,7 @@ public class HGSJ002A extends DaoEPBase { ...@@ -84,6 +86,7 @@ public class HGSJ002A extends DaoEPBase {
private String processCode = " "; /* 工序编码*/ private String processCode = " "; /* 工序编码*/
private String processName = " "; /* 工序名称*/ private String processName = " "; /* 工序名称*/
private Long parendId = new Long(0); private Long parendId = new Long(0);
private BigDecimal costWeight = new BigDecimal(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -164,6 +167,13 @@ public class HGSJ002A extends DaoEPBase { ...@@ -164,6 +167,13 @@ public class HGSJ002A extends DaoEPBase {
eiColumn.setDescName("上级ID"); eiColumn.setDescName("上级ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COST_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("费用权重");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -446,6 +456,14 @@ public class HGSJ002A extends DaoEPBase { ...@@ -446,6 +456,14 @@ public class HGSJ002A extends DaoEPBase {
this.parendId = parendId; this.parendId = parendId;
} }
public BigDecimal getCostWeight() {
return costWeight;
}
public void setCostWeight(BigDecimal costWeight) {
this.costWeight = costWeight;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -472,6 +490,7 @@ public class HGSJ002A extends DaoEPBase { ...@@ -472,6 +490,7 @@ public class HGSJ002A extends DaoEPBase {
setProcessCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CODE)), processCode)); setProcessCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CODE)), processCode));
setProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_NAME)), processName)); setProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_NAME)), processName));
setParendId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PAREND_ID)),parendId)); setParendId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PAREND_ID)),parendId));
setCostWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COST_WEIGHT)), costWeight));
} }
/** /**
...@@ -499,6 +518,7 @@ public class HGSJ002A extends DaoEPBase { ...@@ -499,6 +518,7 @@ public class HGSJ002A extends DaoEPBase {
map.put(FIELD_PROCESS_CODE, StringUtils.toString(processCode, eiMetadata.getMeta(FIELD_PROCESS_CODE))); map.put(FIELD_PROCESS_CODE, StringUtils.toString(processCode, eiMetadata.getMeta(FIELD_PROCESS_CODE)));
map.put(FIELD_PROCESS_NAME, StringUtils.toString(processName, eiMetadata.getMeta(FIELD_PROCESS_NAME))); map.put(FIELD_PROCESS_NAME, StringUtils.toString(processName, eiMetadata.getMeta(FIELD_PROCESS_NAME)));
map.put(FIELD_PAREND_ID, StringUtils.toString(parendId, eiMetadata.getMeta(FIELD_PAREND_ID))); map.put(FIELD_PAREND_ID, StringUtils.toString(parendId, eiMetadata.getMeta(FIELD_PAREND_ID)));
map.put(FIELD_COST_WEIGHT, StringUtils.toString(costWeight, eiMetadata.getMeta(FIELD_COST_WEIGHT)));
return map; return map;
} }
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
PRINC as "princ", <!-- 负责人 --> PRINC as "princ", <!-- 负责人 -->
PRINC_NAME as "princName", <!-- 负责人名称 --> PRINC_NAME as "princName", <!-- 负责人名称 -->
STATUS as "status", <!-- 状态0.停止1.启动 --> STATUS as "status", <!-- 状态0.停止1.启动 -->
COMPUTE_TYPE as "computeType" COMPUTE_TYPE as "computeType",
COST_WEIGHT as "costWeight" <!-- 费用权重 -->
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
...@@ -233,9 +234,10 @@ ...@@ -233,9 +234,10 @@
PRINC, <!-- 负责人 --> PRINC, <!-- 负责人 -->
PRINC_NAME, PRINC_NAME,
STATUS, <!-- 状态0.停止1.启动 --> STATUS, <!-- 状态0.停止1.启动 -->
COMPUTE_TYPE COMPUTE_TYPE,
COST_WEIGHT
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #processCode#, #processName#, #unit#, #standardJob#, #standardDays#, #standardNum#, #princ#, #princName#,#status#,#computeType#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #processCode#, #processName#, #unit#, #standardJob#, #standardDays#, #standardNum#, #princ#, #princName#,#status#,#computeType#, #costWeight#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -278,7 +280,8 @@ ...@@ -278,7 +280,8 @@
PRINC = #princ#, <!-- 负责人 --> PRINC = #princ#, <!-- 负责人 -->
PRINC_NAME = #princName#, PRINC_NAME = #princName#,
STATUS = #status#, <!-- 状态0.停止1.启动 --> STATUS = #status#, <!-- 状态0.停止1.启动 -->
COMPUTE_TYPE = #computeType# COMPUTE_TYPE = #computeType#,
COST_WEIGHT = #costWeight#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
...@@ -302,10 +305,11 @@ ...@@ -302,10 +305,11 @@
FACTORY_NAME as "factoryName", <!-- 厂区名称 --> FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
UNIT AS "unit", UNIT AS "unit",
STATUS as "status", STATUS as "status",
DELETE_FLAG as "deleteFlag" DELETE_FLAG as "deleteFlag",
COST_WEIGHT as "costWeight"
FROM ${hggpSchema}.HGGY001 WHERE 1=1 FROM ${hggpSchema}.HGGY001 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
group by PROCESS_CODE,PROCESS_NAME,FACTORY_CODE,FACTORY_NAME,UNIT,STATUS,DELETE_FLAG group by PROCESS_CODE, PROCESS_NAME, FACTORY_CODE, FACTORY_NAME, UNIT, STATUS, DELETE_FLAG, COST_WEIGHT
</select> </select>
<!--查询用户所在的公司--> <!--查询用户所在的公司-->
......
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
PROCESS_ORDER as "processOrder", <!-- 加工顺序 --> PROCESS_ORDER as "processOrder", <!-- 加工顺序 -->
PROCESS_CODE as "processCode", <!-- 工序编码 --> PROCESS_CODE as "processCode", <!-- 工序编码 -->
PROCESS_NAME as "processName", <!-- 工序名称 --> PROCESS_NAME as "processName", <!-- 工序名称 -->
PAREND_ID as "parendId" PAREND_ID as "parendId",
COST_WEIGHT as "costWeight"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -193,9 +194,10 @@ ...@@ -193,9 +194,10 @@
PROCESS_ORDER, <!-- 加工顺序 --> PROCESS_ORDER, <!-- 加工顺序 -->
PROCESS_CODE, <!-- 工序编码 --> PROCESS_CODE, <!-- 工序编码 -->
PROCESS_NAME, <!-- 工序名称 --> PROCESS_NAME, <!-- 工序名称 -->
PAREND_ID PAREND_ID,
COST_WEIGHT
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processOrder#, #processCode#, #processName#, #parendId#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processOrder#, #processCode#, #processName#, #parendId#, #costWeight#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -232,7 +234,8 @@ ...@@ -232,7 +234,8 @@
PROCESS_ORDER = #processOrder#, <!-- 加工顺序 --> PROCESS_ORDER = #processOrder#, <!-- 加工顺序 -->
PROCESS_CODE = #processCode#, <!-- 工序编码 --> PROCESS_CODE = #processCode#, <!-- 工序编码 -->
PROCESS_NAME = #processName#, <!-- 工序名称 --> PROCESS_NAME = #processName#, <!-- 工序名称 -->
PAREND_ID = #parendId# PAREND_ID = #parendId#,
COST_WEIGHT = #costWeight#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -46,11 +46,15 @@ ...@@ -46,11 +46,15 @@
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitCoeff" cname="单价系数" width="120" enable="true" format="{0:N3}" editType="text" <EF:EFColumn ename="costWeight" cname="费用权重" width="100" enable="false" format="{0:N3}" editType="number"
displayType="0" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="unitCoeff" cname="单价系数" width="120" enable="true" format="{0:N3}" editType="text" hidden="true"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="processClass" cname="工序分类" width="120" enable="true" align="center" required="true"/> <EF:EFColumn ename="processClass" cname="工序分类" width="120" enable="true" align="center" required="true" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -65,6 +65,10 @@ ...@@ -65,6 +65,10 @@
<EF:EFComboColumn ename="computeType" cname="计算类型" width="80" enable="true" align="center" required="true"> <EF:EFComboColumn ename="computeType" cname="计算类型" width="80" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/> <EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="costWeight" cname="费用权重" width="100" enable="true" format="{0:N3}" editType="number"
displayType="0" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="princ" cname="负责人" defaultValue="${loginName}" <EF:EFComboColumn ename="princ" cname="负责人" defaultValue="${loginName}"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -52,6 +52,18 @@ $(function (){ ...@@ -52,6 +52,18 @@ $(function (){
} }
], ],
loadComplete: function(grid) { loadComplete: function(grid) {
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "processCode") {
let item = e.items[0];
for (let j = 0; j < processCodes.length; j++) {
if (processCodes[j].valueField === item.processCode){
resultGrid.setCellValue(item, "costWeight", processCodes[j].param6Field);
break;
}
}
}
});
}, },
afterEdit:function (e) { afterEdit:function (e) {
}, },
......
...@@ -47,8 +47,7 @@ ...@@ -47,8 +47,7 @@
<EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N0}" editType="number" <EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="center" required="true" displayType="0" sort="true" align="center" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="15" data-regex="/^-?[0-9]{1,15}?$/" maxLength="15"
data-errorprompt="请输入数字,该值最大可设置15位整数!" data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
/>
<EF:EFComboColumn ename="processCode" cname="工序名称" <EF:EFComboColumn ename="processCode" cname="工序名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -57,6 +56,10 @@ ...@@ -57,6 +56,10 @@
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="processName" cname="工序名称" hidden="true"/> <EF:EFColumn ename="processName" cname="工序名称" hidden="true"/>
<EF:EFColumn ename="costWeight" cname="费用权重" width="100" enable="true" format="{0:N3}" editType="number"
displayType="0" sort="true" align="right" hidden="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false" <EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="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