瀏覽代碼

aps-产品明细增加字段“暂不评审”,校验坯料计划增加逻辑

sucheng 11 月之前
父節點
當前提交
f648b37f41

+ 2 - 2
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsProductionOrderServiceImpl.java

@@ -295,10 +295,10 @@ public class ApsProductionOrderServiceImpl extends ServiceImpl<ApsProductionOrde
          * 如果订单产品暂不评审=是,并且坯料计划输出总重量 > 0,则错误提示:订单产品 {输入物料描述}暂不评审,不应该填写坯料计划
          */
         for (ApsProductDetailVo apsProductDetailVo : apsProductDetailVoList) {
-            if (apsProductDetailVo.getNotyetreview().equals("否") && apsProductDetailVo.getPlanout().toString().equals("0")) {
+            if (apsProductDetailVo.getNotyetreview().equals("否") && (ObjectUtil.isEmpty(apsProductDetailVo.getPlanout()) || apsProductDetailVo.getPlanout().toString().equals("0"))) {
                 return R.error("订单产品 " + apsProductDetailVo.getInputmaterialdescription() + "坯料计划未填写");
             }
-            if (apsProductDetailVo.getNotyetreview().equals("是") && !apsProductDetailVo.getPlanout().toString().equals("0")) {
+            if (apsProductDetailVo.getNotyetreview().equals("是") && ObjectUtil.isNotEmpty(apsProductDetailVo.getPlanout()) && !apsProductDetailVo.getPlanout().toString().equals("0")) {
                 return R.error("订单产品 " + apsProductDetailVo.getInputmaterialdescription() + "暂不评审,不应该填写坯料计划");
             }
         }