fix(wms): 修复材料卷号重复校验逻辑
- 在查询条件中添加数据类型过滤器 (dataType=1) - 确保只对特定类型的数据进行重复检查 - 修正了进入卷号和当前卷号的重复验证逻辑
This commit is contained in:
@@ -2600,7 +2600,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
if (StringUtils.isNotBlank(enterCoilNo)) {
|
if (StringUtils.isNotBlank(enterCoilNo)) {
|
||||||
LambdaQueryWrapper<WmsMaterialCoil> enterWrapper = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<WmsMaterialCoil> enterWrapper = Wrappers.lambdaQuery();
|
||||||
enterWrapper.eq(WmsMaterialCoil::getEnterCoilNo, enterCoilNo)
|
enterWrapper.eq(WmsMaterialCoil::getEnterCoilNo, enterCoilNo)
|
||||||
.eq(WmsMaterialCoil::getDelFlag, 0);
|
.eq(WmsMaterialCoil::getDelFlag, 0)
|
||||||
|
.eq(WmsMaterialCoil::getDataType, 1);
|
||||||
long enterCount = baseMapper.selectCount(enterWrapper);
|
long enterCount = baseMapper.selectCount(enterWrapper);
|
||||||
enterCoilNoDuplicate = enterCount > 0;
|
enterCoilNoDuplicate = enterCount > 0;
|
||||||
}
|
}
|
||||||
@@ -2609,7 +2610,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
if (StringUtils.isNotBlank(currentCoilNo)) {
|
if (StringUtils.isNotBlank(currentCoilNo)) {
|
||||||
LambdaQueryWrapper<WmsMaterialCoil> currentWrapper = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<WmsMaterialCoil> currentWrapper = Wrappers.lambdaQuery();
|
||||||
currentWrapper.eq(WmsMaterialCoil::getCurrentCoilNo, currentCoilNo)
|
currentWrapper.eq(WmsMaterialCoil::getCurrentCoilNo, currentCoilNo)
|
||||||
.eq(WmsMaterialCoil::getDelFlag, 0);
|
.eq(WmsMaterialCoil::getDelFlag, 0)
|
||||||
|
.eq(WmsMaterialCoil::getDataType, 1);
|
||||||
|
|
||||||
long currentCount = baseMapper.selectCount(currentWrapper);
|
long currentCount = baseMapper.selectCount(currentWrapper);
|
||||||
currentCoilNoDuplicate = currentCount > 0;
|
currentCoilNoDuplicate = currentCount > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user