|
@@ -690,23 +690,27 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
queryWrapper.groupBy("inventory_code");
|
|
|
List<SyPackingListFabricItem> fabricItems=syPackingListFabricItemService.list(queryWrapper);
|
|
|
boolean bool=true;
|
|
|
+ BigDecimal rollsNum=new BigDecimal("0");
|
|
|
for (SyPackingListFabricItem fabricItem : fabricItems){
|
|
|
if(fabricItem.getNetWeight()==null||fabricItem.getNetWeight().doubleValue()==0){
|
|
|
- message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"净重合计为0;\n";
|
|
|
+ message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"净重合计为0;";
|
|
|
bool=false;
|
|
|
}
|
|
|
else if(fabricItem.getGrossWeight()==null||fabricItem.getGrossWeight().doubleValue()==0){
|
|
|
- message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"毛重合计为0;\n";
|
|
|
+ message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"毛重合计为0;";
|
|
|
bool=false;
|
|
|
}
|
|
|
- else if(fabricItem.getRolls()==null||fabricItem.getRolls().doubleValue()==0){
|
|
|
- message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"匹数(箱数)合计为0;\n";
|
|
|
- bool=false;
|
|
|
+ else if(fabricItem.getRolls()!=null){
|
|
|
+ rollsNum.add(fabricItem.getRolls());
|
|
|
}
|
|
|
if (bool=false){
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ if(rollsNum.doubleValue()==0){
|
|
|
+ message+="第"+num+"条提交失败,箱数(匹数)合计为0;";
|
|
|
+ bool=false;
|
|
|
+ }
|
|
|
if (bool){
|
|
|
SyPackingListFabric syPackingListFabric=syPackingListFabricMapper.selectById(id);
|
|
|
syPackingListFabric.setStatus("1");//提交
|