ソースを参照

aps-坯料计划防止出现null字符串

sucheng 3 ヶ月 前
コミット
f4bd56b2cb

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

@@ -1212,9 +1212,9 @@ public class ApsProductionOrderServiceImpl extends ServiceImpl<ApsProductionOrde
 
     private void setBlankColumn(ApsProductionOrderDo orderDo, List<ApsBlankOrderDo> apsBlankOrderDoList, List<ApsProductDetailDo> apsProductDetailVoList, List<ApsProductionMergeOrderDo> apsProductionMergeOrderDoList) {
         //根据订单和产品明细,及其合并订单,重新赋值 坯料计划和输出成品的冗余字段
-        String orderno = orderDo.getOrderno();
-        String customorderno = orderDo.getCustomorderno();
-        String customname = orderDo.getCustomname();
+        String orderno = StringUtils.isNotBlank(orderDo.getOrderno()) ? orderDo.getOrderno() : "";
+        String customorderno = StringUtils.isNotBlank(orderDo.getCustomorderno()) ? orderDo.getCustomorderno() : "";
+        String customname = StringUtils.isNotBlank(orderDo.getCustomname()) ? orderDo.getCustomname() : "";
         List<String> blankIdList = apsBlankOrderDoList.stream().map(ApsBlankOrderDo::getId).collect(Collectors.toList());
         if (!blankIdList.isEmpty()) {
             List<ApsProcessOutputProductDo> apsProcessOutputProductDoList = apsProcessOutputProductService.list(new LambdaQueryWrapper<ApsProcessOutputProductDo>().in(ApsProcessOutputProductDo::getBlankid, blankIdList));