Commit 8fac43ef9b9df7728b0b5b1155fe3d40f1c08633
Merge branch 'feat/mes' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk17
Showing
386 changed files
with
4611 additions
and
1134 deletions
Too many changes.
To preserve performance only 100 of 386 files are displayed.
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/cal/team/MesCalTeamMemberController.java
| @@ -37,6 +37,7 @@ public class MesCalTeamMemberController { | @@ -37,6 +37,7 @@ public class MesCalTeamMemberController { | ||
| 37 | 37 | ||
| 38 | @Resource | 38 | @Resource |
| 39 | private MesCalTeamMemberService teamMemberService; | 39 | private MesCalTeamMemberService teamMemberService; |
| 40 | + | ||
| 40 | @Resource | 41 | @Resource |
| 41 | private AdminUserApi adminUserApi; | 42 | private AdminUserApi adminUserApi; |
| 42 | 43 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkplan/MesDvCheckPlanMachineryController.java
| @@ -75,7 +75,7 @@ public class MesDvCheckPlanMachineryController { | @@ -75,7 +75,7 @@ public class MesDvCheckPlanMachineryController { | ||
| 75 | return BeanUtils.toBean(list, MesDvCheckPlanMachineryRespVO.class, vo -> | 75 | return BeanUtils.toBean(list, MesDvCheckPlanMachineryRespVO.class, vo -> |
| 76 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> | 76 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> |
| 77 | vo.setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) | 77 | vo.setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) |
| 78 | - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec()) | 78 | + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification()) |
| 79 | ) | 79 | ) |
| 80 | ); | 80 | ); |
| 81 | } | 81 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkplan/vo/machinery/MesDvCheckPlanMachineryRespVO.java
| @@ -28,7 +28,7 @@ public class MesDvCheckPlanMachineryRespVO { | @@ -28,7 +28,7 @@ public class MesDvCheckPlanMachineryRespVO { | ||
| 28 | private String machineryBrand; | 28 | private String machineryBrand; |
| 29 | 29 | ||
| 30 | @Schema(description = "规格型号", example = "HTF120") | 30 | @Schema(description = "规格型号", example = "HTF120") |
| 31 | - private String machinerySpec; | 31 | + private String machinerySpecification; |
| 32 | 32 | ||
| 33 | @Schema(description = "备注") | 33 | @Schema(description = "备注") |
| 34 | private String remark; | 34 | private String remark; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordController.java
| @@ -46,10 +46,8 @@ public class MesDvCheckRecordController { | @@ -46,10 +46,8 @@ public class MesDvCheckRecordController { | ||
| 46 | 46 | ||
| 47 | @Resource | 47 | @Resource |
| 48 | private MesDvCheckRecordService checkRecordService; | 48 | private MesDvCheckRecordService checkRecordService; |
| 49 | - | ||
| 50 | @Resource | 49 | @Resource |
| 51 | private MesDvCheckPlanService checkPlanService; | 50 | private MesDvCheckPlanService checkPlanService; |
| 52 | - | ||
| 53 | @Resource | 51 | @Resource |
| 54 | private MesDvMachineryService machineryService; | 52 | private MesDvMachineryService machineryService; |
| 55 | 53 | ||
| @@ -143,7 +141,7 @@ public class MesDvCheckRecordController { | @@ -143,7 +141,7 @@ public class MesDvCheckRecordController { | ||
| 143 | .setPlanCycleType(plan.getCycleType()).setPlanCycleCount(plan.getCycleCount())); | 141 | .setPlanCycleType(plan.getCycleType()).setPlanCycleCount(plan.getCycleCount())); |
| 144 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo | 142 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo |
| 145 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) | 143 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) |
| 146 | - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec())); | 144 | + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification())); |
| 147 | MapUtils.findAndThen(userMap, vo.getUserId(), | 145 | MapUtils.findAndThen(userMap, vo.getUserId(), |
| 148 | user -> vo.setNickname(user.getNickname())); | 146 | user -> vo.setNickname(user.getNickname())); |
| 149 | }); | 147 | }); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/MesDvCheckRecordLineController.java
| @@ -36,7 +36,6 @@ public class MesDvCheckRecordLineController { | @@ -36,7 +36,6 @@ public class MesDvCheckRecordLineController { | ||
| 36 | 36 | ||
| 37 | @Resource | 37 | @Resource |
| 38 | private MesDvCheckRecordLineService checkRecordLineService; | 38 | private MesDvCheckRecordLineService checkRecordLineService; |
| 39 | - | ||
| 40 | @Resource | 39 | @Resource |
| 41 | private MesDvSubjectService subjectService; | 40 | private MesDvSubjectService subjectService; |
| 42 | 41 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/checkrecord/vo/MesDvCheckRecordRespVO.java
| @@ -64,7 +64,7 @@ public class MesDvCheckRecordRespVO { | @@ -64,7 +64,7 @@ public class MesDvCheckRecordRespVO { | ||
| 64 | 64 | ||
| 65 | @Schema(description = "规格型号", example = "X-100") | 65 | @Schema(description = "规格型号", example = "X-100") |
| 66 | @ExcelProperty("规格型号") | 66 | @ExcelProperty("规格型号") |
| 67 | - private String machinerySpec; | 67 | + private String machinerySpecification; |
| 68 | 68 | ||
| 69 | @Schema(description = "点检时间", requiredMode = Schema.RequiredMode.REQUIRED) | 69 | @Schema(description = "点检时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 70 | @ExcelProperty("点检时间") | 70 | @ExcelProperty("点检时间") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/MesDvMachineryController.java
| @@ -48,10 +48,8 @@ public class MesDvMachineryController { | @@ -48,10 +48,8 @@ public class MesDvMachineryController { | ||
| 48 | 48 | ||
| 49 | @Resource | 49 | @Resource |
| 50 | private MesDvMachineryService machineryService; | 50 | private MesDvMachineryService machineryService; |
| 51 | - | ||
| 52 | @Resource | 51 | @Resource |
| 53 | private MesDvMachineryTypeService machineryTypeService; | 52 | private MesDvMachineryTypeService machineryTypeService; |
| 54 | - | ||
| 55 | @Resource | 53 | @Resource |
| 56 | private MesMdWorkshopService workshopService; | 54 | private MesMdWorkshopService workshopService; |
| 57 | 55 | ||
| @@ -126,7 +124,7 @@ public class MesDvMachineryController { | @@ -126,7 +124,7 @@ public class MesDvMachineryController { | ||
| 126 | // 手动创建导出 demo | 124 | // 手动创建导出 demo |
| 127 | List<MesDvMachineryImportExcelVO> list = Collections.singletonList( | 125 | List<MesDvMachineryImportExcelVO> list = Collections.singletonList( |
| 128 | MesDvMachineryImportExcelVO.builder().code("EQ-001").name("示例设备") | 126 | MesDvMachineryImportExcelVO.builder().code("EQ-001").name("示例设备") |
| 129 | - .brand("示例品牌").spec("型号A").machineryTypeCode("MT-001") | 127 | + .brand("示例品牌").specification("型号A").machineryTypeCode("MT-001") |
| 130 | .workshopCode("WS-001").status(0).build() | 128 | .workshopCode("WS-001").status(0).build() |
| 131 | ); | 129 | ); |
| 132 | // 输出 | 130 | // 输出 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/vo/MesDvMachineryImportExcelVO.java
| @@ -28,7 +28,7 @@ public class MesDvMachineryImportExcelVO { | @@ -28,7 +28,7 @@ public class MesDvMachineryImportExcelVO { | ||
| 28 | private String brand; | 28 | private String brand; |
| 29 | 29 | ||
| 30 | @ExcelProperty("规格型号") | 30 | @ExcelProperty("规格型号") |
| 31 | - private String spec; | 31 | + private String specification; |
| 32 | 32 | ||
| 33 | @ExcelProperty("设备类型编码") | 33 | @ExcelProperty("设备类型编码") |
| 34 | private String machineryTypeCode; | 34 | private String machineryTypeCode; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/vo/MesDvMachineryRespVO.java
| @@ -33,7 +33,7 @@ public class MesDvMachineryRespVO { | @@ -33,7 +33,7 @@ public class MesDvMachineryRespVO { | ||
| 33 | 33 | ||
| 34 | @Schema(description = "规格型号", example = "S7-300") | 34 | @Schema(description = "规格型号", example = "S7-300") |
| 35 | @ExcelProperty("规格型号") | 35 | @ExcelProperty("规格型号") |
| 36 | - private String spec; | 36 | + private String specification; |
| 37 | 37 | ||
| 38 | @Schema(description = "设备类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") | 38 | @Schema(description = "设备类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 39 | private Long machineryTypeId; | 39 | private Long machineryTypeId; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/machinery/vo/MesDvMachinerySaveReqVO.java
| @@ -26,7 +26,7 @@ public class MesDvMachinerySaveReqVO { | @@ -26,7 +26,7 @@ public class MesDvMachinerySaveReqVO { | ||
| 26 | private String brand; | 26 | private String brand; |
| 27 | 27 | ||
| 28 | @Schema(description = "规格型号", example = "S7-300") | 28 | @Schema(description = "规格型号", example = "S7-300") |
| 29 | - private String spec; | 29 | + private String specification; |
| 30 | 30 | ||
| 31 | @Schema(description = "设备类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") | 31 | @Schema(description = "设备类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 32 | @NotNull(message = "设备类型不能为空") | 32 | @NotNull(message = "设备类型不能为空") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordController.java
| @@ -46,10 +46,8 @@ public class MesDvMaintenRecordController { | @@ -46,10 +46,8 @@ public class MesDvMaintenRecordController { | ||
| 46 | 46 | ||
| 47 | @Resource | 47 | @Resource |
| 48 | private MesDvMaintenRecordService maintenRecordService; | 48 | private MesDvMaintenRecordService maintenRecordService; |
| 49 | - | ||
| 50 | @Resource | 49 | @Resource |
| 51 | private MesDvCheckPlanService checkPlanService; | 50 | private MesDvCheckPlanService checkPlanService; |
| 52 | - | ||
| 53 | @Resource | 51 | @Resource |
| 54 | private MesDvMachineryService machineryService; | 52 | private MesDvMachineryService machineryService; |
| 55 | 53 | ||
| @@ -146,7 +144,7 @@ public class MesDvMaintenRecordController { | @@ -146,7 +144,7 @@ public class MesDvMaintenRecordController { | ||
| 146 | .setPlanCycleCount(plan.getCycleCount())); | 144 | .setPlanCycleCount(plan.getCycleCount())); |
| 147 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo | 145 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo |
| 148 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) | 146 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) |
| 149 | - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec())); | 147 | + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification())); |
| 150 | MapUtils.findAndThen(userMap, vo.getUserId(), | 148 | MapUtils.findAndThen(userMap, vo.getUserId(), |
| 151 | user -> vo.setNickname(user.getNickname())); | 149 | user -> vo.setNickname(user.getNickname())); |
| 152 | }); | 150 | }); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/MesDvMaintenRecordLineController.java
| @@ -42,7 +42,6 @@ public class MesDvMaintenRecordLineController { | @@ -42,7 +42,6 @@ public class MesDvMaintenRecordLineController { | ||
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | private MesDvMaintenRecordLineService maintenRecordLineService; | 44 | private MesDvMaintenRecordLineService maintenRecordLineService; |
| 45 | - | ||
| 46 | @Resource | 45 | @Resource |
| 47 | private MesDvSubjectService subjectService; | 46 | private MesDvSubjectService subjectService; |
| 48 | 47 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/maintenrecord/vo/MesDvMaintenRecordRespVO.java
| @@ -64,7 +64,7 @@ public class MesDvMaintenRecordRespVO { | @@ -64,7 +64,7 @@ public class MesDvMaintenRecordRespVO { | ||
| 64 | 64 | ||
| 65 | @Schema(description = "规格型号", example = "X-100") | 65 | @Schema(description = "规格型号", example = "X-100") |
| 66 | @ExcelProperty("规格型号") | 66 | @ExcelProperty("规格型号") |
| 67 | - private String machinerySpec; | 67 | + private String machinerySpecification; |
| 68 | 68 | ||
| 69 | @Schema(description = "保养时间", requiredMode = Schema.RequiredMode.REQUIRED) | 69 | @Schema(description = "保养时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 70 | @ExcelProperty("保养时间") | 70 | @ExcelProperty("保养时间") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairController.java
| @@ -48,7 +48,6 @@ public class MesDvRepairController { | @@ -48,7 +48,6 @@ public class MesDvRepairController { | ||
| 48 | 48 | ||
| 49 | @Resource | 49 | @Resource |
| 50 | private MesDvRepairService repairService; | 50 | private MesDvRepairService repairService; |
| 51 | - | ||
| 52 | @Resource | 51 | @Resource |
| 53 | private MesDvMachineryService machineryService; | 52 | private MesDvMachineryService machineryService; |
| 54 | 53 | ||
| @@ -160,7 +159,7 @@ public class MesDvRepairController { | @@ -160,7 +159,7 @@ public class MesDvRepairController { | ||
| 160 | return BeanUtils.toBean(list, MesDvRepairRespVO.class, vo -> { | 159 | return BeanUtils.toBean(list, MesDvRepairRespVO.class, vo -> { |
| 161 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo | 160 | MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo |
| 162 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) | 161 | .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName()) |
| 163 | - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec())); | 162 | + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification())); |
| 164 | MapUtils.findAndThen(userMap, vo.getAcceptedUserId(), | 163 | MapUtils.findAndThen(userMap, vo.getAcceptedUserId(), |
| 165 | user -> vo.setAcceptedUserNickname(user.getNickname())); | 164 | user -> vo.setAcceptedUserNickname(user.getNickname())); |
| 166 | MapUtils.findAndThen(userMap, vo.getConfirmUserId(), | 165 | MapUtils.findAndThen(userMap, vo.getConfirmUserId(), |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/MesDvRepairLineController.java
| @@ -42,7 +42,6 @@ public class MesDvRepairLineController { | @@ -42,7 +42,6 @@ public class MesDvRepairLineController { | ||
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | private MesDvRepairLineService repairLineService; | 44 | private MesDvRepairLineService repairLineService; |
| 45 | - | ||
| 46 | @Resource | 45 | @Resource |
| 47 | private MesDvSubjectService subjectService; | 46 | private MesDvSubjectService subjectService; |
| 48 | 47 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/dv/repair/vo/MesDvRepairRespVO.java
| @@ -44,7 +44,7 @@ public class MesDvRepairRespVO { | @@ -44,7 +44,7 @@ public class MesDvRepairRespVO { | ||
| 44 | 44 | ||
| 45 | @Schema(description = "规格型号", example = "X-100") | 45 | @Schema(description = "规格型号", example = "X-100") |
| 46 | @ExcelProperty("规格型号") | 46 | @ExcelProperty("规格型号") |
| 47 | - private String machinerySpec; | 47 | + private String machinerySpecification; |
| 48 | 48 | ||
| 49 | @Schema(description = "报修日期") | 49 | @Schema(description = "报修日期") |
| 50 | @ExcelProperty("报修日期") | 50 | @ExcelProperty("报修日期") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/client/vo/MesMdClientImportExcelVO.java
| @@ -37,6 +37,39 @@ public class MesMdClientImportExcelVO { | @@ -37,6 +37,39 @@ public class MesMdClientImportExcelVO { | ||
| 37 | @ExcelProperty("客户邮箱地址") | 37 | @ExcelProperty("客户邮箱地址") |
| 38 | private String email; | 38 | private String email; |
| 39 | 39 | ||
| 40 | + @ExcelProperty("客户英文名称") | ||
| 41 | + private String englishName; | ||
| 42 | + | ||
| 43 | + @ExcelProperty("客户简介") | ||
| 44 | + private String description; | ||
| 45 | + | ||
| 46 | + @ExcelProperty("客户地址") | ||
| 47 | + private String address; | ||
| 48 | + | ||
| 49 | + @ExcelProperty("客户官网地址") | ||
| 50 | + private String website; | ||
| 51 | + | ||
| 52 | + @ExcelProperty("联系人1") | ||
| 53 | + private String contact1Name; | ||
| 54 | + | ||
| 55 | + @ExcelProperty("联系人1-电话") | ||
| 56 | + private String contact1Telephone; | ||
| 57 | + | ||
| 58 | + @ExcelProperty("联系人1-邮箱") | ||
| 59 | + private String contact1Email; | ||
| 60 | + | ||
| 61 | + @ExcelProperty("联系人2") | ||
| 62 | + private String contact2Name; | ||
| 63 | + | ||
| 64 | + @ExcelProperty("联系人2-电话") | ||
| 65 | + private String contact2Telephone; | ||
| 66 | + | ||
| 67 | + @ExcelProperty("联系人2-邮箱") | ||
| 68 | + private String contact2Email; | ||
| 69 | + | ||
| 70 | + @ExcelProperty("统一社会信用代码") | ||
| 71 | + private String creditCode; | ||
| 72 | + | ||
| 40 | @ExcelProperty(value = "状态", converter = DictConvert.class) | 73 | @ExcelProperty(value = "状态", converter = DictConvert.class) |
| 41 | @DictFormat(cn.iocoder.yudao.module.system.enums.DictTypeConstants.COMMON_STATUS) | 74 | @DictFormat(cn.iocoder.yudao.module.system.enums.DictTypeConstants.COMMON_STATUS) |
| 42 | private Integer status; | 75 | private Integer status; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/client/vo/MesMdClientSaveReqVO.java
| 1 | package cn.iocoder.yudao.module.mes.controller.admin.md.client.vo; | 1 | package cn.iocoder.yudao.module.mes.controller.admin.md.client.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | +import jakarta.validation.constraints.Email; | ||
| 4 | import jakarta.validation.constraints.NotEmpty; | 5 | import jakarta.validation.constraints.NotEmpty; |
| 5 | import jakarta.validation.constraints.NotNull; | 6 | import jakarta.validation.constraints.NotNull; |
| 7 | +import jakarta.validation.constraints.Size; | ||
| 6 | import lombok.Data; | 8 | import lombok.Data; |
| 7 | 9 | ||
| 8 | @Schema(description = "管理后台 - MES 客户新增/修改 Request VO") | 10 | @Schema(description = "管理后台 - MES 客户新增/修改 Request VO") |
| @@ -14,22 +16,28 @@ public class MesMdClientSaveReqVO { | @@ -14,22 +16,28 @@ public class MesMdClientSaveReqVO { | ||
| 14 | 16 | ||
| 15 | @Schema(description = "客户编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "C00184") | 17 | @Schema(description = "客户编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "C00184") |
| 16 | @NotEmpty(message = "客户编码不能为空") | 18 | @NotEmpty(message = "客户编码不能为空") |
| 19 | + @Size(max = 64, message = "客户编码长度不能超过 64 个字符") | ||
| 17 | private String code; | 20 | private String code; |
| 18 | 21 | ||
| 19 | @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "比亚迪") | 22 | @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "比亚迪") |
| 20 | @NotEmpty(message = "客户名称不能为空") | 23 | @NotEmpty(message = "客户名称不能为空") |
| 24 | + @Size(max = 255, message = "客户名称长度不能超过 255 个字符") | ||
| 21 | private String name; | 25 | private String name; |
| 22 | 26 | ||
| 23 | @Schema(description = "客户简称", example = "比亚迪") | 27 | @Schema(description = "客户简称", example = "比亚迪") |
| 28 | + @Size(max = 255, message = "客户简称长度不能超过 255 个字符") | ||
| 24 | private String nickname; | 29 | private String nickname; |
| 25 | 30 | ||
| 26 | @Schema(description = "客户英文名称", example = "BYD") | 31 | @Schema(description = "客户英文名称", example = "BYD") |
| 32 | + @Size(max = 255, message = "客户英文名称长度不能超过 255 个字符") | ||
| 27 | private String englishName; | 33 | private String englishName; |
| 28 | 34 | ||
| 29 | @Schema(description = "客户简介", example = "比亚迪品牌诞生于深圳") | 35 | @Schema(description = "客户简介", example = "比亚迪品牌诞生于深圳") |
| 36 | + @Size(max = 500, message = "客户简介长度不能超过 500 个字符") | ||
| 30 | private String description; | 37 | private String description; |
| 31 | 38 | ||
| 32 | @Schema(description = "客户LOGO地址", example = "https://xxx.com/logo.png") | 39 | @Schema(description = "客户LOGO地址", example = "https://xxx.com/logo.png") |
| 40 | + @Size(max = 255, message = "客户LOGO地址长度不能超过 255 个字符") | ||
| 33 | private String logo; | 41 | private String logo; |
| 34 | 42 | ||
| 35 | @Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 43 | @Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| @@ -37,36 +45,50 @@ public class MesMdClientSaveReqVO { | @@ -37,36 +45,50 @@ public class MesMdClientSaveReqVO { | ||
| 37 | private Integer type; | 45 | private Integer type; |
| 38 | 46 | ||
| 39 | @Schema(description = "客户地址", example = "深圳南山区") | 47 | @Schema(description = "客户地址", example = "深圳南山区") |
| 48 | + @Size(max = 500, message = "客户地址长度不能超过 500 个字符") | ||
| 40 | private String address; | 49 | private String address; |
| 41 | 50 | ||
| 42 | @Schema(description = "客户官网地址", example = "https://www.bydglobal.com") | 51 | @Schema(description = "客户官网地址", example = "https://www.bydglobal.com") |
| 52 | + @Size(max = 255, message = "客户官网地址长度不能超过 255 个字符") | ||
| 43 | private String website; | 53 | private String website; |
| 44 | 54 | ||
| 45 | @Schema(description = "客户邮箱地址", example = "salse@bydglobal.com") | 55 | @Schema(description = "客户邮箱地址", example = "salse@bydglobal.com") |
| 56 | + @Size(max = 255, message = "客户邮箱地址长度不能超过 255 个字符") | ||
| 57 | + @Email(message = "客户邮箱地址格式不正确") | ||
| 46 | private String email; | 58 | private String email; |
| 47 | 59 | ||
| 48 | @Schema(description = "客户电话", example = "123432222") | 60 | @Schema(description = "客户电话", example = "123432222") |
| 61 | + @Size(max = 64, message = "客户电话长度不能超过 64 个字符") | ||
| 49 | private String telephone; | 62 | private String telephone; |
| 50 | 63 | ||
| 51 | @Schema(description = "联系人1", example = "张三") | 64 | @Schema(description = "联系人1", example = "张三") |
| 65 | + @Size(max = 64, message = "联系人1长度不能超过 64 个字符") | ||
| 52 | private String contact1Name; | 66 | private String contact1Name; |
| 53 | 67 | ||
| 54 | @Schema(description = "联系人1-电话", example = "122212312") | 68 | @Schema(description = "联系人1-电话", example = "122212312") |
| 69 | + @Size(max = 64, message = "联系人1-电话长度不能超过 64 个字符") | ||
| 55 | private String contact1Telephone; | 70 | private String contact1Telephone; |
| 56 | 71 | ||
| 57 | @Schema(description = "联系人1-邮箱", example = "s1@bydglobal.com") | 72 | @Schema(description = "联系人1-邮箱", example = "s1@bydglobal.com") |
| 73 | + @Size(max = 255, message = "联系人1-邮箱长度不能超过 255 个字符") | ||
| 74 | + @Email(message = "联系人1-邮箱格式不正确") | ||
| 58 | private String contact1Email; | 75 | private String contact1Email; |
| 59 | 76 | ||
| 60 | @Schema(description = "联系人2", example = "李四") | 77 | @Schema(description = "联系人2", example = "李四") |
| 78 | + @Size(max = 64, message = "联系人2长度不能超过 64 个字符") | ||
| 61 | private String contact2Name; | 79 | private String contact2Name; |
| 62 | 80 | ||
| 63 | @Schema(description = "联系人2-电话", example = "1132323232") | 81 | @Schema(description = "联系人2-电话", example = "1132323232") |
| 82 | + @Size(max = 64, message = "联系人2-电话长度不能超过 64 个字符") | ||
| 64 | private String contact2Telephone; | 83 | private String contact2Telephone; |
| 65 | 84 | ||
| 66 | @Schema(description = "联系人2-邮箱", example = "s2@bydglobal.com") | 85 | @Schema(description = "联系人2-邮箱", example = "s2@bydglobal.com") |
| 86 | + @Size(max = 255, message = "联系人2-邮箱长度不能超过 255 个字符") | ||
| 87 | + @Email(message = "联系人2-邮箱格式不正确") | ||
| 67 | private String contact2Email; | 88 | private String contact2Email; |
| 68 | 89 | ||
| 69 | @Schema(description = "统一社会信用代码", example = "11212121") | 90 | @Schema(description = "统一社会信用代码", example = "11212121") |
| 91 | + @Size(max = 64, message = "统一社会信用代码长度不能超过 64 个字符") | ||
| 70 | private String creditCode; | 92 | private String creditCode; |
| 71 | 93 | ||
| 72 | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | 94 | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") |
| @@ -74,6 +96,7 @@ public class MesMdClientSaveReqVO { | @@ -74,6 +96,7 @@ public class MesMdClientSaveReqVO { | ||
| 74 | private Integer status; | 96 | private Integer status; |
| 75 | 97 | ||
| 76 | @Schema(description = "备注", example = "备注") | 98 | @Schema(description = "备注", example = "备注") |
| 99 | + @Size(max = 500, message = "备注长度不能超过 500 个字符") | ||
| 77 | private String remark; | 100 | private String remark; |
| 78 | 101 | ||
| 79 | } | 102 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/item/MesMdItemController.java
| @@ -48,10 +48,8 @@ public class MesMdItemController { | @@ -48,10 +48,8 @@ public class MesMdItemController { | ||
| 48 | 48 | ||
| 49 | @Resource | 49 | @Resource |
| 50 | private MesMdItemService itemService; | 50 | private MesMdItemService itemService; |
| 51 | - | ||
| 52 | @Resource | 51 | @Resource |
| 53 | private MesMdItemTypeService itemTypeService; | 52 | private MesMdItemTypeService itemTypeService; |
| 54 | - | ||
| 55 | @Resource | 53 | @Resource |
| 56 | private MesMdUnitMeasureService unitMeasureService; | 54 | private MesMdUnitMeasureService unitMeasureService; |
| 57 | 55 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/item/MesMdProductBomController.java
| @@ -40,13 +40,10 @@ public class MesMdProductBomController { | @@ -40,13 +40,10 @@ public class MesMdProductBomController { | ||
| 40 | 40 | ||
| 41 | @Resource | 41 | @Resource |
| 42 | private MesMdProductBomService productBomService; | 42 | private MesMdProductBomService productBomService; |
| 43 | - | ||
| 44 | @Resource | 43 | @Resource |
| 45 | private MesMdItemService itemService; | 44 | private MesMdItemService itemService; |
| 46 | - | ||
| 47 | @Resource | 45 | @Resource |
| 48 | private MesMdItemTypeService itemTypeService; | 46 | private MesMdItemTypeService itemTypeService; |
| 49 | - | ||
| 50 | @Resource | 47 | @Resource |
| 51 | private MesMdUnitMeasureService unitMeasureService; | 48 | private MesMdUnitMeasureService unitMeasureService; |
| 52 | 49 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/vendor/vo/MesMdVendorImportExcelVO.java
| @@ -37,6 +37,39 @@ public class MesMdVendorImportExcelVO { | @@ -37,6 +37,39 @@ public class MesMdVendorImportExcelVO { | ||
| 37 | @ExcelProperty("供应商邮箱地址") | 37 | @ExcelProperty("供应商邮箱地址") |
| 38 | private String email; | 38 | private String email; |
| 39 | 39 | ||
| 40 | + @ExcelProperty("供应商英文名称") | ||
| 41 | + private String englishName; | ||
| 42 | + | ||
| 43 | + @ExcelProperty("供应商简介") | ||
| 44 | + private String description; | ||
| 45 | + | ||
| 46 | + @ExcelProperty("供应商地址") | ||
| 47 | + private String address; | ||
| 48 | + | ||
| 49 | + @ExcelProperty("供应商官网地址") | ||
| 50 | + private String website; | ||
| 51 | + | ||
| 52 | + @ExcelProperty("联系人1") | ||
| 53 | + private String contact1Name; | ||
| 54 | + | ||
| 55 | + @ExcelProperty("联系人1-电话") | ||
| 56 | + private String contact1Telephone; | ||
| 57 | + | ||
| 58 | + @ExcelProperty("联系人1-邮箱") | ||
| 59 | + private String contact1Email; | ||
| 60 | + | ||
| 61 | + @ExcelProperty("联系人2") | ||
| 62 | + private String contact2Name; | ||
| 63 | + | ||
| 64 | + @ExcelProperty("联系人2-电话") | ||
| 65 | + private String contact2Telephone; | ||
| 66 | + | ||
| 67 | + @ExcelProperty("联系人2-邮箱") | ||
| 68 | + private String contact2Email; | ||
| 69 | + | ||
| 70 | + @ExcelProperty("统一社会信用代码") | ||
| 71 | + private String creditCode; | ||
| 72 | + | ||
| 40 | @ExcelProperty(value = "状态", converter = DictConvert.class) | 73 | @ExcelProperty(value = "状态", converter = DictConvert.class) |
| 41 | @DictFormat(cn.iocoder.yudao.module.system.enums.DictTypeConstants.COMMON_STATUS) | 74 | @DictFormat(cn.iocoder.yudao.module.system.enums.DictTypeConstants.COMMON_STATUS) |
| 42 | private Integer status; | 75 | private Integer status; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/vendor/vo/MesMdVendorSaveReqVO.java
| 1 | package cn.iocoder.yudao.module.mes.controller.admin.md.vendor.vo; | 1 | package cn.iocoder.yudao.module.mes.controller.admin.md.vendor.vo; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | +import jakarta.validation.constraints.Email; | ||
| 4 | import jakarta.validation.constraints.NotEmpty; | 5 | import jakarta.validation.constraints.NotEmpty; |
| 5 | import jakarta.validation.constraints.NotNull; | 6 | import jakarta.validation.constraints.NotNull; |
| 7 | +import jakarta.validation.constraints.Size; | ||
| 6 | import lombok.Data; | 8 | import lombok.Data; |
| 7 | 9 | ||
| 8 | @Schema(description = "管理后台 - MES 供应商新增/修改 Request VO") | 10 | @Schema(description = "管理后台 - MES 供应商新增/修改 Request VO") |
| @@ -14,61 +16,82 @@ public class MesMdVendorSaveReqVO { | @@ -14,61 +16,82 @@ public class MesMdVendorSaveReqVO { | ||
| 14 | 16 | ||
| 15 | @Schema(description = "供应商编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "V00101") | 17 | @Schema(description = "供应商编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "V00101") |
| 16 | @NotEmpty(message = "供应商编码不能为空") | 18 | @NotEmpty(message = "供应商编码不能为空") |
| 19 | + @Size(max = 64, message = "供应商编码长度不能超过 64 个字符") | ||
| 17 | private String code; | 20 | private String code; |
| 18 | 21 | ||
| 19 | @Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "海力德电子") | 22 | @Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "海力德电子") |
| 20 | @NotEmpty(message = "供应商名称不能为空") | 23 | @NotEmpty(message = "供应商名称不能为空") |
| 24 | + @Size(max = 255, message = "供应商名称长度不能超过 255 个字符") | ||
| 21 | private String name; | 25 | private String name; |
| 22 | 26 | ||
| 23 | @Schema(description = "供应商简称", example = "海力德") | 27 | @Schema(description = "供应商简称", example = "海力德") |
| 28 | + @Size(max = 255, message = "供应商简称长度不能超过 255 个字符") | ||
| 24 | private String nickname; | 29 | private String nickname; |
| 25 | 30 | ||
| 26 | @Schema(description = "供应商英文名称", example = "HLD Electronics") | 31 | @Schema(description = "供应商英文名称", example = "HLD Electronics") |
| 32 | + @Size(max = 255, message = "供应商英文名称长度不能超过 255 个字符") | ||
| 27 | private String englishName; | 33 | private String englishName; |
| 28 | 34 | ||
| 29 | @Schema(description = "供应商简介", example = "专业从事电子元器件生产与销售") | 35 | @Schema(description = "供应商简介", example = "专业从事电子元器件生产与销售") |
| 36 | + @Size(max = 500, message = "供应商简介长度不能超过 500 个字符") | ||
| 30 | private String description; | 37 | private String description; |
| 31 | 38 | ||
| 32 | @Schema(description = "供应商LOGO地址", example = "https://xxx.com/logo.png") | 39 | @Schema(description = "供应商LOGO地址", example = "https://xxx.com/logo.png") |
| 40 | + @Size(max = 255, message = "供应商LOGO地址长度不能超过 255 个字符") | ||
| 33 | private String logo; | 41 | private String logo; |
| 34 | 42 | ||
| 35 | @Schema(description = "供应商等级", example = "A") | 43 | @Schema(description = "供应商等级", example = "A") |
| 44 | + @Size(max = 64, message = "供应商等级长度不能超过 64 个字符") | ||
| 36 | private String level; | 45 | private String level; |
| 37 | 46 | ||
| 38 | @Schema(description = "供应商评分", example = "95") | 47 | @Schema(description = "供应商评分", example = "95") |
| 39 | private Integer score; | 48 | private Integer score; |
| 40 | 49 | ||
| 41 | @Schema(description = "供应商地址", example = "深圳市宝安区") | 50 | @Schema(description = "供应商地址", example = "深圳市宝安区") |
| 51 | + @Size(max = 500, message = "供应商地址长度不能超过 500 个字符") | ||
| 42 | private String address; | 52 | private String address; |
| 43 | 53 | ||
| 44 | @Schema(description = "供应商官网地址", example = "https://www.hld-elec.com") | 54 | @Schema(description = "供应商官网地址", example = "https://www.hld-elec.com") |
| 55 | + @Size(max = 255, message = "供应商官网地址长度不能超过 255 个字符") | ||
| 45 | private String website; | 56 | private String website; |
| 46 | 57 | ||
| 47 | @Schema(description = "供应商邮箱地址", example = "info@hld-elec.com") | 58 | @Schema(description = "供应商邮箱地址", example = "info@hld-elec.com") |
| 59 | + @Size(max = 255, message = "供应商邮箱地址长度不能超过 255 个字符") | ||
| 60 | + @Email(message = "供应商邮箱地址格式不正确") | ||
| 48 | private String email; | 61 | private String email; |
| 49 | 62 | ||
| 50 | @Schema(description = "供应商电话", example = "0755-12345678") | 63 | @Schema(description = "供应商电话", example = "0755-12345678") |
| 64 | + @Size(max = 64, message = "供应商电话长度不能超过 64 个字符") | ||
| 51 | private String telephone; | 65 | private String telephone; |
| 52 | 66 | ||
| 53 | @Schema(description = "联系人1", example = "王经理") | 67 | @Schema(description = "联系人1", example = "王经理") |
| 68 | + @Size(max = 64, message = "联系人1长度不能超过 64 个字符") | ||
| 54 | private String contact1Name; | 69 | private String contact1Name; |
| 55 | 70 | ||
| 56 | @Schema(description = "联系人1-电话", example = "13800138001") | 71 | @Schema(description = "联系人1-电话", example = "13800138001") |
| 72 | + @Size(max = 64, message = "联系人1-电话长度不能超过 64 个字符") | ||
| 57 | private String contact1Telephone; | 73 | private String contact1Telephone; |
| 58 | 74 | ||
| 59 | @Schema(description = "联系人1-邮箱", example = "wang@hld-elec.com") | 75 | @Schema(description = "联系人1-邮箱", example = "wang@hld-elec.com") |
| 76 | + @Size(max = 255, message = "联系人1-邮箱长度不能超过 255 个字符") | ||
| 77 | + @Email(message = "联系人1-邮箱格式不正确") | ||
| 60 | private String contact1Email; | 78 | private String contact1Email; |
| 61 | 79 | ||
| 62 | @Schema(description = "联系人2", example = "赵助理") | 80 | @Schema(description = "联系人2", example = "赵助理") |
| 81 | + @Size(max = 64, message = "联系人2长度不能超过 64 个字符") | ||
| 63 | private String contact2Name; | 82 | private String contact2Name; |
| 64 | 83 | ||
| 65 | @Schema(description = "联系人2-电话", example = "13800138002") | 84 | @Schema(description = "联系人2-电话", example = "13800138002") |
| 85 | + @Size(max = 64, message = "联系人2-电话长度不能超过 64 个字符") | ||
| 66 | private String contact2Telephone; | 86 | private String contact2Telephone; |
| 67 | 87 | ||
| 68 | @Schema(description = "联系人2-邮箱", example = "zhao@hld-elec.com") | 88 | @Schema(description = "联系人2-邮箱", example = "zhao@hld-elec.com") |
| 89 | + @Size(max = 255, message = "联系人2-邮箱长度不能超过 255 个字符") | ||
| 90 | + @Email(message = "联系人2-邮箱格式不正确") | ||
| 69 | private String contact2Email; | 91 | private String contact2Email; |
| 70 | 92 | ||
| 71 | @Schema(description = "统一社会信用代码", example = "91440300MA5EXAMPLE") | 93 | @Schema(description = "统一社会信用代码", example = "91440300MA5EXAMPLE") |
| 94 | + @Size(max = 64, message = "统一社会信用代码长度不能超过 64 个字符") | ||
| 72 | private String creditCode; | 95 | private String creditCode; |
| 73 | 96 | ||
| 74 | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") | 97 | @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0") |
| @@ -76,6 +99,7 @@ public class MesMdVendorSaveReqVO { | @@ -76,6 +99,7 @@ public class MesMdVendorSaveReqVO { | ||
| 76 | private Integer status; | 99 | private Integer status; |
| 77 | 100 | ||
| 78 | @Schema(description = "备注", example = "备注") | 101 | @Schema(description = "备注", example = "备注") |
| 102 | + @Size(max = 500, message = "备注长度不能超过 500 个字符") | ||
| 79 | private String remark; | 103 | private String remark; |
| 80 | 104 | ||
| 81 | } | 105 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/workstation/MesMdWorkshopController.java
| @@ -77,7 +77,11 @@ public class MesMdWorkshopController { | @@ -77,7 +77,11 @@ public class MesMdWorkshopController { | ||
| 77 | @PreAuthorize("@ss.hasPermission('mes:md-workshop:query')") | 77 | @PreAuthorize("@ss.hasPermission('mes:md-workshop:query')") |
| 78 | public CommonResult<MesMdWorkshopRespVO> getWorkshop(@RequestParam("id") Long id) { | 78 | public CommonResult<MesMdWorkshopRespVO> getWorkshop(@RequestParam("id") Long id) { |
| 79 | MesMdWorkshopDO workshop = workshopService.getWorkshop(id); | 79 | MesMdWorkshopDO workshop = workshopService.getWorkshop(id); |
| 80 | - return success(BeanUtils.toBean(workshop, MesMdWorkshopRespVO.class)); | 80 | + if (workshop == null) { |
| 81 | + return success(null); | ||
| 82 | + } | ||
| 83 | + List<MesMdWorkshopRespVO> voList = buildWorkshopRespVOList(Collections.singletonList(workshop)); | ||
| 84 | + return success(voList.get(0)); | ||
| 81 | } | 85 | } |
| 82 | 86 | ||
| 83 | @GetMapping("/page") | 87 | @GetMapping("/page") |
| @@ -92,8 +96,19 @@ public class MesMdWorkshopController { | @@ -92,8 +96,19 @@ public class MesMdWorkshopController { | ||
| 92 | @Operation(summary = "获得车间精简列表", description = "只包含被开启的车间,主要用于前端的下拉选项") | 96 | @Operation(summary = "获得车间精简列表", description = "只包含被开启的车间,主要用于前端的下拉选项") |
| 93 | public CommonResult<List<MesMdWorkshopRespVO>> getWorkshopSimpleList() { | 97 | public CommonResult<List<MesMdWorkshopRespVO>> getWorkshopSimpleList() { |
| 94 | List<MesMdWorkshopDO> list = workshopService.getWorkshopListByStatus(CommonStatusEnum.ENABLE.getStatus()); | 98 | List<MesMdWorkshopDO> list = workshopService.getWorkshopListByStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 95 | - return success(convertList(list, ws -> new MesMdWorkshopRespVO() | ||
| 96 | - .setId(ws.getId()).setCode(ws.getCode()).setName(ws.getName()).setArea(ws.getArea()))); | 99 | + if (CollUtil.isEmpty(list)) { |
| 100 | + return success(Collections.emptyList()); | ||
| 101 | + } | ||
| 102 | + // 批量获取负责人信息 | ||
| 103 | + Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( | ||
| 104 | + convertSet(list, MesMdWorkshopDO::getChargeUserId)); | ||
| 105 | + return success(convertList(list, ws -> { | ||
| 106 | + MesMdWorkshopRespVO vo = new MesMdWorkshopRespVO() | ||
| 107 | + .setId(ws.getId()).setCode(ws.getCode()).setName(ws.getName()).setArea(ws.getArea()); | ||
| 108 | + MapUtils.findAndThen(userMap, ws.getChargeUserId(), | ||
| 109 | + user -> vo.setChargeUserName(user.getNickname())); | ||
| 110 | + return vo; | ||
| 111 | + })); | ||
| 97 | } | 112 | } |
| 98 | 113 | ||
| 99 | @GetMapping("/export-excel") | 114 | @GetMapping("/export-excel") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/workstation/MesMdWorkstationMachineController.java
| @@ -34,7 +34,6 @@ public class MesMdWorkstationMachineController { | @@ -34,7 +34,6 @@ public class MesMdWorkstationMachineController { | ||
| 34 | 34 | ||
| 35 | @Resource | 35 | @Resource |
| 36 | private MesMdWorkstationMachineService workstationMachineService; | 36 | private MesMdWorkstationMachineService workstationMachineService; |
| 37 | - | ||
| 38 | @Resource | 37 | @Resource |
| 39 | private MesDvMachineryService machineryService; | 38 | private MesDvMachineryService machineryService; |
| 40 | 39 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/workstation/MesMdWorkstationToolController.java
| @@ -34,7 +34,6 @@ public class MesMdWorkstationToolController { | @@ -34,7 +34,6 @@ public class MesMdWorkstationToolController { | ||
| 34 | 34 | ||
| 35 | @Resource | 35 | @Resource |
| 36 | private MesMdWorkstationToolService workstationToolService; | 36 | private MesMdWorkstationToolService workstationToolService; |
| 37 | - | ||
| 38 | @Resource | 37 | @Resource |
| 39 | private MesTmToolTypeService toolTypeService; | 38 | private MesTmToolTypeService toolTypeService; |
| 40 | 39 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/andon/MesProAndonRecordController.java
| @@ -50,13 +50,10 @@ public class MesProAndonRecordController { | @@ -50,13 +50,10 @@ public class MesProAndonRecordController { | ||
| 50 | 50 | ||
| 51 | @Resource | 51 | @Resource |
| 52 | private MesProAndonRecordService andonRecordService; | 52 | private MesProAndonRecordService andonRecordService; |
| 53 | - | ||
| 54 | @Resource | 53 | @Resource |
| 55 | private MesMdWorkstationService workstationService; | 54 | private MesMdWorkstationService workstationService; |
| 56 | - | ||
| 57 | @Resource | 55 | @Resource |
| 58 | private MesProWorkOrderService workOrderService; | 56 | private MesProWorkOrderService workOrderService; |
| 59 | - | ||
| 60 | @Resource | 57 | @Resource |
| 61 | private MesProProcessService processService; | 58 | private MesProProcessService processService; |
| 62 | 59 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/card/MesProCardController.java
| @@ -47,13 +47,10 @@ public class MesProCardController { | @@ -47,13 +47,10 @@ public class MesProCardController { | ||
| 47 | 47 | ||
| 48 | @Resource | 48 | @Resource |
| 49 | private MesProCardService cardService; | 49 | private MesProCardService cardService; |
| 50 | - | ||
| 51 | @Resource | 50 | @Resource |
| 52 | private MesProWorkOrderService workOrderService; | 51 | private MesProWorkOrderService workOrderService; |
| 53 | - | ||
| 54 | @Resource | 52 | @Resource |
| 55 | private MesMdItemService itemService; | 53 | private MesMdItemService itemService; |
| 56 | - | ||
| 57 | @Resource | 54 | @Resource |
| 58 | private MesMdUnitMeasureService unitMeasureService; | 55 | private MesMdUnitMeasureService unitMeasureService; |
| 59 | 56 | ||
| @@ -128,12 +125,6 @@ public class MesProCardController { | @@ -128,12 +125,6 @@ public class MesProCardController { | ||
| 128 | return success(new PageResult<>(buildCardRespVOList(pageResult.getList()), pageResult.getTotal())); | 125 | return success(new PageResult<>(buildCardRespVOList(pageResult.getList()), pageResult.getTotal())); |
| 129 | } | 126 | } |
| 130 | 127 | ||
| 131 | - @GetMapping("/simple-list") | ||
| 132 | - @Operation(summary = "获得生产流转卡精简列表", description = "主要用于前端的下拉选项") | ||
| 133 | - public CommonResult<List<MesProCardRespVO>> getCardSimpleList() { | ||
| 134 | - List<MesProCardDO> list = cardService.getCardSimpleList(); | ||
| 135 | - return success(buildCardRespVOList(list)); | ||
| 136 | - } | ||
| 137 | 128 | ||
| 138 | @GetMapping("/export-excel") | 129 | @GetMapping("/export-excel") |
| 139 | @Operation(summary = "导出生产流转卡 Excel") | 130 | @Operation(summary = "导出生产流转卡 Excel") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/card/MesProCardProcessController.java
| @@ -40,10 +40,8 @@ public class MesProCardProcessController { | @@ -40,10 +40,8 @@ public class MesProCardProcessController { | ||
| 40 | 40 | ||
| 41 | @Resource | 41 | @Resource |
| 42 | private MesProCardProcessService cardProcessService; | 42 | private MesProCardProcessService cardProcessService; |
| 43 | - | ||
| 44 | @Resource | 43 | @Resource |
| 45 | private MesProProcessService processService; | 44 | private MesProProcessService processService; |
| 46 | - | ||
| 47 | @Resource | 45 | @Resource |
| 48 | private MesMdWorkstationService workstationService; | 46 | private MesMdWorkstationService workstationService; |
| 49 | 47 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/card/vo/MesProCardPageReqVO.java
| @@ -24,5 +24,4 @@ public class MesProCardPageReqVO extends PageParam { | @@ -24,5 +24,4 @@ public class MesProCardPageReqVO extends PageParam { | ||
| 24 | @Schema(description = "批次号", example = "BATCH-001") | 24 | @Schema(description = "批次号", example = "BATCH-001") |
| 25 | private String batchCode; | 25 | private String batchCode; |
| 26 | 26 | ||
| 27 | - | ||
| 28 | } | 27 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/card/vo/MesProCardRespVO.java
| @@ -32,13 +32,13 @@ public class MesProCardRespVO { | @@ -32,13 +32,13 @@ public class MesProCardRespVO { | ||
| 32 | @ExcelProperty("工单名称") | 32 | @ExcelProperty("工单名称") |
| 33 | private String workOrderName; | 33 | private String workOrderName; |
| 34 | 34 | ||
| 35 | + @Schema(description = "产品物料编号", example = "200") | ||
| 36 | + private Long itemId; | ||
| 37 | + | ||
| 35 | @Schema(description = "批次号", example = "BATCH-001") | 38 | @Schema(description = "批次号", example = "BATCH-001") |
| 36 | @ExcelProperty("批次号") | 39 | @ExcelProperty("批次号") |
| 37 | private String batchCode; | 40 | private String batchCode; |
| 38 | 41 | ||
| 39 | - @Schema(description = "产品物料编号", example = "200") | ||
| 40 | - private Long itemId; | ||
| 41 | - | ||
| 42 | @Schema(description = "产品编码", example = "P-001") | 42 | @Schema(description = "产品编码", example = "P-001") |
| 43 | @ExcelProperty("产品编码") | 43 | @ExcelProperty("产品编码") |
| 44 | private String itemCode; | 44 | private String itemCode; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/card/vo/MesProCardSaveReqVO.java
| @@ -22,13 +22,13 @@ public class MesProCardSaveReqVO { | @@ -22,13 +22,13 @@ public class MesProCardSaveReqVO { | ||
| 22 | @NotNull(message = "生产工单不能为空") | 22 | @NotNull(message = "生产工单不能为空") |
| 23 | private Long workOrderId; | 23 | private Long workOrderId; |
| 24 | 24 | ||
| 25 | - @Schema(description = "批次号", example = "BATCH-001") | ||
| 26 | - private String batchCode; | ||
| 27 | - | ||
| 28 | @Schema(description = "产品物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "200") | 25 | @Schema(description = "产品物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "200") |
| 29 | @NotNull(message = "产品物料不能为空") | 26 | @NotNull(message = "产品物料不能为空") |
| 30 | private Long itemId; | 27 | private Long itemId; |
| 31 | 28 | ||
| 29 | + @Schema(description = "批次号", example = "BATCH-001") | ||
| 30 | + private String batchCode; | ||
| 31 | + | ||
| 32 | @Schema(description = "流转数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") | 32 | @Schema(description = "流转数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00") |
| 33 | @NotNull(message = "流转数量不能为空") | 33 | @NotNull(message = "流转数量不能为空") |
| 34 | private BigDecimal transferedQuantity; | 34 | private BigDecimal transferedQuantity; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/feedback/MesProFeedbackController.java
| @@ -49,7 +49,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPOR | @@ -49,7 +49,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPOR | ||
| 49 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 49 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 50 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; | 50 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; |
| 51 | import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; | 51 | import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen; |
| 52 | -import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | 52 | + |
| 53 | 53 | ||
| 54 | @Tag(name = "管理后台 - MES 生产报工") | 54 | @Tag(name = "管理后台 - MES 生产报工") |
| 55 | @RestController | 55 | @RestController |
| @@ -158,7 +158,7 @@ public class MesProFeedbackController { | @@ -158,7 +158,7 @@ public class MesProFeedbackController { | ||
| 158 | @Parameter(name = "id", description = "编号", required = true) | 158 | @Parameter(name = "id", description = "编号", required = true) |
| 159 | @PreAuthorize("@ss.hasPermission('mes:pro-feedback:approve')") | 159 | @PreAuthorize("@ss.hasPermission('mes:pro-feedback:approve')") |
| 160 | public CommonResult<Boolean> approveFeedback(@RequestParam("id") Long id) { | 160 | public CommonResult<Boolean> approveFeedback(@RequestParam("id") Long id) { |
| 161 | - return success(feedbackService.approveFeedback(id, getLoginUserId())); | 161 | + return success(feedbackService.approveFeedback(id)); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | // ==================== 拼接 VO ==================== | 164 | // ==================== 拼接 VO ==================== |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/route/MesProRouteProcessController.java
| @@ -38,7 +38,6 @@ public class MesProRouteProcessController { | @@ -38,7 +38,6 @@ public class MesProRouteProcessController { | ||
| 38 | 38 | ||
| 39 | @Resource | 39 | @Resource |
| 40 | private MesProRouteProcessService routeProcessService; | 40 | private MesProRouteProcessService routeProcessService; |
| 41 | - | ||
| 42 | @Resource | 41 | @Resource |
| 43 | private MesProProcessService processService; | 42 | private MesProProcessService processService; |
| 44 | 43 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/route/MesProRouteProductBomController.java
| @@ -39,10 +39,8 @@ public class MesProRouteProductBomController { | @@ -39,10 +39,8 @@ public class MesProRouteProductBomController { | ||
| 39 | 39 | ||
| 40 | @Resource | 40 | @Resource |
| 41 | private MesProRouteProductBomService routeProductBomService; | 41 | private MesProRouteProductBomService routeProductBomService; |
| 42 | - | ||
| 43 | @Resource | 42 | @Resource |
| 44 | private MesMdItemService itemService; | 43 | private MesMdItemService itemService; |
| 45 | - | ||
| 46 | @Resource | 44 | @Resource |
| 47 | private MesMdUnitMeasureService unitMeasureService; | 45 | private MesMdUnitMeasureService unitMeasureService; |
| 48 | 46 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/route/MesProRouteProductController.java
| @@ -38,10 +38,8 @@ public class MesProRouteProductController { | @@ -38,10 +38,8 @@ public class MesProRouteProductController { | ||
| 38 | 38 | ||
| 39 | @Resource | 39 | @Resource |
| 40 | private MesProRouteProductService routeProductService; | 40 | private MesProRouteProductService routeProductService; |
| 41 | - | ||
| 42 | @Resource | 41 | @Resource |
| 43 | private MesMdItemService itemService; | 42 | private MesMdItemService itemService; |
| 44 | - | ||
| 45 | @Resource | 43 | @Resource |
| 46 | private MesMdUnitMeasureService unitMeasureService; | 44 | private MesMdUnitMeasureService unitMeasureService; |
| 47 | 45 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/task/MesProTaskController.java
| @@ -39,12 +39,13 @@ import org.springframework.security.access.prepost.PreAuthorize; | @@ -39,12 +39,13 @@ import org.springframework.security.access.prepost.PreAuthorize; | ||
| 39 | import org.springframework.validation.annotation.Validated; | 39 | import org.springframework.validation.annotation.Validated; |
| 40 | import org.springframework.web.bind.annotation.*; | 40 | import org.springframework.web.bind.annotation.*; |
| 41 | 41 | ||
| 42 | +import cn.iocoder.yudao.module.mes.dal.dataobject.pro.route.MesProRouteProcessDO; | ||
| 43 | +import cn.iocoder.yudao.module.mes.service.pro.route.MesProRouteProcessService; | ||
| 44 | + | ||
| 42 | import java.io.IOException; | 45 | import java.io.IOException; |
| 43 | import java.math.BigDecimal; | 46 | import java.math.BigDecimal; |
| 44 | import java.math.RoundingMode; | 47 | import java.math.RoundingMode; |
| 45 | -import java.util.Collections; | ||
| 46 | -import java.util.List; | ||
| 47 | -import java.util.Map; | 48 | +import java.util.*; |
| 48 | 49 | ||
| 49 | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | 50 | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| 50 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | 51 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| @@ -59,24 +60,20 @@ public class MesProTaskController { | @@ -59,24 +60,20 @@ public class MesProTaskController { | ||
| 59 | 60 | ||
| 60 | @Resource | 61 | @Resource |
| 61 | private MesProTaskService taskService; | 62 | private MesProTaskService taskService; |
| 62 | - | ||
| 63 | @Resource | 63 | @Resource |
| 64 | private MesProWorkOrderService workOrderService; | 64 | private MesProWorkOrderService workOrderService; |
| 65 | - | ||
| 66 | @Resource | 65 | @Resource |
| 67 | private MesMdWorkstationService workstationService; | 66 | private MesMdWorkstationService workstationService; |
| 68 | - | ||
| 69 | @Resource | 67 | @Resource |
| 70 | private MesProProcessService processService; | 68 | private MesProProcessService processService; |
| 71 | - | ||
| 72 | @Resource | 69 | @Resource |
| 73 | private MesMdItemService itemService; | 70 | private MesMdItemService itemService; |
| 74 | - | ||
| 75 | @Resource | 71 | @Resource |
| 76 | private MesMdClientService clientService; | 72 | private MesMdClientService clientService; |
| 77 | - | ||
| 78 | @Resource | 73 | @Resource |
| 79 | private MesMdUnitMeasureService unitMeasureService; | 74 | private MesMdUnitMeasureService unitMeasureService; |
| 75 | + @Resource | ||
| 76 | + private MesProRouteProcessService routeProcessService; | ||
| 80 | 77 | ||
| 81 | @PostMapping("/create") | 78 | @PostMapping("/create") |
| 82 | @Operation(summary = "创建生产任务") | 79 | @Operation(summary = "创建生产任务") |
| @@ -122,18 +119,6 @@ public class MesProTaskController { | @@ -122,18 +119,6 @@ public class MesProTaskController { | ||
| 122 | return success(new PageResult<>(buildTaskRespVOList(pageResult.getList()), pageResult.getTotal())); | 119 | return success(new PageResult<>(buildTaskRespVOList(pageResult.getList()), pageResult.getTotal())); |
| 123 | } | 120 | } |
| 124 | 121 | ||
| 125 | - @GetMapping("/simple-list") | ||
| 126 | - @Operation(summary = "获得生产任务精简列表", description = "主要用于前端的下拉选项") | ||
| 127 | - public CommonResult<List<MesProTaskRespVO>> getTaskSimpleList( | ||
| 128 | - @RequestParam(value = "workOrderId", required = false) Long workOrderId) { | ||
| 129 | - List<MesProTaskDO> list = taskService.getTaskListByWorkOrderId(workOrderId); | ||
| 130 | - return success(convertList(list, task -> new MesProTaskRespVO() | ||
| 131 | - .setId(task.getId()).setCode(task.getCode()).setName(task.getName()) | ||
| 132 | - .setWorkOrderId(task.getWorkOrderId()).setWorkstationId(task.getWorkstationId()) | ||
| 133 | - .setRouteId(task.getRouteId()).setProcessId(task.getProcessId()) | ||
| 134 | - .setItemId(task.getItemId()).setStatus(task.getStatus()))); | ||
| 135 | - } | ||
| 136 | - | ||
| 137 | @GetMapping("/gantt-list") | 122 | @GetMapping("/gantt-list") |
| 138 | @Operation(summary = "获得甘特图任务列表", description = "后端组装工单=project + 任务=task 列表") | 123 | @Operation(summary = "获得甘特图任务列表", description = "后端组装工单=project + 任务=task 列表") |
| 139 | @PreAuthorize("@ss.hasPermission('mes:pro-task:query')") | 124 | @PreAuthorize("@ss.hasPermission('mes:pro-task:query')") |
| @@ -229,11 +214,24 @@ public class MesProTaskController { | @@ -229,11 +214,24 @@ public class MesProTaskController { | ||
| 229 | Map<Long, MesMdWorkstationDO> workstationMap = workstationService.getWorkstationMap( | 214 | Map<Long, MesMdWorkstationDO> workstationMap = workstationService.getWorkstationMap( |
| 230 | convertSet(list, MesProTaskDO::getWorkstationId)); | 215 | convertSet(list, MesProTaskDO::getWorkstationId)); |
| 231 | Map<Long, MesProProcessDO> processMap = processService.getProcessMap( | 216 | Map<Long, MesProProcessDO> processMap = processService.getProcessMap( |
| 232 | - new java.util.ArrayList<>(convertSet(list, MesProTaskDO::getProcessId))); | 217 | + new ArrayList<>(convertSet(list, MesProTaskDO::getProcessId))); |
| 233 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap( | 218 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap( |
| 234 | convertSet(list, MesProTaskDO::getItemId)); | 219 | convertSet(list, MesProTaskDO::getItemId)); |
| 220 | + Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( | ||
| 221 | + convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); | ||
| 235 | Map<Long, MesMdClientDO> clientMap = clientService.getClientMap( | 222 | Map<Long, MesMdClientDO> clientMap = clientService.getClientMap( |
| 236 | convertSet(list, MesProTaskDO::getClientId)); | 223 | convertSet(list, MesProTaskDO::getClientId)); |
| 224 | + // 工序的 checkFlag:批量查询后构建 routeId -> processId -> checkFlag 的双层 Map | ||
| 225 | + Set<Long> routeIds = convertSet(list, MesProTaskDO::getRouteId); | ||
| 226 | + Map<Long, Map<Long, Boolean>> routeProcessCheckFlagMap = new HashMap<>(); | ||
| 227 | + if (CollUtil.isNotEmpty(routeIds)) { | ||
| 228 | + List<MesProRouteProcessDO> allRouteProcesses = routeProcessService.getRouteProcessListByRouteIds(routeIds); | ||
| 229 | + for (MesProRouteProcessDO rp : allRouteProcesses) { | ||
| 230 | + routeProcessCheckFlagMap | ||
| 231 | + .computeIfAbsent(rp.getRouteId(), k -> new HashMap<>()) | ||
| 232 | + .put(rp.getProcessId(), Boolean.TRUE.equals(rp.getCheckFlag())); | ||
| 233 | + } | ||
| 234 | + } | ||
| 237 | // 拼接 VO | 235 | // 拼接 VO |
| 238 | return convertList(list, task -> { | 236 | return convertList(list, task -> { |
| 239 | MesProTaskRespVO vo = BeanUtils.toBean(task, MesProTaskRespVO.class); | 237 | MesProTaskRespVO vo = BeanUtils.toBean(task, MesProTaskRespVO.class); |
| @@ -243,10 +241,15 @@ public class MesProTaskController { | @@ -243,10 +241,15 @@ public class MesProTaskController { | ||
| 243 | vo.setWorkstationCode(ws.getCode()).setWorkstationName(ws.getName())); | 241 | vo.setWorkstationCode(ws.getCode()).setWorkstationName(ws.getName())); |
| 244 | findAndThen(processMap, task.getProcessId(), p -> | 242 | findAndThen(processMap, task.getProcessId(), p -> |
| 245 | vo.setProcessName(p.getName())); | 243 | vo.setProcessName(p.getName())); |
| 246 | - findAndThen(itemMap, task.getItemId(), item -> | ||
| 247 | - vo.setItemCode(item.getCode()).setItemName(item.getName()).setItemSpec(item.getSpecification())); | 244 | + findAndThen(itemMap, task.getItemId(), item -> { |
| 245 | + vo.setItemCode(item.getCode()).setItemName(item.getName()).setItemSpecification(item.getSpecification()); | ||
| 246 | + findAndThen(unitMeasureMap, item.getUnitMeasureId(), unit -> | ||
| 247 | + vo.setUnitMeasureName(unit.getName())); | ||
| 248 | + }); | ||
| 248 | findAndThen(clientMap, task.getClientId(), c -> | 249 | findAndThen(clientMap, task.getClientId(), c -> |
| 249 | vo.setClientName(c.getName())); | 250 | vo.setClientName(c.getName())); |
| 251 | + findAndThen(routeProcessCheckFlagMap, task.getRouteId(), processCheckMap -> | ||
| 252 | + findAndThen(processCheckMap, task.getProcessId(), vo::setCheckFlag)); | ||
| 250 | return vo; | 253 | return vo; |
| 251 | }); | 254 | }); |
| 252 | } | 255 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/task/MesProTaskIssueController.java
| @@ -40,10 +40,8 @@ public class MesProTaskIssueController { | @@ -40,10 +40,8 @@ public class MesProTaskIssueController { | ||
| 40 | 40 | ||
| 41 | @Resource | 41 | @Resource |
| 42 | private MesProTaskIssueService taskIssueService; | 42 | private MesProTaskIssueService taskIssueService; |
| 43 | - | ||
| 44 | @Resource | 43 | @Resource |
| 45 | private MesMdItemService itemService; | 44 | private MesMdItemService itemService; |
| 46 | - | ||
| 47 | @Resource | 45 | @Resource |
| 48 | private MesMdUnitMeasureService unitMeasureService; | 46 | private MesMdUnitMeasureService unitMeasureService; |
| 49 | 47 | ||
| @@ -115,7 +113,7 @@ public class MesProTaskIssueController { | @@ -115,7 +113,7 @@ public class MesProTaskIssueController { | ||
| 115 | return cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList(list, issue -> { | 113 | return cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList(list, issue -> { |
| 116 | MesProTaskIssueRespVO vo = BeanUtils.toBean(issue, MesProTaskIssueRespVO.class); | 114 | MesProTaskIssueRespVO vo = BeanUtils.toBean(issue, MesProTaskIssueRespVO.class); |
| 117 | findAndThen(itemMap, issue.getItemId(), item -> | 115 | findAndThen(itemMap, issue.getItemId(), item -> |
| 118 | - vo.setItemCode(item.getCode()).setItemName(item.getName()).setItemSpec(item.getSpecification())); | 116 | + vo.setItemCode(item.getCode()).setItemName(item.getName()).setItemSpecification(item.getSpecification())); |
| 119 | findAndThen(unitMap, issue.getUnitMeasureId(), unit -> | 117 | findAndThen(unitMap, issue.getUnitMeasureId(), unit -> |
| 120 | vo.setUnitMeasureName(unit.getName())); | 118 | vo.setUnitMeasureName(unit.getName())); |
| 121 | return vo; | 119 | return vo; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/task/vo/MesProTaskIssueRespVO.java
| @@ -22,21 +22,21 @@ public class MesProTaskIssueRespVO { | @@ -22,21 +22,21 @@ public class MesProTaskIssueRespVO { | ||
| 22 | @Schema(description = "工作站编号", example = "1") | 22 | @Schema(description = "工作站编号", example = "1") |
| 23 | private Long workstationId; | 23 | private Long workstationId; |
| 24 | 24 | ||
| 25 | + @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE") | ||
| 26 | + private String sourceDocType; | ||
| 27 | + | ||
| 25 | @Schema(description = "来源单据编号", example = "1") | 28 | @Schema(description = "来源单据编号", example = "1") |
| 26 | private Long sourceDocId; | 29 | private Long sourceDocId; |
| 27 | 30 | ||
| 31 | + @Schema(description = "来源单据行编号", example = "1") | ||
| 32 | + private Long sourceLineId; | ||
| 33 | + | ||
| 28 | @Schema(description = "来源单据编码", example = "DOC-001") | 34 | @Schema(description = "来源单据编码", example = "DOC-001") |
| 29 | private String sourceDocCode; | 35 | private String sourceDocCode; |
| 30 | 36 | ||
| 31 | - @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE") | ||
| 32 | - private String sourceDocType; | ||
| 33 | - | ||
| 34 | @Schema(description = "投料批次", example = "BATCH-001") | 37 | @Schema(description = "投料批次", example = "BATCH-001") |
| 35 | private String batchCode; | 38 | private String batchCode; |
| 36 | 39 | ||
| 37 | - @Schema(description = "来源单据行编号", example = "1") | ||
| 38 | - private Long sourceLineId; | ||
| 39 | - | ||
| 40 | @Schema(description = "产品物料编号", example = "100") | 40 | @Schema(description = "产品物料编号", example = "100") |
| 41 | private Long itemId; | 41 | private Long itemId; |
| 42 | 42 | ||
| @@ -47,7 +47,7 @@ public class MesProTaskIssueRespVO { | @@ -47,7 +47,7 @@ public class MesProTaskIssueRespVO { | ||
| 47 | private String itemName; | 47 | private String itemName; |
| 48 | 48 | ||
| 49 | @Schema(description = "规格型号", example = "100x200mm") | 49 | @Schema(description = "规格型号", example = "100x200mm") |
| 50 | - private String itemSpec; | 50 | + private String itemSpecification; |
| 51 | 51 | ||
| 52 | @Schema(description = "单位编号", example = "1") | 52 | @Schema(description = "单位编号", example = "1") |
| 53 | private Long unitMeasureId; | 53 | private Long unitMeasureId; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/task/vo/MesProTaskIssueSaveReqVO.java
| @@ -23,22 +23,22 @@ public class MesProTaskIssueSaveReqVO { | @@ -23,22 +23,22 @@ public class MesProTaskIssueSaveReqVO { | ||
| 23 | @Schema(description = "工作站编号", example = "1") | 23 | @Schema(description = "工作站编号", example = "1") |
| 24 | private Long workstationId; | 24 | private Long workstationId; |
| 25 | 25 | ||
| 26 | + @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE") | ||
| 27 | + private String sourceDocType; | ||
| 28 | + | ||
| 26 | @Schema(description = "来源单据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 29 | @Schema(description = "来源单据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 27 | @NotNull(message = "来源单据编号不能为空") | 30 | @NotNull(message = "来源单据编号不能为空") |
| 28 | private Long sourceDocId; | 31 | private Long sourceDocId; |
| 29 | 32 | ||
| 33 | + @Schema(description = "来源单据行编号", example = "1") | ||
| 34 | + private Long sourceLineId; | ||
| 35 | + | ||
| 30 | @Schema(description = "来源单据编码", example = "DOC-001") | 36 | @Schema(description = "来源单据编码", example = "DOC-001") |
| 31 | private String sourceDocCode; | 37 | private String sourceDocCode; |
| 32 | 38 | ||
| 33 | - @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE") | ||
| 34 | - private String sourceDocType; | ||
| 35 | - | ||
| 36 | @Schema(description = "投料批次", example = "BATCH-001") | 39 | @Schema(description = "投料批次", example = "BATCH-001") |
| 37 | private String batchCode; | 40 | private String batchCode; |
| 38 | 41 | ||
| 39 | - @Schema(description = "来源单据行编号", example = "1") | ||
| 40 | - private Long sourceLineId; | ||
| 41 | - | ||
| 42 | @Schema(description = "产品物料编号", example = "100") | 42 | @Schema(description = "产品物料编号", example = "100") |
| 43 | private Long itemId; | 43 | private Long itemId; |
| 44 | 44 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/task/vo/MesProTaskPageReqVO.java
| @@ -8,6 +8,7 @@ import lombok.ToString; | @@ -8,6 +8,7 @@ import lombok.ToString; | ||
| 8 | import org.springframework.format.annotation.DateTimeFormat; | 8 | import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 9 | ||
| 10 | import java.time.LocalDateTime; | 10 | import java.time.LocalDateTime; |
| 11 | +import java.util.List; | ||
| 11 | 12 | ||
| 12 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 13 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 13 | 14 | ||
| @@ -38,6 +39,12 @@ public class MesProTaskPageReqVO extends PageParam { | @@ -38,6 +39,12 @@ public class MesProTaskPageReqVO extends PageParam { | ||
| 38 | @Schema(description = "任务状态", example = "0") | 39 | @Schema(description = "任务状态", example = "0") |
| 39 | private Integer status; | 40 | private Integer status; |
| 40 | 41 | ||
| 42 | + @Schema(description = "任务状态列表(IN 查询)", example = "[0, 1, 2]") | ||
| 43 | + private List<Integer> statuses; | ||
| 44 | + | ||
| 45 | + @Schema(description = "是否质检(关联工艺路线工序)", example = "true") | ||
| 46 | + private Boolean checkFlag; | ||
| 47 | + | ||
| 41 | @Schema(description = "创建时间") | 48 | @Schema(description = "创建时间") |
| 42 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 49 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 43 | private LocalDateTime[] createTime; | 50 | private LocalDateTime[] createTime; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/task/vo/MesProTaskRespVO.java
| @@ -56,7 +56,10 @@ public class MesProTaskRespVO { | @@ -56,7 +56,10 @@ public class MesProTaskRespVO { | ||
| 56 | private String itemName; | 56 | private String itemName; |
| 57 | 57 | ||
| 58 | @Schema(description = "规格型号", example = "100x200mm") | 58 | @Schema(description = "规格型号", example = "100x200mm") |
| 59 | - private String itemSpec; | 59 | + private String itemSpecification; |
| 60 | + | ||
| 61 | + @Schema(description = "计量单位名称", example = "个") | ||
| 62 | + private String unitMeasureName; | ||
| 60 | 63 | ||
| 61 | @Schema(description = "排产数量", example = "100.00") | 64 | @Schema(description = "排产数量", example = "100.00") |
| 62 | private BigDecimal quantity; | 65 | private BigDecimal quantity; |
| @@ -103,6 +106,9 @@ public class MesProTaskRespVO { | @@ -103,6 +106,9 @@ public class MesProTaskRespVO { | ||
| 103 | @Schema(description = "任务状态", example = "0") | 106 | @Schema(description = "任务状态", example = "0") |
| 104 | private Integer status; | 107 | private Integer status; |
| 105 | 108 | ||
| 109 | + @Schema(description = "是否质检(派生自工艺路线工序 checkFlag)", example = "true") | ||
| 110 | + private Boolean checkFlag; | ||
| 111 | + | ||
| 106 | @Schema(description = "备注", example = "备注") | 112 | @Schema(description = "备注", example = "备注") |
| 107 | private String remark; | 113 | private String remark; |
| 108 | 114 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderBomController.java
| @@ -43,16 +43,12 @@ public class MesProWorkOrderBomController { | @@ -43,16 +43,12 @@ public class MesProWorkOrderBomController { | ||
| 43 | 43 | ||
| 44 | @Resource | 44 | @Resource |
| 45 | private MesProWorkOrderBomService workOrderBomService; | 45 | private MesProWorkOrderBomService workOrderBomService; |
| 46 | - | ||
| 47 | @Resource | 46 | @Resource |
| 48 | private MesMdItemService itemService; | 47 | private MesMdItemService itemService; |
| 49 | - | ||
| 50 | @Resource | 48 | @Resource |
| 51 | private MesMdUnitMeasureService unitMeasureService; | 49 | private MesMdUnitMeasureService unitMeasureService; |
| 52 | - | ||
| 53 | @Resource | 50 | @Resource |
| 54 | private MesMdItemTypeService itemTypeService; | 51 | private MesMdItemTypeService itemTypeService; |
| 55 | - | ||
| 56 | @Resource | 52 | @Resource |
| 57 | private MesMdProductBomService productBomService; | 53 | private MesMdProductBomService productBomService; |
| 58 | 54 | ||
| @@ -122,6 +118,8 @@ public class MesProWorkOrderBomController { | @@ -122,6 +118,8 @@ public class MesProWorkOrderBomController { | ||
| 122 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap(leafItems.keySet()); | 118 | Map<Long, MesMdItemDO> itemMap = itemService.getItemMap(leafItems.keySet()); |
| 123 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( | 119 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( |
| 124 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); | 120 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); |
| 121 | + Map<Long, MesMdItemTypeDO> itemTypeMap = itemTypeService.getItemTypeMap( | ||
| 122 | + convertSet(itemMap.values(), MesMdItemDO::getItemTypeId)); | ||
| 125 | List<MesProWorkOrderItemRespVO> result = new ArrayList<>(leafItems.size()); | 123 | List<MesProWorkOrderItemRespVO> result = new ArrayList<>(leafItems.size()); |
| 126 | for (Map.Entry<Long, BigDecimal> entry : leafItems.entrySet()) { | 124 | for (Map.Entry<Long, BigDecimal> entry : leafItems.entrySet()) { |
| 127 | MesMdItemDO item = itemMap.get(entry.getKey()); | 125 | MesMdItemDO item = itemMap.get(entry.getKey()); |
| @@ -130,9 +128,11 @@ public class MesProWorkOrderBomController { | @@ -130,9 +128,11 @@ public class MesProWorkOrderBomController { | ||
| 130 | } | 128 | } |
| 131 | MesProWorkOrderItemRespVO vo = new MesProWorkOrderItemRespVO() | 129 | MesProWorkOrderItemRespVO vo = new MesProWorkOrderItemRespVO() |
| 132 | .setItemId(item.getId()).setQuantity(entry.getValue()) | 130 | .setItemId(item.getId()).setQuantity(entry.getValue()) |
| 133 | - .setItemCode(item.getCode()).setItemName(item.getName()).setItemSpec(item.getSpecification()); | 131 | + .setItemCode(item.getCode()).setItemName(item.getName()).setItemSpecification(item.getSpecification()); |
| 134 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 132 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
| 135 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); | 133 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); |
| 134 | + MapUtils.findAndThen(itemTypeMap, item.getItemTypeId(), | ||
| 135 | + itemType -> vo.setItemOrProduct(itemType.getItemOrProduct())); | ||
| 136 | result.add(vo); | 136 | result.add(vo); |
| 137 | } | 137 | } |
| 138 | return success(result); | 138 | return success(result); |
| @@ -155,7 +155,7 @@ public class MesProWorkOrderBomController { | @@ -155,7 +155,7 @@ public class MesProWorkOrderBomController { | ||
| 155 | return BeanUtils.toBean(list, MesProWorkOrderBomRespVO.class, vo -> { | 155 | return BeanUtils.toBean(list, MesProWorkOrderBomRespVO.class, vo -> { |
| 156 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { | 156 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { |
| 157 | vo.setItemName(item.getName()).setItemCode(item.getCode()) | 157 | vo.setItemName(item.getName()).setItemCode(item.getCode()) |
| 158 | - .setItemSpec(item.getSpecification()); | 158 | + .setItemSpecification(item.getSpecification()); |
| 159 | MapUtils.findAndThen(itemTypeMap, item.getItemTypeId(), | 159 | MapUtils.findAndThen(itemTypeMap, item.getItemTypeId(), |
| 160 | itemType -> vo.setItemOrProduct(itemType.getItemOrProduct())); | 160 | itemType -> vo.setItemOrProduct(itemType.getItemOrProduct())); |
| 161 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 161 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/MesProWorkOrderController.java
| @@ -47,16 +47,12 @@ public class MesProWorkOrderController { | @@ -47,16 +47,12 @@ public class MesProWorkOrderController { | ||
| 47 | 47 | ||
| 48 | @Resource | 48 | @Resource |
| 49 | private MesProWorkOrderService workOrderService; | 49 | private MesProWorkOrderService workOrderService; |
| 50 | - | ||
| 51 | @Resource | 50 | @Resource |
| 52 | private MesMdItemService itemService; | 51 | private MesMdItemService itemService; |
| 53 | - | ||
| 54 | @Resource | 52 | @Resource |
| 55 | private MesMdClientService clientService; | 53 | private MesMdClientService clientService; |
| 56 | - | ||
| 57 | @Resource | 54 | @Resource |
| 58 | private MesMdVendorService vendorService; | 55 | private MesMdVendorService vendorService; |
| 59 | - | ||
| 60 | @Resource | 56 | @Resource |
| 61 | private MesMdUnitMeasureService unitMeasureService; | 57 | private MesMdUnitMeasureService unitMeasureService; |
| 62 | 58 | ||
| @@ -165,7 +161,7 @@ public class MesProWorkOrderController { | @@ -165,7 +161,7 @@ public class MesProWorkOrderController { | ||
| 165 | return BeanUtils.toBean(list, MesProWorkOrderRespVO.class, vo -> { | 161 | return BeanUtils.toBean(list, MesProWorkOrderRespVO.class, vo -> { |
| 166 | MapUtils.findAndThen(itemMap, vo.getProductId(), item -> { | 162 | MapUtils.findAndThen(itemMap, vo.getProductId(), item -> { |
| 167 | vo.setProductName(item.getName()).setProductCode(item.getCode()) | 163 | vo.setProductName(item.getName()).setProductCode(item.getCode()) |
| 168 | - .setProductSpec(item.getSpecification()); | 164 | + .setProductSpecification(item.getSpecification()); |
| 169 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 165 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
| 170 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); | 166 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); |
| 171 | }); | 167 | }); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/vo/MesProWorkOrderItemRespVO.java
| @@ -19,7 +19,7 @@ public class MesProWorkOrderItemRespVO { | @@ -19,7 +19,7 @@ public class MesProWorkOrderItemRespVO { | ||
| 19 | private String itemName; | 19 | private String itemName; |
| 20 | 20 | ||
| 21 | @Schema(description = "规格型号", example = "0603") | 21 | @Schema(description = "规格型号", example = "0603") |
| 22 | - private String itemSpec; | 22 | + private String itemSpecification; |
| 23 | 23 | ||
| 24 | @Schema(description = "单位名称", example = "个") | 24 | @Schema(description = "单位名称", example = "个") |
| 25 | private String unitMeasureName; | 25 | private String unitMeasureName; |
| @@ -27,4 +27,7 @@ public class MesProWorkOrderItemRespVO { | @@ -27,4 +27,7 @@ public class MesProWorkOrderItemRespVO { | ||
| 27 | @Schema(description = "需求数量", example = "1000.00") | 27 | @Schema(description = "需求数量", example = "1000.00") |
| 28 | private BigDecimal quantity; | 28 | private BigDecimal quantity; |
| 29 | 29 | ||
| 30 | + @Schema(description = "物料/产品标识", example = "ITEM") | ||
| 31 | + private String itemOrProduct; | ||
| 32 | + | ||
| 30 | } | 33 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/vo/MesProWorkOrderPageReqVO.java
| @@ -35,6 +35,9 @@ public class MesProWorkOrderPageReqVO extends PageParam { | @@ -35,6 +35,9 @@ public class MesProWorkOrderPageReqVO extends PageParam { | ||
| 35 | @Schema(description = "客户编号", example = "300") | 35 | @Schema(description = "客户编号", example = "300") |
| 36 | private Long clientId; | 36 | private Long clientId; |
| 37 | 37 | ||
| 38 | + @Schema(description = "工单状态", example = "1") | ||
| 39 | + private Integer status; | ||
| 40 | + | ||
| 38 | @Schema(description = "需求日期") | 41 | @Schema(description = "需求日期") |
| 39 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 42 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 40 | private LocalDateTime[] requestDate; | 43 | private LocalDateTime[] requestDate; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/vo/MesProWorkOrderRespVO.java
| @@ -55,7 +55,7 @@ public class MesProWorkOrderRespVO { | @@ -55,7 +55,7 @@ public class MesProWorkOrderRespVO { | ||
| 55 | 55 | ||
| 56 | @Schema(description = "规格型号", example = "100x200mm") | 56 | @Schema(description = "规格型号", example = "100x200mm") |
| 57 | @ExcelProperty("规格型号") | 57 | @ExcelProperty("规格型号") |
| 58 | - private String productSpec; | 58 | + private String productSpecification; |
| 59 | 59 | ||
| 60 | @Schema(description = "单位名称", example = "个") | 60 | @Schema(description = "单位名称", example = "个") |
| 61 | @ExcelProperty("单位") | 61 | @ExcelProperty("单位") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pro/workorder/vo/bom/MesProWorkOrderBomRespVO.java
| @@ -33,7 +33,7 @@ public class MesProWorkOrderBomRespVO { | @@ -33,7 +33,7 @@ public class MesProWorkOrderBomRespVO { | ||
| 33 | 33 | ||
| 34 | @Schema(description = "规格型号", example = "10K 0603") | 34 | @Schema(description = "规格型号", example = "10K 0603") |
| 35 | @ExcelProperty("规格型号") | 35 | @ExcelProperty("规格型号") |
| 36 | - private String itemSpec; | 36 | + private String itemSpecification; |
| 37 | 37 | ||
| 38 | @Schema(description = "单位编号", example = "300") | 38 | @Schema(description = "单位编号", example = "300") |
| 39 | private Long unitMeasureId; | 39 | private Long unitMeasureId; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/defect/vo/MesQcDefectPageReqVO.java
| @@ -18,8 +18,8 @@ public class MesQcDefectPageReqVO extends PageParam { | @@ -18,8 +18,8 @@ public class MesQcDefectPageReqVO extends PageParam { | ||
| 18 | @Schema(description = "缺陷描述", example = "外观缺陷") | 18 | @Schema(description = "缺陷描述", example = "外观缺陷") |
| 19 | private String name; | 19 | private String name; |
| 20 | 20 | ||
| 21 | - @Schema(description = "检测项类型", example = "APPEARANCE") | ||
| 22 | - private String type; | 21 | + @Schema(description = "检测项类型", example = "2") |
| 22 | + private Integer type; | ||
| 23 | 23 | ||
| 24 | @Schema(description = "缺陷等级", example = "1") | 24 | @Schema(description = "缺陷等级", example = "1") |
| 25 | private Integer level; | 25 | private Integer level; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/defect/vo/MesQcDefectRespVO.java
| @@ -27,10 +27,10 @@ public class MesQcDefectRespVO { | @@ -27,10 +27,10 @@ public class MesQcDefectRespVO { | ||
| 27 | @ExcelProperty("缺陷描述") | 27 | @ExcelProperty("缺陷描述") |
| 28 | private String name; | 28 | private String name; |
| 29 | 29 | ||
| 30 | - @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "APPEARANCE") | 30 | + @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 31 | @ExcelProperty(value = "检测项类型", converter = DictConvert.class) | 31 | @ExcelProperty(value = "检测项类型", converter = DictConvert.class) |
| 32 | @DictFormat(DictTypeConstants.MES_DEFECT_TYPE) | 32 | @DictFormat(DictTypeConstants.MES_DEFECT_TYPE) |
| 33 | - private String type; | 33 | + private Integer type; |
| 34 | 34 | ||
| 35 | @Schema(description = "缺陷等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 35 | @Schema(description = "缺陷等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 36 | @ExcelProperty(value = "缺陷等级", converter = DictConvert.class) | 36 | @ExcelProperty(value = "缺陷等级", converter = DictConvert.class) |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/defect/vo/MesQcDefectSaveReqVO.java
| @@ -22,9 +22,9 @@ public class MesQcDefectSaveReqVO { | @@ -22,9 +22,9 @@ public class MesQcDefectSaveReqVO { | ||
| 22 | @NotEmpty(message = "缺陷描述不能为空") | 22 | @NotEmpty(message = "缺陷描述不能为空") |
| 23 | private String name; | 23 | private String name; |
| 24 | 24 | ||
| 25 | - @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "APPEARANCE") | ||
| 26 | - @NotEmpty(message = "检测项类型不能为空") | ||
| 27 | - private String type; | 25 | + @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 26 | + @NotNull(message = "检测项类型不能为空") | ||
| 27 | + private Integer type; | ||
| 28 | 28 | ||
| 29 | @Schema(description = "缺陷等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 29 | @Schema(description = "缺陷等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 30 | @NotNull(message = "缺陷等级不能为空") | 30 | @NotNull(message = "缺陷等级不能为空") |
| @@ -34,4 +34,4 @@ public class MesQcDefectSaveReqVO { | @@ -34,4 +34,4 @@ public class MesQcDefectSaveReqVO { | ||
| 34 | @Schema(description = "备注", example = "备注") | 34 | @Schema(description = "备注", example = "备注") |
| 35 | private String remark; | 35 | private String remark; |
| 36 | 36 | ||
| 37 | - } | 37 | +} |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/defectrecord/MesQcDefectRecordController.java
| @@ -46,7 +46,7 @@ public class MesQcDefectRecordController { | @@ -46,7 +46,7 @@ public class MesQcDefectRecordController { | ||
| 46 | @DeleteMapping("/delete") | 46 | @DeleteMapping("/delete") |
| 47 | @Operation(summary = "删除质检缺陷记录") | 47 | @Operation(summary = "删除质检缺陷记录") |
| 48 | @Parameter(name = "id", description = "编号", required = true) | 48 | @Parameter(name = "id", description = "编号", required = true) |
| 49 | - @PreAuthorize("@ss.hasPermission('mes:qc-defect:update')") | 49 | + @PreAuthorize("@ss.hasPermission('mes:qc-defect:delete')") |
| 50 | public CommonResult<Boolean> deleteDefectRecord(@RequestParam("id") Long id) { | 50 | public CommonResult<Boolean> deleteDefectRecord(@RequestParam("id") Long id) { |
| 51 | defectRecordService.deleteDefectRecord(id); | 51 | defectRecordService.deleteDefectRecord(id); |
| 52 | return success(true); | 52 | return success(true); |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/indicator/MesQcIndicatorController.java
| @@ -77,13 +77,6 @@ public class MesQcIndicatorController { | @@ -77,13 +77,6 @@ public class MesQcIndicatorController { | ||
| 77 | return success(BeanUtils.toBean(pageResult, MesQcIndicatorRespVO.class)); | 77 | return success(BeanUtils.toBean(pageResult, MesQcIndicatorRespVO.class)); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | - @GetMapping("/simple-list") | ||
| 81 | - @Operation(summary = "获得质检指标精简列表", description = "主要用于前端的下拉选项") | ||
| 82 | - public CommonResult<List<MesQcIndicatorRespVO>> getIndicatorSimpleList() { | ||
| 83 | - List<MesQcIndicatorDO> list = indicatorService.getIndicatorList(); | ||
| 84 | - return success(BeanUtils.toBean(list, MesQcIndicatorRespVO.class)); | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | @GetMapping("/export-excel") | 80 | @GetMapping("/export-excel") |
| 88 | @Operation(summary = "导出质检指标 Excel") | 81 | @Operation(summary = "导出质检指标 Excel") |
| 89 | @PreAuthorize("@ss.hasPermission('mes:qc-indicator:export')") | 82 | @PreAuthorize("@ss.hasPermission('mes:qc-indicator:export')") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/indicator/vo/MesQcIndicatorPageReqVO.java
| @@ -18,8 +18,8 @@ public class MesQcIndicatorPageReqVO extends PageParam { | @@ -18,8 +18,8 @@ public class MesQcIndicatorPageReqVO extends PageParam { | ||
| 18 | @Schema(description = "检测项名称", example = "长度") | 18 | @Schema(description = "检测项名称", example = "长度") |
| 19 | private String name; | 19 | private String name; |
| 20 | 20 | ||
| 21 | - @Schema(description = "检测项类型", example = "SIZE") | ||
| 22 | - private String type; | 21 | + @Schema(description = "检测项类型", example = "1") |
| 22 | + private Integer type; | ||
| 23 | 23 | ||
| 24 | @Schema(description = "结果值类型", example = "1") | 24 | @Schema(description = "结果值类型", example = "1") |
| 25 | private Integer resultType; | 25 | private Integer resultType; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/indicator/vo/MesQcIndicatorRespVO.java
| @@ -27,10 +27,10 @@ public class MesQcIndicatorRespVO { | @@ -27,10 +27,10 @@ public class MesQcIndicatorRespVO { | ||
| 27 | @ExcelProperty("检测项名称") | 27 | @ExcelProperty("检测项名称") |
| 28 | private String name; | 28 | private String name; |
| 29 | 29 | ||
| 30 | - @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "SIZE") | 30 | + @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 31 | @ExcelProperty(value = "检测项类型", converter = DictConvert.class) | 31 | @ExcelProperty(value = "检测项类型", converter = DictConvert.class) |
| 32 | @DictFormat(DictTypeConstants.MES_INDICATOR_TYPE) | 32 | @DictFormat(DictTypeConstants.MES_INDICATOR_TYPE) |
| 33 | - private String type; | 33 | + private Integer type; |
| 34 | 34 | ||
| 35 | @Schema(description = "检测工具", example = "卡尺") | 35 | @Schema(description = "检测工具", example = "卡尺") |
| 36 | @ExcelProperty("检测工具") | 36 | @ExcelProperty("检测工具") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/indicator/vo/MesQcIndicatorSaveReqVO.java
| @@ -20,9 +20,9 @@ public class MesQcIndicatorSaveReqVO { | @@ -20,9 +20,9 @@ public class MesQcIndicatorSaveReqVO { | ||
| 20 | @NotEmpty(message = "检测项名称不能为空") | 20 | @NotEmpty(message = "检测项名称不能为空") |
| 21 | private String name; | 21 | private String name; |
| 22 | 22 | ||
| 23 | - @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "SIZE") | ||
| 24 | - @NotEmpty(message = "检测项类型不能为空") | ||
| 25 | - private String type; | 23 | + @Schema(description = "检测项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 24 | + @NotNull(message = "检测项类型不能为空") | ||
| 25 | + private Integer type; | ||
| 26 | 26 | ||
| 27 | @Schema(description = "检测工具", example = "卡尺") | 27 | @Schema(description = "检测工具", example = "卡尺") |
| 28 | private String tool; | 28 | private String tool; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/ipqc/vo/MesQcIpqcRespVO.java
| @@ -34,12 +34,12 @@ public class MesQcIpqcRespVO { | @@ -34,12 +34,12 @@ public class MesQcIpqcRespVO { | ||
| 34 | 34 | ||
| 35 | // ========== 来源单据 ========== | 35 | // ========== 来源单据 ========== |
| 36 | 36 | ||
| 37 | - @Schema(description = "来源单据 ID", example = "200") | ||
| 38 | - private Long sourceDocId; | ||
| 39 | - | ||
| 40 | @Schema(description = "来源单据类型", example = "304") | 37 | @Schema(description = "来源单据类型", example = "304") |
| 41 | private Integer sourceDocType; | 38 | private Integer sourceDocType; |
| 42 | 39 | ||
| 40 | + @Schema(description = "来源单据 ID", example = "200") | ||
| 41 | + private Long sourceDocId; | ||
| 42 | + | ||
| 43 | @Schema(description = "来源单据行 ID", example = "300") | 43 | @Schema(description = "来源单据行 ID", example = "300") |
| 44 | private Long sourceLineId; | 44 | private Long sourceLineId; |
| 45 | 45 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/ipqc/vo/line/MesQcIpqcLineRespVO.java
| @@ -27,8 +27,8 @@ public class MesQcIpqcLineRespVO { | @@ -27,8 +27,8 @@ public class MesQcIpqcLineRespVO { | ||
| 27 | @Schema(description = "检测指标名称", example = "外观") | 27 | @Schema(description = "检测指标名称", example = "外观") |
| 28 | private String indicatorName; | 28 | private String indicatorName; |
| 29 | 29 | ||
| 30 | - @Schema(description = "检测指标类型", example = "QUANTITATIVE") | ||
| 31 | - private String indicatorType; | 30 | + @Schema(description = "检测指标类型", example = "1") |
| 31 | + private Integer indicatorType; | ||
| 32 | 32 | ||
| 33 | @Schema(description = "检测工具", example = "卡尺") | 33 | @Schema(description = "检测工具", example = "卡尺") |
| 34 | private String tool; | 34 | private String tool; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/iqc/vo/MesQcIqcRespVO.java
| @@ -30,12 +30,12 @@ public class MesQcIqcRespVO { | @@ -30,12 +30,12 @@ public class MesQcIqcRespVO { | ||
| 30 | 30 | ||
| 31 | // ========== 来源单据 ========== | 31 | // ========== 来源单据 ========== |
| 32 | 32 | ||
| 33 | - @Schema(description = "来源单据 ID", example = "200") | ||
| 34 | - private Long sourceDocId; | ||
| 35 | - | ||
| 36 | @Schema(description = "来源单据类型", example = "100") | 33 | @Schema(description = "来源单据类型", example = "100") |
| 37 | private Integer sourceDocType; | 34 | private Integer sourceDocType; |
| 38 | 35 | ||
| 36 | + @Schema(description = "来源单据 ID", example = "200") | ||
| 37 | + private Long sourceDocId; | ||
| 38 | + | ||
| 39 | @Schema(description = "来源单据行 ID", example = "300") | 39 | @Schema(description = "来源单据行 ID", example = "300") |
| 40 | private Long sourceLineId; | 40 | private Long sourceLineId; |
| 41 | 41 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/iqc/vo/line/MesQcIqcLineRespVO.java
| @@ -27,8 +27,8 @@ public class MesQcIqcLineRespVO { | @@ -27,8 +27,8 @@ public class MesQcIqcLineRespVO { | ||
| 27 | @Schema(description = "检测指标名称", example = "外观") | 27 | @Schema(description = "检测指标名称", example = "外观") |
| 28 | private String indicatorName; | 28 | private String indicatorName; |
| 29 | 29 | ||
| 30 | - @Schema(description = "检测指标类型", example = "QUANTITATIVE") | ||
| 31 | - private String indicatorType; | 30 | + @Schema(description = "检测指标类型", example = "1") |
| 31 | + private Integer indicatorType; | ||
| 32 | 32 | ||
| 33 | @Schema(description = "检测工具", example = "卡尺") | 33 | @Schema(description = "检测工具", example = "卡尺") |
| 34 | private String tool; | 34 | private String tool; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/oqc/vo/MesQcOqcRespVO.java
| @@ -30,12 +30,12 @@ public class MesQcOqcRespVO { | @@ -30,12 +30,12 @@ public class MesQcOqcRespVO { | ||
| 30 | 30 | ||
| 31 | // ========== 来源单据 ========== | 31 | // ========== 来源单据 ========== |
| 32 | 32 | ||
| 33 | - @Schema(description = "来源单据 ID", example = "200") | ||
| 34 | - private Long sourceDocId; | ||
| 35 | - | ||
| 36 | @Schema(description = "来源单据类型", example = "118") | 33 | @Schema(description = "来源单据类型", example = "118") |
| 37 | private Integer sourceDocType; | 34 | private Integer sourceDocType; |
| 38 | 35 | ||
| 36 | + @Schema(description = "来源单据 ID", example = "200") | ||
| 37 | + private Long sourceDocId; | ||
| 38 | + | ||
| 39 | @Schema(description = "来源单据行 ID", example = "300") | 39 | @Schema(description = "来源单据行 ID", example = "300") |
| 40 | private Long sourceLineId; | 40 | private Long sourceLineId; |
| 41 | 41 | ||
| @@ -51,12 +51,12 @@ public class MesQcOqcRespVO { | @@ -51,12 +51,12 @@ public class MesQcOqcRespVO { | ||
| 51 | @ExcelProperty("客户简称") | 51 | @ExcelProperty("客户简称") |
| 52 | private String clientNickname; | 52 | private String clientNickname; |
| 53 | 53 | ||
| 54 | + // ========== 物料 ========== | ||
| 55 | + | ||
| 54 | @Schema(description = "批次号", example = "BC20250101") | 56 | @Schema(description = "批次号", example = "BC20250101") |
| 55 | @ExcelProperty("批次号") | 57 | @ExcelProperty("批次号") |
| 56 | private String batchCode; | 58 | private String batchCode; |
| 57 | 59 | ||
| 58 | - // ========== 物料 ========== | ||
| 59 | - | ||
| 60 | @Schema(description = "产品物料 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") | 60 | @Schema(description = "产品物料 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") |
| 61 | private Long itemId; | 61 | private Long itemId; |
| 62 | 62 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/oqc/vo/MesQcOqcSaveReqVO.java
| @@ -26,12 +26,12 @@ public class MesQcOqcSaveReqVO { | @@ -26,12 +26,12 @@ public class MesQcOqcSaveReqVO { | ||
| 26 | 26 | ||
| 27 | // ========== 来源单据 ========== | 27 | // ========== 来源单据 ========== |
| 28 | 28 | ||
| 29 | - @Schema(description = "来源单据 ID", example = "200") | ||
| 30 | - private Long sourceDocId; | ||
| 31 | - | ||
| 32 | @Schema(description = "来源单据类型", example = "118") | 29 | @Schema(description = "来源单据类型", example = "118") |
| 33 | private Integer sourceDocType; | 30 | private Integer sourceDocType; |
| 34 | 31 | ||
| 32 | + @Schema(description = "来源单据 ID", example = "200") | ||
| 33 | + private Long sourceDocId; | ||
| 34 | + | ||
| 35 | @Schema(description = "来源单据行 ID", example = "300") | 35 | @Schema(description = "来源单据行 ID", example = "300") |
| 36 | private Long sourceLineId; | 36 | private Long sourceLineId; |
| 37 | 37 | ||
| @@ -41,11 +41,11 @@ public class MesQcOqcSaveReqVO { | @@ -41,11 +41,11 @@ public class MesQcOqcSaveReqVO { | ||
| 41 | @NotNull(message = "客户不能为空") | 41 | @NotNull(message = "客户不能为空") |
| 42 | private Long clientId; | 42 | private Long clientId; |
| 43 | 43 | ||
| 44 | + // ========== 物料 ========== | ||
| 45 | + | ||
| 44 | @Schema(description = "批次号", example = "BC20250101") | 46 | @Schema(description = "批次号", example = "BC20250101") |
| 45 | private String batchCode; | 47 | private String batchCode; |
| 46 | 48 | ||
| 47 | - // ========== 物料 ========== | ||
| 48 | - | ||
| 49 | @Schema(description = "产品物料 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") | 49 | @Schema(description = "产品物料 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20") |
| 50 | @NotNull(message = "产品物料不能为空") | 50 | @NotNull(message = "产品物料不能为空") |
| 51 | private Long itemId; | 51 | private Long itemId; |
| @@ -74,9 +74,8 @@ public class MesQcOqcSaveReqVO { | @@ -74,9 +74,8 @@ public class MesQcOqcSaveReqVO { | ||
| 74 | 74 | ||
| 75 | // ========== 检验 ========== | 75 | // ========== 检验 ========== |
| 76 | 76 | ||
| 77 | - @Schema(description = "检测人员用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | ||
| 78 | - @NotNull(message = "检测人员不能为空") | ||
| 79 | - private Long inspectorUserId; | 77 | + @Schema(description = "检测结果", example = "1") |
| 78 | + private Integer checkResult; | ||
| 80 | 79 | ||
| 81 | @Schema(description = "出货日期", requiredMode = Schema.RequiredMode.REQUIRED) | 80 | @Schema(description = "出货日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| 82 | @NotNull(message = "出货日期不能为空") | 81 | @NotNull(message = "出货日期不能为空") |
| @@ -86,8 +85,9 @@ public class MesQcOqcSaveReqVO { | @@ -86,8 +85,9 @@ public class MesQcOqcSaveReqVO { | ||
| 86 | @NotNull(message = "检测日期不能为空") | 85 | @NotNull(message = "检测日期不能为空") |
| 87 | private LocalDateTime inspectDate; | 86 | private LocalDateTime inspectDate; |
| 88 | 87 | ||
| 89 | - @Schema(description = "检测结果", example = "1") | ||
| 90 | - private Integer checkResult; | 88 | + @Schema(description = "检测人员用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 89 | + @NotNull(message = "检测人员不能为空") | ||
| 90 | + private Long inspectorUserId; | ||
| 91 | 91 | ||
| 92 | @Schema(description = "备注", example = "备注") | 92 | @Schema(description = "备注", example = "备注") |
| 93 | private String remark; | 93 | private String remark; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/oqc/vo/line/MesQcOqcLineRespVO.java
| @@ -27,8 +27,8 @@ public class MesQcOqcLineRespVO { | @@ -27,8 +27,8 @@ public class MesQcOqcLineRespVO { | ||
| 27 | @Schema(description = "检测指标名称", example = "外观") | 27 | @Schema(description = "检测指标名称", example = "外观") |
| 28 | private String indicatorName; | 28 | private String indicatorName; |
| 29 | 29 | ||
| 30 | - @Schema(description = "检测指标类型", example = "QUANTITATIVE") | ||
| 31 | - private String indicatorType; | 30 | + @Schema(description = "检测指标类型", example = "1") |
| 31 | + private Integer indicatorType; | ||
| 32 | 32 | ||
| 33 | @Schema(description = "检测工具", example = "卡尺") | 33 | @Schema(description = "检测工具", example = "卡尺") |
| 34 | private String tool; | 34 | private String tool; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/pendinginspect/vo/MesQcPendingInspectRespVO.java
| @@ -10,17 +10,16 @@ import java.time.LocalDateTime; | @@ -10,17 +10,16 @@ import java.time.LocalDateTime; | ||
| 10 | @Data | 10 | @Data |
| 11 | public class MesQcPendingInspectRespVO { | 11 | public class MesQcPendingInspectRespVO { |
| 12 | 12 | ||
| 13 | - @Schema(description = "来源单据 ID", example = "100") | ||
| 14 | - private Long sourceDocId; | ||
| 15 | - | ||
| 16 | @Schema(description = "来源单据类型(MesBizTypeConstants)", example = "100") | 13 | @Schema(description = "来源单据类型(MesBizTypeConstants)", example = "100") |
| 17 | private Integer sourceDocType; | 14 | private Integer sourceDocType; |
| 18 | 15 | ||
| 19 | - @Schema(description = "来源单据编号", example = "AN2025001") | ||
| 20 | - private String sourceDocCode; | 16 | + @Schema(description = "来源单据 ID", example = "100") |
| 17 | + private Long sourceDocId; | ||
| 21 | 18 | ||
| 22 | @Schema(description = "来源单据行 ID", example = "200") | 19 | @Schema(description = "来源单据行 ID", example = "200") |
| 23 | private Long sourceLineId; | 20 | private Long sourceLineId; |
| 21 | + @Schema(description = "来源单据编号", example = "AN2025001") | ||
| 22 | + private String sourceDocCode; | ||
| 24 | 23 | ||
| 25 | @Schema(description = "检验类型(MesQcTypeEnum)", example = "1") | 24 | @Schema(description = "检验类型(MesQcTypeEnum)", example = "1") |
| 26 | private Integer qcType; | 25 | private Integer qcType; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/rqc/vo/MesQcRqcRespVO.java
| @@ -30,12 +30,12 @@ public class MesQcRqcRespVO { | @@ -30,12 +30,12 @@ public class MesQcRqcRespVO { | ||
| 30 | 30 | ||
| 31 | // ========== 来源单据 ========== | 31 | // ========== 来源单据 ========== |
| 32 | 32 | ||
| 33 | - @Schema(description = "来源单据 ID", example = "200") | ||
| 34 | - private Long sourceDocId; | ||
| 35 | - | ||
| 36 | @Schema(description = "来源单据类型", example = "116") | 33 | @Schema(description = "来源单据类型", example = "116") |
| 37 | private Integer sourceDocType; | 34 | private Integer sourceDocType; |
| 38 | 35 | ||
| 36 | + @Schema(description = "来源单据 ID", example = "200") | ||
| 37 | + private Long sourceDocId; | ||
| 38 | + | ||
| 39 | @Schema(description = "来源单据行 ID", example = "300") | 39 | @Schema(description = "来源单据行 ID", example = "300") |
| 40 | private Long sourceLineId; | 40 | private Long sourceLineId; |
| 41 | 41 | ||
| @@ -85,6 +85,26 @@ public class MesQcRqcRespVO { | @@ -85,6 +85,26 @@ public class MesQcRqcRespVO { | ||
| 85 | @ExcelProperty("不合格数量") | 85 | @ExcelProperty("不合格数量") |
| 86 | private BigDecimal unqualifiedQuantity; | 86 | private BigDecimal unqualifiedQuantity; |
| 87 | 87 | ||
| 88 | + // ========== 缺陷统计 ========== | ||
| 89 | + | ||
| 90 | + @Schema(description = "致命缺陷率(%)", example = "5.00") | ||
| 91 | + private BigDecimal criticalRate; | ||
| 92 | + | ||
| 93 | + @Schema(description = "严重缺陷率(%)", example = "10.00") | ||
| 94 | + private BigDecimal majorRate; | ||
| 95 | + | ||
| 96 | + @Schema(description = "轻微缺陷率(%)", example = "15.00") | ||
| 97 | + private BigDecimal minorRate; | ||
| 98 | + | ||
| 99 | + @Schema(description = "致命缺陷数量", example = "5") | ||
| 100 | + private Integer criticalQuantity; | ||
| 101 | + | ||
| 102 | + @Schema(description = "严重缺陷数量", example = "10") | ||
| 103 | + private Integer majorQuantity; | ||
| 104 | + | ||
| 105 | + @Schema(description = "轻微缺陷数量", example = "15") | ||
| 106 | + private Integer minorQuantity; | ||
| 107 | + | ||
| 88 | // ========== 检验 ========== | 108 | // ========== 检验 ========== |
| 89 | 109 | ||
| 90 | @Schema(description = "检测结果", example = "1") | 110 | @Schema(description = "检测结果", example = "1") |
| @@ -110,26 +130,6 @@ public class MesQcRqcRespVO { | @@ -110,26 +130,6 @@ public class MesQcRqcRespVO { | ||
| 110 | @ExcelProperty("备注") | 130 | @ExcelProperty("备注") |
| 111 | private String remark; | 131 | private String remark; |
| 112 | 132 | ||
| 113 | - // ========== 缺陷统计 ========== | ||
| 114 | - | ||
| 115 | - @Schema(description = "致命缺陷数量", example = "5") | ||
| 116 | - private Integer criticalQuantity; | ||
| 117 | - | ||
| 118 | - @Schema(description = "严重缺陷数量", example = "10") | ||
| 119 | - private Integer majorQuantity; | ||
| 120 | - | ||
| 121 | - @Schema(description = "轻微缺陷数量", example = "15") | ||
| 122 | - private Integer minorQuantity; | ||
| 123 | - | ||
| 124 | - @Schema(description = "致命缺陷率(%)", example = "5.00") | ||
| 125 | - private BigDecimal criticalRate; | ||
| 126 | - | ||
| 127 | - @Schema(description = "严重缺陷率(%)", example = "10.00") | ||
| 128 | - private BigDecimal majorRate; | ||
| 129 | - | ||
| 130 | - @Schema(description = "轻微缺陷率(%)", example = "15.00") | ||
| 131 | - private BigDecimal minorRate; | ||
| 132 | - | ||
| 133 | @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | 133 | @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 134 | @ExcelProperty("创建时间") | 134 | @ExcelProperty("创建时间") |
| 135 | private LocalDateTime createTime; | 135 | private LocalDateTime createTime; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/rqc/vo/MesQcRqcSaveReqVO.java
| @@ -32,12 +32,12 @@ public class MesQcRqcSaveReqVO { | @@ -32,12 +32,12 @@ public class MesQcRqcSaveReqVO { | ||
| 32 | 32 | ||
| 33 | // ========== 来源单据 ========== | 33 | // ========== 来源单据 ========== |
| 34 | 34 | ||
| 35 | - @Schema(description = "来源单据 ID", example = "200") | ||
| 36 | - private Long sourceDocId; | ||
| 37 | - | ||
| 38 | @Schema(description = "来源单据类型", example = "116") | 35 | @Schema(description = "来源单据类型", example = "116") |
| 39 | private Integer sourceDocType; | 36 | private Integer sourceDocType; |
| 40 | 37 | ||
| 38 | + @Schema(description = "来源单据 ID", example = "200") | ||
| 39 | + private Long sourceDocId; | ||
| 40 | + | ||
| 41 | @Schema(description = "来源单据行 ID", example = "300") | 41 | @Schema(description = "来源单据行 ID", example = "300") |
| 42 | private Long sourceLineId; | 42 | private Long sourceLineId; |
| 43 | 43 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/rqc/vo/line/MesQcRqcLineRespVO.java
| @@ -27,8 +27,8 @@ public class MesQcRqcLineRespVO { | @@ -27,8 +27,8 @@ public class MesQcRqcLineRespVO { | ||
| 27 | @Schema(description = "检测指标名称", example = "外观") | 27 | @Schema(description = "检测指标名称", example = "外观") |
| 28 | private String indicatorName; | 28 | private String indicatorName; |
| 29 | 29 | ||
| 30 | - @Schema(description = "检测指标类型", example = "QUANTITATIVE") | ||
| 31 | - private String indicatorType; | 30 | + @Schema(description = "检测指标类型", example = "1") |
| 31 | + private Integer indicatorType; | ||
| 32 | 32 | ||
| 33 | @Schema(description = "检测工具", example = "卡尺") | 33 | @Schema(description = "检测工具", example = "卡尺") |
| 34 | private String tool; | 34 | private String tool; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/MesQcTemplateController.java
| @@ -77,13 +77,6 @@ public class MesQcTemplateController { | @@ -77,13 +77,6 @@ public class MesQcTemplateController { | ||
| 77 | return success(BeanUtils.toBean(pageResult, MesQcTemplateRespVO.class)); | 77 | return success(BeanUtils.toBean(pageResult, MesQcTemplateRespVO.class)); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | - @GetMapping("/simple-list") | ||
| 81 | - @Operation(summary = "获得质检方案精简列表", description = "主要用于前端的下拉选项") | ||
| 82 | - public CommonResult<List<MesQcTemplateRespVO>> getTemplateSimpleList() { | ||
| 83 | - List<MesQcTemplateDO> list = templateService.getTemplateList(); | ||
| 84 | - return success(BeanUtils.toBean(list, MesQcTemplateRespVO.class)); | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | @GetMapping("/export-excel") | 80 | @GetMapping("/export-excel") |
| 88 | @Operation(summary = "导出质检方案 Excel") | 81 | @Operation(summary = "导出质检方案 Excel") |
| 89 | @PreAuthorize("@ss.hasPermission('mes:qc-template:export')") | 82 | @PreAuthorize("@ss.hasPermission('mes:qc-template:export')") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/vo/indicator/MesQcTemplateIndicatorRespVO.java
| @@ -63,9 +63,9 @@ public class MesQcTemplateIndicatorRespVO { | @@ -63,9 +63,9 @@ public class MesQcTemplateIndicatorRespVO { | ||
| 63 | @ExcelProperty("检测项名称") | 63 | @ExcelProperty("检测项名称") |
| 64 | private String indicatorName; | 64 | private String indicatorName; |
| 65 | 65 | ||
| 66 | - @Schema(description = "检测项类型(字典 mes_index_type)", example = "SIZE") | 66 | + @Schema(description = "检测项类型", example = "1") |
| 67 | @ExcelProperty("检测项类型") | 67 | @ExcelProperty("检测项类型") |
| 68 | - private String indicatorType; | 68 | + private Integer indicatorType; |
| 69 | 69 | ||
| 70 | @Schema(description = "检测工具", example = "卡尺") | 70 | @Schema(description = "检测工具", example = "卡尺") |
| 71 | @ExcelProperty("检测工具") | 71 | @ExcelProperty("检测工具") |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/tm/tool/MesTmToolController.java
| @@ -43,7 +43,6 @@ public class MesTmToolController { | @@ -43,7 +43,6 @@ public class MesTmToolController { | ||
| 43 | 43 | ||
| 44 | @Resource | 44 | @Resource |
| 45 | private MesTmToolService toolService; | 45 | private MesTmToolService toolService; |
| 46 | - | ||
| 47 | @Resource | 46 | @Resource |
| 48 | private MesTmToolTypeService toolTypeService; | 47 | private MesTmToolTypeService toolTypeService; |
| 49 | 48 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/tm/tool/vo/MesTmToolPageReqVO.java
| @@ -25,7 +25,7 @@ public class MesTmToolPageReqVO extends PageParam { | @@ -25,7 +25,7 @@ public class MesTmToolPageReqVO extends PageParam { | ||
| 25 | private String brand; | 25 | private String brand; |
| 26 | 26 | ||
| 27 | @Schema(description = "型号规格", example = "M5-100") | 27 | @Schema(description = "型号规格", example = "M5-100") |
| 28 | - private String spec; | 28 | + private String specification; |
| 29 | 29 | ||
| 30 | @Schema(description = "状态", example = "1") | 30 | @Schema(description = "状态", example = "1") |
| 31 | private Integer status; | 31 | private Integer status; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/tm/tool/vo/MesTmToolRespVO.java
| @@ -33,7 +33,7 @@ public class MesTmToolRespVO { | @@ -33,7 +33,7 @@ public class MesTmToolRespVO { | ||
| 33 | 33 | ||
| 34 | @Schema(description = "型号规格", example = "M5-100") | 34 | @Schema(description = "型号规格", example = "M5-100") |
| 35 | @ExcelProperty("型号规格") | 35 | @ExcelProperty("型号规格") |
| 36 | - private String spec; | 36 | + private String specification; |
| 37 | 37 | ||
| 38 | @Schema(description = "工具类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") | 38 | @Schema(description = "工具类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 39 | private Long toolTypeId; | 39 | private Long toolTypeId; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/tm/tool/vo/MesTmToolSaveReqVO.java
| @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.mes.controller.admin.tm.tool.vo; | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.mes.controller.admin.tm.tool.vo; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.NotEmpty; | 4 | import jakarta.validation.constraints.NotEmpty; |
| 5 | import jakarta.validation.constraints.NotNull; | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import jakarta.validation.constraints.Size; | ||
| 6 | import lombok.Data; | 7 | import lombok.Data; |
| 7 | 8 | ||
| 8 | import java.time.LocalDateTime; | 9 | import java.time.LocalDateTime; |
| @@ -16,17 +17,21 @@ public class MesTmToolSaveReqVO { | @@ -16,17 +17,21 @@ public class MesTmToolSaveReqVO { | ||
| 16 | 17 | ||
| 17 | @Schema(description = "工具编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "T-001") | 18 | @Schema(description = "工具编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "T-001") |
| 18 | @NotEmpty(message = "工具编码不能为空") | 19 | @NotEmpty(message = "工具编码不能为空") |
| 20 | + @Size(max = 64, message = "工具编码长度不能超过 64 个字符") | ||
| 19 | private String code; | 21 | private String code; |
| 20 | 22 | ||
| 21 | @Schema(description = "工具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "5mm 铣刀") | 23 | @Schema(description = "工具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "5mm 铣刀") |
| 22 | @NotEmpty(message = "工具名称不能为空") | 24 | @NotEmpty(message = "工具名称不能为空") |
| 25 | + @Size(max = 255, message = "工具名称长度不能超过 255 个字符") | ||
| 23 | private String name; | 26 | private String name; |
| 24 | 27 | ||
| 25 | @Schema(description = "品牌", example = "三菱") | 28 | @Schema(description = "品牌", example = "三菱") |
| 29 | + @Size(max = 255, message = "品牌长度不能超过 255 个字符") | ||
| 26 | private String brand; | 30 | private String brand; |
| 27 | 31 | ||
| 28 | @Schema(description = "型号规格", example = "M5-100") | 32 | @Schema(description = "型号规格", example = "M5-100") |
| 29 | - private String spec; | 33 | + @Size(max = 255, message = "型号规格长度不能超过 255 个字符") |
| 34 | + private String specification; | ||
| 30 | 35 | ||
| 31 | @Schema(description = "工具类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") | 36 | @Schema(description = "工具类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 32 | @NotNull(message = "工具类型不能为空") | 37 | @NotNull(message = "工具类型不能为空") |
| @@ -36,7 +41,8 @@ public class MesTmToolSaveReqVO { | @@ -36,7 +41,8 @@ public class MesTmToolSaveReqVO { | ||
| 36 | @NotNull(message = "数量不能为空") | 41 | @NotNull(message = "数量不能为空") |
| 37 | private Integer quantity; | 42 | private Integer quantity; |
| 38 | 43 | ||
| 39 | - @Schema(description = "可用数量", example = "1") | 44 | + @Schema(description = "可用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 45 | + @NotNull(message = "可用数量不能为空") | ||
| 40 | private Integer availableQuantity; | 46 | private Integer availableQuantity; |
| 41 | 47 | ||
| 42 | @Schema(description = "保养维护类型", example = "1") | 48 | @Schema(description = "保养维护类型", example = "1") |
| @@ -53,6 +59,7 @@ public class MesTmToolSaveReqVO { | @@ -53,6 +59,7 @@ public class MesTmToolSaveReqVO { | ||
| 53 | private Integer status; | 59 | private Integer status; |
| 54 | 60 | ||
| 55 | @Schema(description = "备注", example = "备注") | 61 | @Schema(description = "备注", example = "备注") |
| 62 | + @Size(max = 500, message = "备注长度不能超过 500 个字符") | ||
| 56 | private String remark; | 63 | private String remark; |
| 57 | 64 | ||
| 58 | - } | 65 | +} |
| 59 | \ No newline at end of file | 66 | \ No newline at end of file |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/tm/tool/vo/type/MesTmToolTypeSaveReqVO.java
| @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.mes.controller.admin.tm.tool.vo.type; | @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.mes.controller.admin.tm.tool.vo.type; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.NotEmpty; | 4 | import jakarta.validation.constraints.NotEmpty; |
| 5 | import jakarta.validation.constraints.NotNull; | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import jakarta.validation.constraints.Size; | ||
| 6 | import lombok.Data; | 7 | import lombok.Data; |
| 7 | 8 | ||
| 8 | @Schema(description = "管理后台 - MES 工具类型新增/修改 Request VO") | 9 | @Schema(description = "管理后台 - MES 工具类型新增/修改 Request VO") |
| @@ -14,10 +15,12 @@ public class MesTmToolTypeSaveReqVO { | @@ -14,10 +15,12 @@ public class MesTmToolTypeSaveReqVO { | ||
| 14 | 15 | ||
| 15 | @Schema(description = "类型编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "TT-001") | 16 | @Schema(description = "类型编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "TT-001") |
| 16 | @NotEmpty(message = "类型编码不能为空") | 17 | @NotEmpty(message = "类型编码不能为空") |
| 18 | + @Size(max = 64, message = "类型编码长度不能超过 64 个字符") | ||
| 17 | private String code; | 19 | private String code; |
| 18 | 20 | ||
| 19 | @Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "铣刀") | 21 | @Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "铣刀") |
| 20 | @NotEmpty(message = "类型名称不能为空") | 22 | @NotEmpty(message = "类型名称不能为空") |
| 23 | + @Size(max = 255, message = "类型名称长度不能超过 255 个字符") | ||
| 21 | private String name; | 24 | private String name; |
| 22 | 25 | ||
| 23 | @Schema(description = "是否编码管理", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") | 26 | @Schema(description = "是否编码管理", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| @@ -31,6 +34,7 @@ public class MesTmToolTypeSaveReqVO { | @@ -31,6 +34,7 @@ public class MesTmToolTypeSaveReqVO { | ||
| 31 | private Integer maintenPeriod; | 34 | private Integer maintenPeriod; |
| 32 | 35 | ||
| 33 | @Schema(description = "备注", example = "备注") | 36 | @Schema(description = "备注", example = "备注") |
| 37 | + @Size(max = 500, message = "备注长度不能超过 500 个字符") | ||
| 34 | private String remark; | 38 | private String remark; |
| 35 | 39 | ||
| 36 | - } | 40 | +} |
| 37 | \ No newline at end of file | 41 | \ No newline at end of file |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/arrivalnotice/MesWmArrivalNoticeController.java
| @@ -42,7 +42,6 @@ public class MesWmArrivalNoticeController { | @@ -42,7 +42,6 @@ public class MesWmArrivalNoticeController { | ||
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | private MesWmArrivalNoticeService arrivalNoticeService; | 44 | private MesWmArrivalNoticeService arrivalNoticeService; |
| 45 | - | ||
| 46 | @Resource | 45 | @Resource |
| 47 | private MesMdVendorService vendorService; | 46 | private MesMdVendorService vendorService; |
| 48 | 47 | ||
| @@ -112,15 +111,6 @@ public class MesWmArrivalNoticeController { | @@ -112,15 +111,6 @@ public class MesWmArrivalNoticeController { | ||
| 112 | return success(true); | 111 | return success(true); |
| 113 | } | 112 | } |
| 114 | 113 | ||
| 115 | - @GetMapping("/simple-list") | ||
| 116 | - @Operation(summary = "获得到货通知单精简列表") | ||
| 117 | - @Parameter(name = "status", description = "状态", example = "2") | ||
| 118 | - public CommonResult<List<MesWmArrivalNoticeRespVO>> getArrivalNoticeSimpleList( | ||
| 119 | - @RequestParam(value = "status", required = false) Integer status) { | ||
| 120 | - List<MesWmArrivalNoticeDO> list = arrivalNoticeService.getArrivalNoticeListByStatus(status); | ||
| 121 | - return success(buildRespVOList(list)); | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | // ==================== 拼接 VO ==================== | 114 | // ==================== 拼接 VO ==================== |
| 125 | 115 | ||
| 126 | private List<MesWmArrivalNoticeRespVO> buildRespVOList(List<MesWmArrivalNoticeDO> list) { | 116 | private List<MesWmArrivalNoticeRespVO> buildRespVOList(List<MesWmArrivalNoticeDO> list) { |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/arrivalnotice/MesWmArrivalNoticeLineController.java
| @@ -40,13 +40,10 @@ public class MesWmArrivalNoticeLineController { | @@ -40,13 +40,10 @@ public class MesWmArrivalNoticeLineController { | ||
| 40 | 40 | ||
| 41 | @Resource | 41 | @Resource |
| 42 | private MesWmArrivalNoticeLineService arrivalNoticeLineService; | 42 | private MesWmArrivalNoticeLineService arrivalNoticeLineService; |
| 43 | - | ||
| 44 | @Resource | 43 | @Resource |
| 45 | private MesMdItemService itemService; | 44 | private MesMdItemService itemService; |
| 46 | - | ||
| 47 | @Resource | 45 | @Resource |
| 48 | private MesMdUnitMeasureService unitMeasureService; | 46 | private MesMdUnitMeasureService unitMeasureService; |
| 49 | - | ||
| 50 | @Resource | 47 | @Resource |
| 51 | private MesQcIqcService iqcService; | 48 | private MesQcIqcService iqcService; |
| 52 | 49 | ||
| @@ -95,16 +92,6 @@ public class MesWmArrivalNoticeLineController { | @@ -95,16 +92,6 @@ public class MesWmArrivalNoticeLineController { | ||
| 95 | return success(new PageResult<>(buildRespVOList(pageResult.getList()), pageResult.getTotal())); | 92 | return success(new PageResult<>(buildRespVOList(pageResult.getList()), pageResult.getTotal())); |
| 96 | } | 93 | } |
| 97 | 94 | ||
| 98 | - @GetMapping("/list-by-notice-id") | ||
| 99 | - @Operation(summary = "获得到货通知单行列表") | ||
| 100 | - @Parameter(name = "noticeId", description = "到货通知单编号", required = true, example = "1024") | ||
| 101 | - @PreAuthorize("@ss.hasPermission('mes:wm-arrival-notice:query')") | ||
| 102 | - public CommonResult<List<MesWmArrivalNoticeLineRespVO>> getArrivalNoticeLineListByNoticeId( | ||
| 103 | - @RequestParam("noticeId") Long noticeId) { | ||
| 104 | - List<MesWmArrivalNoticeLineDO> list = arrivalNoticeLineService.getArrivalNoticeLineListByNoticeId(noticeId); | ||
| 105 | - return success(buildRespVOList(list)); | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | // ==================== 拼接 VO ==================== | 95 | // ==================== 拼接 VO ==================== |
| 109 | 96 | ||
| 110 | private List<MesWmArrivalNoticeLineRespVO> buildRespVOList(List<MesWmArrivalNoticeLineDO> list) { | 97 | private List<MesWmArrivalNoticeLineRespVO> buildRespVOList(List<MesWmArrivalNoticeLineDO> list) { |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/itemconsume/vo/MesWmItemConsumeLinePageReqVO.java
| @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.mes.controller.admin.wm.itemconsume.vo; | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.mes.controller.admin.wm.itemconsume.vo; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | +import jakarta.validation.constraints.NotNull; | ||
| 5 | import lombok.Data; | 6 | import lombok.Data; |
| 6 | import lombok.EqualsAndHashCode; | 7 | import lombok.EqualsAndHashCode; |
| 7 | import lombok.ToString; | 8 | import lombok.ToString; |
| @@ -13,6 +14,7 @@ import lombok.ToString; | @@ -13,6 +14,7 @@ import lombok.ToString; | ||
| 13 | public class MesWmItemConsumeLinePageReqVO extends PageParam { | 14 | public class MesWmItemConsumeLinePageReqVO extends PageParam { |
| 14 | 15 | ||
| 15 | @Schema(description = "报工记录编号", requiredMode = Schema.RequiredMode.REQUIRED) | 16 | @Schema(description = "报工记录编号", requiredMode = Schema.RequiredMode.REQUIRED) |
| 17 | + @NotNull(message = "报工记录编号不能为空") | ||
| 16 | private Long feedbackId; | 18 | private Long feedbackId; |
| 17 | 19 | ||
| 18 | } | 20 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/itemreceipt/MesWmItemReceiptController.java
| @@ -46,13 +46,10 @@ public class MesWmItemReceiptController { | @@ -46,13 +46,10 @@ public class MesWmItemReceiptController { | ||
| 46 | 46 | ||
| 47 | @Resource | 47 | @Resource |
| 48 | private MesWmItemReceiptService itemReceiptService; | 48 | private MesWmItemReceiptService itemReceiptService; |
| 49 | - | ||
| 50 | @Resource | 49 | @Resource |
| 51 | private MesMdVendorService vendorService; | 50 | private MesMdVendorService vendorService; |
| 52 | - | ||
| 53 | @Resource | 51 | @Resource |
| 54 | private MesQcIqcService iqcService; | 52 | private MesQcIqcService iqcService; |
| 55 | - | ||
| 56 | @Resource | 53 | @Resource |
| 57 | private MesWmArrivalNoticeService arrivalNoticeService; | 54 | private MesWmArrivalNoticeService arrivalNoticeService; |
| 58 | 55 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/itemreceipt/MesWmItemReceiptDetailController.java
| @@ -42,19 +42,14 @@ public class MesWmItemReceiptDetailController { | @@ -42,19 +42,14 @@ public class MesWmItemReceiptDetailController { | ||
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | private MesWmItemReceiptDetailService itemReceiptDetailService; | 44 | private MesWmItemReceiptDetailService itemReceiptDetailService; |
| 45 | - | ||
| 46 | @Resource | 45 | @Resource |
| 47 | private MesMdItemService itemService; | 46 | private MesMdItemService itemService; |
| 48 | - | ||
| 49 | @Resource | 47 | @Resource |
| 50 | private MesMdUnitMeasureService unitMeasureService; | 48 | private MesMdUnitMeasureService unitMeasureService; |
| 51 | - | ||
| 52 | @Resource | 49 | @Resource |
| 53 | private MesWmWarehouseService warehouseService; | 50 | private MesWmWarehouseService warehouseService; |
| 54 | - | ||
| 55 | @Resource | 51 | @Resource |
| 56 | private MesWmWarehouseLocationService locationService; | 52 | private MesWmWarehouseLocationService locationService; |
| 57 | - | ||
| 58 | @Resource | 53 | @Resource |
| 59 | private MesWmWarehouseAreaService areaService; | 54 | private MesWmWarehouseAreaService areaService; |
| 60 | 55 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/itemreceipt/MesWmItemReceiptLineController.java
| @@ -10,10 +10,12 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.line.MesWm | @@ -10,10 +10,12 @@ import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.line.MesWm | ||
| 10 | import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.line.MesWmItemReceiptLineSaveReqVO; | 10 | import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.line.MesWmItemReceiptLineSaveReqVO; |
| 11 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; | 11 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO; |
| 12 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.unitmeasure.MesMdUnitMeasureDO; | 12 | import cn.iocoder.yudao.module.mes.dal.dataobject.md.unitmeasure.MesMdUnitMeasureDO; |
| 13 | +import cn.iocoder.yudao.module.mes.dal.dataobject.wm.itemreceipt.MesWmItemReceiptDO; | ||
| 13 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.itemreceipt.MesWmItemReceiptLineDO; | 14 | import cn.iocoder.yudao.module.mes.dal.dataobject.wm.itemreceipt.MesWmItemReceiptLineDO; |
| 14 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; | 15 | import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService; |
| 15 | import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService; | 16 | import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService; |
| 16 | import cn.iocoder.yudao.module.mes.service.wm.itemreceipt.MesWmItemReceiptLineService; | 17 | import cn.iocoder.yudao.module.mes.service.wm.itemreceipt.MesWmItemReceiptLineService; |
| 18 | +import cn.iocoder.yudao.module.mes.service.wm.itemreceipt.MesWmItemReceiptService; | ||
| 17 | import io.swagger.v3.oas.annotations.Operation; | 19 | import io.swagger.v3.oas.annotations.Operation; |
| 18 | import io.swagger.v3.oas.annotations.Parameter; | 20 | import io.swagger.v3.oas.annotations.Parameter; |
| 19 | import io.swagger.v3.oas.annotations.tags.Tag; | 21 | import io.swagger.v3.oas.annotations.tags.Tag; |
| @@ -38,12 +40,12 @@ public class MesWmItemReceiptLineController { | @@ -38,12 +40,12 @@ public class MesWmItemReceiptLineController { | ||
| 38 | 40 | ||
| 39 | @Resource | 41 | @Resource |
| 40 | private MesWmItemReceiptLineService itemReceiptLineService; | 42 | private MesWmItemReceiptLineService itemReceiptLineService; |
| 41 | - | ||
| 42 | @Resource | 43 | @Resource |
| 43 | private MesMdItemService itemService; | 44 | private MesMdItemService itemService; |
| 44 | - | ||
| 45 | @Resource | 45 | @Resource |
| 46 | private MesMdUnitMeasureService unitMeasureService; | 46 | private MesMdUnitMeasureService unitMeasureService; |
| 47 | + @Resource | ||
| 48 | + private MesWmItemReceiptService itemReceiptService; | ||
| 47 | 49 | ||
| 48 | @PostMapping("/create") | 50 | @PostMapping("/create") |
| 49 | @Operation(summary = "创建采购入库单行") | 51 | @Operation(summary = "创建采购入库单行") |
| @@ -101,6 +103,8 @@ public class MesWmItemReceiptLineController { | @@ -101,6 +103,8 @@ public class MesWmItemReceiptLineController { | ||
| 101 | convertSet(list, MesWmItemReceiptLineDO::getItemId)); | 103 | convertSet(list, MesWmItemReceiptLineDO::getItemId)); |
| 102 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( | 104 | Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap( |
| 103 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); | 105 | convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId)); |
| 106 | + Map<Long, MesWmItemReceiptDO> receiptMap = itemReceiptService.getItemReceiptMap( | ||
| 107 | + convertSet(list, MesWmItemReceiptLineDO::getReceiptId)); | ||
| 104 | // 2. 构建结果 | 108 | // 2. 构建结果 |
| 105 | return BeanUtils.toBean(list, MesWmItemReceiptLineRespVO.class, vo -> { | 109 | return BeanUtils.toBean(list, MesWmItemReceiptLineRespVO.class, vo -> { |
| 106 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { | 110 | MapUtils.findAndThen(itemMap, vo.getItemId(), item -> { |
| @@ -108,6 +112,8 @@ public class MesWmItemReceiptLineController { | @@ -108,6 +112,8 @@ public class MesWmItemReceiptLineController { | ||
| 108 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 112 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
| 109 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); | 113 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); |
| 110 | }); | 114 | }); |
| 115 | + MapUtils.findAndThen(receiptMap, vo.getReceiptId(), receipt -> | ||
| 116 | + vo.setReceiptCode(receipt.getCode()).setPurchaseOrderCode(receipt.getPurchaseOrderCode())); | ||
| 111 | }); | 117 | }); |
| 112 | } | 118 | } |
| 113 | 119 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/itemreceipt/vo/line/MesWmItemReceiptLineRespVO.java
| @@ -16,6 +16,12 @@ public class MesWmItemReceiptLineRespVO { | @@ -16,6 +16,12 @@ public class MesWmItemReceiptLineRespVO { | ||
| 16 | @Schema(description = "入库单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 16 | @Schema(description = "入库单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 17 | private Long receiptId; | 17 | private Long receiptId; |
| 18 | 18 | ||
| 19 | + @Schema(description = "入库单编码", example = "IR2026020001") | ||
| 20 | + private String receiptCode; | ||
| 21 | + | ||
| 22 | + @Schema(description = "采购订单号", example = "PO20260201") | ||
| 23 | + private String purchaseOrderCode; | ||
| 24 | + | ||
| 19 | @Schema(description = "到货通知单行编号", example = "1") | 25 | @Schema(description = "到货通知单行编号", example = "1") |
| 20 | private Long arrivalNoticeLineId; | 26 | private Long arrivalNoticeLineId; |
| 21 | 27 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/materialstock/MesWmMaterialStockController.java
| @@ -52,22 +52,16 @@ public class MesWmMaterialStockController { | @@ -52,22 +52,16 @@ public class MesWmMaterialStockController { | ||
| 52 | 52 | ||
| 53 | @Resource | 53 | @Resource |
| 54 | private MesWmMaterialStockService materialStockService; | 54 | private MesWmMaterialStockService materialStockService; |
| 55 | - | ||
| 56 | @Resource | 55 | @Resource |
| 57 | private MesMdItemService itemService; | 56 | private MesMdItemService itemService; |
| 58 | - | ||
| 59 | @Resource | 57 | @Resource |
| 60 | private MesMdUnitMeasureService unitMeasureService; | 58 | private MesMdUnitMeasureService unitMeasureService; |
| 61 | - | ||
| 62 | @Resource | 59 | @Resource |
| 63 | private MesWmWarehouseService warehouseService; | 60 | private MesWmWarehouseService warehouseService; |
| 64 | - | ||
| 65 | @Resource | 61 | @Resource |
| 66 | private MesWmWarehouseLocationService locationService; | 62 | private MesWmWarehouseLocationService locationService; |
| 67 | - | ||
| 68 | @Resource | 63 | @Resource |
| 69 | private MesWmWarehouseAreaService areaService; | 64 | private MesWmWarehouseAreaService areaService; |
| 70 | - | ||
| 71 | @Resource | 65 | @Resource |
| 72 | private MesMdVendorService vendorService; | 66 | private MesMdVendorService vendorService; |
| 73 | 67 | ||
| @@ -139,8 +133,8 @@ public class MesWmMaterialStockController { | @@ -139,8 +133,8 @@ public class MesWmMaterialStockController { | ||
| 139 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), | 133 | MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(), |
| 140 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); | 134 | unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName())); |
| 141 | }); | 135 | }); |
| 142 | - MapUtils.findAndThen(warehouseMap, vo.getWarehouseId(), | ||
| 143 | - warehouse -> vo.setWarehouseName(warehouse.getName())); | 136 | + MapUtils.findAndThen(warehouseMap, vo.getWarehouseId(), warehouse -> |
| 137 | + vo.setWarehouseCode(warehouse.getCode()).setWarehouseName(warehouse.getName())); | ||
| 144 | MapUtils.findAndThen(locationMap, vo.getLocationId(), | 138 | MapUtils.findAndThen(locationMap, vo.getLocationId(), |
| 145 | location -> vo.setLocationName(location.getName())); | 139 | location -> vo.setLocationName(location.getName())); |
| 146 | MapUtils.findAndThen(areaMap, vo.getAreaId(), | 140 | MapUtils.findAndThen(areaMap, vo.getAreaId(), |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/materialstock/vo/MesWmMaterialStockPageReqVO.java
| @@ -12,6 +12,18 @@ import lombok.ToString; | @@ -12,6 +12,18 @@ import lombok.ToString; | ||
| 12 | @ToString(callSuper = true) | 12 | @ToString(callSuper = true) |
| 13 | public class MesWmMaterialStockPageReqVO extends PageParam { | 13 | public class MesWmMaterialStockPageReqVO extends PageParam { |
| 14 | 14 | ||
| 15 | + /** | ||
| 16 | + * 虚拟仓过滤模式 - 排除虚拟仓 | ||
| 17 | + */ | ||
| 18 | + public static final String VIRTUAL_FILTER_EXCLUDE = "exclude"; | ||
| 19 | + /** | ||
| 20 | + * 虚拟仓过滤模式 - 只看虚拟仓 | ||
| 21 | + */ | ||
| 22 | + public static final String VIRTUAL_FILTER_ONLY = "only"; | ||
| 23 | + | ||
| 24 | + @Schema(description = "虚拟仓过滤模式", example = "exclude") | ||
| 25 | + private String virtualFilter; | ||
| 26 | + | ||
| 15 | @Schema(description = "物料分类编号", example = "1") | 27 | @Schema(description = "物料分类编号", example = "1") |
| 16 | private Long itemTypeId; | 28 | private Long itemTypeId; |
| 17 | 29 | ||
| @@ -21,6 +33,9 @@ public class MesWmMaterialStockPageReqVO extends PageParam { | @@ -21,6 +33,9 @@ public class MesWmMaterialStockPageReqVO extends PageParam { | ||
| 21 | @Schema(description = "批次号", example = "B20260101") | 33 | @Schema(description = "批次号", example = "B20260101") |
| 22 | private String batchCode; | 34 | private String batchCode; |
| 23 | 35 | ||
| 36 | + @Schema(description = "批次编号", example = "1") | ||
| 37 | + private Long batchId; | ||
| 38 | + | ||
| 24 | @Schema(description = "仓库编号", example = "1") | 39 | @Schema(description = "仓库编号", example = "1") |
| 25 | private Long warehouseId; | 40 | private Long warehouseId; |
| 26 | 41 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/materialstock/vo/MesWmMaterialStockRespVO.java
| @@ -49,6 +49,9 @@ public class MesWmMaterialStockRespVO { | @@ -49,6 +49,9 @@ public class MesWmMaterialStockRespVO { | ||
| 49 | @Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 49 | @Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 50 | private Long warehouseId; | 50 | private Long warehouseId; |
| 51 | 51 | ||
| 52 | + @Schema(description = "仓库编码", example = "WH001") | ||
| 53 | + private String warehouseCode; | ||
| 54 | + | ||
| 52 | @Schema(description = "仓库名称", example = "原料仓") | 55 | @Schema(description = "仓库名称", example = "原料仓") |
| 53 | @ExcelProperty("仓库") | 56 | @ExcelProperty("仓库") |
| 54 | private String warehouseName; | 57 | private String warehouseName; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/miscissue/MesWmMiscIssueLineController.java
| @@ -44,19 +44,14 @@ public class MesWmMiscIssueLineController { | @@ -44,19 +44,14 @@ public class MesWmMiscIssueLineController { | ||
| 44 | 44 | ||
| 45 | @Resource | 45 | @Resource |
| 46 | private MesWmMiscIssueLineService miscIssueLineService; | 46 | private MesWmMiscIssueLineService miscIssueLineService; |
| 47 | - | ||
| 48 | @Resource | 47 | @Resource |
| 49 | private MesMdItemService itemService; | 48 | private MesMdItemService itemService; |
| 50 | - | ||
| 51 | @Resource | 49 | @Resource |
| 52 | private MesMdUnitMeasureService unitMeasureService; | 50 | private MesMdUnitMeasureService unitMeasureService; |
| 53 | - | ||
| 54 | @Resource | 51 | @Resource |
| 55 | private MesWmWarehouseService warehouseService; | 52 | private MesWmWarehouseService warehouseService; |
| 56 | - | ||
| 57 | @Resource | 53 | @Resource |
| 58 | private MesWmWarehouseLocationService warehouseLocationService; | 54 | private MesWmWarehouseLocationService warehouseLocationService; |
| 59 | - | ||
| 60 | @Resource | 55 | @Resource |
| 61 | private MesWmWarehouseAreaService warehouseAreaService; | 56 | private MesWmWarehouseAreaService warehouseAreaService; |
| 62 | 57 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/miscissue/vo/MesWmMiscIssueRespVO.java
| @@ -21,15 +21,14 @@ public class MesWmMiscIssueRespVO { | @@ -21,15 +21,14 @@ public class MesWmMiscIssueRespVO { | ||
| 21 | @Schema(description = "杂项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 21 | @Schema(description = "杂项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 22 | private Integer type; | 22 | private Integer type; |
| 23 | 23 | ||
| 24 | + @Schema(description = "来源单据类型", example = "PURCHASE_ORDER") | ||
| 25 | + private String sourceDocType; | ||
| 24 | @Schema(description = "来源单据ID", example = "1") | 26 | @Schema(description = "来源单据ID", example = "1") |
| 25 | private Long sourceDocId; | 27 | private Long sourceDocId; |
| 26 | 28 | ||
| 27 | @Schema(description = "来源单据编号", example = "DOC20260302001") | 29 | @Schema(description = "来源单据编号", example = "DOC20260302001") |
| 28 | private String sourceDocCode; | 30 | private String sourceDocCode; |
| 29 | 31 | ||
| 30 | - @Schema(description = "来源单据类型", example = "PURCHASE_ORDER") | ||
| 31 | - private String sourceDocType; | ||
| 32 | - | ||
| 33 | @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED) | 32 | @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| 34 | private LocalDateTime issueDate; | 33 | private LocalDateTime issueDate; |
| 35 | 34 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/miscissue/vo/MesWmMiscIssueSaveReqVO.java
| @@ -26,15 +26,14 @@ public class MesWmMiscIssueSaveReqVO { | @@ -26,15 +26,14 @@ public class MesWmMiscIssueSaveReqVO { | ||
| 26 | @NotNull(message = "杂项类型不能为空") | 26 | @NotNull(message = "杂项类型不能为空") |
| 27 | private Integer type; | 27 | private Integer type; |
| 28 | 28 | ||
| 29 | + @Schema(description = "来源单据类型", example = "PURCHASE_ORDER") | ||
| 30 | + private String sourceDocType; | ||
| 29 | @Schema(description = "来源单据ID", example = "1") | 31 | @Schema(description = "来源单据ID", example = "1") |
| 30 | private Long sourceDocId; | 32 | private Long sourceDocId; |
| 31 | 33 | ||
| 32 | @Schema(description = "来源单据编号", example = "DOC20260302001") | 34 | @Schema(description = "来源单据编号", example = "DOC20260302001") |
| 33 | private String sourceDocCode; | 35 | private String sourceDocCode; |
| 34 | 36 | ||
| 35 | - @Schema(description = "来源单据类型", example = "PURCHASE_ORDER") | ||
| 36 | - private String sourceDocType; | ||
| 37 | - | ||
| 38 | @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED) | 37 | @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| 39 | @NotNull(message = "出库日期不能为空") | 38 | @NotNull(message = "出库日期不能为空") |
| 40 | private LocalDateTime issueDate; | 39 | private LocalDateTime issueDate; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/miscreceipt/MesWmMiscReceiptLineController.java
| @@ -47,19 +47,14 @@ public class MesWmMiscReceiptLineController { | @@ -47,19 +47,14 @@ public class MesWmMiscReceiptLineController { | ||
| 47 | 47 | ||
| 48 | @Resource | 48 | @Resource |
| 49 | private MesWmMiscReceiptLineService miscReceiptLineService; | 49 | private MesWmMiscReceiptLineService miscReceiptLineService; |
| 50 | - | ||
| 51 | @Resource | 50 | @Resource |
| 52 | private MesMdItemService itemService; | 51 | private MesMdItemService itemService; |
| 53 | - | ||
| 54 | @Resource | 52 | @Resource |
| 55 | private MesMdUnitMeasureService unitMeasureService; | 53 | private MesMdUnitMeasureService unitMeasureService; |
| 56 | - | ||
| 57 | @Resource | 54 | @Resource |
| 58 | private MesWmWarehouseService warehouseService; | 55 | private MesWmWarehouseService warehouseService; |
| 59 | - | ||
| 60 | @Resource | 56 | @Resource |
| 61 | private MesWmWarehouseLocationService warehouseLocationService; | 57 | private MesWmWarehouseLocationService warehouseLocationService; |
| 62 | - | ||
| 63 | @Resource | 58 | @Resource |
| 64 | private MesWmWarehouseAreaService warehouseAreaService; | 59 | private MesWmWarehouseAreaService warehouseAreaService; |
| 65 | 60 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/miscreceipt/vo/MesWmMiscReceiptRespVO.java
| @@ -21,15 +21,14 @@ public class MesWmMiscReceiptRespVO { | @@ -21,15 +21,14 @@ public class MesWmMiscReceiptRespVO { | ||
| 21 | @Schema(description = "杂项类型", example = "1") | 21 | @Schema(description = "杂项类型", example = "1") |
| 22 | private Integer type; | 22 | private Integer type; |
| 23 | 23 | ||
| 24 | + @Schema(description = "来源单据类型", example = "WORK_ORDER") | ||
| 25 | + private String sourceDocType; | ||
| 24 | @Schema(description = "来源单据 ID", example = "1") | 26 | @Schema(description = "来源单据 ID", example = "1") |
| 25 | private Long sourceDocId; | 27 | private Long sourceDocId; |
| 26 | 28 | ||
| 27 | @Schema(description = "来源单据编码", example = "WO2026030001") | 29 | @Schema(description = "来源单据编码", example = "WO2026030001") |
| 28 | private String sourceDocCode; | 30 | private String sourceDocCode; |
| 29 | 31 | ||
| 30 | - @Schema(description = "来源单据类型", example = "WORK_ORDER") | ||
| 31 | - private String sourceDocType; | ||
| 32 | - | ||
| 33 | @Schema(description = "入库日期") | 32 | @Schema(description = "入库日期") |
| 34 | private LocalDateTime receiptDate; | 33 | private LocalDateTime receiptDate; |
| 35 | 34 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/miscreceipt/vo/MesWmMiscReceiptSaveReqVO.java
| @@ -26,15 +26,14 @@ public class MesWmMiscReceiptSaveReqVO { | @@ -26,15 +26,14 @@ public class MesWmMiscReceiptSaveReqVO { | ||
| 26 | @NotNull(message = "杂项类型不能为空") | 26 | @NotNull(message = "杂项类型不能为空") |
| 27 | private Integer type; | 27 | private Integer type; |
| 28 | 28 | ||
| 29 | + @Schema(description = "来源单据类型", example = "WORK_ORDER") | ||
| 30 | + private String sourceDocType; | ||
| 29 | @Schema(description = "来源单据 ID", example = "1") | 31 | @Schema(description = "来源单据 ID", example = "1") |
| 30 | private Long sourceDocId; | 32 | private Long sourceDocId; |
| 31 | 33 | ||
| 32 | @Schema(description = "来源单据编码", example = "WO2026030001") | 34 | @Schema(description = "来源单据编码", example = "WO2026030001") |
| 33 | private String sourceDocCode; | 35 | private String sourceDocCode; |
| 34 | 36 | ||
| 35 | - @Schema(description = "来源单据类型", example = "WORK_ORDER") | ||
| 36 | - private String sourceDocType; | ||
| 37 | - | ||
| 38 | @Schema(description = "入库日期", requiredMode = Schema.RequiredMode.REQUIRED) | 37 | @Schema(description = "入库日期", requiredMode = Schema.RequiredMode.REQUIRED) |
| 39 | @NotNull(message = "入库日期不能为空") | 38 | @NotNull(message = "入库日期不能为空") |
| 40 | private LocalDateTime receiptDate; | 39 | private LocalDateTime receiptDate; |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/outsourceissue/MesWmOutsourceIssueController.java
| @@ -49,7 +49,6 @@ public class MesWmOutsourceIssueController { | @@ -49,7 +49,6 @@ public class MesWmOutsourceIssueController { | ||
| 49 | 49 | ||
| 50 | @Resource | 50 | @Resource |
| 51 | private MesWmOutsourceIssueService outsourceIssueService; | 51 | private MesWmOutsourceIssueService outsourceIssueService; |
| 52 | - | ||
| 53 | @Resource | 52 | @Resource |
| 54 | private MesMdVendorService vendorService; | 53 | private MesMdVendorService vendorService; |
| 55 | @Resource | 54 | @Resource |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/outsourceissue/MesWmOutsourceIssueDetailController.java
| @@ -47,19 +47,14 @@ public class MesWmOutsourceIssueDetailController { | @@ -47,19 +47,14 @@ public class MesWmOutsourceIssueDetailController { | ||
| 47 | 47 | ||
| 48 | @Resource | 48 | @Resource |
| 49 | private MesWmOutsourceIssueDetailService outsourceIssueDetailService; | 49 | private MesWmOutsourceIssueDetailService outsourceIssueDetailService; |
| 50 | - | ||
| 51 | @Resource | 50 | @Resource |
| 52 | private MesMdItemService itemService; | 51 | private MesMdItemService itemService; |
| 53 | - | ||
| 54 | @Resource | 52 | @Resource |
| 55 | private MesMdUnitMeasureService unitMeasureService; | 53 | private MesMdUnitMeasureService unitMeasureService; |
| 56 | - | ||
| 57 | @Resource | 54 | @Resource |
| 58 | private MesWmWarehouseService warehouseService; | 55 | private MesWmWarehouseService warehouseService; |
| 59 | - | ||
| 60 | @Resource | 56 | @Resource |
| 61 | private MesWmWarehouseLocationService locationService; | 57 | private MesWmWarehouseLocationService locationService; |
| 62 | - | ||
| 63 | @Resource | 58 | @Resource |
| 64 | private MesWmWarehouseAreaService areaService; | 59 | private MesWmWarehouseAreaService areaService; |
| 65 | 60 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/outsourceissue/MesWmOutsourceIssueLineController.java
| @@ -47,13 +47,10 @@ public class MesWmOutsourceIssueLineController { | @@ -47,13 +47,10 @@ public class MesWmOutsourceIssueLineController { | ||
| 47 | 47 | ||
| 48 | @Resource | 48 | @Resource |
| 49 | private MesWmOutsourceIssueLineService outsourceIssueLineService; | 49 | private MesWmOutsourceIssueLineService outsourceIssueLineService; |
| 50 | - | ||
| 51 | @Resource | 50 | @Resource |
| 52 | private MesMdItemService itemService; | 51 | private MesMdItemService itemService; |
| 53 | - | ||
| 54 | @Resource | 52 | @Resource |
| 55 | private MesMdUnitMeasureService unitMeasureService; | 53 | private MesMdUnitMeasureService unitMeasureService; |
| 56 | - | ||
| 57 | @Resource | 54 | @Resource |
| 58 | private MesWmBatchService batchService; | 55 | private MesWmBatchService batchService; |
| 59 | 56 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/outsourcereceipt/MesWmOutsourceReceiptController.java
| @@ -44,10 +44,8 @@ public class MesWmOutsourceReceiptController { | @@ -44,10 +44,8 @@ public class MesWmOutsourceReceiptController { | ||
| 44 | 44 | ||
| 45 | @Resource | 45 | @Resource |
| 46 | private MesWmOutsourceReceiptService outsourceReceiptService; | 46 | private MesWmOutsourceReceiptService outsourceReceiptService; |
| 47 | - | ||
| 48 | @Resource | 47 | @Resource |
| 49 | private MesMdVendorService vendorService; | 48 | private MesMdVendorService vendorService; |
| 50 | - | ||
| 51 | @Resource | 49 | @Resource |
| 52 | private MesProWorkOrderService workOrderService; | 50 | private MesProWorkOrderService workOrderService; |
| 53 | 51 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/outsourcereceipt/MesWmOutsourceReceiptDetailController.java
| @@ -42,19 +42,14 @@ public class MesWmOutsourceReceiptDetailController { | @@ -42,19 +42,14 @@ public class MesWmOutsourceReceiptDetailController { | ||
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | private MesWmOutsourceReceiptDetailService detailService; | 44 | private MesWmOutsourceReceiptDetailService detailService; |
| 45 | - | ||
| 46 | @Resource | 45 | @Resource |
| 47 | private MesMdItemService itemService; | 46 | private MesMdItemService itemService; |
| 48 | - | ||
| 49 | @Resource | 47 | @Resource |
| 50 | private MesMdUnitMeasureService unitMeasureService; | 48 | private MesMdUnitMeasureService unitMeasureService; |
| 51 | - | ||
| 52 | @Resource | 49 | @Resource |
| 53 | private MesWmWarehouseService warehouseService; | 50 | private MesWmWarehouseService warehouseService; |
| 54 | - | ||
| 55 | @Resource | 51 | @Resource |
| 56 | private MesWmWarehouseLocationService locationService; | 52 | private MesWmWarehouseLocationService locationService; |
| 57 | - | ||
| 58 | @Resource | 53 | @Resource |
| 59 | private MesWmWarehouseAreaService areaService; | 54 | private MesWmWarehouseAreaService areaService; |
| 60 | 55 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/outsourcereceipt/MesWmOutsourceReceiptLineController.java
| @@ -38,10 +38,8 @@ public class MesWmOutsourceReceiptLineController { | @@ -38,10 +38,8 @@ public class MesWmOutsourceReceiptLineController { | ||
| 38 | 38 | ||
| 39 | @Resource | 39 | @Resource |
| 40 | private MesWmOutsourceReceiptLineService receiptLineService; | 40 | private MesWmOutsourceReceiptLineService receiptLineService; |
| 41 | - | ||
| 42 | @Resource | 41 | @Resource |
| 43 | private MesMdItemService itemService; | 42 | private MesMdItemService itemService; |
| 44 | - | ||
| 45 | @Resource | 43 | @Resource |
| 46 | private MesMdUnitMeasureService unitMeasureService; | 44 | private MesMdUnitMeasureService unitMeasureService; |
| 47 | 45 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/packages/MesWmPackageController.java
| @@ -50,6 +50,7 @@ public class MesWmPackageController { | @@ -50,6 +50,7 @@ public class MesWmPackageController { | ||
| 50 | private MesMdClientService clientService; | 50 | private MesMdClientService clientService; |
| 51 | @Resource | 51 | @Resource |
| 52 | private MesMdUnitMeasureService unitMeasureService; | 52 | private MesMdUnitMeasureService unitMeasureService; |
| 53 | + | ||
| 53 | @Resource | 54 | @Resource |
| 54 | private AdminUserApi adminUserApi; | 55 | private AdminUserApi adminUserApi; |
| 55 | 56 | ||
| @@ -125,20 +126,6 @@ public class MesWmPackageController { | @@ -125,20 +126,6 @@ public class MesWmPackageController { | ||
| 125 | return success(true); | 126 | return success(true); |
| 126 | } | 127 | } |
| 127 | 128 | ||
| 128 | - @GetMapping("/childable-simple-list") | ||
| 129 | - @Operation(summary = "可添加为子箱的装箱单精简列表") | ||
| 130 | - @PreAuthorize("@ss.hasPermission('mes:wm-package:query')") | ||
| 131 | - public CommonResult<List<MesWmPackageRespVO>> getChildablePackageSimpleList() { | ||
| 132 | - List<MesWmPackageDO> list = packageService.getChildablePackageList(); | ||
| 133 | - return success(buildRespVOList(list)); | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - @GetMapping("/simple-list") | ||
| 137 | - @Operation(summary = "获得装箱单精简列表", description = "主要用于前端的下拉选项") | ||
| 138 | - public CommonResult<List<MesWmPackageRespVO>> getPackageSimpleList() { | ||
| 139 | - List<MesWmPackageDO> list = packageService.getPackageSimpleList(); | ||
| 140 | - return success(buildRespVOList(list)); | ||
| 141 | - } | ||
| 142 | 129 | ||
| 143 | // ========== 私有方法 ========== | 130 | // ========== 私有方法 ========== |
| 144 | 131 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/packages/vo/MesWmPackagePageReqVO.java
| @@ -32,4 +32,7 @@ public class MesWmPackagePageReqVO extends PageParam { | @@ -32,4 +32,7 @@ public class MesWmPackagePageReqVO extends PageParam { | ||
| 32 | @Schema(description = "检查员用户 ID", example = "1") | 32 | @Schema(description = "检查员用户 ID", example = "1") |
| 33 | private Long inspectorUserId; | 33 | private Long inspectorUserId; |
| 34 | 34 | ||
| 35 | + @Schema(description = "单据状态", example = "1") | ||
| 36 | + private Integer status; | ||
| 37 | + | ||
| 35 | } | 38 | } |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/packages/vo/line/MesWmPackageLineSaveReqVO.java
| @@ -36,10 +36,10 @@ public class MesWmPackageLineSaveReqVO { | @@ -36,10 +36,10 @@ public class MesWmPackageLineSaveReqVO { | ||
| 36 | @DecimalMin(value = "0.01", message = "装箱数量必须大于 0") | 36 | @DecimalMin(value = "0.01", message = "装箱数量必须大于 0") |
| 37 | private BigDecimal quantity; | 37 | private BigDecimal quantity; |
| 38 | 38 | ||
| 39 | - @Schema(description = "生产工单 ID", example = "1") | 39 | + @Schema(description = "生产工单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 40 | + @NotNull(message = "生产工单不能为空") | ||
| 40 | private Long workOrderId; | 41 | private Long workOrderId; |
| 41 | 42 | ||
| 42 | - // DONE @AI:时间都是 LocalDateTIme; | ||
| 43 | @Schema(description = "有效期") | 43 | @Schema(description = "有效期") |
| 44 | private LocalDateTime expireDate; | 44 | private LocalDateTime expireDate; |
| 45 | 45 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/MesWmProductIssueDetailController.java
| @@ -42,19 +42,14 @@ public class MesWmProductIssueDetailController { | @@ -42,19 +42,14 @@ public class MesWmProductIssueDetailController { | ||
| 42 | 42 | ||
| 43 | @Resource | 43 | @Resource |
| 44 | private MesWmProductIssueDetailService issueDetailService; | 44 | private MesWmProductIssueDetailService issueDetailService; |
| 45 | - | ||
| 46 | @Resource | 45 | @Resource |
| 47 | private MesMdItemService itemService; | 46 | private MesMdItemService itemService; |
| 48 | - | ||
| 49 | @Resource | 47 | @Resource |
| 50 | private MesMdUnitMeasureService unitMeasureService; | 48 | private MesMdUnitMeasureService unitMeasureService; |
| 51 | - | ||
| 52 | @Resource | 49 | @Resource |
| 53 | private MesWmWarehouseService warehouseService; | 50 | private MesWmWarehouseService warehouseService; |
| 54 | - | ||
| 55 | @Resource | 51 | @Resource |
| 56 | private MesWmWarehouseLocationService locationService; | 52 | private MesWmWarehouseLocationService locationService; |
| 57 | - | ||
| 58 | @Resource | 53 | @Resource |
| 59 | private MesWmWarehouseAreaService areaService; | 54 | private MesWmWarehouseAreaService areaService; |
| 60 | 55 |
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/productissue/MesWmProductIssueLineController.java
| @@ -38,10 +38,8 @@ public class MesWmProductIssueLineController { | @@ -38,10 +38,8 @@ public class MesWmProductIssueLineController { | ||
| 38 | 38 | ||
| 39 | @Resource | 39 | @Resource |
| 40 | private MesWmProductIssueLineService issueLineService; | 40 | private MesWmProductIssueLineService issueLineService; |
| 41 | - | ||
| 42 | @Resource | 41 | @Resource |
| 43 | private MesMdItemService itemService; | 42 | private MesMdItemService itemService; |
| 44 | - | ||
| 45 | @Resource | 43 | @Resource |
| 46 | private MesMdUnitMeasureService unitMeasureService; | 44 | private MesMdUnitMeasureService unitMeasureService; |
| 47 | 45 |