材料出库-代码同步

This commit is contained in:
mzr 2025-12-24 18:30:13 +08:00
parent 53ecf46d08
commit 0bb2ed6c70
1 changed files with 11 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import nc.bs.logging.Log;
import nc.bs.scmpub.query.SCMBillQuery;
import nc.vo.ic.m4d.entity.MaterialOutVO;
import nc.vo.ic.pub.define.ICPubMetaNameConst;
import nc.vo.pub.lang.UFDate;
import nc.ws.opm.pub.utils.result.APIErrCodeEnum;
import nccloud.api.ic.m4d.IAPIMaterialOutMaintain;
import nccloud.api.ic.m4d.IAPIMaterialOutQuery;
@ -168,6 +169,7 @@ public class MaterialOutResource extends NCCPubRestResource {
@Produces("application/json")
public JSONString update(Map<String, Object> paramMap) {
try {
UFDate startTime = new UFDate();
if (paramMap == null || !paramMap.containsKey(HEADTABLE)) {
return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含表头信息和表体信息", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
}
@ -178,9 +180,15 @@ public class MaterialOutResource extends NCCPubRestResource {
NCLocator.getInstance().lookup(IAPIMaterialOutMaintain.class);
// vbatchcode 批次号字段上游需要传递给WMS
MaterialOutVO[] updateVO = materialOut.update(paramMapList);
return ResultMessageUtil.toJSON(updateVO,
nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("4008027_0",
"04008027-0474")/* @res "材料出库单修改成功" */);
UFDate endTime = new UFDate();
//间隔时间
long interval =endTime.getMillis()-startTime.getMillis() ;
//转秒
long intervalSeconds = interval / 1000;
return ResultMessageUtil.toJSON(updateVO,"材料出库单修改成功,业务开始时间【"+startTime+"】,业务结束时间【"+endTime+"】,业务耗时【"+intervalSeconds+"】秒");
// return ResultMessageUtil.toJSON(updateVO,
// nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("4008027_0",
// "04008027-0474")/* @res "材料出库单修改成功" */);
} catch (Exception e) {
return ResultMessageUtil.exceptionToJSON(e);
}