Commit 91b55b68 by 江和松

提交校验修改

parent 744e2566
......@@ -321,32 +321,20 @@ public class ServiceHGCG003 extends ServiceBase {
/**
* 修改状态
*/
@OperationLogAnnotation(operModul = "工艺流程",operType = "修改",operDesc = "修改状态操作")
@OperationLogAnnotation(operModul = "采购收货",operType = "确认收货",operDesc = "修改状态操作")
public EiInfo updateStatus(EiInfo inInfo){
int i = 0;
try {
HGCG003 hgcg003 = new HGCG003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List<Long> primaryIds = new LinkedList<>();
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgcg003.fromMap(map);
primaryIds.add(hgcg003.getId());
HGCG003 old = HGCGTools.HgCg003.get(hgcg003.getId());
hgcg003.setReceiveNo(old.getReceiveNo());
DaoUtils.update(HGCG003.UPDATE_STATUS, hgcg003);
this.putInStorageData(old);
}
List<HGCG003B> hgcg003BList = HGCGTools.HgCg003B.listByPrimaryIds(primaryIds);
hgcg003BList.forEach(o->{
Map<String, Object> paramDetailMap = new HashMap<>();
paramDetailMap.put(HGCG003B.FIELD_ID, o.getId());
paramDetailMap.put(HGCG003B.FIELD_STATUS, HGConstant.CgReceiveStatus.S_2);
paramDetailMap.put(HGCG003B.FIELD_DELIVER_QTY, 0);
paramDetailMap.put(HGCG003B.FIELD_DEPOSIT_QTY, o.getReceiveQty());
DaoUtils.update(HGSqlConstant.HgCg003B.UPDATE_CONFIRM, paramDetailMap);
//采购入库
HGKCTools.HgKc001.putInStorageData(o.getId());
});
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
......@@ -359,4 +347,19 @@ public class ServiceHGCG003 extends ServiceBase {
return inInfo;
}
private void putInStorageData(HGCG003 hgcg003) {
List<HGCG003B> hgcg003BList = HGCGTools.HgCg003B.listByPrimaryId(hgcg003.getId());
AssertUtils.isTrue(CollectionUtils.isEmpty(hgcg003BList), String.format("收货单明细[%s]为空", hgcg003.getReceiveNo()));
hgcg003BList.forEach(o->{
Map<String, Object> paramDetailMap = new HashMap<>();
paramDetailMap.put(HGCG003B.FIELD_ID, o.getId());
paramDetailMap.put(HGCG003B.FIELD_STATUS, HGConstant.CgReceiveStatus.S_2);
paramDetailMap.put(HGCG003B.FIELD_DELIVER_QTY, 0);
paramDetailMap.put(HGCG003B.FIELD_DEPOSIT_QTY, o.getReceiveQty());
DaoUtils.update(HGSqlConstant.HgCg003B.UPDATE_CONFIRM, paramDetailMap);
//采购入库
HGKCTools.HgKc001.putInStorageData(o.getId());
});
}
}
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