Commit 8fac43ef9b9df7728b0b5b1155fe3d40f1c08633

Authored by YunaiV
2 parents 4eaed881 bd3d7880

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 37  
38 38 @Resource
39 39 private MesCalTeamMemberService teamMemberService;
  40 +
40 41 @Resource
41 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 75 return BeanUtils.toBean(list, MesDvCheckPlanMachineryRespVO.class, vo ->
76 76 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery ->
77 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 28 private String machineryBrand;
29 29  
30 30 @Schema(description = "规格型号", example = "HTF120")
31   - private String machinerySpec;
  31 + private String machinerySpecification;
32 32  
33 33 @Schema(description = "备注")
34 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 46  
47 47 @Resource
48 48 private MesDvCheckRecordService checkRecordService;
49   -
50 49 @Resource
51 50 private MesDvCheckPlanService checkPlanService;
52   -
53 51 @Resource
54 52 private MesDvMachineryService machineryService;
55 53  
... ... @@ -143,7 +141,7 @@ public class MesDvCheckRecordController {
143 141 .setPlanCycleType(plan.getCycleType()).setPlanCycleCount(plan.getCycleCount()));
144 142 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo
145 143 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName())
146   - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec()));
  144 + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification()));
147 145 MapUtils.findAndThen(userMap, vo.getUserId(),
148 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 36  
37 37 @Resource
38 38 private MesDvCheckRecordLineService checkRecordLineService;
39   -
40 39 @Resource
41 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 64  
65 65 @Schema(description = "规格型号", example = "X-100")
66 66 @ExcelProperty("规格型号")
67   - private String machinerySpec;
  67 + private String machinerySpecification;
68 68  
69 69 @Schema(description = "点检时间", requiredMode = Schema.RequiredMode.REQUIRED)
70 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 48  
49 49 @Resource
50 50 private MesDvMachineryService machineryService;
51   -
52 51 @Resource
53 52 private MesDvMachineryTypeService machineryTypeService;
54   -
55 53 @Resource
56 54 private MesMdWorkshopService workshopService;
57 55  
... ... @@ -126,7 +124,7 @@ public class MesDvMachineryController {
126 124 // 手动创建导出 demo
127 125 List<MesDvMachineryImportExcelVO> list = Collections.singletonList(
128 126 MesDvMachineryImportExcelVO.builder().code("EQ-001").name("示例设备")
129   - .brand("示例品牌").spec("型号A").machineryTypeCode("MT-001")
  127 + .brand("示例品牌").specification("型号A").machineryTypeCode("MT-001")
130 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 28 private String brand;
29 29  
30 30 @ExcelProperty("规格型号")
31   - private String spec;
  31 + private String specification;
32 32  
33 33 @ExcelProperty("设备类型编码")
34 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 33  
34 34 @Schema(description = "规格型号", example = "S7-300")
35 35 @ExcelProperty("规格型号")
36   - private String spec;
  36 + private String specification;
37 37  
38 38 @Schema(description = "设备类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
39 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 26 private String brand;
27 27  
28 28 @Schema(description = "规格型号", example = "S7-300")
29   - private String spec;
  29 + private String specification;
30 30  
31 31 @Schema(description = "设备类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
32 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 46  
47 47 @Resource
48 48 private MesDvMaintenRecordService maintenRecordService;
49   -
50 49 @Resource
51 50 private MesDvCheckPlanService checkPlanService;
52   -
53 51 @Resource
54 52 private MesDvMachineryService machineryService;
55 53  
... ... @@ -146,7 +144,7 @@ public class MesDvMaintenRecordController {
146 144 .setPlanCycleCount(plan.getCycleCount()));
147 145 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo
148 146 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName())
149   - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec()));
  147 + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification()));
