feat(wms): 添加钢卷号重复检查和最大钢卷号查询功能
- 实现了钢卷号重复检查接口,支持检查入场钢卷号和当前钢卷号是否重复 - 添加了根据入场钢卷号前缀查询最大入场钢卷号的功能 - 在服务层新增了 checkCoilNoDuplicate 方法用于重复验证逻辑 - 在服务层新增了 getMaxEnterCoilNoByPrefix 方法用于获取最大钢卷号 - 在控制器层暴露了对应的 REST API 接口 - 完善了相关方法的文档注释和参数校验
This commit is contained in:
@@ -253,5 +253,40 @@ public class WmsMaterialCoilController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查钢卷号是否重复
|
||||
* 前端传入入场钢卷号和当前钢卷号,返回哪个钢卷号重复
|
||||
*
|
||||
* @param enterCoilNo 入场钢卷号
|
||||
* @param currentCoilNo 当前钢卷号
|
||||
* @return 返回结果,包含:
|
||||
* - duplicateType: "enter" (入场钢卷号重复), "current" (当前钢卷号重复), "both" (都重复), "none" (都不重复)
|
||||
* - enterCoilNoDuplicate: 入场钢卷号是否重复
|
||||
* - currentCoilNoDuplicate: 当前钢卷号是否重复
|
||||
*/
|
||||
@GetMapping("/checkCoilNoDuplicate")
|
||||
public R<Map<String, Object>> checkCoilNoDuplicate(
|
||||
@RequestParam(required = false) String enterCoilNo,
|
||||
@RequestParam(required = false) String currentCoilNo) {
|
||||
Map<String, Object> result = iWmsMaterialCoilService.checkCoilNoDuplicate(enterCoilNo, currentCoilNo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据入场钢卷号前缀查询最大的入场钢卷号
|
||||
* 前端传入入场钢卷号的前四位,查询所有符合的入场钢卷号,返回最大值
|
||||
*
|
||||
* @param enterCoilNoPrefix 入场钢卷号前缀(前四位)
|
||||
* @return 返回结果,包含:
|
||||
* - maxEnterCoilNo: 最大的入场钢卷号
|
||||
* - prefix: 前缀值
|
||||
*/
|
||||
@GetMapping("/getMaxEnterCoilNo")
|
||||
public R<Map<String, Object>> getMaxEnterCoilNoByPrefix(
|
||||
@RequestParam @NotBlank(message = "入场钢卷号前缀不能为空") String enterCoilNoPrefix) {
|
||||
Map<String, Object> result = iWmsMaterialCoilService.getMaxEnterCoilNoByPrefix(enterCoilNoPrefix);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user