生产报告代码同步
This commit is contained in:
parent
627619119f
commit
05b0a218fd
|
|
@ -5,21 +5,17 @@ import nc.bs.framework.common.InvocationInfoProxy;
|
||||||
import nc.bs.framework.common.NCLocator;
|
import nc.bs.framework.common.NCLocator;
|
||||||
import nc.bs.logging.Log;
|
import nc.bs.logging.Log;
|
||||||
import nc.bs.uif2.validation.ValidationFailure;
|
import nc.bs.uif2.validation.ValidationFailure;
|
||||||
import nc.itf.mmpac.wr.IWrBusinessService;
|
|
||||||
import nc.jdbc.framework.SQLParameter;
|
import nc.jdbc.framework.SQLParameter;
|
||||||
import nc.jdbc.framework.processor.ColumnProcessor;
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
||||||
import nc.util.mmf.framework.base.MMArrayUtil;
|
import nc.util.mmf.framework.base.MMArrayUtil;
|
||||||
import nc.util.mmf.framework.base.MMCollectionUtil;
|
import nc.util.mmf.framework.base.MMCollectionUtil;
|
||||||
import nc.util.mmf.framework.base.MMNumberUtil;
|
import nc.util.mmf.framework.base.MMNumberUtil;
|
||||||
import nc.util.mmf.framework.base.MMValueCheck;
|
import nc.util.mmf.framework.base.MMValueCheck;
|
||||||
import nc.vo.bd.bom.bom0202.enumeration.OutputTypeEnum;
|
|
||||||
import nc.vo.mmpac.wr.consts.WrptLangConst;
|
|
||||||
import nc.vo.mmpac.wr.entity.*;
|
import nc.vo.mmpac.wr.entity.*;
|
||||||
import nc.vo.mmpac.wr.enumeration.WrBillStatusEnum;
|
import nc.vo.mmpac.wr.enumeration.WrBillStatusEnum;
|
||||||
import nc.vo.pub.BusinessException;
|
import nc.vo.pub.BusinessException;
|
||||||
import nc.vo.pub.VOStatus;
|
import nc.vo.pub.VOStatus;
|
||||||
import nc.vo.pub.billtype.BilltypeVO;
|
import nc.vo.pub.billtype.BilltypeVO;
|
||||||
import nc.vo.pub.lang.UFBoolean;
|
|
||||||
import nc.vo.pub.lang.UFDate;
|
import nc.vo.pub.lang.UFDate;
|
||||||
import nc.vo.pubapp.AppContext;
|
import nc.vo.pubapp.AppContext;
|
||||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||||
|
|
@ -27,7 +23,6 @@ import nc.ws.opm.pub.utils.result.APIErrCodeEnum;
|
||||||
import nccloud.api.mmpac.wr.IAPIWrMaintain;
|
import nccloud.api.mmpac.wr.IAPIWrMaintain;
|
||||||
import nccloud.api.rest.utils.NCCRestUtils;
|
import nccloud.api.rest.utils.NCCRestUtils;
|
||||||
import nccloud.api.rest.utils.ResultMessageUtil;
|
import nccloud.api.rest.utils.ResultMessageUtil;
|
||||||
import nccloud.framework.service.ServiceLocator;
|
|
||||||
import nccloud.openapi.scmpub.pub.TransferCodeToPKTool;
|
import nccloud.openapi.scmpub.pub.TransferCodeToPKTool;
|
||||||
import nccloud.ws.rest.resource.AbstractNCCRestResource;
|
import nccloud.ws.rest.resource.AbstractNCCRestResource;
|
||||||
import org.json.JSONString;
|
import org.json.JSONString;
|
||||||
|
|
@ -390,38 +385,38 @@ public class WrResource extends AbstractNCCRestResource {
|
||||||
* 考虑标品接口扩展性 表头增加校验参数 isdonecheck:Y/N
|
* 考虑标品接口扩展性 表头增加校验参数 isdonecheck:Y/N
|
||||||
*/
|
*/
|
||||||
AggWrVO[] wrVOS = voList.toArray(new AggWrVO[0]);
|
AggWrVO[] wrVOS = voList.toArray(new AggWrVO[0]);
|
||||||
if (headInfo.containsKey("isdonecheck") && "Y".equals(headInfo.get("isdonecheck").toString())) {
|
// if(headInfo.containsKey("isdonecheck") && "Y".equals(headInfo.get("isdonecheck").toString())){
|
||||||
IWrBusinessService service = (IWrBusinessService) ServiceLocator.find(IWrBusinessService.class);
|
// IWrBusinessService service = (IWrBusinessService) NCLocator.getInstance().lookup(IWrBusinessService.class);
|
||||||
AggWrVO[] resultvos = service.setCheck(wrVOS);
|
// AggWrVO[] resultvos = service.setCheck(wrVOS);
|
||||||
if (!MMValueCheck.isEmpty(resultvos)) {
|
// if (!MMValueCheck.isEmpty(resultvos)) {
|
||||||
StringBuilder errorMessagesSB = new StringBuilder();
|
// StringBuilder errorMessagesSB = new StringBuilder();
|
||||||
|
//
|
||||||
for (AggWrVO aggWrVO : resultvos) {
|
// for (AggWrVO aggWrVO :resultvos) {
|
||||||
if (!WrBillStatusEnum.FREEDOM.equalsValue(aggWrVO.getParentVO().getFbillstatus())) {
|
// if (!WrBillStatusEnum.FREEDOM.equalsValue(aggWrVO.getParentVO().getFbillstatus())) {
|
||||||
StringBuilder notThroughSB = new StringBuilder();
|
// StringBuilder notThroughSB = new StringBuilder();
|
||||||
String billCode = aggWrVO.getParentVO().getVbillcode();
|
// String billCode = aggWrVO.getParentVO().getVbillcode();
|
||||||
WrItemVO[] itemVOs = (WrItemVO[]) aggWrVO.getChildren(WrItemVO.class);
|
// WrItemVO[] itemVOs = (WrItemVO[]) aggWrVO.getChildren(WrItemVO.class);
|
||||||
if (!MMValueCheck.isEmpty(itemVOs)) {
|
// if (!MMValueCheck.isEmpty(itemVOs)) {
|
||||||
for (WrItemVO itemVO : itemVOs) {
|
// for (WrItemVO itemVO:itemVOs) {
|
||||||
if (!MMValueCheck.isEmpty(itemVO.getCbmoid()) && OutputTypeEnum.MAIN_PRODUCT.equalsValue(itemVO.getFbproducttype()) && !UFBoolean.TRUE.equals(itemVO.getBbsetmark())) {
|
// if (!MMValueCheck.isEmpty(itemVO.getCbmoid()) && OutputTypeEnum.MAIN_PRODUCT.equalsValue(itemVO.getFbproducttype()) && !UFBoolean.TRUE.equals(itemVO.getBbsetmark())) {
|
||||||
notThroughSB.append(itemVO.getVbrowno());
|
// notThroughSB.append(itemVO.getVbrowno());
|
||||||
notThroughSB.append(",");
|
// notThroughSB.append(",");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (!MMValueCheck.isEmpty(notThroughSB)) {
|
// if (!MMValueCheck.isEmpty(notThroughSB)) {
|
||||||
notThroughSB.setLength(notThroughSB.length() - 1);
|
// notThroughSB.setLength(notThroughSB.length() - 1);
|
||||||
String message = WrptLangConst.getSetCheckError_Msg(new String[]{billCode, notThroughSB.toString()});
|
// String message = WrptLangConst.getSetCheckError_Msg(new String[]{billCode, notThroughSB.toString()});
|
||||||
errorMessagesSB.append(message);
|
// errorMessagesSB.append(message);
|
||||||
errorMessagesSB.append("\n");
|
// errorMessagesSB.append("\n");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (!MMValueCheck.isEmpty(errorMessagesSB)) {
|
// if (!MMValueCheck.isEmpty(errorMessagesSB)) {
|
||||||
ExceptionUtils.wrappBusinessException(errorMessagesSB.toString());
|
// ExceptionUtils.wrappBusinessException(errorMessagesSB.toString());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
/*
|
/*
|
||||||
* end 齐套检查
|
* end 齐套检查
|
||||||
* edit by xc 2025-10-22
|
* edit by xc 2025-10-22
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue