Showing
3 changed files
with
6 additions
and
3 deletions
| ... | ... | @@ -37,7 +37,7 @@ public class ProcurementPlanChangeController extends DefaultBaseController { |
| 37 | 37 | * 查询列表 |
| 38 | 38 | */ |
| 39 | 39 | @ApiOperation("查询列表") |
| 40 | - @HasPermission({"plan-manage:plan-change:query"}) | |
| 40 | + @HasPermission({"plan-manage:schedule-plan:query"}) | |
| 41 | 41 | @GetMapping("/query") |
| 42 | 42 | public InvokeResult<PageResult<ProcurementPlanChange>> query(@Valid QueryProcurementPlanChangeVo vo) { |
| 43 | 43 | PageResult<ProcurementPlanChange> result = procurementPlanChangeService.query( |
| ... | ... | @@ -50,7 +50,7 @@ public class ProcurementPlanChangeController extends DefaultBaseController { |
| 50 | 50 | */ |
| 51 | 51 | @ApiOperation("查询详情") |
| 52 | 52 | @ApiImplicitParam(value = "ID", name = "id", paramType = "query", required = true) |
| 53 | - @HasPermission({"plan-manage:plan-change:query","plan-manage:schedule-plan:view"}) | |
| 53 | + @HasPermission({"plan-manage:schedule-plan:query","plan-manage:schedule-plan:view"}) | |
| 54 | 54 | @GetMapping("/findById") |
| 55 | 55 | public InvokeResult<GetProcurementPlanChangeBo> findById(@NotBlank(message = "ID不能为空!") String id) { |
| 56 | 56 | GetProcurementPlanChangeBo result = procurementPlanChangeService.findDetail(id); | ... | ... |
| ... | ... | @@ -142,7 +142,7 @@ public class ProcurementPlanController extends DefaultBaseController { |
| 142 | 142 | */ |
| 143 | 143 | @ApiOperation("根据ID查询") |
| 144 | 144 | @ApiImplicitParam(value = "ID", name = "id", paramType = "query", required = true) |
| 145 | - @HasPermission({"procurement:plan:query"}) | |
| 145 | + @HasPermission({"plan-manage:domestic-plan:query"}) | |
| 146 | 146 | @GetMapping |
| 147 | 147 | public InvokeResult<GetProcurementPlanBo> findById( |
| 148 | 148 | @NotBlank(message = "ID不能为空!") String id) { | ... | ... |
| ... | ... | @@ -714,9 +714,11 @@ public class ProcurementPlanServiceImpl extends BaseMpServiceImpl<ProcurementPla |
| 714 | 714 | |
| 715 | 715 | // 2. 查询当月最大的编号(例如:260100005) |
| 716 | 716 | // 使用 MyBatis-Plus 的 likeRight 进行前缀匹配,确保只查当月的数据 |
| 717 | + // 过滤包含下划线的子计划/归档编号(如 260800001_01、260800001_HIST):下划线在LIKE中是通配符,需要ESCAPE转义 | |
| 717 | 718 | ProcurementPlan maxPlan = getBaseMapper().selectOne( |
| 718 | 719 | Wrappers.lambdaQuery(ProcurementPlan.class) |
| 719 | 720 | .likeRight(ProcurementPlan::getCode, datePrefix) |
| 721 | + .apply("code NOT LIKE '%/_%' ESCAPE '/'") | |
| 720 | 722 | .orderByDesc(ProcurementPlan::getCode) |
| 721 | 723 | .last("LIMIT 1") |
| 722 | 724 | ); |
| ... | ... | @@ -737,6 +739,7 @@ public class ProcurementPlanServiceImpl extends BaseMpServiceImpl<ProcurementPla |
| 737 | 739 | |
| 738 | 740 | // 4. 拼接最终编号,流水号不足5位左侧补0 |
| 739 | 741 | String candidate = datePrefix + String.format("%05d", nextSeq); |
| 742 | + System.out.println("candidate===" + candidate); | |
| 740 | 743 | |
| 741 | 744 | // 5. 兜底校验:防止极端并发下出现重复 |
| 742 | 745 | Integer count = getBaseMapper().selectCount( | ... | ... |