feat(wms): 新增钢卷报表查询接口和解锁功能
- 添加 queryReportList 方法用于轻量级报表数据查询 - 新增 listForReport 控制器接口返回必要字段提升传输性能 - 创建 WmsMaterialCoilReportVo 类定义报表数据结构 - 添加 unlockCoil 方法解除钢卷锁定状态 - 实现 unlockCoil 控制器接口支持 PUT 请求 - 更新数据库映射配置移除多余关联查询字段 - 优化报表查询 SQL 仅返回必要字段提升查询效率
This commit is contained in:
@@ -3050,6 +3050,17 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
return wmsMaterialCoilDeliveryExportVos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钢卷报表数据(轻量级,仅返回必要字段)
|
||||
* 使用与分页列表相同的查询条件,但只返回少量字段以提升传输性能
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<WmsMaterialCoilReportVo> queryReportList(WmsMaterialCoilBo bo) {
|
||||
QueryWrapper<WmsMaterialCoil> lqw = buildQueryWrapperPlus(bo);
|
||||
return baseMapper.selectPageReportList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退火报表导出:按 coilIds 查询钢卷 + 退火计划联查数据
|
||||
*/
|
||||
@@ -5709,5 +5720,20 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
return material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean unlockCoil(Long coilId) {
|
||||
if (coilId == null) {
|
||||
throw new RuntimeException("钢卷ID不能为空");
|
||||
}
|
||||
WmsMaterialCoil coil = baseMapper.selectById(coilId);
|
||||
if (coil == null) {
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
LambdaUpdateWrapper<WmsMaterialCoil> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(WmsMaterialCoil::getCoilId, coilId)
|
||||
.set(WmsMaterialCoil::getExclusiveStatus, 0);
|
||||
return baseMapper.update(null, updateWrapper) > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user