fix(wms): 修复钢卷数据类型空指针异常
- 添加了数据类型空值检查,避免空指针异常 - 确保只有当数据类型不为空且等于10时才设置为10 - 保持原有逻辑默认设置数据类型为1
This commit is contained in:
@@ -570,7 +570,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
|
|
||||||
// 3. 插入钢卷数据
|
// 3. 插入钢卷数据
|
||||||
WmsMaterialCoil add = BeanUtil.toBean(bo, WmsMaterialCoil.class);
|
WmsMaterialCoil add = BeanUtil.toBean(bo, WmsMaterialCoil.class);
|
||||||
if(bo.getDataType() == 10){
|
if(bo.getDataType() != null && bo.getDataType() == 10){
|
||||||
add.setDataType(10);
|
add.setDataType(10);
|
||||||
}else {
|
}else {
|
||||||
add.setDataType(1); // 新增的钢卷默认为当前数据
|
add.setDataType(1); // 新增的钢卷默认为当前数据
|
||||||
|
|||||||
Reference in New Issue
Block a user