fix(wms/material): 修正钢卷长度字段为整型

将WmsMaterialCoil及相关BO/VO中的length和actualLength字段从BigDecimal改为Long类型,并在WmsCoilPendingActionServiceImpl和WmsCoilWarehouseOperationLogServiceImpl中相应调整赋值逻辑,确保类型转换时进行空值检查,避免空指针异常。
This commit is contained in:
2026-05-27 16:57:17 +08:00
parent 11c1594169
commit 17af108940
7 changed files with 11 additions and 10 deletions

View File

@@ -137,7 +137,7 @@ public class WmsMaterialCoil extends BaseEntity {
//新增长度字段
private BigDecimal length;
private Long length;
//发货人
private String exportBy;
@@ -167,7 +167,7 @@ public class WmsMaterialCoil extends BaseEntity {
/**
* 实测长度
*/
private BigDecimal actualLength;
private Long actualLength;
/**
* 实测宽度

View File

@@ -238,7 +238,7 @@ public class WmsMaterialCoilBo extends BaseEntity {
//新增长度字段
private BigDecimal length;
private Long length;
// 新增的在钢卷表中的表面处理
private String coilSurfaceTreatment;
@@ -295,7 +295,7 @@ public class WmsMaterialCoilBo extends BaseEntity {
/**
* 实测长度
*/
private BigDecimal actualLength;
private Long actualLength;
/**
* 实测宽度

View File

@@ -130,7 +130,7 @@ public class WmsMaterialCoilAllExportVo {
@ExcelProperty(value = "长度")
private BigDecimal length;
private Long length;
/**
* 规格

View File

@@ -125,7 +125,7 @@ public class WmsMaterialCoilExportVo {
@ExcelProperty(value = "长度")
private BigDecimal length;
private Long length;
/**
* 实测厚度

View File

@@ -236,7 +236,7 @@ public class WmsMaterialCoilVo extends BaseEntity {
private String saleName;
//新增长度字段
private BigDecimal length;
private Long length;
//发货人
private String exportBy;
@@ -277,7 +277,7 @@ public class WmsMaterialCoilVo extends BaseEntity {
* 实测长度
*/
@ExcelProperty(value = "实测长度")
private BigDecimal actualLength;
private Long actualLength;
/**
* 实测宽度

View File

@@ -303,7 +303,7 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
// 净重 > 毛重
plan.setInMatWeight(coil.getNetWeight() != null ? coil.getNetWeight() : coil.getGrossWeight());
// 长度
plan.setInMatLength(coil.getLength());
plan.setInMatLength(coil.getLength() != null ? BigDecimal.valueOf(coil.getLength()) : null);
// ② 查原材料库itemType='raw_material' 时通过 itemId 关联)
if ("raw_material".equals(coil.getItemType()) && coil.getItemId() != null) {

View File

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
import com.klp.domain.bo.WmsCoilWarehouseOperationLogBo;
import com.klp.domain.vo.WmsCoilWarehouseOperationLogVo;
import com.klp.domain.vo.WmsCoilWarehouseOperationLogExportVo;
import java.math.BigDecimal;
import com.klp.domain.vo.WmsMaterialCoilVo;
import com.klp.domain.WmsCoilWarehouseOperationLog;
import com.klp.mapper.WmsCoilWarehouseOperationLogMapper;
@@ -295,7 +296,7 @@ public class WmsCoilWarehouseOperationLogServiceImpl implements IWmsCoilWarehous
exportVo.setStatusDesc(getStatusDesc(coil.getStatus()));
exportVo.setItemName(coil.getItemName());
exportVo.setSpecification(coil.getSpecification());
exportVo.setLength(coil.getLength());
exportVo.setLength(coil.getLength() != null ? BigDecimal.valueOf(coil.getLength()) : null);
exportVo.setMaterial(coil.getMaterial());
exportVo.setManufacturer(coil.getManufacturer());
exportVo.setSurfaceTreatmentDesc(coil.getSurfaceTreatmentDesc());