150 148 MapUtils.findAndThen(userMap, vo.getUserId(),
151 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 42  
43 43 @Resource
44 44 private MesDvMaintenRecordLineService maintenRecordLineService;
45   -
46 45 @Resource
47 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 64  
65 65 @Schema(description = "规格型号", example = "X-100")
66 66 @ExcelProperty("规格型号")
67   - private String machinerySpec;
  67 + private String machinerySpecification;
68 68  
69 69 @Schema(description = "保养时间", requiredMode = Schema.RequiredMode.REQUIRED)
70 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 48  
49 49 @Resource
50 50 private MesDvRepairService repairService;
51   -
52 51 @Resource
53 52 private MesDvMachineryService machineryService;
54 53  
... ... @@ -160,7 +159,7 @@ public class MesDvRepairController {
160 159 return BeanUtils.toBean(list, MesDvRepairRespVO.class, vo -> {
161 160 MapUtils.findAndThen(machineryMap, vo.getMachineryId(), machinery -> vo
162 161 .setMachineryCode(machinery.getCode()).setMachineryName(machinery.getName())
163   - .setMachineryBrand(machinery.getBrand()).setMachinerySpec(machinery.getSpec()));
  162 + .setMachineryBrand(machinery.getBrand()).setMachinerySpecification(machinery.getSpecification()));
164 163 MapUtils.findAndThen(userMap, vo.getAcceptedUserId(),
165 164 user -> vo.setAcceptedUserNickname(user.getNickname()));
166 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 42  
43 43 @Resource
44 44 private MesDvRepairLineService repairLineService;
45   -
46 45 @Resource
47 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 44  
45 45 @Schema(description = "规格型号", example = "X-100")
46 46 @ExcelProperty("规格型号")
47   - private String machinerySpec;
  47 + private String machinerySpecification;
48 48  
49 49 @Schema(description = "报修日期")
50 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 37 @ExcelProperty("客户邮箱地址")
38 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 73 @ExcelProperty(value = "状态", converter = DictConvert.class)
41 74 @DictFormat(cn.iocoder.yudao.module.system.enums.DictTypeConstants.COMMON_STATUS)
42 75 private Integer status;
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/client/vo/MesMdClientSaveReqVO.java
1 1 package cn.iocoder.yudao.module.mes.controller.admin.md.client.vo;
2 2  
3 3 import io.swagger.v3.oas.annotations.media.Schema;
  4 +import jakarta.validation.constraints.Email;
4 5 import jakarta.validation.constraints.NotEmpty;
5 6 import jakarta.validation.constraints.NotNull;
  7 +import jakarta.validation.constraints.Size;
6 8 import lombok.Data;
7 9  
8 10 @Schema(description = "管理后台 - MES 客户新增/修改 Request VO")
... ... @@ -14,22 +16,28 @@ public class MesMdClientSaveReqVO {
14 16  
15 17 @Schema(description = "客户编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "C00184")
16 18 @NotEmpty(message = "客户编码不能为空")
  19 + @Size(max = 64, message = "客户编码长度不能超过 64 个字符")
17 20 private String code;
18 21  
19 22 @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "比亚迪")
20 23 @NotEmpty(message = "客户名称不能为空")
  24 + @Size(max = 255, message = "客户名称长度不能超过 255 个字符")
21 25 private String name;
22 26  
23 27 @Schema(description = "客户简称", example = "比亚迪")
  28 + @Size(max = 255, message = "客户简称长度不能超过 255 个字符")
24 29 private String nickname;
25 30  
26 31 @Schema(description = "客户英文名称", example = "BYD")
  32 + @Size(max = 255, message = "客户英文名称长度不能超过 255 个字符")
27 33 private String englishName;
28 34  
29 35 @Schema(description = "客户简介", example = "比亚迪品牌诞生于深圳")
  36 + @Size(max = 500, message = "客户简介长度不能超过 500 个字符")
30 37 private String description;
31 38  
32 39 @Schema(description = "客户LOGO地址", example = "https://xxx.com/logo.png")
  40 + @Size(max = 255, message = "客户LOGO地址长度不能超过 255 个字符")
33 41 private String logo;
34 42  
35 43 @Schema(description = "客户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
... ... @@ -37,36 +45,50 @@ public class MesMdClientSaveReqVO {
37 45 private Integer type;
38 46  
39 47 @Schema(description = "客户地址", example = "深圳南山区")
  48 + @Size(max = 500, message = "客户地址长度不能超过 500 个字符")
40 49 private String address;
41 50  
42 51 @Schema(description = "客户官网地址", example = "https://www.bydglobal.com")
  52 + @Size(max = 255, message = "客户官网地址长度不能超过 255 个字符")
43 53 private String website;
44 54  
45 55 @Schema(description = "客户邮箱地址", example = "salse@bydglobal.com")
  56 + @Size(max = 255, message = "客户邮箱地址长度不能超过 255 个字符")
  57 + @Email(message = "客户邮箱地址格式不正确")
46 58 private String email;
47 59  
48 60 @Schema(description = "客户电话", example = "123432222")
  61 + @Size(max = 64, message = "客户电话长度不能超过 64 个字符")
49 62 private String telephone;
50 63  
51 64 @Schema(description = "联系人1", example = "张三")
  65 + @Size(max = 64, message = "联系人1长度不能超过 64 个字符")
52 66 private String contact1Name;
53 67  
54 68 @Schema(description = "联系人1-电话", example = "122212312")
  69 + @Size(max = 64, message = "联系人1-电话长度不能超过 64 个字符")
55 70 private String contact1Telephone;
56 71  
57 72 @Schema(description = "联系人1-邮箱", example = "s1@bydglobal.com")
  73 + @Size(max = 255, message = "联系人1-邮箱长度不能超过 255 个字符")
  74 + @Email(message = "联系人1-邮箱格式不正确")
58 75 private String contact1Email;
59 76  
60 77 @Schema(description = "联系人2", example = "李四")
  78 + @Size(max = 64, message = "联系人2长度不能超过 64 个字符")
61 79 private String contact2Name;
62 80  
63 81 @Schema(description = "联系人2-电话", example = "1132323232")
  82 + @Size(max = 64, message = "联系人2-电话长度不能超过 64 个字符")
64 83 private String contact2Telephone;
65 84  
66 85 @Schema(description = "联系人2-邮箱", example = "s2@bydglobal.com")
  86 + @Size(max = 255, message = "联系人2-邮箱长度不能超过 255 个字符")
  87 + @Email(message = "联系人2-邮箱格式不正确")
67 88 private String contact2Email;
68 89  
69 90 @Schema(description = "统一社会信用代码", example = "11212121")
  91 + @Size(max = 64, message = "统一社会信用代码长度不能超过 64 个字符")
70 92 private String creditCode;
71 93  
72 94 @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
... ... @@ -74,6 +96,7 @@ public class MesMdClientSaveReqVO {
74 96 private Integer status;
75 97  
76 98 @Schema(description = "备注", example = "备注")
  99 + @Size(max = 500, message = "备注长度不能超过 500 个字符")
77 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 48  
49 49 @Resource
50 50 private MesMdItemService itemService;
51   -
52 51 @Resource
53 52 private MesMdItemTypeService itemTypeService;
54   -
55 53 @Resource
56 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 40  
41 41 @Resource
42 42 private MesMdProductBomService productBomService;
43   -
44 43 @Resource
45 44 private MesMdItemService itemService;
46   -
47 45 @Resource
48 46 private MesMdItemTypeService itemTypeService;
49   -
50 47 @Resource
51 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 37 @ExcelProperty("供应商邮箱地址")
38 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 73 @ExcelProperty(value = "状态", converter = DictConvert.class)
41 74 @DictFormat(cn.iocoder.yudao.module.system.enums.DictTypeConstants.COMMON_STATUS)
42 75 private Integer status;
... ...
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/md/vendor/vo/MesMdVendorSaveReqVO.java
1 1 package cn.iocoder.yudao.module.mes.controller.admin.md.vendor.vo;
2 2  
3 3 import io.swagger.v3.oas.annotations.media.Schema;
  4 +import jakarta.validation.constraints.Email;
4 5 import jakarta.validation.constraints.NotEmpty;
5 6 import jakarta.validation.constraints.NotNull;
  7 +import jakarta.validation.constraints.Size;
6 8 import lombok.Data;
7 9  
8 10 @Schema(description = "管理后台 - MES 供应商新增/修改 Request VO")
... ... @@ -14,61 +16,82 @@ public class MesMdVendorSaveReqVO {
14 16  
15 17 @Schema(description = "供应商编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "V00101")
16 18 @NotEmpty(message = "供应商编码不能为空")
  19 + @Size(max = 64, message = "供应商编码长度不能超过 64 个字符")
17 20 private String code;
18 21  
19 22 @Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "海力德电子")
20 23 @NotEmpty(message = "供应商名称不能为空")
  24 + @Size(max = 255, message = "供应商名称长度不能超过 255 个字符")
21 25 private String name;
22 26  
23 27 @Schema(description = "供应商简称", example = "海力德")
  28 + @Size(max = 255, message = "供应商简称长度不能超过 255 个字符")
24 29 private String nickname;
25 30  
26 31 @Schema(description = "供应商英文名称", example = "HLD Electronics")
  32 + @Size(max = 255, message = "供应商英文名称长度不能超过 255 个字符")
27 33 private String englishName;
28 34  
29 35 @Schema(description = "供应商简介", example = "专业从事电子元器件生产与销售")
  36 + @Size(max = 500, message = "供应商简介长度不能超过 500 个字符")
30 37 private String description;
31 38  
32 39 @Schema(description = "供应商LOGO地址", example = "https://xxx.com/logo.png")
  40 + @Size(max = 255, message = "供应商LOGO地址长度不能超过 255 个字符")
33 41 private String logo;
34 42  
35 43 @Schema(description = "供应商等级", example = "A")
  44 + @Size(max = 64, message = "供应商等级长度不能超过 64 个字符")
36 45 private String level;
37 46  
38 47 @Schema(description = "供应商评分", example = "95")
39 48 private Integer score;
40 49  
41 50 @Schema(description = "供应商地址", example = "深圳市宝安区")
  51 + @Size(max = 500, message = "供应商地址长度不能超过 500 个字符")
42 52 private String address;
43 53  
44 54 @Schema(description = "供应商官网地址", example = "https://www.hld-elec.com")
  55 + @Size(max = 255, message = "供应商官网地址长度不能超过 255 个字符")
45 56 private String website;
46 57  
47 58 @Schema(description = "供应商邮箱地址", example = "info@hld-elec.com")
  59 + @Size(max = 255, message = "供应商邮箱地址长度不能超过 255 个字符")
  60 + @Email(message = "供应商邮箱地址格式不正确")
48 61 private String email;
49 62  
50 63 @Schema(description = "供应商电话", example = "0755-12345678")
  64 + @Size(max = 64, message = "供应商电话长度不能超过 64 个字符")
51 65 private String telephone;
52 66  
53 67 @Schema(description = "联系人1", example = "王经理")
  68 + @Size(max = 64, message = "联系人1长度不能超过 64 个字符")
54 69 private String contact1Name;
55 70  
56 71 @Schema(description = "联系人1-电话", example = "13800138001")
  72 + @Size(max = 64, message = "联系人1-电话长度不能超过 64 个字符")
57 73 private String contact1Telephone;
58 74  
59 75 @Schema(description = "联系人1-邮箱", example = "wang@hld-elec.com")
  76 + @Size(max = 255, message = "联系人1-邮箱长度不能超过 255 个字符")
  77 + @Email(message = "联系人1-邮箱格式不正确")
60 78 private String contact1Email;
61 79  
62 80 @Schema(description = "联系人2", example = "赵助理")
  81 + @Size(max = 64, message = "联系人2长度不能超过 64 个字符")
63 82 private String contact2Name;
64 83  
65 84 @Schema(description = "联系人2-电话", example = "13800138002")
  85 + @Size(max = 64, message = "联系人2-电话长度不能超过 64 个字符")
66 86 private String contact2Telephone;
67 87  
68 88 @Schema(description = "联系人2-邮箱", example = "zhao@hld-elec.com")
  89 + @Size(max = 255, message = "联系人2-邮箱长度不能超过 255 个字符")
  90 + @Email(message = "联系人2-邮箱格式不正确")
69 91 private String contact2Email;
70 92  
71 93 @Schema(description = "统一社会信用代码", example = "91440300MA5EXAMPLE")
  94 + @Size(max = 64, message = "统一社会信用代码长度不能超过 64 个字符")
72 95 private String creditCode;
73 96  
74 97 @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
... ... @@ -76,6 +99,7 @@ public class MesMdVendorSaveReqVO {
76 99 private Integer status;
77 100  
78 101 @Schema(description = "备注", example = "备注")
  102 + @Size(max = 500, message = "备注长度不能超过 500 个字符")
79 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 77 @PreAuthorize("@ss.hasPermission('mes:md-workshop:query')")
78 78 public CommonResult<MesMdWorkshopRespVO> getWorkshop(@RequestParam("id") Long id) {
79 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 87 @GetMapping("/page")
... ... @@ -92,8 +96,19 @@ public class MesMdWorkshopController {
92 96 @Operation(summary = "获得车间精简列表", description = "只包含被开启的车间,主要用于前端的下拉选项")
93 97 public CommonResult<List<MesMdWorkshopRespVO>> getWorkshopSimpleList() {
94 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 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 34  
35 35 @Resource
36 36 private MesMdWorkstationMachineService workstationMachineService;
37   -
38 37 @Resource
39 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 34  
35 35 @Resource
36 36 private MesMdWorkstationToolService workstationToolService;
37   -
38 37 @Resource
39 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 50  
51 51 @Resource
52 52 private MesProAndonRecordService andonRecordService;
53   -
54 53 @Resource
55 54 private MesMdWorkstationService workstationService;
56   -
57 55 @Resource
58 56 private MesProWorkOrderService workOrderService;
59   -
60 57 @Resource
61 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 47  
48 48 @Resource
49 49 private MesProCardService cardService;
50   -
51 50 @Resource
52 51 private MesProWorkOrderService workOrderService;
53   -
54 52 @Resource
55 53 private MesMdItemService itemService;
56   -
57 54 @Resource
58 55 private MesMdUnitMeasureService unitMeasureService;
59 56  
... ... @@ -128,12 +125,6 @@ public class MesProCardController {
128 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 129 @GetMapping("/export-excel")
139 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 40  
41 41 @Resource
42 42 private MesProCardProcessService cardProcessService;
43   -
44 43 @Resource
45 44 private MesProProcessService processService;
46   -
47 45 @Resource
48 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 24 @Schema(description = "批次号", example = "BATCH-001")
25 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 32 @ExcelProperty("工单名称")
33 33 private String workOrderName;
34 34  
  35 + @Schema(description = "产品物料编号", example = "200")
  36 + private Long itemId;
  37 +
35 38 @Schema(description = "批次号", example = "BATCH-001")
36 39 @ExcelProperty("批次号")
37 40 private String batchCode;
38 41  
39   - @Schema(description = "产品物料编号", example = "200")
40   - private Long itemId;
41   -
42 42 @Schema(description = "产品编码", example = "P-001")
43 43 @ExcelProperty("产品编码")
44 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 22 @NotNull(message = "生产工单不能为空")
23 23 private Long workOrderId;
24 24  
25   - @Schema(description = "批次号", example = "BATCH-001")
26   - private String batchCode;
27   -
28 25 @Schema(description = "产品物料编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "200")
29 26 @NotNull(message = "产品物料不能为空")
30 27 private Long itemId;
31 28  
  29 + @Schema(description = "批次号", example = "BATCH-001")
  30 + private String batchCode;
  31 +
32 32 @Schema(description = "流转数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
33 33 @NotNull(message = "流转数量不能为空")
34 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 49 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
50 50 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*;
51 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 54 @Tag(name = "管理后台 - MES 生产报工")
55 55 @RestController
... ... @@ -158,7 +158,7 @@ public class MesProFeedbackController {
158 158 @Parameter(name = "id", description = "编号", required = true)
159 159 @PreAuthorize("@ss.hasPermission('mes:pro-feedback:approve')")
160 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 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 38  
39 39 @Resource
40 40 private MesProRouteProcessService routeProcessService;
41   -
42 41 @Resource
43 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 39  
40 40 @Resource
41 41 private MesProRouteProductBomService routeProductBomService;
42   -
43 42 @Resource
44 43 private MesMdItemService itemService;
45   -
46 44 @Resource
47 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 38  
39 39 @Resource
40 40 private MesProRouteProductService routeProductService;
41   -
42 41 @Resource
43 42 private MesMdItemService itemService;
44   -
45 43 @Resource
46 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 39 import org.springframework.validation.annotation.Validated;
40 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 45 import java.io.IOException;
43 46 import java.math.BigDecimal;
44 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 50 import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
50 51 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
... ... @@ -59,24 +60,20 @@ public class MesProTaskController {
59 60  
60 61 @Resource
61 62 private MesProTaskService taskService;
62   -
63 63 @Resource
64 64 private MesProWorkOrderService workOrderService;
65   -
66 65 @Resource
67 66 private MesMdWorkstationService workstationService;
68   -
69 67 @Resource
70 68 private MesProProcessService processService;
71   -
72 69 @Resource
73 70 private MesMdItemService itemService;
74   -
75 71 @Resource
76 72 private MesMdClientService clientService;
77   -
78 73 @Resource
79 74 private MesMdUnitMeasureService unitMeasureService;
  75 + @Resource
  76 + private MesProRouteProcessService routeProcessService;
80 77  
81 78 @PostMapping("/create")
82 79 @Operation(summary = "创建生产任务")
... ... @@ -122,18 +119,6 @@ public class MesProTaskController {
122 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 122 @GetMapping("/gantt-list")
138 123 @Operation(summary = "获得甘特图任务列表", description = "后端组装工单=project + 任务=task 列表")
139 124 @PreAuthorize("@ss.hasPermission('mes:pro-task:query')")
... ... @@ -229,11 +214,24 @@ public class MesProTaskController {
229 214 Map<Long, MesMdWorkstationDO> workstationMap = workstationService.getWorkstationMap(
230 215 convertSet(list, MesProTaskDO::getWorkstationId));
231 216 Map<Long, MesProProcessDO> processMap = processService.getProcessMap(
232   - new java.util.ArrayList<>(convertSet(list, MesProTaskDO::getProcessId)));
  217 + new ArrayList<>(convertSet(list, MesProTaskDO::getProcessId)));
233 218 Map<Long, MesMdItemDO> itemMap = itemService.getItemMap(
234 219 convertSet(list, MesProTaskDO::getItemId));
  220 + Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap(
  221 + convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId));
235 222 Map<Long, MesMdClientDO> clientMap = clientService.getClientMap(
236 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 235 // 拼接 VO
238 236 return convertList(list, task -> {
239 237 MesProTaskRespVO vo = BeanUtils.toBean(task, MesProTaskRespVO.class);
... ... @@ -243,10 +241,15 @@ public class MesProTaskController {
243 241 vo.setWorkstationCode(ws.getCode()).setWorkstationName(ws.getName()));
244 242 findAndThen(processMap, task.getProcessId(), p ->
245 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 249 findAndThen(clientMap, task.getClientId(), c ->
249 250 vo.setClientName(c.getName()));
  251 + findAndThen(routeProcessCheckFlagMap, task.getRouteId(), processCheckMap ->
  252 + findAndThen(processCheckMap, task.getProcessId(), vo::setCheckFlag));
250 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 40  
41 41 @Resource
42 42 private MesProTaskIssueService taskIssueService;
43   -
44 43 @Resource
45 44 private MesMdItemService itemService;
46   -
47 45 @Resource
48 46 private MesMdUnitMeasureService unitMeasureService;
49 47  
... ... @@ -115,7 +113,7 @@ public class MesProTaskIssueController {
115 113 return cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList(list, issue -> {
116 114 MesProTaskIssueRespVO vo = BeanUtils.toBean(issue, MesProTaskIssueRespVO.class);
117 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 117 findAndThen(unitMap, issue.getUnitMeasureId(), unit ->
120 118 vo.setUnitMeasureName(unit.getName()));
121 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 22 @Schema(description = "工作站编号", example = "1")
23 23 private Long workstationId;
24 24  
  25 + @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE")
  26 + private String sourceDocType;
  27 +
25 28 @Schema(description = "来源单据编号", example = "1")
26 29 private Long sourceDocId;
27 30  
  31 + @Schema(description = "来源单据行编号", example = "1")
  32 + private Long sourceLineId;
  33 +
28 34 @Schema(description = "来源单据编码", example = "DOC-001")
29 35 private String sourceDocCode;
30 36  
31   - @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE")
32   - private String sourceDocType;
33   -
34 37 @Schema(description = "投料批次", example = "BATCH-001")
35 38 private String batchCode;
36 39  
37   - @Schema(description = "来源单据行编号", example = "1")
38   - private Long sourceLineId;
39   -
40 40 @Schema(description = "产品物料编号", example = "100")
41 41 private Long itemId;
42 42  
... ... @@ -47,7 +47,7 @@ public class MesProTaskIssueRespVO {
47 47 private String itemName;
48 48  
49 49 @Schema(description = "规格型号", example = "100x200mm")
50   - private String itemSpec;
  50 + private String itemSpecification;
51 51  
52 52 @Schema(description = "单位编号", example = "1")
53 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 23 @Schema(description = "工作站编号", example = "1")
24 24 private Long workstationId;
25 25  
  26 + @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE")
  27 + private String sourceDocType;
  28 +
26 29 @Schema(description = "来源单据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
27 30 @NotNull(message = "来源单据编号不能为空")
28 31 private Long sourceDocId;
29 32  
  33 + @Schema(description = "来源单据行编号", example = "1")
  34 + private Long sourceLineId;
  35 +
30 36 @Schema(description = "来源单据编码", example = "DOC-001")
31 37 private String sourceDocCode;
32 38  
33   - @Schema(description = "来源单据类型", example = "MATERIAL_ISSUE")
34   - private String sourceDocType;
35   -
36 39 @Schema(description = "投料批次", example = "BATCH-001")
37 40 private String batchCode;
38 41  
39   - @Schema(description = "来源单据行编号", example = "1")
40   - private Long sourceLineId;
41   -
42 42 @Schema(description = "产品物料编号", example = "100")
43 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 8 import org.springframework.format.annotation.DateTimeFormat;
9 9  
10 10 import java.time.LocalDateTime;
  11 +import java.util.List;
11 12  
12 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 39 @Schema(description = "任务状态", example = "0")
39 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 48 @Schema(description = "创建时间")
42 49 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
43 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 56 private String itemName;
57 57  
58 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 64 @Schema(description = "排产数量", example = "100.00")
62 65 private BigDecimal quantity;
... ... @@ -103,6 +106,9 @@ public class MesProTaskRespVO {
103 106 @Schema(description = "任务状态", example = "0")
104 107 private Integer status;
105 108  
  109 + @Schema(description = "是否质检(派生自工艺路线工序 checkFlag)", example = "true")
  110 + private Boolean checkFlag;
  111 +
106 112 @Schema(description = "备注", example = "备注")
107 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 43  
44 44 @Resource
45 45 private MesProWorkOrderBomService workOrderBomService;
46   -
47 46 @Resource
48 47 private MesMdItemService itemService;
49   -
50 48 @Resource
51 49 private MesMdUnitMeasureService unitMeasureService;
52   -
53 50 @Resource
54 51 private MesMdItemTypeService itemTypeService;
55   -
56 52 @Resource
57 53 private MesMdProductBomService productBomService;
58 54  
... ... @@ -122,6 +118,8 @@ public class MesProWorkOrderBomController {
122 118 Map<Long, MesMdItemDO> itemMap = itemService.getItemMap(leafItems.keySet());
123 119 Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap(
124 120 convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId));
  121 + Map<Long, MesMdItemTypeDO> itemTypeMap = itemTypeService.getItemTypeMap(
  122 + convertSet(itemMap.values(), MesMdItemDO::getItemTypeId));
125 123 List<MesProWorkOrderItemRespVO> result = new ArrayList<>(leafItems.size());
126 124 for (Map.Entry<Long, BigDecimal> entry : leafItems.entrySet()) {
127 125 MesMdItemDO item = itemMap.get(entry.getKey());
... ... @@ -130,9 +128,11 @@ public class MesProWorkOrderBomController {
130 128 }
131 129 MesProWorkOrderItemRespVO vo = new MesProWorkOrderItemRespVO()
132 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 132 MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(),
135 133 unitMeasure -> vo.setUnitMeasureName(unitMeasure.getName()));
  134 + MapUtils.findAndThen(itemTypeMap, item.getItemTypeId(),
  135 + itemType -> vo.setItemOrProduct(itemType.getItemOrProduct()));
136 136 result.add(vo);
137 137 }
138 138 return success(result);
... ... @@ -155,7 +155,7 @@ public class MesProWorkOrderBomController {
155 155 return BeanUtils.toBean(list, MesProWorkOrderBomRespVO.class, vo -> {
156 156 MapUtils.findAndThen(itemMap, vo.getItemId(), item -> {
157 157 vo.setItemName(item.getName()).setItemCode(item.getCode())
158   - .setItemSpec(item.getSpecification());
  158 + .setItemSpecification(item.getSpecification());
159 159 MapUtils.findAndThen(itemTypeMap, item.getItemTypeId(),
160 160 itemType -> vo.setItemOrProduct(itemType.getItemOrProduct()));
161 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 47  
48 48 @Resource
49 49 private MesProWorkOrderService workOrderService;
50   -
51 50 @Resource
52 51 private MesMdItemService itemService;
53   -
54 52 @Resource
55 53 private MesMdClientService clientService;
56   -
57 54 @Resource
58 55 private MesMdVendorService vendorService;
59   -
60 56 @Resource
61 57 private MesMdUnitMeasureService unitMeasureService;
62 58  
... ... @@ -165,7 +161,7 @@ public class MesProWorkOrderController {
165 161 return BeanUtils.toBean(list, MesProWorkOrderRespVO.class, vo -> {
166 162 MapUtils.findAndThen(itemMap, vo.getProductId(), item -> {
167 163 vo.setProductName(item.getName()).setProductCode(item.getCode())
168   - .setProductSpec(item.getSpecification());
  164 + .setProductSpecification(item.getSpecification());
169 165 MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(),
170 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 19 private String itemName;
20 20  
21 21 @Schema(description = "规格型号", example = "0603")
22   - private String itemSpec;
  22 + private String itemSpecification;
23 23  
24 24 @Schema(description = "单位名称", example = "个")
25 25 private String unitMeasureName;
... ... @@ -27,4 +27,7 @@ public class MesProWorkOrderItemRespVO {
27 27 @Schema(description = "需求数量", example = "1000.00")
28 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 35 @Schema(description = "客户编号", example = "300")
36 36 private Long clientId;
37 37  
  38 + @Schema(description = "工单状态", example = "1")
  39 + private Integer status;
  40 +
38 41 @Schema(description = "需求日期")
39 42 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
40 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 55  
56 56 @Schema(description = "规格型号", example = "100x200mm")
57 57 @ExcelProperty("规格型号")
58   - private String productSpec;
  58 + private String productSpecification;
59 59  
60 60 @Schema(description = "单位名称", example = "个")
61 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 33  
34 34 @Schema(description = "规格型号", example = "10K 0603")
35 35 @ExcelProperty("规格型号")
36   - private String itemSpec;
  36 + private String itemSpecification;
37 37  
38 38 @Schema(description = "单位编号", example = "300")
39 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 18 @Schema(description = "缺陷描述", example = "外观缺陷")
19 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 24 @Schema(description = "缺陷等级", example = "1")
25 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 27 @ExcelProperty("缺陷描述")
28 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 31 @ExcelProperty(value = "检测项类型", converter = DictConvert.class)
32 32 @DictFormat(DictTypeConstants.MES_DEFECT_TYPE)
33   - private String type;
  33 + private Integer type;
34 34  
35 35 @Schema(description = "缺陷等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
36 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 22 @NotEmpty(message = "缺陷描述不能为空")
23 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 29 @Schema(description = "缺陷等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
30 30 @NotNull(message = "缺陷等级不能为空")
... ... @@ -34,4 +34,4 @@ public class MesQcDefectSaveReqVO {
34 34 @Schema(description = "备注", example = "备注")
35 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 46 @DeleteMapping("/delete")
47 47 @Operation(summary = "删除质检缺陷记录")
48 48 @Parameter(name = "id", description = "编号", required = true)
49   - @PreAuthorize("@ss.hasPermission('mes:qc-defect:update')")
  49 + @PreAuthorize("@ss.hasPermission('mes:qc-defect:delete')")
50 50 public CommonResult<Boolean> deleteDefectRecord(@RequestParam("id") Long id) {
51 51 defectRecordService.deleteDefectRecord(id);
52 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 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 80 @GetMapping("/export-excel")
88 81 @Operation(summary = "导出质检指标 Excel")
89 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 18 @Schema(description = "检测项名称", example = "长度")
19 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 24 @Schema(description = "结果值类型", example = "1")
25 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 27 @ExcelProperty("检测项名称")
28 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 31 @ExcelProperty(value = "检测项类型", converter = DictConvert.class)
32 32 @DictFormat(DictTypeConstants.MES_INDICATOR_TYPE)
33   - private String type;
  33 + private Integer type;
34 34  
35 35 @Schema(description = "检测工具", example = "卡尺")
36 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 20 @NotEmpty(message = "检测项名称不能为空")
21 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 27 @Schema(description = "检测工具", example = "卡尺")
28 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 34  
35 35 // ========== 来源单据 ==========
36 36  
37   - @Schema(description = "来源单据 ID", example = "200")
38   - private Long sourceDocId;
39   -
40 37 @Schema(description = "来源单据类型", example = "304")
41 38 private Integer sourceDocType;
42 39  
  40 + @Schema(description = "来源单据 ID", example = "200")
  41 + private Long sourceDocId;
  42 +
43 43 @Schema(description = "来源单据行 ID", example = "300")
44 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 27 @Schema(description = "检测指标名称", example = "外观")
28 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 33 @Schema(description = "检测工具", example = "卡尺")
34 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 30  
31 31 // ========== 来源单据 ==========
32 32  
33   - @Schema(description = "来源单据 ID", example = "200")
34   - private Long sourceDocId;
35   -
36 33 @Schema(description = "来源单据类型", example = "100")
37 34 private Integer sourceDocType;
38 35  
  36 + @Schema(description = "来源单据 ID", example = "200")
  37 + private Long sourceDocId;
  38 +
39 39 @Schema(description = "来源单据行 ID", example = "300")
40 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 27 @Schema(description = "检测指标名称", example = "外观")
28 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 33 @Schema(description = "检测工具", example = "卡尺")
34 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 30  
31 31 // ========== 来源单据 ==========
32 32  
33   - @Schema(description = "来源单据 ID", example = "200")
34   - private Long sourceDocId;
35   -
36 33 @Schema(description = "来源单据类型", example = "118")
37 34 private Integer sourceDocType;
38 35  
  36 + @Schema(description = "来源单据 ID", example = "200")
  37 + private Long sourceDocId;
  38 +
39 39 @Schema(description = "来源单据行 ID", example = "300")
40 40 private Long sourceLineId;
41 41  
... ... @@ -51,12 +51,12 @@ public class MesQcOqcRespVO {
51 51 @ExcelProperty("客户简称")
52 52 private String clientNickname;
53 53  
  54 + // ========== 物料 ==========
  55 +
54 56 @Schema(description = "批次号", example = "BC20250101")
55 57 @ExcelProperty("批次号")
56 58 private String batchCode;
57 59  
58   - // ========== 物料 ==========
59   -
60 60 @Schema(description = "产品物料 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
61 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 26  
27 27 // ========== 来源单据 ==========
28 28  
29   - @Schema(description = "来源单据 ID", example = "200")
30   - private Long sourceDocId;
31   -
32 29 @Schema(description = "来源单据类型", example = "118")
33 30 private Integer sourceDocType;
34 31  
  32 + @Schema(description = "来源单据 ID", example = "200")
  33 + private Long sourceDocId;
  34 +
35 35 @Schema(description = "来源单据行 ID", example = "300")
36 36 private Long sourceLineId;
37 37  
... ... @@ -41,11 +41,11 @@ public class MesQcOqcSaveReqVO {
41 41 @NotNull(message = "客户不能为空")
42 42 private Long clientId;
43 43  
  44 + // ========== 物料 ==========
  45 +
44 46 @Schema(description = "批次号", example = "BC20250101")
45 47 private String batchCode;
46 48  
47   - // ========== 物料 ==========
48   -
49 49 @Schema(description = "产品物料 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
50 50 @NotNull(message = "产品物料不能为空")
51 51 private Long itemId;
... ... @@ -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 80 @Schema(description = "出货日期", requiredMode = Schema.RequiredMode.REQUIRED)
82 81 @NotNull(message = "出货日期不能为空")
... ... @@ -86,8 +85,9 @@ public class MesQcOqcSaveReqVO {
86 85 @NotNull(message = "检测日期不能为空")
87 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 92 @Schema(description = "备注", example = "备注")
93 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 27 @Schema(description = "检测指标名称", example = "外观")
28 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 33 @Schema(description = "检测工具", example = "卡尺")
34 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 10 @Data
11 11 public class MesQcPendingInspectRespVO {
12 12  
13   - @Schema(description = "来源单据 ID", example = "100")
14   - private Long sourceDocId;
15   -
16 13 @Schema(description = "来源单据类型(MesBizTypeConstants)", example = "100")
17 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 19 @Schema(description = "来源单据行 ID", example = "200")
23 20 private Long sourceLineId;
  21 + @Schema(description = "来源单据编号", example = "AN2025001")
  22 + private String sourceDocCode;
24 23  
25 24 @Schema(description = "检验类型(MesQcTypeEnum)", example = "1")
26 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 30  
31 31 // ========== 来源单据 ==========
32 32  
33   - @Schema(description = "来源单据 ID", example = "200")
34   - private Long sourceDocId;
35   -
36 33 @Schema(description = "来源单据类型", example = "116")
37 34 private Integer sourceDocType;
38 35  
  36 + @Schema(description = "来源单据 ID", example = "200")
  37 + private Long sourceDocId;
  38 +
39 39 @Schema(description = "来源单据行 ID", example = "300")
40 40 private Long sourceLineId;
41 41  
... ... @@ -85,6 +85,26 @@ public class MesQcRqcRespVO {
85 85 @ExcelProperty("不合格数量")
86 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 110 @Schema(description = "检测结果", example = "1")
... ... @@ -110,26 +130,6 @@ public class MesQcRqcRespVO {
110 130 @ExcelProperty("备注")
111 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 133 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
134 134 @ExcelProperty("创建时间")
135 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 32  
33 33 // ========== 来源单据 ==========
34 34  
35   - @Schema(description = "来源单据 ID", example = "200")
36   - private Long sourceDocId;
37   -
38 35 @Schema(description = "来源单据类型", example = "116")
39 36 private Integer sourceDocType;
40 37  
  38 + @Schema(description = "来源单据 ID", example = "200")
  39 + private Long sourceDocId;
  40 +
41 41 @Schema(description = "来源单据行 ID", example = "300")
42 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 27 @Schema(description = "检测指标名称", example = "外观")
28 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 33 @Schema(description = "检测工具", example = "卡尺")
34 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 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 80 @GetMapping("/export-excel")
88 81 @Operation(summary = "导出质检方案 Excel")
89 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 63 @ExcelProperty("检测项名称")
64 64 private String indicatorName;
65 65  
66   - @Schema(description = "检测项类型(字典 mes_index_type)", example = "SIZE")
  66 + @Schema(description = "检测项类型", example = "1")
67 67 @ExcelProperty("检测项类型")
68   - private String indicatorType;
  68 + private Integer indicatorType;
69 69  
70 70 @Schema(description = "检测工具", example = "卡尺")
71 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 43  
44 44 @Resource
45 45 private MesTmToolService toolService;
46   -
47 46 @Resource
48 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 25 private String brand;
26 26  
27 27 @Schema(description = "型号规格", example = "M5-100")
28   - private String spec;
  28 + private String specification;
29 29  
30 30 @Schema(description = "状态", example = "1")
31 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 33  
34 34 @Schema(description = "型号规格", example = "M5-100")
35 35 @ExcelProperty("型号规格")
36   - private String spec;
  36 + private String specification;
37 37  
38 38 @Schema(description = "工具类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
39 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 3 import io.swagger.v3.oas.annotations.media.Schema;
4 4 import jakarta.validation.constraints.NotEmpty;
5 5 import jakarta.validation.constraints.NotNull;
  6 +import jakarta.validation.constraints.Size;
6 7 import lombok.Data;
7 8  
8 9 import java.time.LocalDateTime;
... ... @@ -16,17 +17,21 @@ public class MesTmToolSaveReqVO {
16 17  
17 18 @Schema(description = "工具编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "T-001")
18 19 @NotEmpty(message = "工具编码不能为空")
  20 + @Size(max = 64, message = "工具编码长度不能超过 64 个字符")
19 21 private String code;
20 22  
21 23 @Schema(description = "工具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "5mm 铣刀")
22 24 @NotEmpty(message = "工具名称不能为空")
  25 + @Size(max = 255, message = "工具名称长度不能超过 255 个字符")
23 26 private String name;
24 27  
25 28 @Schema(description = "品牌", example = "三菱")
  29 + @Size(max = 255, message = "品牌长度不能超过 255 个字符")
26 30 private String brand;
27 31  
28 32 @Schema(description = "型号规格", example = "M5-100")
29   - private String spec;
  33 + @Size(max = 255, message = "型号规格长度不能超过 255 个字符")
  34 + private String specification;
30 35  
31 36 @Schema(description = "工具类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
32 37 @NotNull(message = "工具类型不能为空")
... ... @@ -36,7 +41,8 @@ public class MesTmToolSaveReqVO {
36 41 @NotNull(message = "数量不能为空")
37 42 private Integer quantity;
38 43  
39   - @Schema(description = "可用数量", example = "1")
  44 + @Schema(description = "可用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
  45 + @NotNull(message = "可用数量不能为空")
40 46 private Integer availableQuantity;
41 47  
42 48 @Schema(description = "保养维护类型", example = "1")
... ... @@ -53,6 +59,7 @@ public class MesTmToolSaveReqVO {
53 59 private Integer status;
54 60  
55 61 @Schema(description = "备注", example = "备注")
  62 + @Size(max = 500, message = "备注长度不能超过 500 个字符")
56 63 private String remark;
57 64  
58   - }
  65 +}
59 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 3 import io.swagger.v3.oas.annotations.media.Schema;
4 4 import jakarta.validation.constraints.NotEmpty;
5 5 import jakarta.validation.constraints.NotNull;
  6 +import jakarta.validation.constraints.Size;
6 7 import lombok.Data;
7 8  
8 9 @Schema(description = "管理后台 - MES 工具类型新增/修改 Request VO")
... ... @@ -14,10 +15,12 @@ public class MesTmToolTypeSaveReqVO {
14 15  
15 16 @Schema(description = "类型编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "TT-001")
16 17 @NotEmpty(message = "类型编码不能为空")
  18 + @Size(max = 64, message = "类型编码长度不能超过 64 个字符")
17 19 private String code;
18 20  
19 21 @Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "铣刀")
20 22 @NotEmpty(message = "类型名称不能为空")
  23 + @Size(max = 255, message = "类型名称长度不能超过 255 个字符")
21 24 private String name;
22 25  
23 26 @Schema(description = "是否编码管理", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
... ... @@ -31,6 +34,7 @@ public class MesTmToolTypeSaveReqVO {
31 34 private Integer maintenPeriod;
32 35  
33 36 @Schema(description = "备注", example = "备注")
  37 + @Size(max = 500, message = "备注长度不能超过 500 个字符")
34 38 private String remark;
35 39  
36   - }
  40 +}
37 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 42  
43 43 @Resource
44 44 private MesWmArrivalNoticeService arrivalNoticeService;
45   -
46 45 @Resource
47 46 private MesMdVendorService vendorService;
48 47  
... ... @@ -112,15 +111,6 @@ public class MesWmArrivalNoticeController {
112 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 114 // ==================== 拼接 VO ====================
125 115  
126 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 40  
41 41 @Resource
42 42 private MesWmArrivalNoticeLineService arrivalNoticeLineService;
43   -
44 43 @Resource
45 44 private MesMdItemService itemService;
46   -
47 45 @Resource
48 46 private MesMdUnitMeasureService unitMeasureService;
49   -
50 47 @Resource
51 48 private MesQcIqcService iqcService;
52 49  
... ... @@ -95,16 +92,6 @@ public class MesWmArrivalNoticeLineController {
95 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 95 // ==================== 拼接 VO ====================
109 96  
110 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 2  
3 3 import cn.iocoder.yudao.framework.common.pojo.PageParam;
4 4 import io.swagger.v3.oas.annotations.media.Schema;
  5 +import jakarta.validation.constraints.NotNull;
5 6 import lombok.Data;
6 7 import lombok.EqualsAndHashCode;
7 8 import lombok.ToString;
... ... @@ -13,6 +14,7 @@ import lombok.ToString;
13 14 public class MesWmItemConsumeLinePageReqVO extends PageParam {
14 15  
15 16 @Schema(description = "报工记录编号", requiredMode = Schema.RequiredMode.REQUIRED)
  17 + @NotNull(message = "报工记录编号不能为空")
16 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 46  
47 47 @Resource
48 48 private MesWmItemReceiptService itemReceiptService;
49   -
50 49 @Resource
51 50 private MesMdVendorService vendorService;
52   -
53 51 @Resource
54 52 private MesQcIqcService iqcService;
55   -
56 53 @Resource
57 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 42  
43 43 @Resource
44 44 private MesWmItemReceiptDetailService itemReceiptDetailService;
45   -
46 45 @Resource
47 46 private MesMdItemService itemService;
48   -
49 47 @Resource
50 48 private MesMdUnitMeasureService unitMeasureService;
51   -
52 49 @Resource
53 50 private MesWmWarehouseService warehouseService;
54   -
55 51 @Resource
56 52 private MesWmWarehouseLocationService locationService;
57   -
58 53 @Resource
59 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 import cn.iocoder.yudao.module.mes.controller.admin.wm.itemreceipt.vo.line.MesWmItemReceiptLineSaveReqVO;
11 11 import cn.iocoder.yudao.module.mes.dal.dataobject.md.item.MesMdItemDO;
12 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 14 import cn.iocoder.yudao.module.mes.dal.dataobject.wm.itemreceipt.MesWmItemReceiptLineDO;
14 15 import cn.iocoder.yudao.module.mes.service.md.item.MesMdItemService;
15 16 import cn.iocoder.yudao.module.mes.service.md.unitmeasure.MesMdUnitMeasureService;
16 17 import cn.iocoder.yudao.module.mes.service.wm.itemreceipt.MesWmItemReceiptLineService;
  18 +import cn.iocoder.yudao.module.mes.service.wm.itemreceipt.MesWmItemReceiptService;
17 19 import io.swagger.v3.oas.annotations.Operation;
18 20 import io.swagger.v3.oas.annotations.Parameter;
19 21 import io.swagger.v3.oas.annotations.tags.Tag;
... ... @@ -38,12 +40,12 @@ public class MesWmItemReceiptLineController {
38 40  
39 41 @Resource
40 42 private MesWmItemReceiptLineService itemReceiptLineService;
41   -
42 43 @Resource
43 44 private MesMdItemService itemService;
44   -
45 45 @Resource
46 46 private MesMdUnitMeasureService unitMeasureService;
  47 + @Resource
  48 + private MesWmItemReceiptService itemReceiptService;
47 49  
48 50 @PostMapping("/create")
49 51 @Operation(summary = "创建采购入库单行")
... ... @@ -101,6 +103,8 @@ public class MesWmItemReceiptLineController {
101 103 convertSet(list, MesWmItemReceiptLineDO::getItemId));
102 104 Map<Long, MesMdUnitMeasureDO> unitMeasureMap = unitMeasureService.getUnitMeasureMap(
103 105 convertSet(itemMap.values(), MesMdItemDO::getUnitMeasureId));
  106 + Map<Long, MesWmItemReceiptDO> receiptMap = itemReceiptService.getItemReceiptMap(
  107 + convertSet(list, MesWmItemReceiptLineDO::getReceiptId));
104 108 // 2. 构建结果
105 109 return BeanUtils.toBean(list, MesWmItemReceiptLineRespVO.class, vo -> {
106 110 MapUtils.findAndThen(itemMap, vo.getItemId(), item -> {
... ... @@ -108,6 +112,8 @@ public class MesWmItemReceiptLineController {
108 112 MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(),
109 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 16 @Schema(description = "入库单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
17 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 25 @Schema(description = "到货通知单行编号", example = "1")
20 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 52  
53 53 @Resource
54 54 private MesWmMaterialStockService materialStockService;
55   -
56 55 @Resource
57 56 private MesMdItemService itemService;
58   -
59 57 @Resource
60 58 private MesMdUnitMeasureService unitMeasureService;
61   -
62 59 @Resource
63 60 private MesWmWarehouseService warehouseService;
64   -
65 61 @Resource
66 62 private MesWmWarehouseLocationService locationService;
67   -
68 63 @Resource
69 64 private MesWmWarehouseAreaService areaService;
70   -
71 65 @Resource
72 66 private MesMdVendorService vendorService;
73 67  
... ... @@ -139,8 +133,8 @@ public class MesWmMaterialStockController {
139 133 MapUtils.findAndThen(unitMeasureMap, item.getUnitMeasureId(),
140 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 138 MapUtils.findAndThen(locationMap, vo.getLocationId(),
145 139 location -> vo.setLocationName(location.getName()));
146 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 12 @ToString(callSuper = true)
13 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 27 @Schema(description = "物料分类编号", example = "1")
16 28 private Long itemTypeId;
17 29  
... ... @@ -21,6 +33,9 @@ public class MesWmMaterialStockPageReqVO extends PageParam {
21 33 @Schema(description = "批次号", example = "B20260101")
22 34 private String batchCode;
23 35  
  36 + @Schema(description = "批次编号", example = "1")
  37 + private Long batchId;
  38 +
24 39 @Schema(description = "仓库编号", example = "1")
25 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 49 @Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
50 50 private Long warehouseId;
51 51  
  52 + @Schema(description = "仓库编码", example = "WH001")
  53 + private String warehouseCode;
  54 +
52 55 @Schema(description = "仓库名称", example = "原料仓")
53 56 @ExcelProperty("仓库")
54 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 44  
45 45 @Resource
46 46 private MesWmMiscIssueLineService miscIssueLineService;
47   -
48 47 @Resource
49 48 private MesMdItemService itemService;
50   -
51 49 @Resource
52 50 private MesMdUnitMeasureService unitMeasureService;
53   -
54 51 @Resource
55 52 private MesWmWarehouseService warehouseService;
56   -
57 53 @Resource
58 54 private MesWmWarehouseLocationService warehouseLocationService;
59   -
60 55 @Resource
61 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 21 @Schema(description = "杂项类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
22 22 private Integer type;
23 23  
  24 + @Schema(description = "来源单据类型", example = "PURCHASE_ORDER")
  25 + private String sourceDocType;
24 26 @Schema(description = "来源单据ID", example = "1")
25 27 private Long sourceDocId;
26 28  
27 29 @Schema(description = "来源单据编号", example = "DOC20260302001")
28 30 private String sourceDocCode;
29 31  
30   - @Schema(description = "来源单据类型", example = "PURCHASE_ORDER")
31   - private String sourceDocType;
32   -
33 32 @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED)
34 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 26 @NotNull(message = "杂项类型不能为空")
27 27 private Integer type;
28 28  
  29 + @Schema(description = "来源单据类型", example = "PURCHASE_ORDER")
  30 + private String sourceDocType;
29 31 @Schema(description = "来源单据ID", example = "1")
30 32 private Long sourceDocId;
31 33  
32 34 @Schema(description = "来源单据编号", example = "DOC20260302001")
33 35 private String sourceDocCode;
34 36  
35   - @Schema(description = "来源单据类型", example = "PURCHASE_ORDER")
36   - private String sourceDocType;
37   -
38 37 @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED)
39 38 @NotNull(message = "出库日期不能为空")
40 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 47  
48 48 @Resource
49 49 private MesWmMiscReceiptLineService miscReceiptLineService;
50   -
51 50 @Resource
52 51 private MesMdItemService itemService;
53   -
54 52 @Resource
55 53 private MesMdUnitMeasureService unitMeasureService;
56   -
57 54 @Resource
58 55 private MesWmWarehouseService warehouseService;
59   -
60 56 @Resource
61 57 private MesWmWarehouseLocationService warehouseLocationService;
62   -
63 58 @Resource
64 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 21 @Schema(description = "杂项类型", example = "1")
22 22 private Integer type;
23 23  
  24 + @Schema(description = "来源单据类型", example = "WORK_ORDER")
  25 + private String sourceDocType;
24 26 @Schema(description = "来源单据 ID", example = "1")
25 27 private Long sourceDocId;
26 28  
27 29 @Schema(description = "来源单据编码", example = "WO2026030001")
28 30 private String sourceDocCode;
29 31  
30   - @Schema(description = "来源单据类型", example = "WORK_ORDER")
31   - private String sourceDocType;
32   -
33 32 @Schema(description = "入库日期")
34 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 26 @NotNull(message = "杂项类型不能为空")
27 27 private Integer type;
28 28  
  29 + @Schema(description = "来源单据类型", example = "WORK_ORDER")
  30 + private String sourceDocType;
29 31 @Schema(description = "来源单据 ID", example = "1")
30 32 private Long sourceDocId;
31 33  
32 34 @Schema(description = "来源单据编码", example = "WO2026030001")
33 35 private String sourceDocCode;
34 36  
35   - @Schema(description = "来源单据类型", example = "WORK_ORDER")
36   - private String sourceDocType;
37   -
38 37 @Schema(description = "入库日期", requiredMode = Schema.RequiredMode.REQUIRED)
39 38 @NotNull(message = "入库日期不能为空")
40 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 49  
50 50 @Resource
51 51 private MesWmOutsourceIssueService outsourceIssueService;
52   -
53 52 @Resource
54 53 private MesMdVendorService vendorService;
55 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 47  
48 48 @Resource
49 49 private MesWmOutsourceIssueDetailService outsourceIssueDetailService;
50   -
51 50 @Resource
52 51 private MesMdItemService itemService;
53   -
54 52 @Resource
55 53 private MesMdUnitMeasureService unitMeasureService;
56   -
57 54 @Resource
58 55 private MesWmWarehouseService warehouseService;
59   -
60 56 @Resource
61 57 private MesWmWarehouseLocationService locationService;
62   -
63 58 @Resource
64 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 47  
48 48 @Resource
49 49 private MesWmOutsourceIssueLineService outsourceIssueLineService;
50   -
51 50 @Resource
52 51 private MesMdItemService itemService;
53   -
54 52 @Resource
55 53 private MesMdUnitMeasureService unitMeasureService;
56   -
57 54 @Resource
58 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 44  
45 45 @Resource
46 46 private MesWmOutsourceReceiptService outsourceReceiptService;
47   -
48 47 @Resource
49 48 private MesMdVendorService vendorService;
50   -
51 49 @Resource
52 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 42  
43 43 @Resource
44 44 private MesWmOutsourceReceiptDetailService detailService;
45   -
46 45 @Resource
47 46 private MesMdItemService itemService;
48   -
49 47 @Resource
50 48 private MesMdUnitMeasureService unitMeasureService;
51   -
52 49 @Resource
53 50 private MesWmWarehouseService warehouseService;
54   -
55 51 @Resource
56 52 private MesWmWarehouseLocationService locationService;
57   -
58 53 @Resource
59 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 38  
39 39 @Resource
40 40 private MesWmOutsourceReceiptLineService receiptLineService;
41   -
42 41 @Resource
43 42 private MesMdItemService itemService;
44   -
45 43 @Resource
46 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 50 private MesMdClientService clientService;
51 51 @Resource
52 52 private MesMdUnitMeasureService unitMeasureService;
  53 +
53 54 @Resource
54 55 private AdminUserApi adminUserApi;
55 56  
... ... @@ -125,20 +126,6 @@ public class MesWmPackageController {
125 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 32 @Schema(description = "检查员用户 ID", example = "1")
33 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 36 @DecimalMin(value = "0.01", message = "装箱数量必须大于 0")
37 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 41 private Long workOrderId;
41 42  
42   - // DONE @AI:时间都是 LocalDateTIme;
43 43 @Schema(description = "有效期")
44 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 42  
43 43 @Resource
44 44 private MesWmProductIssueDetailService issueDetailService;
45   -
46 45 @Resource
47 46 private MesMdItemService itemService;
48   -
49 47 @Resource
50 48 private MesMdUnitMeasureService unitMeasureService;
51   -
52 49 @Resource
53 50 private MesWmWarehouseService warehouseService;
54   -
55 51 @Resource
56 52 private MesWmWarehouseLocationService locationService;
57   -
58 53 @Resource
59 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 38  
39 39 @Resource
40 40 private MesWmProductIssueLineService issueLineService;
41   -
42 41 @Resource
43 42 private MesMdItemService itemService;
44   -
45 43 @Resource
46 44 private MesMdUnitMeasureService unitMeasureService;
47 45  
... ...