feat(wms): 添加钢卷统计记录存在性检查功能

- 在服务接口中新增 checkExistsByStatTypeToday 方法用于检查当天指定类型统计记录的存在性
- 在控制器中新增 /checkToday 接口提供统计记录存在性检查服务
- 在服务实现类中实现具体的数据库查询逻辑,使用日期函数过滤当天数据
- 添加参数校验确保统计类型参数不为空
- 使用分页限制优化查询性能,仅返回是否存在标识
This commit is contained in:
2026-03-10 16:28:07 +08:00
parent e937ff50f6
commit 927cbf9586
3 changed files with 36 additions and 0 deletions

View File

@@ -96,4 +96,15 @@ public class WmsCoilStatisticsSummaryController extends BaseController {
@PathVariable Long[] summaryIds) {
return toAjax(iWmsCoilStatisticsSummaryService.deleteWithValidByIds(Arrays.asList(summaryIds), true));
}
/**
* 检查当天是否存在指定类型的统计记录
*
* @param statType 统计类型
* @return true-存在false-不存在
*/
@GetMapping("/checkToday")
public R<Boolean> checkTodayExists(@RequestParam String statType) {
return R.ok(iWmsCoilStatisticsSummaryService.checkExistsByStatTypeToday(statType));
}
}