feat(wms): 添加排产厚度字段支持
- 在 WmsMaterialCoil 实体类中新增 scheduleThickness 字段 - 在 WmsMaterialCoilBo 业务对象中新增 scheduleThickness 字段 - 在 WmsMaterialCoilController 控制器中添加排产厚度列映射 - 在 WmsMaterialCoilExportVo 导出对象中添加 Excel 导出支持 - 在 WmsMaterialCoilMapper.xml 中添加数据库映射配置 - 在 WmsMaterialCoilServiceImpl 服务实现中添加查询条件支持 - 修复钢卷号重复检查逻辑中的数据类型判断问题 - 在 WmsMaterialCoilVo 视图对象中添加排产厚度字段
This commit is contained in:
@@ -195,6 +195,7 @@ public class WmsMaterialCoilController extends BaseController {
|
||||
columns.put("transferType", "调拨类型");
|
||||
columns.put("team", "班组");
|
||||
columns.put("theoreticalThickness", "理论厚度");
|
||||
columns.put("scheduleThickness", "排产厚度");
|
||||
columns.put("theoreticalLength", "理论长度");
|
||||
columns.put("chromePlateCoilNo", "镀铬卷号");
|
||||
return R.ok(columns);
|
||||
|
||||
@@ -219,6 +219,11 @@ public class WmsMaterialCoil extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal theoreticalThickness;
|
||||
|
||||
/**
|
||||
* 排产厚度(单位:毫米)
|
||||
*/
|
||||
private BigDecimal scheduleThickness;
|
||||
|
||||
/**
|
||||
* 理论长度(单位:米)
|
||||
*/
|
||||
|
||||
@@ -392,6 +392,11 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal theoreticalThickness;
|
||||
|
||||
/**
|
||||
* 排产厚度(单位:毫米)
|
||||
*/
|
||||
private BigDecimal scheduleThickness;
|
||||
|
||||
/**
|
||||
* 理论长度(单位:米)
|
||||
*/
|
||||
|
||||
@@ -215,6 +215,12 @@ public class WmsMaterialCoilExportVo {
|
||||
@ExcelProperty(value = "理论厚度")
|
||||
private BigDecimal theoreticalThickness;
|
||||
|
||||
/**
|
||||
* 排产厚度(单位:毫米)
|
||||
*/
|
||||
@ExcelProperty(value = "排产厚度")
|
||||
private BigDecimal scheduleThickness;
|
||||
|
||||
/**
|
||||
* 理论长度(单位:米)
|
||||
*/
|
||||
|
||||
@@ -345,6 +345,11 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal theoreticalThickness;
|
||||
|
||||
/**
|
||||
* 排产厚度(单位:毫米)
|
||||
*/
|
||||
private BigDecimal scheduleThickness;
|
||||
|
||||
/**
|
||||
* 理论长度(单位:米)
|
||||
*/
|
||||
|
||||
@@ -731,6 +731,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
qw.eq(StringUtils.isNotBlank(bo.getActualThickness()), "mc.actual_thickness", bo.getActualThickness());
|
||||
// 理论厚度
|
||||
qw.eq(bo.getTheoreticalThickness() != null, "mc.theoretical_thickness", bo.getTheoreticalThickness());
|
||||
// 排产厚度
|
||||
qw.eq(bo.getScheduleThickness() != null, "mc.schedule_thickness", bo.getScheduleThickness());
|
||||
// 理论长度
|
||||
qw.eq(bo.getTheoreticalLength() != null, "mc.theoretical_length", bo.getTheoreticalLength());
|
||||
// 镀铬卷号
|
||||
@@ -1813,7 +1815,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
throw new RuntimeException("原钢卷已被更新");
|
||||
}
|
||||
|
||||
// 检查当前钢卷号是否重复(单个更新,传入coilId排除自身)
|
||||
// 检查当前钢卷号是否重复(单个更新,传入coilId排除老卷) 首先退火走的这个接口但是退火的当前钢卷号是不会变的
|
||||
// 当前钢卷号不变加工必然报错老卷还没变成历史所以要排除和老卷相同的情况 由于老卷马上就要变成历史了也不用担心和老卷的当前钢卷号重复问题了
|
||||
Map<String, Object> duplicateCheck = checkCoilNoDuplicate(bo.getCoilId(), null, bo.getCurrentCoilNo(), null);
|
||||
if ("current".equals(duplicateCheck.get("duplicateType")) || "both".equals(duplicateCheck.get("duplicateType"))) {
|
||||
throw new RuntimeException("更新失败:当前钢卷号[" + bo.getCurrentCoilNo() + "]已存在");
|
||||
@@ -3906,8 +3909,10 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 1. 如果coilId不为空(修改操作),先查询该钢卷的dataType
|
||||
if (coilId != null) {
|
||||
WmsMaterialCoil coil = baseMapper.selectById(coilId);
|
||||
// 2. 如果查询到钢卷且dataType!=1(说明是历史记录),直接返回无重复
|
||||
if (coil != null && coil.getDataType() != 1) {
|
||||
// 2. 如果查询到钢卷且dataType==0(说明是历史记录),直接返回无重复
|
||||
// 为了防止历史的入场钢卷号问题因为排除自身也没用, 回滚本身操作的就是历史钢卷,但是它不应该跳过因为它要变成现存卷了
|
||||
// 回滚卷要校验钢卷号 所以回滚是不需要传递coilId 加上本身是历史卷 所以也不会被查出来 .eq(WmsMaterialCoil::getDataType, 1);已经过滤掉自身了 所以也能修改
|
||||
if (coil != null && coil.getDataType() == 0) {
|
||||
result.put("duplicateType", "none");
|
||||
result.put("enterCoilNoDuplicate", false);
|
||||
result.put("currentCoilNoDuplicate", false);
|
||||
|
||||
@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="specId" column="spec_id"/>
|
||||
<result property="versionId" column="version_id"/>
|
||||
<result property="theoreticalThickness" column="theoretical_thickness"/>
|
||||
<result property="scheduleThickness" column="schedule_thickness"/>
|
||||
<result property="theoreticalLength" column="theoretical_length"/>
|
||||
<result property="chromePlateCoilNo" column="chrome_plate_coil_no"/>
|
||||
|
||||
@@ -132,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mc.exclusive_status,
|
||||
mc.transfer_type,
|
||||
mc.theoretical_thickness,
|
||||
mc.schedule_thickness,
|
||||
mc.theoretical_length,
|
||||
mc.chrome_plate_coil_no,
|
||||
mc.sale_name AS saleName,
|
||||
@@ -488,6 +490,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mc.transfer_type AS transferType,
|
||||
-- 理论厚度
|
||||
mc.theoretical_thickness AS theoreticalThickness,
|
||||
-- 排产厚度
|
||||
mc.schedule_thickness AS scheduleThickness,
|
||||
-- 理论长度
|
||||
mc.theoretical_length AS theoreticalLength,
|
||||
-- 镀铬卷号
|
||||
@@ -580,6 +584,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mc.sale_name AS saleName,
|
||||
mc.transfer_type AS transferType,
|
||||
mc.theoretical_thickness AS theoreticalThickness,
|
||||
mc.schedule_thickness AS scheduleThickness,
|
||||
mc.theoretical_length AS theoreticalLength,
|
||||
mc.chrome_plate_coil_no AS chromePlateCoilNo,
|
||||
CASE
|
||||
@@ -701,6 +706,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
mc.sale_name AS saleName,
|
||||
mc.transfer_type AS transferType,
|
||||
mc.theoretical_thickness AS theoreticalThickness,
|
||||
mc.schedule_thickness AS scheduleThickness,
|
||||
mc.theoretical_length AS theoreticalLength,
|
||||
mc.chrome_plate_coil_no AS chromePlateCoilNo,
|
||||
CASE
|
||||
|
||||
Reference in New Issue
Block a user