Prechádzať zdrojové kódy

aps-订单暂不评审增加默认值,坯料计划计算交期问题

sucheng 3 mesiacov pred
rodič
commit
b34017caa3

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

@@ -463,10 +463,14 @@ public class ApsProductionOrderServiceImpl extends ServiceImpl<ApsProductionOrde
                  */
                 for (ApsProductDetailVo apsProductDetailVo : apsProductDetailVoList) {
                     if (apsProductDetailVo.getDeleted().equals("0")) {
-                        if (apsProductDetailVo.getNotyetreview().equals("否") && (ObjectUtil.isEmpty(apsProductDetailVo.getPlanout()) || apsProductDetailVo.getPlanout().toString().equals("0"))) {
+                        String notyetreview = "否";
+                        if (StringUtils.isNotBlank(apsProductDetailVo.getNotyetreview())) {
+                            notyetreview = apsProductDetailVo.getNotyetreview();
+                        }
+                        if (notyetreview.equals("否") && (ObjectUtil.isEmpty(apsProductDetailVo.getPlanout()) || apsProductDetailVo.getPlanout().toString().equals("0"))) {
                             return R.error("订单产品 " + apsProductDetailVo.getInputmaterialdescription() + "坯料计划未填写");
                         }
-                        if (apsProductDetailVo.getNotyetreview().equals("是") && ObjectUtil.isNotEmpty(apsProductDetailVo.getPlanout()) && !apsProductDetailVo.getPlanout().toString().equals("0")) {
+                        if (notyetreview.equals("是") && ObjectUtil.isNotEmpty(apsProductDetailVo.getPlanout()) && !apsProductDetailVo.getPlanout().toString().equals("0")) {
                             return R.error("订单产品 " + apsProductDetailVo.getInputmaterialdescription() + "暂不评审,不应该填写坯料计划");
                         }
                     }

+ 2 - 0
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsBlankOrderDao.xml

@@ -446,6 +446,8 @@
                     apo.DELETED = '0'
                   AND apope.DELETED = '0'
                   AND apoom.PLANPRODROLLNUM > 0
+                  AND apope.PLANSTARTDATE is not null
+                  AND apope.PLANENDDATE is not null
                   AND abo.ID = #{blankId}
             ) a
         where a.rn_asc=1 or a.rn_desc=1 order by a.PLANENDDATE