瀏覽代碼

aps-修改产品明细后,拼接字段变更增加空值判断

sucheng 9 月之前
父節點
當前提交
de37208cda

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

@@ -499,7 +499,8 @@ public class ApsProductDetailServiceImpl extends ServiceImpl<ApsProductDetailDao
             ApsProductDetailDo oldProductDetail = this.getById(apsProductDetailDo.getId());
 
             //如果订单产品明细的订单产品字段值改变了
-            if (!oldProductDetail.getInputmaterialdescription().equals(apsProductDetailDo.getInputmaterialdescription())) {
+            if ((ObjectUtil.isEmpty(oldProductDetail.getInputmaterialdescription()) && ObjectUtil.isNotEmpty(apsProductDetailDo.getInputmaterialdescription()))
+                    || !oldProductDetail.getInputmaterialdescription().equals(apsProductDetailDo.getInputmaterialdescription())) {
 
                 //复制新的产品明细
                 apsProductDetailDo.setId(SecurityUtil.getUUID());