fix(wms/material): 修正钢卷长度字段为整型
将WmsMaterialCoil及相关BO/VO中的length和actualLength字段从BigDecimal改为Long类型,并在WmsCoilPendingActionServiceImpl和WmsCoilWarehouseOperationLogServiceImpl中相应调整赋值逻辑,确保类型转换时进行空值检查,避免空指针异常。
This commit is contained in:
@@ -137,7 +137,7 @@ public class WmsMaterialCoil extends BaseEntity {
|
|||||||
|
|
||||||
|
|
||||||
//新增长度字段
|
//新增长度字段
|
||||||
private BigDecimal length;
|
private Long length;
|
||||||
|
|
||||||
//发货人
|
//发货人
|
||||||
private String exportBy;
|
private String exportBy;
|
||||||
@@ -167,7 +167,7 @@ public class WmsMaterialCoil extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 实测长度
|
* 实测长度
|
||||||
*/
|
*/
|
||||||
private BigDecimal actualLength;
|
private Long actualLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实测宽度
|
* 实测宽度
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
|||||||
|
|
||||||
|
|
||||||
//新增长度字段
|
//新增长度字段
|
||||||
private BigDecimal length;
|
private Long length;
|
||||||
|
|
||||||
// 新增的在钢卷表中的表面处理
|
// 新增的在钢卷表中的表面处理
|
||||||
private String coilSurfaceTreatment;
|
private String coilSurfaceTreatment;
|
||||||
@@ -295,7 +295,7 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 实测长度
|
* 实测长度
|
||||||
*/
|
*/
|
||||||
private BigDecimal actualLength;
|
private Long actualLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实测宽度
|
* 实测宽度
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class WmsMaterialCoilAllExportVo {
|
|||||||
|
|
||||||
|
|
||||||
@ExcelProperty(value = "长度")
|
@ExcelProperty(value = "长度")
|
||||||
private BigDecimal length;
|
private Long length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格
|
* 规格
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class WmsMaterialCoilExportVo {
|
|||||||
|
|
||||||
|
|
||||||
@ExcelProperty(value = "长度")
|
@ExcelProperty(value = "长度")
|
||||||
private BigDecimal length;
|
private Long length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实测厚度
|
* 实测厚度
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
|||||||
private String saleName;
|
private String saleName;
|
||||||
|
|
||||||
//新增长度字段
|
//新增长度字段
|
||||||
private BigDecimal length;
|
private Long length;
|
||||||
|
|
||||||
//发货人
|
//发货人
|
||||||
private String exportBy;
|
private String exportBy;
|
||||||
@@ -277,7 +277,7 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
|||||||
* 实测长度
|
* 实测长度
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "实测长度")
|
@ExcelProperty(value = "实测长度")
|
||||||
private BigDecimal actualLength;
|
private Long actualLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实测宽度
|
* 实测宽度
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
|||||||
// 净重 > 毛重
|
// 净重 > 毛重
|
||||||
plan.setInMatWeight(coil.getNetWeight() != null ? coil.getNetWeight() : coil.getGrossWeight());
|
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 关联)
|
// ② 查原材料库(itemType='raw_material' 时通过 itemId 关联)
|
||||||
if ("raw_material".equals(coil.getItemType()) && coil.getItemId() != null) {
|
if ("raw_material".equals(coil.getItemType()) && coil.getItemId() != null) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import com.klp.domain.bo.WmsCoilWarehouseOperationLogBo;
|
import com.klp.domain.bo.WmsCoilWarehouseOperationLogBo;
|
||||||
import com.klp.domain.vo.WmsCoilWarehouseOperationLogVo;
|
import com.klp.domain.vo.WmsCoilWarehouseOperationLogVo;
|
||||||
import com.klp.domain.vo.WmsCoilWarehouseOperationLogExportVo;
|
import com.klp.domain.vo.WmsCoilWarehouseOperationLogExportVo;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import com.klp.domain.vo.WmsMaterialCoilVo;
|
import com.klp.domain.vo.WmsMaterialCoilVo;
|
||||||
import com.klp.domain.WmsCoilWarehouseOperationLog;
|
import com.klp.domain.WmsCoilWarehouseOperationLog;
|
||||||
import com.klp.mapper.WmsCoilWarehouseOperationLogMapper;
|
import com.klp.mapper.WmsCoilWarehouseOperationLogMapper;
|
||||||
@@ -295,7 +296,7 @@ public class WmsCoilWarehouseOperationLogServiceImpl implements IWmsCoilWarehous
|
|||||||
exportVo.setStatusDesc(getStatusDesc(coil.getStatus()));
|
exportVo.setStatusDesc(getStatusDesc(coil.getStatus()));
|
||||||
exportVo.setItemName(coil.getItemName());
|
exportVo.setItemName(coil.getItemName());
|
||||||
exportVo.setSpecification(coil.getSpecification());
|
exportVo.setSpecification(coil.getSpecification());
|
||||||
exportVo.setLength(coil.getLength());
|
exportVo.setLength(coil.getLength() != null ? BigDecimal.valueOf(coil.getLength()) : null);
|
||||||
exportVo.setMaterial(coil.getMaterial());
|
exportVo.setMaterial(coil.getMaterial());
|
||||||
exportVo.setManufacturer(coil.getManufacturer());
|
exportVo.setManufacturer(coil.getManufacturer());
|
||||||
exportVo.setSurfaceTreatmentDesc(coil.getSurfaceTreatmentDesc());
|
exportVo.setSurfaceTreatmentDesc(coil.getSurfaceTreatmentDesc());
|
||||||
|
|||||||
Reference in New Issue
Block a user