Commit ef7b2ab43d7cf2aeab6a456434a85fff22712f55
1 parent
67173a4f
✨ feat(mes): 更新检验单完成接口及权限管理
Showing
12 changed files
with
24 additions
and
24 deletions
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/ipqc/MesQcIpqcController.java
| @@ -82,12 +82,12 @@ public class MesQcIpqcController { | @@ -82,12 +82,12 @@ public class MesQcIpqcController { | ||
| 82 | return success(true); | 82 | return success(true); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | - @PutMapping("/complete") | 85 | + @PutMapping("/finish") |
| 86 | @Operation(summary = "完成过程检验单") | 86 | @Operation(summary = "完成过程检验单") |
| 87 | @Parameter(name = "id", description = "编号", required = true) | 87 | @Parameter(name = "id", description = "编号", required = true) |
| 88 | - @PreAuthorize("@ss.hasPermission('mes:qc-ipqc:update')") | ||
| 89 | - public CommonResult<Boolean> completeIpqc(@RequestParam("id") Long id) { | ||
| 90 | - ipqcService.completeIpqc(id); | 88 | + @PreAuthorize("@ss.hasPermission('mes:qc-ipqc:finish')") |
| 89 | + public CommonResult<Boolean> finishIpqc(@RequestParam("id") Long id) { | ||
| 90 | + ipqcService.finishIpqc(id); | ||
| 91 | return success(true); | 91 | return success(true); |
| 92 | } | 92 | } |
| 93 | 93 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/iqc/MesQcIqcController.java
| @@ -74,12 +74,12 @@ public class MesQcIqcController { | @@ -74,12 +74,12 @@ public class MesQcIqcController { | ||
| 74 | return success(true); | 74 | return success(true); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | - @PutMapping("/complete") | 77 | + @PutMapping("/finish") |
| 78 | @Operation(summary = "完成来料检验单") | 78 | @Operation(summary = "完成来料检验单") |
| 79 | @Parameter(name = "id", description = "编号", required = true) | 79 | @Parameter(name = "id", description = "编号", required = true) |
| 80 | - @PreAuthorize("@ss.hasPermission('mes:qc-iqc:update')") | ||
| 81 | - public CommonResult<Boolean> completeIqc(@RequestParam("id") Long id) { | ||
| 82 | - iqcService.completeIqc(id); | 80 | + @PreAuthorize("@ss.hasPermission('mes:qc-iqc:finish')") |
| 81 | + public CommonResult<Boolean> finishIqc(@RequestParam("id") Long id) { | ||
| 82 | + iqcService.finishIqc(id); | ||
| 83 | return success(true); | 83 | return success(true); |
| 84 | } | 84 | } |
| 85 | 85 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/oqc/MesQcOqcController.java
| @@ -73,12 +73,12 @@ public class MesQcOqcController { | @@ -73,12 +73,12 @@ public class MesQcOqcController { | ||
| 73 | return success(true); | 73 | return success(true); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | - @PutMapping("/complete") | 76 | + @PutMapping("/finish") |
| 77 | @Operation(summary = "完成出货检验单") | 77 | @Operation(summary = "完成出货检验单") |
| 78 | @Parameter(name = "id", description = "编号", required = true) | 78 | @Parameter(name = "id", description = "编号", required = true) |
| 79 | - @PreAuthorize("@ss.hasPermission('mes:qc-oqc:update')") | ||
| 80 | - public CommonResult<Boolean> completeOqc(@RequestParam("id") Long id) { | ||
| 81 | - oqcService.completeOqc(id); | 79 | + @PreAuthorize("@ss.hasPermission('mes:qc-oqc:finish')") |
| 80 | + public CommonResult<Boolean> finishOqc(@RequestParam("id") Long id) { | ||
| 81 | + oqcService.finishOqc(id); | ||
| 82 | return success(true); | 82 | return success(true); |
| 83 | } | 83 | } |
| 84 | 84 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/rqc/MesQcRqcController.java
| @@ -69,12 +69,12 @@ public class MesQcRqcController { | @@ -69,12 +69,12 @@ public class MesQcRqcController { | ||
| 69 | return success(true); | 69 | return success(true); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | - @PutMapping("/complete") | 72 | + @PutMapping("/finish") |
| 73 | @Operation(summary = "完成退货检验单") | 73 | @Operation(summary = "完成退货检验单") |
| 74 | @Parameter(name = "id", description = "编号", required = true) | 74 | @Parameter(name = "id", description = "编号", required = true) |
| 75 | - @PreAuthorize("@ss.hasPermission('mes:qc-rqc:update')") | ||
| 76 | - public CommonResult<Boolean> completeRqc(@RequestParam("id") Long id) { | ||
| 77 | - rqcService.completeRqc(id); | 75 | + @PreAuthorize("@ss.hasPermission('mes:qc-rqc:finish')") |
| 76 | + public CommonResult<Boolean> finishRqc(@RequestParam("id") Long id) { | ||
| 77 | + rqcService.finishRqc(id); | ||
| 78 | return success(true); | 78 | return success(true); |
| 79 | } | 79 | } |
| 80 | 80 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/ipqc/MesQcIpqcService.java
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/ipqc/MesQcIpqcServiceImpl.java
| @@ -110,7 +110,7 @@ public class MesQcIpqcServiceImpl implements MesQcIpqcService { | @@ -110,7 +110,7 @@ public class MesQcIpqcServiceImpl implements MesQcIpqcService { | ||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | @Override | 112 | @Override |
| 113 | - public void completeIpqc(Long id) { | 113 | + public void finishIpqc(Long id) { |
| 114 | // 1.1 校验存在 + 草稿状态 | 114 | // 1.1 校验存在 + 草稿状态 |
| 115 | MesQcIpqcDO ipqc = validateIpqcStatusPrepare(id); | 115 | MesQcIpqcDO ipqc = validateIpqcStatusPrepare(id); |
| 116 | // 1.2 校验检测结论必填 | 116 | // 1.2 校验检测结论必填 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/iqc/MesQcIqcService.java
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/iqc/MesQcIqcServiceImpl.java
| @@ -111,7 +111,7 @@ public class MesQcIqcServiceImpl implements MesQcIqcService { | @@ -111,7 +111,7 @@ public class MesQcIqcServiceImpl implements MesQcIqcService { | ||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | @Override | 113 | @Override |
| 114 | - public void completeIqc(Long id) { | 114 | + public void finishIqc(Long id) { |
| 115 | // 1.1 校验存在 + 草稿状态 | 115 | // 1.1 校验存在 + 草稿状态 |
| 116 | MesQcIqcDO iqc = validateIqcStatusPrepare(id); | 116 | MesQcIqcDO iqc = validateIqcStatusPrepare(id); |
| 117 | if (iqc.getCheckResult() == null) { | 117 | if (iqc.getCheckResult() == null) { |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/oqc/MesQcOqcService.java
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/oqc/MesQcOqcServiceImpl.java
| @@ -100,7 +100,7 @@ public class MesQcOqcServiceImpl implements MesQcOqcService { | @@ -100,7 +100,7 @@ public class MesQcOqcServiceImpl implements MesQcOqcService { | ||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | @Override | 102 | @Override |
| 103 | - public void completeOqc(Long id) { | 103 | + public void finishOqc(Long id) { |
| 104 | // 1. 校验存在 + 草稿状态 | 104 | // 1. 校验存在 + 草稿状态 |
| 105 | validateOqcStatusPrepare(id); | 105 | validateOqcStatusPrepare(id); |
| 106 | 106 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/rqc/MesQcRqcService.java
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/rqc/MesQcRqcServiceImpl.java
| @@ -95,7 +95,7 @@ public class MesQcRqcServiceImpl implements MesQcRqcService { | @@ -95,7 +95,7 @@ public class MesQcRqcServiceImpl implements MesQcRqcService { | ||
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | @Override | 97 | @Override |
| 98 | - public void completeRqc(Long id) { | 98 | + public void finishRqc(Long id) { |
| 99 | // 1.1 校验存在 + 草稿状态 | 99 | // 1.1 校验存在 + 草稿状态 |
| 100 | MesQcRqcDO rqc = validateRqcStatusPrepare(id); | 100 | MesQcRqcDO rqc = validateRqcStatusPrepare(id); |
| 101 | // 1.2 校验合格品 + 不合格品 = 检测数量 | 101 | // 1.2 校验合格品 + 不合格品 = 检测数量 |