refactor(wms): 移除销售人员相关字段
- 从WmsMaterialCoilExportVo中移除saleName私有字段 - 从WmsMaterialCoilVo中移除saleId和saleName私有字段 - 从WmsMaterialCoilMapper.xml的多个查询中移除sale_name映射 - 从WmsMaterialCoilMapper.xml的关联查询中移除sys_user表连接 - 移除与销售人员相关的数据库字段映射和关联关系
This commit is contained in:
@@ -772,21 +772,21 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 新增查询逻辑也就是当saleId未空时候
|
||||
if (bo.getSaleId() != null) {
|
||||
if (bo.getSaleId() == -1) {
|
||||
// 当saleId为-1时查询sale_id为空的记录
|
||||
qw.isNull("mc.sale_id");
|
||||
} else if (bo.getSaleId() > 0) {
|
||||
// 正常传值时依据saleId作为查询条件
|
||||
qw.eq("mc.sale_id", bo.getSaleId());
|
||||
}
|
||||
}
|
||||
// // 新增查询逻辑也就是当saleId未空时候
|
||||
// if (bo.getSaleId() != null) {
|
||||
// if (bo.getSaleId() == -1) {
|
||||
// // 当saleId为-1时查询sale_id为空的记录
|
||||
// qw.isNull("mc.sale_id");
|
||||
// } else if (bo.getSaleId() > 0) {
|
||||
// // 正常传值时依据saleId作为查询条件
|
||||
// qw.eq("mc.sale_id", bo.getSaleId());
|
||||
// }
|
||||
// }
|
||||
|
||||
// 销售人员姓名模糊查询
|
||||
if (bo.getSaleName() != null && !bo.getSaleName().isEmpty()) {
|
||||
qw.like("su.nick_name", bo.getSaleName());
|
||||
}
|
||||
// // 销售人员姓名模糊查询
|
||||
// if (bo.getSaleName() != null && !bo.getSaleName().isEmpty()) {
|
||||
// qw.like("su.nick_name", bo.getSaleName());
|
||||
// }
|
||||
|
||||
// 仅查询废品:质量状态为 D+、D、D-
|
||||
if (Boolean.TRUE.equals(bo.getOnlyScrap())) {
|
||||
@@ -1743,12 +1743,12 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 使用MyBatis-Plus的updateById方法直接更新
|
||||
boolean flag = baseMapper.updateById(updateCoil) > 0;
|
||||
// 特殊处理saleId字段,确保null值也能被正确更新
|
||||
if (bo.getSaleId() == null) {
|
||||
LambdaUpdateWrapper<WmsMaterialCoil> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(WmsMaterialCoil::getCoilId, bo.getCoilId());
|
||||
updateWrapper.set(WmsMaterialCoil::getSaleId, (Long)null);
|
||||
baseMapper.update(null, updateWrapper);
|
||||
}
|
||||
// if (bo.getSaleId() == null) {
|
||||
// LambdaUpdateWrapper<WmsMaterialCoil> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
// updateWrapper.eq(WmsMaterialCoil::getCoilId, bo.getCoilId());
|
||||
// updateWrapper.set(WmsMaterialCoil::getSaleId, (Long)null);
|
||||
// baseMapper.update(null, updateWrapper);
|
||||
// }
|
||||
|
||||
// 检查长度/厚度偏差并插入告警
|
||||
materialWarningService.checkAndInsertWarnings(updateCoil, bo);
|
||||
|
||||
Reference in New Issue
Block a user