Commit a6a39816da3d2abbe34df1f6765525f0da131712

Authored by 易文鹏
1 parent 979ecde4

fix: 修复打印历史出库单,任务明细没有颜色报错的问题

src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentPrintVo.java
1 1 package com.huaheng.pc.shipment.shipmentHeader.domain;
2 2  
3 3 import com.huaheng.common.utils.DataUtils;
  4 +import com.huaheng.common.utils.StringUtils;
4 5 import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService;
5 6 import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
6 7 import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
... ... @@ -69,7 +70,7 @@ public class ShipmentPrintVo {
69 70 voDetail.recordCode = taskDetail.getRecordCode();//合并前单号
70 71 voDetail.port = port;//出库口
71 72 String materialColor = taskDetail.getMaterialColor();
72   - if (materialColor.length() > 12) {
  73 + if (StringUtils.isNotEmpty(materialColor) && materialColor.length() > 12) {
73 74 data.materialColor = materialColor.substring(12);
74 75 } else {
75 76 data.materialColor = materialColor;
... ...