Commit b76223c9 by liuyang

2024-08-12 生产任务的报工增加超报原因字段

parent 99af012a
......@@ -69,6 +69,7 @@ public class HGSC008 extends DaoEPBase {
public static final String FIELD_spec = "spec"; /* 规格*/
public static final String FIELD_length = "length"; /* 长*/
public static final String FIELD_exceed_reason = "exceedReason";
public static final String COL_id = "id";
public static final String COL_mat_id = "mat_id"; /* 物料清单ID*/
......@@ -153,6 +154,7 @@ public class HGSC008 extends DaoEPBase {
private String updatedTime = " "; /* 更新时间*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private String exceedReason = " ";
//补充字段
......@@ -412,6 +414,10 @@ public class HGSC008 extends DaoEPBase {
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_exceed_reason);
eiColumn.setDescName("超报原因");
eiMetadata.addMeta(eiColumn);
// private Integer registeredQuantity = new Integer(0);
// private BigDecimal registeredWeight = new BigDecimal(0);
// private Integer unregisterQuantity = new Integer(0);
......@@ -1019,6 +1025,14 @@ public class HGSC008 extends DaoEPBase {
this.length = length;
}
public String getExceedReason() {
return exceedReason;
}
public void setExceedReason(String exceedReason) {
this.exceedReason = exceedReason;
}
/**
* get the value from Map.
*
......@@ -1072,6 +1086,7 @@ public class HGSC008 extends DaoEPBase {
setTaskWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_task_weight)), taskWeight));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_spec)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length));
setExceedReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_exceed_reason)), exceedReason));
}
/**
......@@ -1125,6 +1140,7 @@ public class HGSC008 extends DaoEPBase {
map.put(FIELD_task_weight, StringUtils.toString(taskWeight, eiMetadata.getMeta(FIELD_task_weight)));
map.put(FIELD_spec, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_spec)));
map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length)));
map.put(FIELD_exceed_reason, StringUtils.toString(exceedReason, eiMetadata.getMeta(FIELD_exceed_reason)));
return map;
}
}
......@@ -196,7 +196,8 @@
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime", <!-- 更新时间 -->
length as "length", <!-- 长 -->
spec as "spec" <!-- 规格 -->
spec as "spec", <!-- 规格 -->
exceed_reason as "exceedReason"
FROM ${hggpSchema}.HGSC008
WHERE 1=1
<include refid="condition" />
......@@ -365,13 +366,14 @@
updated_name, <!-- 修改人名称 -->
updated_time, <!-- 更新时间 -->
spec,
length
length,
exceed_reason
)
VALUES (#id#, #matId#, #taskId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#,
#processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#,
#productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#,
#groupCode#, #groupName#, #registerDate#, #quantity#, #singleWeight#, #totalWeight#, #accountCode#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,#spec#,#length#)
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,#spec#,#length#,#exceedReason#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC008
</selectKey>
......@@ -421,7 +423,8 @@
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime#, <!-- 更新时间 -->
spec = #spec#,
length = #length#
length = #length#,
exceed_reason = #exceedReason#
WHERE
id = #id#
</update>
......
......@@ -1223,6 +1223,7 @@ public class HGSCTools {
hgsc008.setTaskId(hgsc007.getId());
hgsc008.setQuantity(NumberUtils.toInteger(resultMap.get(HGSC008.FIELD_quantity)));
hgsc008.setRegisterDate(String.valueOf(resultMap.get(HGSC008.FIELD_register_date)));
hgsc008.setExceedReason(resultMap.get(HGSC008.FIELD_exceed_reason).toString());
hgsc008.setTotalWeight(hgsc007.getSingleWeight().multiply(new BigDecimal(hgsc008.getQuantity())));
checkAddDate(hgsc008);
hgsc008.setWorkCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC008_WORK_CODE));
......
......@@ -35,6 +35,13 @@ $(function () {
message("报工日期不能为空!");
return ;
}
let unregisterQuantity = $("#result-0-unregisterQuantity").val();
let exceedReason = $("#result-0-exceedReason").val();
if (quantity - unregisterQuantity > 0 && exceedReason.trim().length === 0){
message("报工数量大于剩余报工数量,请填写超报原因");
return ;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("", "HGSC007A", "save", {isAlldata:true,onSuccessCallback:parent.registerWorkCallback});
......
......@@ -34,6 +34,7 @@
format="yyyy-MM-dd" required="true" readonly="false"/>
<EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0}" editType="text" colWidth="4" required="true" />
<EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-exceedReason" cname="超报原因" type="textarea" editType="text" colWidth="8" ratio="2:10"/>
</div>
</EF:EFRegion>
......
......@@ -42,6 +42,7 @@
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="exceedReason" cname="超报原因" width="200" etype="textarea" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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