|
@@ -12,6 +12,7 @@ import com.rongwei.bsentity.domain.ApsProductionMergeOrderDo;
|
|
|
import com.rongwei.bsentity.domain.ApsProductionOrderDo;
|
|
|
import com.rongwei.bsentity.vo.ApsProductDetailVo;
|
|
|
import com.rongwei.bsentity.vo.CheckAndSaveOrUpdateOrderReq;
|
|
|
+import com.rongwei.bsentity.vo.ProductDetailIdAndPlanOutPutRollCountAllVo;
|
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
import com.rongwei.safecommon.utils.SaveConstans;
|
|
|
import org.slf4j.Logger;
|
|
@@ -171,7 +172,24 @@ public class ApsProductionOrderServiceImpl extends ServiceImpl<ApsProductionOrde
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //=========查询此订单所有产品明细对应的输出成品的卷数和============
|
|
|
+ //查询此订单所有产品明细对应的输出成品的卷数和
|
|
|
+ List<ProductDetailIdAndPlanOutPutRollCountAllVo> planOutPutRollCountAllVos = this.baseMapper.getProductDetailIdAndPlanOutPutRollCountAll(apsProductDetailVoList.get(0).getMainid());
|
|
|
+ //检查每个订单产品,如果该订单产品填写了卷数,
|
|
|
+ //并且该订单产品对应坯料输出成品的计划输出订单卷数合计不等于订单产品的卷数,
|
|
|
+ //错误提示:订单产品 {输入物料描述} 的卷数与坯料计划的计划输出订单卷数不一致
|
|
|
+ for (ApsProductDetailVo apsProductDetailVo : apsProductDetailVoList) {
|
|
|
+ if (ObjectUtil.isNotEmpty(apsProductDetailVo.getRollnum())) {
|
|
|
+ for (ProductDetailIdAndPlanOutPutRollCountAllVo planOutPutRollCountAllVo : planOutPutRollCountAllVos) {
|
|
|
+ if (planOutPutRollCountAllVo.getProductDetailId().equals(apsProductDetailVo.getId())) {
|
|
|
+ if (planOutPutRollCountAllVo.getPlanOutPutRollCountAll().equals(apsProductDetailVo.getRollnum())) {
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ return R.error("订单产品 " + apsProductDetailVo.getInputmaterialdescription() + " 的卷数与坯料计划的计划输出订单卷数不一致");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|