生产报告自动移交报错信息优化
This commit is contained in:
parent
d1d78484ac
commit
979959d07f
|
|
@ -78,8 +78,8 @@ public class HandOverRule implements IRule<AggWrVO> {
|
|||
continue;
|
||||
}
|
||||
if(queryService.isAuditToProdInBPTransType(new String[]{vo.getParentVO().getVtrantypeid()}).get(vo.getParentVO().getVtrantypeid())){
|
||||
throw new BusinessException("交易类型不能是审批即入库");
|
||||
|
||||
// throw new BusinessException("交易类型不能是审批即入库");
|
||||
continue;
|
||||
}
|
||||
WrItemVO[] itemVOS= vo.getChildrenVO();
|
||||
List<WrItemVO> itemlist = new ArrayList<WrItemVO>();
|
||||
|
|
@ -88,13 +88,12 @@ public class HandOverRule implements IRule<AggWrVO> {
|
|||
Map<String, MaterialProdVO> map = serv.queryMaterialProduceInfoByPks(new String[]{itemVO.getCbmaterialvid()},pkOrg
|
||||
,new String[]{"wghxcl","iscreatesonprodorder"});
|
||||
if(map.isEmpty()) {
|
||||
throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
// continue;
|
||||
// throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
}else{
|
||||
MaterialProdVO materialProdVO=map.get(itemVO.getCbmaterialvid());
|
||||
if(materialProdVO == null) {
|
||||
throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
// continue;
|
||||
// throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
continue;
|
||||
}
|
||||
if(materialProdVO.getWghxcl().equals(1)&& materialProdVO.getIscreatesonprodorder().booleanValue()) {
|
||||
AggWrVO vo1 = new AggWrVO();
|
||||
|
|
@ -102,12 +101,15 @@ public class HandOverRule implements IRule<AggWrVO> {
|
|||
vo1.setChildrenVO(new WrItemVO[]{itemVO});
|
||||
list.add(vo1);
|
||||
}else{
|
||||
throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
// throw new BusinessException("请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<AggHandTakeVO> aggHandTakeVOS= new ArrayList<>();
|
||||
if(list.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (AggWrVO vo : list) {
|
||||
try {
|
||||
this.loadWrQualityVO(vo);
|
||||
|
|
@ -144,10 +146,12 @@ public class HandOverRule implements IRule<AggWrVO> {
|
|||
for (HandTakeBVO handTakeBVO:(HandTakeBVO[])takeVO.getChildrenVO()){
|
||||
|
||||
if(handTakeBVO.getVrcvmocode().isEmpty() || handTakeBVO.getVrcvpickmcode().isEmpty()){
|
||||
throw new BusinessException("没有接受备料计划单号和接受生产订单号,请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
continue;
|
||||
// throw new BusinessException("没有接受备料计划单号和接受生产订单号,请检查工位半产品是否维护配套子件和完工后续处理生产页签参数");
|
||||
}
|
||||
if(takeVO.getParentVO().getNhandoverastnum().compareTo(UFDouble.ZERO_DBL) ==0){
|
||||
throw new BusinessException("完工数量不能为0");
|
||||
continue;
|
||||
// throw new BusinessException("完工数量不能为0");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -175,17 +179,18 @@ public class HandOverRule implements IRule<AggWrVO> {
|
|||
}
|
||||
aggHandTakeVOS.add(takeVO);
|
||||
}
|
||||
|
||||
// handTakeMaintainService.insert(aggHandTakeVOS.toArray(new AggHandTakeVO[aggHandTakeVOS.size()]));
|
||||
try {
|
||||
this.validate(aggHandTakeVOS.get(0));
|
||||
} catch (ValidationException e) {
|
||||
ExceptionUtils.wrappException(e);
|
||||
}
|
||||
try {
|
||||
this.process(aggHandTakeVOS.get(0));
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappException(e);
|
||||
if(!aggHandTakeVOS.isEmpty()){
|
||||
// handTakeMaintainService.insert(aggHandTakeVOS.toArray(new AggHandTakeVO[aggHandTakeVOS.size()]));
|
||||
try {
|
||||
this.validate(aggHandTakeVOS.get(0));
|
||||
} catch (ValidationException e) {
|
||||
ExceptionUtils.wrappException(e);
|
||||
}
|
||||
try {
|
||||
this.process(aggHandTakeVOS.get(0));
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappException(e);
|
||||
}
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue