Commit 0aef8bee by wuwenlong

工序质检单生成

parent de3253e5
......@@ -41,7 +41,7 @@ public class ServiceHGSC007A extends ServiceEPBase {
List<HGSC008> old008List = HGSCTools.THGSC008.getByTaskId(Long.valueOf(taskId));
hgsc008.setTaskId(hgsc007.getId());
hgsc008.setTaskQuantity(hgsc007.getQuantity());
hgsc008.setTaskWeight(hgsc007.getTotalWeight());
hgsc008.setRegisteredQuantity(Optional.ofNullable(old008List).orElse(new ArrayList<>()).stream().mapToInt(HGSC008::getQuantity).sum());
......@@ -51,6 +51,7 @@ public class ServiceHGSC007A extends ServiceEPBase {
hgsc008.setRegisterDate(DateUtil.toDateStr(new Date(),DateUtil.DATE10_PATTERN));
hgsc008.setQuantity(null);
hgsc008.setTotalWeight(null);
hgsc008.setId(null);
inInfo.addBlock(EiConstant.resultBlock).addRow(hgsc008);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -768,12 +768,14 @@ public class HGSCTools {
public static HGSC008 add(EiInfo info){
Map resultMap = EiInfoUtils.getFirstRow(info, EiConstant.resultBlock);
String taskId = com.baosight.hggp.util.MapUtils.getString(resultMap, HGSC008.FIELD_task_id);
String taskId = MapUtils.getString(resultMap, HGSC008.FIELD_task_id);
HGSC007 hgsc007 = HGSCTools.THGSC007.getById(Long.valueOf(taskId));
HGSC008 hgsc008 = new HGSC008();
BeanUtils.copyProperties(hgsc007,hgsc008);
cleanBaseInfo(hgsc008);
hgsc008.setTaskId(hgsc007.getId());
hgsc008.setQuantity(NumberUtils.toInteger(resultMap.get(HGSC008.FIELD_quantity)));
hgsc008.setRegisterDate(String.valueOf(resultMap.get(HGSC008.FIELD_register_date)));
hgsc008.setTotalWeight(hgsc007.getSingleWeight().multiply(new BigDecimal(hgsc008.getQuantity())));
checkAddDate(hgsc008);
hgsc008.setWorkCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC008_WORK_CODE));
......
......@@ -37,7 +37,7 @@ $(function () {
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGSC007A", "save", {isAlldata:true,onSuccessCallback:parent.registerWorkCallback});
JSUtils.submitGrid("", "HGSC007A", "save", {isAlldata:true,onSuccessCallback:parent.registerWorkCallback});
}
});
});
......
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