Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X
This commit is contained in:
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.exception.ServiceException;
|
||||
import com.klp.common.helper.LoginHelper;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.common.utils.spring.SpringUtils;
|
||||
@@ -431,9 +432,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
}
|
||||
|
||||
// 使用 EXISTS 针对 selectType 的细粒度筛选(使用参数占位符防注入)
|
||||
if (hasSelectType) {
|
||||
qw.eq("mc.item_type", bo.getSelectType());
|
||||
if (hasAnyItemFilter) {
|
||||
if (hasSelectType && hasAnyItemFilter) {
|
||||
// 执行筛选逻辑(和上面完全一样)
|
||||
qw.eq("mc.item_type", bo.getSelectType());
|
||||
StringBuilder existsSql = new StringBuilder();
|
||||
List<Object> existsArgs = new ArrayList<>();
|
||||
if ("product".equals(bo.getSelectType())) {
|
||||
@@ -473,7 +474,6 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
qw.apply(existsSql.toString(), existsArgs.toArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 显式 itemId 条件:与 EXISTS 共存时,语义为交集
|
||||
if (CollectionUtils.isNotEmpty(explicitItemIds)) {
|
||||
@@ -984,10 +984,6 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
if (oldCoil == null) {
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
// 判断数据类型 0=历史数据 1=正常数据
|
||||
if (oldCoil.getDataType() == 0) {
|
||||
throw new RuntimeException("原钢卷已被更新");
|
||||
}
|
||||
|
||||
// 若修改实际库位,先进行校验
|
||||
if (bo.getActualWarehouseId() != null) {
|
||||
@@ -2225,6 +2221,10 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
WmsMaterialCoilVo wmsMaterialCoilVo = queryById(coilId);
|
||||
Long oldActualWarehouseId = wmsMaterialCoilVo != null ? wmsMaterialCoilVo.getActualWarehouseId() : null;
|
||||
|
||||
// 如果当前钢卷为历史数据应该抛异常
|
||||
if (wmsMaterialCoilVo != null && wmsMaterialCoilVo.getDataType() == 0) {
|
||||
throw new RuntimeException("当前数据为历史数据,请勿发货!");
|
||||
}
|
||||
// 1. 更新钢卷为已发货,并记录发货时间,同时清空实际库区占用(改用Wrapper实现)
|
||||
int rows = 0;
|
||||
//获取当前调用接口的这个人的username
|
||||
|
||||
Reference in New Issue
Block a user