Compare commits
300 Commits
release_1.5.0
...
master
Author | SHA1 | Date |
---|---|---|
zengchenxi | bbc2867c7e | 7 months ago |
qiuhongwu | f961e0bea1 | 7 months ago |
qiuhongwu | a001f64285 | 7 months ago |
qiuhongwu | fc418e6c15 | 7 months ago |
qiuhongwu | 8ed3590403 | 7 months ago |
qiuhongwu | fca1253478 | 7 months ago |
qiuhongwu | 98558f3385 | 7 months ago |
zengchenxi | dfa17a1941 | 7 months ago |
zengchenxi | 47b8988d3c | 7 months ago |
qiuhongwu | 836da147c7 | 7 months ago |
qiuhongwu | 7c6d3fe9d2 | 7 months ago |
qiuhongwu | 0f9f342808 | 7 months ago |
zengchenxi | 7736336d4c | 7 months ago |
zengchenxi | bca04d8b6e | 7 months ago |
zengchenxi | 0a437d7c91 | 7 months ago |
zengchenxi | 395e4eca89 | 7 months ago |
qiuhongwu | 03d80dd4c5 | 7 months ago |
qiuhongwu | f12161c96d | 7 months ago |
siontion | 465b26b0b8 | 7 months ago |
siontion | 1b7cf6564d | 7 months ago |
zengchenxi | d0f7ec39af | 7 months ago |
zengchenxi | 0e72febc37 | 7 months ago |
zengchenxi | 789852e157 | 7 months ago |
qiuhongwu | 0faf8858cc | 7 months ago |
qiuhongwu | 8e5744a6d2 | 7 months ago |
qiuhongwu | 7dae610b70 | 7 months ago |
qiuhongwu | ff7be7d37a | 7 months ago |
qiuhongwu | 8f9e9bfd2c | 7 months ago |
siontion | f8d8c5fed0 | 7 months ago |
siontion | 86c05d894c | 7 months ago |
siontion | 28b1e618f3 | 7 months ago |
siontion | dbe809034e | 7 months ago |
zengchenxi | d59e7ce58d | 7 months ago |
zengchenxi | 4a1fa91bbe | 7 months ago |
qiuhongwu | d41cc1e2de | 7 months ago |
qiuhongwu | ab3c315bcd | 7 months ago |
zengchenxi | 9614a27843 | 7 months ago |
zengchenxi | f3b05f21ed | 7 months ago |
qiuhongwu | 9614805179 | 7 months ago |
qiuhongwu | 80a37fab3a | 7 months ago |
siontion | d8fcb5d660 | 7 months ago |
siontion | 7c5a52d6f0 | 7 months ago |
siontion | ca956dcc62 | 7 months ago |
qiuhongwu | 42b331302c | 7 months ago |
qiuhongwu | ffb41f4674 | 7 months ago |
siontion | 29aa08ccfb | 7 months ago |
siontion | 5733af88b0 | 7 months ago |
qiuhongwu | 66dc5efc3f | 7 months ago |
zengchenxi | 30c4a22f14 | 7 months ago |
zengchenxi | 0c87a22829 | 7 months ago |
qiuhongwu | f20aaa3558 | 7 months ago |
qiuhongwu | 518bd8f5c0 | 7 months ago |
siontion | 793007c9db | 7 months ago |
siontion | 794a753ea1 | 7 months ago |
qiuhongwu | 203cb834b4 | 7 months ago |
zengchenxi | 7845a0d8b5 | 7 months ago |
zengchenxi | 6466abb14d | 7 months ago |
qiuhongwu | 1c0f109f41 | 7 months ago |
qiuhongwu | 04d64d0899 | 7 months ago |
qiuhongwu | b9ed94eeb8 | 7 months ago |
siontion | a80535c6b7 | 7 months ago |
siontion | b4f3c7d9a3 | 7 months ago |
siontion | b40a32fed3 | 7 months ago |
siontion | 80ea81053c | 7 months ago |
siontion | 7e29b3e585 | 7 months ago |
siontion | 2464d14fa6 | 7 months ago |
siontion | 1021c7e908 | 7 months ago |
siontion | faeef0f0c1 | 7 months ago |
siontion | bcb2e767b9 | 7 months ago |
siontion | 8aeb8902c0 | 7 months ago |
siontion | d80c9472eb | 7 months ago |
zengchenxi | 5a3cef16ab | 7 months ago |
zengchenxi | 70fe0579c1 | 7 months ago |
siontion | 5ba533a230 | 7 months ago |
siontion | 7a88a3edf3 | 7 months ago |
siontion | 7e1037d3b1 | 7 months ago |
siontion | 9524452c8e | 7 months ago |
siontion | 12e160ca37 | 7 months ago |
siontion | 895c32379b | 7 months ago |
siontion | 0be830c893 | 7 months ago |
qiuhongwu | 2de792955f | 7 months ago |
qiuhongwu | 9123224051 | 7 months ago |
qiuhongwu | c86e4266d7 | 7 months ago |
siontion | 55c577b0b0 | 7 months ago |
siontion | 8588b9b600 | 7 months ago |
qiuhongwu | 8ea967e2da | 7 months ago |
qiuhongwu | 0a08886ef2 | 7 months ago |
zengchenxi | 4b72a78262 | 7 months ago |
zengchenxi | bf4151a49f | 7 months ago |
qiuhongwu | 771e49e568 | 7 months ago |
zengchenxi | c92db1688b | 7 months ago |
zengchenxi | 6943d46472 | 7 months ago |
qiuhongwu | 8b96f856af | 7 months ago |
qiuhongwu | 3d6ab4955a | 7 months ago |
qiuhongwu | 8ac8394a94 | 7 months ago |
qiuhongwu | 3f418b8849 | 7 months ago |
zengchenxi | aeaef9fb92 | 7 months ago |
zengchenxi | 790c3fc878 | 7 months ago |
zengchenxi | ab58ec5286 | 7 months ago |
qiuhongwu | 2b0ca9d141 | 7 months ago |
zengchenxi | dd67674233 | 7 months ago |
zengchenxi | 93be931005 | 7 months ago |
qiuhongwu | 2679b4e043 | 7 months ago |
zengchenxi | eb5a6cc205 | 7 months ago |
zengchenxi | 2e7b2173b1 | 7 months ago |
qiuhongwu | 977e9d2580 | 7 months ago |
zengchenxi | 55fb78223d | 7 months ago |
zengchenxi | 71f7ebdcee | 7 months ago |
qiuhongwu | 23420b3de4 | 7 months ago |
qiuhongwu | 9d45afd9fd | 7 months ago |
zengchenxi | 3810edff77 | 7 months ago |
zengchenxi | 5ab458f0b1 | 7 months ago |
zengchenxi | 2ddc8a2332 | 7 months ago |
zengchenxi | e48fdfb170 | 7 months ago |
qiuhongwu | 815f582a88 | 7 months ago |
qiuhongwu | fb76468cc5 | 7 months ago |
qiuhongwu | 7be775e845 | 7 months ago |
zengchenxi | 2f8ea83699 | 7 months ago |
zengchenxi | 9c4b6bc7da | 7 months ago |
zengchenxi | bbfb2a6726 | 7 months ago |
qiuhongwu | 20e9e4653a | 7 months ago |
zengchenxi | 966e938f0f | 7 months ago |
zengchenxi | 95d3ab73d4 | 7 months ago |
siontion | 5fa48afc06 | 7 months ago |
siontion | 36a4801ba6 | 7 months ago |
siontion | 7f0e6c13b4 | 7 months ago |
qiuhongwu | 350b3f0f1f | 7 months ago |
qiuhongwu | cb6b072558 | 7 months ago |
siontion | 437e6eab25 | 7 months ago |
siontion | 4996f0b5ff | 7 months ago |
siontion | 579892eed0 | 7 months ago |
qiuhongwu | c9a0e4a657 | 7 months ago |
qiuhongwu | 90433f6768 | 7 months ago |
siontion | c372133ab5 | 7 months ago |
siontion | 22e80d6c5d | 7 months ago |
siontion | 6e755160da | 7 months ago |
zengchenxi | c33181b7c6 | 7 months ago |
zengchenxi | 732789d400 | 7 months ago |
qiuhongwu | 77814d960c | 7 months ago |
zengchenxi | 55c863f330 | 7 months ago |
zengchenxi | e1dd3d2c2d | 7 months ago |
zengchenxi | 2f66e75a4a | 7 months ago |
qiuhongwu | 09892498a4 | 7 months ago |
qiuhongwu | 9d98fa1096 | 7 months ago |
qiuhongwu | 7c706572b4 | 7 months ago |
qiuhongwu | 996b66ca46 | 7 months ago |
qiuhongwu | e0478db2b7 | 7 months ago |
zengchenxi | dbd91ee581 | 7 months ago |
zengchenxi | 25de6b9b6c | 7 months ago |
qiuhongwu | f668fdbae8 | 7 months ago |
zengchenxi | 43af697a73 | 7 months ago |
zengchenxi | e2fef42584 | 7 months ago |
qiuhongwu | 577161c261 | 7 months ago |
zengchenxi | 92d8bf6fab | 7 months ago |
zengchenxi | 29241d2765 | 7 months ago |
qiuhongwu | 14c888d9b8 | 7 months ago |
qiuhongwu | 2f4bbf3272 | 7 months ago |
zengchenxi | d3574d9220 | 7 months ago |
zengchenxi | a6e8cba474 | 7 months ago |
zengchenxi | f25fd0cd8b | 7 months ago |
zengchenxi | e3e5551d12 | 7 months ago |
zengchenxi | 88a820c88f | 7 months ago |
zengchenxi | dd1d0ba022 | 7 months ago |
zengchenxi | 0c79766f59 | 7 months ago |
zengchenxi | 378f4bcf65 | 7 months ago |
siontion | 7a8ad652a6 | 7 months ago |
siontion | 380c640eab | 7 months ago |
zengchenxi | fd70830dfe | 7 months ago |
zengchenxi | 52c5340249 | 7 months ago |
qiuhongwu | 83cafa780a | 8 months ago |
qiuhongwu | 3dea2a212d | 8 months ago |
zengchenxi | 6e67610601 | 8 months ago |
zengchenxi | bdf6dc9719 | 8 months ago |
zengchenxi | 12122fbb65 | 8 months ago |
qiuhongwu | f632f61cc3 | 8 months ago |
zengchenxi | d92ca511da | 8 months ago |
zengchenxi | de8e00f29d | 8 months ago |
qiuhongwu | 31ac902403 | 8 months ago |
zengchenxi | 9c1453ce64 | 8 months ago |
qiuhongwu | 4d7f9d11ba | 8 months ago |
qiuhongwu | 97dc32085f | 8 months ago |
qiuhongwu | 6690305233 | 8 months ago |
zengchenxi | fa3878f9b0 | 8 months ago |
zengchenxi | e53f349fd4 | 8 months ago |
zengchenxi | 5def0102bc | 8 months ago |
qiuhongwu | caf55bfb12 | 8 months ago |
qiuhongwu | 25e64adaa6 | 8 months ago |
qiuhongwu | de349879db | 8 months ago |
zengchenxi | db5ed1071b | 8 months ago |
qiuhongwu | 0184834ec8 | 8 months ago |
siontion | d8dcd19377 | 8 months ago |
zengchenxi | 6a491ef962 | 8 months ago |
siontion | 636eea9d3d | 8 months ago |
siontion | b173018ea5 | 8 months ago |
siontion | d3c99645b8 | 8 months ago |
qiuhongwu | fb96296033 | 8 months ago |
qiuhongwu | 9e9f943928 | 8 months ago |
zengchenxi | 007e290bf8 | 8 months ago |
siontion | 7d2e9a3f0e | 8 months ago |
siontion | 696c6c658d | 8 months ago |
siontion | 95724dce6c | 8 months ago |
siontion | 9640e0e1d2 | 8 months ago |
qiuhongwu | ea3553b3f3 | 8 months ago |
qiuhongwu | 0f08e555ec | 8 months ago |
siontion | dfc81d9a2c | 8 months ago |
siontion | 7719050783 | 8 months ago |
zengchenxi | e4ebe6cc53 | 8 months ago |
zengchenxi | 00f37397aa | 8 months ago |
qiuhongwu | 86c54456ad | 8 months ago |
siontion | 58ea8e4814 | 8 months ago |
siontion | 634351f83e | 8 months ago |
zengchenxi | 9183d539aa | 8 months ago |
siontion | aeaa97671a | 8 months ago |
siontion | ae9059ec31 | 8 months ago |
qiuhongwu | 770cc39159 | 8 months ago |
zengchenxi | fa58e3b0e9 | 8 months ago |
zengchenxi | 2cab1bc30e | 8 months ago |
zengchenxi | eb2191f646 | 8 months ago |
qiuhongwu | 59c9c6b7b8 | 8 months ago |
qiuhongwu | 5391d262f6 | 8 months ago |
siontion | f9eecdb2c3 | 8 months ago |
siontion | 97881fd837 | 8 months ago |
siontion | c148ca80f4 | 8 months ago |
siontion | 67ef9de7e6 | 8 months ago |
siontion | dfc8eabf4a | 8 months ago |
siontion | b1b1a11ccf | 8 months ago |
siontion | cba27b3c6c | 8 months ago |
zengchenxi | 38c6665042 | 8 months ago |
zengchenxi | eb278d6c98 | 8 months ago |
zengchenxi | a6d9c61aba | 8 months ago |
zengchenxi | 85e503d119 | 8 months ago |
qiuhongwu | 4953005b4d | 8 months ago |
qiuhongwu | 48dac377d7 | 8 months ago |
qiuhongwu | ed8a3999a5 | 8 months ago |
qiuhongwu | 9f72900ce2 | 8 months ago |
qiuhongwu | cb81864ed6 | 8 months ago |
zengchenxi | 7f1f16777f | 8 months ago |
qiuhongwu | 40ce037c65 | 8 months ago |
siontion | 6583b2a0e5 | 8 months ago |
qiuhongwu | ff5131e289 | 8 months ago |
siontion | 7c57b7560f | 8 months ago |
siontion | 5f52b645c8 | 8 months ago |
qiuhongwu | e27b0a9dca | 8 months ago |
siontion | 28b14030bd | 8 months ago |
siontion | af41059934 | 8 months ago |
siontion | 2aaff50a11 | 8 months ago |
siontion | 297cadd32d | 8 months ago |
qiuhongwu | b140ee5e28 | 8 months ago |
qiuhongwu | b6fd5ec3c9 | 8 months ago |
siontion | 44491d90fb | 8 months ago |
siontion | 830ae38b0d | 8 months ago |
siontion | ac2ad4ec51 | 8 months ago |
siontion | 65220620d8 | 8 months ago |
qiuhongwu | 653cccdc1a | 8 months ago |
qiuhongwu | a74469150c | 8 months ago |
zengchenxi | 4afc2d2699 | 8 months ago |
zengchenxi | cb9809398a | 8 months ago |
qiuhongwu | 09bf4dfdee | 8 months ago |
zengchenxi | 0deeb7ea14 | 8 months ago |
zengchenxi | 54d60ce661 | 8 months ago |
zengchenxi | b1138cb777 | 8 months ago |
qiuhongwu | fd4e8a12b9 | 8 months ago |
qiuhongwu | 0b513add12 | 8 months ago |
zengchenxi | 2642e68573 | 8 months ago |
zengchenxi | 4ebe8e6450 | 8 months ago |
qiuhongwu | 398bbd101c | 8 months ago |
zengchenxi | 13e07e62e6 | 8 months ago |
qiuhongwu | 2211599f40 | 8 months ago |
qiuhongwu | 9f4888f2e9 | 8 months ago |
zengchenxi | 2549519688 | 8 months ago |
zengchenxi | e73b202281 | 8 months ago |
qiuhongwu | 70837c7c3e | 8 months ago |
qiuhongwu | 2debd78b9c | 8 months ago |
qiuhongwu | 68d9c17f3a | 8 months ago |
qiuhongwu | 860746b4dc | 8 months ago |
siontion | 359ad39db9 | 8 months ago |
zengchenxi | 37a62f1752 | 8 months ago |
zengchenxi | 772ed36b43 | 8 months ago |
qiuhongwu | 1ce6bc16ce | 8 months ago |
zengchenxi | 7e521d6be5 | 8 months ago |
siontion | deff30bf07 | 8 months ago |
siontion | f5961d5d8b | 8 months ago |
qiuhongwu | 0940910c69 | 8 months ago |
siontion | 5189b76361 | 8 months ago |
siontion | 415bf92fed | 8 months ago |
zengchenxi | 6e1cee0898 | 8 months ago |
zengchenxi | 28edfde268 | 8 months ago |
siontion | 0b5beaf4b5 | 8 months ago |
zengchenxi | 6faf22a2d3 | 8 months ago |
qiuhongwu | 7ee5fe3a20 | 8 months ago |
zengchenxi | c20f3cd8d2 | 8 months ago |
zengchenxi | e855c0e600 | 8 months ago |
zengchenxi | b228d5e2d8 | 8 months ago |
zengchenxi | fb7f8a7049 | 8 months ago |
qiuhongwu | 6ab2c19608 | 8 months ago |
zengchenxi | 72b8550e00 | 8 months ago |
qiuhongwu | 3d3e3540f3 | 8 months ago |
qiuhongwu | 8486f6bf07 | 8 months ago |
qiuhongwu | a81e19e4f1 | 8 months ago |
qiuhongwu | bcfef4b969 | 8 months ago |
@ -0,0 +1,23 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料类型
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-02-01 04:42
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum BoomDetailTypeEnum {
|
||||||
|
|
||||||
|
MATERIAL("1", "原材料"),
|
||||||
|
OTHER("2", "加工件");
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
BoomDetailTypeEnum(String code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum DictTypeConstants {
|
||||||
|
|
||||||
|
MATERIAL_TYPE("heli_material_type", "物料类型"),
|
||||||
|
MATERIAL_UNIT("heli_material_unit", "物料单位");
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
DictTypeConstants(String code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票状态枚举
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-02-26 11:25
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum InvoiceStatusEnum {
|
||||||
|
|
||||||
|
SAVE(1, "已保存"),
|
||||||
|
SUBMIT(2, "已提交"),
|
||||||
|
CANCEL(3, "已作废");
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
InvoiceStatusEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库类型
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-02-01 02:31
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum StockInTypeEnum {
|
||||||
|
|
||||||
|
RECEIVE(1, "采购入库"),
|
||||||
|
GAIN(2, "盘盈入库"),
|
||||||
|
PRODUCTION(3, "生产入库"),
|
||||||
|
OTHER(4, "其他入库"),
|
||||||
|
RETURN(5, "车间退料")
|
||||||
|
;
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
StockInTypeEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派工单工序状态枚举
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-03-04 04:44
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum TaskDispatchProcedureStatusEnum {
|
||||||
|
|
||||||
|
DEFAULT(0, "默认"),
|
||||||
|
SUBMITTED(1, "已提交"),
|
||||||
|
COMPLETED(2, "已完成");
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TaskDispatchProcedureStatusEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派工单状态枚举
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-02-26 11:25
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum TaskDispatchStatusEnum {
|
||||||
|
|
||||||
|
SAVE(1, "已保存"),
|
||||||
|
SUBMIT(2, "已提交"),
|
||||||
|
CANCEL_SUBMIT(1, "取消提交"),
|
||||||
|
TERMINATE(3, "已终止");
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TaskDispatchStatusEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.TASK_DISPATCH_ASSEMBLE;
|
||||||
|
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.TASK_DISPATCH_PRODUCTION;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派工单类型枚举
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-03-12 02:28
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum TaskDispatchTypeEnum {
|
||||||
|
|
||||||
|
PRODUCTION(BusinesTypeEnum.TASK_DISPATCH_PRODUCTION, TASK_DISPATCH_PRODUCTION, "生产任务"),
|
||||||
|
ASSEMBLE(BusinesTypeEnum.TASK_DISPATCH_ASSEMBLE, TASK_DISPATCH_ASSEMBLE, "装配任务");
|
||||||
|
|
||||||
|
private BusinesTypeEnum businesTypeEnum;
|
||||||
|
private CodeEnum codeEnum;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TaskDispatchTypeEnum(BusinesTypeEnum businesTypeEnum, CodeEnum codeEnum, String description) {
|
||||||
|
this.businesTypeEnum = businesTypeEnum;
|
||||||
|
this.codeEnum = codeEnum;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务报工操作枚举
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-03-08 10:03
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum TaskReportOperateEnum {
|
||||||
|
START("开始"),
|
||||||
|
END("结束"),
|
||||||
|
SUBMIT("提交"),
|
||||||
|
FINISH("完成")
|
||||||
|
;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TaskReportOperateEnum(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派工单状态枚举
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-02-26 11:25
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum UnqualifiedNotificationStatusEnum {
|
||||||
|
|
||||||
|
SAVE(1, "已保存"),
|
||||||
|
SUBMIT(2, "已送审"),
|
||||||
|
AUDIT(3, "已审核");
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
UnqualifiedNotificationStatusEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.config;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.swagger.config.MesSwaggerAutoConfiguration;
|
||||||
|
import org.springdoc.core.GroupedOpenApi;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* system 模块的 web 组件的 Configuration
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Configuration(proxyBeanMethods = false)
|
||||||
|
public class HeliWebConfiguration {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* system 模块的 API 分组
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public GroupedOpenApi heliGroupedOpenApi() {
|
||||||
|
return MesSwaggerAutoConfiguration.buildGroupedOpenApi("heli");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.equipmanufacture.EquipManufactureService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 制造设备")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/equip-manufacture")
|
||||||
|
@Validated
|
||||||
|
public class EquipManufactureController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EquipManufactureService equipManufactureService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建制造设备")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:create')")
|
||||||
|
public CommonResult<Long> createEquipManufacture(@Valid @RequestBody EquipManufactureSaveReqVO createReqVO) {
|
||||||
|
return success(equipManufactureService.createEquipManufacture(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新制造设备")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:update')")
|
||||||
|
public CommonResult<Boolean> updateEquipManufacture(@Valid @RequestBody EquipManufactureSaveReqVO updateReqVO) {
|
||||||
|
equipManufactureService.updateEquipManufacture(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除制造设备")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:delete')")
|
||||||
|
public CommonResult<Boolean> deleteEquipManufacture(@RequestParam("id") Long id) {
|
||||||
|
equipManufactureService.deleteEquipManufacture(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得制造设备")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:query')")
|
||||||
|
public CommonResult<EquipManufactureRespVO> getEquipManufacture(@RequestParam("id") Long id) {
|
||||||
|
EquipManufactureDO equipManufacture = equipManufactureService.getEquipManufacture(id);
|
||||||
|
return success(BeanUtils.toBean(equipManufacture, EquipManufactureRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得制造设备分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:query')")
|
||||||
|
public CommonResult<PageResult<EquipManufactureRespVO>> getEquipManufacturePage(@Valid EquipManufacturePageReqVO pageReqVO) {
|
||||||
|
PageResult<EquipManufactureDO> pageResult = equipManufactureService.getEquipManufacturePage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, EquipManufactureRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出制造设备 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportEquipManufactureExcel(@Valid EquipManufacturePageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<EquipManufactureDO> list = equipManufactureService.getEquipManufacturePage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "制造设备.xls", "数据", EquipManufactureRespVO.class,
|
||||||
|
BeanUtils.toBean(list, EquipManufactureRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo.InvoicePageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo.InvoiceRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo.InvoiceSaveReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.invoice.InvoiceDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.invoice.InvoiceService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 财务发票")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/invoice")
|
||||||
|
@Validated
|
||||||
|
public class InvoiceController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private InvoiceService invoiceService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建财务发票")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:create')")
|
||||||
|
public CommonResult<Long> createInvoice(@Valid @RequestBody InvoiceSaveReqVO createReqVO) {
|
||||||
|
return success(invoiceService.createInvoice(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新财务发票")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:update')")
|
||||||
|
public CommonResult<Boolean> updateInvoice(@Valid @RequestBody InvoiceSaveReqVO updateReqVO) {
|
||||||
|
invoiceService.updateInvoice(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/operate")
|
||||||
|
@Operation(summary = "操作发票")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:update')")
|
||||||
|
@OperateLog(enable = false)
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public CommonResult operate(@Valid @RequestBody InvoiceSaveReqVO operateReqVO) {
|
||||||
|
return success(invoiceService.operate(operateReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除财务发票")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:delete')")
|
||||||
|
public CommonResult<Boolean> deleteInvoice(@RequestParam("id") Long id) {
|
||||||
|
invoiceService.deleteInvoice(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得财务发票")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:query')")
|
||||||
|
public CommonResult<InvoiceRespVO> getInvoice(@RequestParam("id") Long id, @RequestParam("businessType") String businessType) {
|
||||||
|
InvoiceDO invoice = invoiceService.getInvoice(id, businessType);
|
||||||
|
return success(BeanUtils.toBean(invoice, InvoiceRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得财务发票分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:query')")
|
||||||
|
public CommonResult<PageResult<InvoiceRespVO>> getInvoicePage(@Valid InvoicePageReqVO pageReqVO) {
|
||||||
|
PageResult<InvoiceDO> pageResult = invoiceService.getInvoicePage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, InvoiceRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出财务发票 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:invoice:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportInvoiceExcel(@Valid InvoicePageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<InvoiceDO> list = invoiceService.getInvoicePage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "财务发票.xls", "数据", InvoiceRespVO.class,
|
||||||
|
BeanUtils.toBean(list, InvoiceRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 财务发票分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class InvoicePageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", example = "2")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "订单id", example = "30302")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
@Schema(description = "发票号码")
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
@Schema(description = "发票类型", example = "1")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "开票日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] billingDate;
|
||||||
|
|
||||||
|
@Schema(description = "发票金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@Schema(description = "税率")
|
||||||
|
private BigDecimal rate;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "提交人")
|
||||||
|
private Long submitter;
|
||||||
|
|
||||||
|
@Schema(description = "提交时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] submitTime;
|
||||||
|
|
||||||
|
@Schema(description = "作废人")
|
||||||
|
private Long canceller;
|
||||||
|
|
||||||
|
@Schema(description = "作废时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] cancelTime;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态 已保存|已提交|已作废 1|2|3", example = "1")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
@Schema(description = "订单编号", example = "30302")
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,90 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 财务发票 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class InvoiceRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "9244")
|
||||||
|
@ExcelProperty("自增字段,唯一")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
|
@ExcelProperty("业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "订单id", example = "30302")
|
||||||
|
@ExcelProperty("订单id")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
@Schema(description = "发票号码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("发票号码")
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
@Schema(description = "发票类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty(value = "发票类型", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_invoice_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "开票日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("开票日期")
|
||||||
|
private LocalDateTime billingDate;
|
||||||
|
|
||||||
|
@Schema(description = "发票金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("发票金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@Schema(description = "税率", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("税率")
|
||||||
|
private BigDecimal rate;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "提交人")
|
||||||
|
@ExcelProperty("提交人")
|
||||||
|
private Long submitter;
|
||||||
|
|
||||||
|
@Schema(description = "提交时间")
|
||||||
|
@ExcelProperty("提交时间")
|
||||||
|
private LocalDateTime submitTime;
|
||||||
|
|
||||||
|
@Schema(description = "作废人")
|
||||||
|
@ExcelProperty("作废人")
|
||||||
|
private Long canceller;
|
||||||
|
|
||||||
|
@Schema(description = "作废时间")
|
||||||
|
@ExcelProperty("作废时间")
|
||||||
|
private LocalDateTime cancelTime;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态 已保存|已提交|已作废 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty("单据状态 已保存|已提交|已作废 1|2|3")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "提交人名称")
|
||||||
|
private String submitterName;
|
||||||
|
|
||||||
|
@Schema(description = "创建人名称")
|
||||||
|
private String creatorName;
|
||||||
|
|
||||||
|
@Schema(description = "作废人名称")
|
||||||
|
private String cancellerName;
|
||||||
|
|
||||||
|
@Schema(description = "订单编号")
|
||||||
|
private String orderCode;
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 财务发票新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class InvoiceSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "9244")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
|
@NotEmpty(message = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票不能为空")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "订单不能为空")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
@Schema(description = "发票号码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "发票号码不能为空")
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
@Schema(description = "发票类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotEmpty(message = "发票类型不能为空")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "开票日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "开票日期不能为空")
|
||||||
|
private LocalDateTime billingDate;
|
||||||
|
|
||||||
|
@Schema(description = "发票金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "发票金额不能为空")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@Schema(description = "税率", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "税率不能为空")
|
||||||
|
private BigDecimal rate;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "提交人")
|
||||||
|
private Long submitter;
|
||||||
|
|
||||||
|
@Schema(description = "提交时间")
|
||||||
|
private LocalDateTime submitTime;
|
||||||
|
|
||||||
|
@Schema(description = "作废人")
|
||||||
|
private Long canceller;
|
||||||
|
|
||||||
|
@Schema(description = "作废时间")
|
||||||
|
private LocalDateTime cancelTime;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态 已保存|已提交|已作废 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotNull(message = "单据状态 已保存|已提交|已作废 1|2|3不能为空")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型")
|
||||||
|
@NotBlank(message = "操作类型不能为空")
|
||||||
|
private String active;
|
||||||
|
|
||||||
|
@Schema(description = "操作意见")
|
||||||
|
private String activeOpinion;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,115 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.processbom.ProcessBomService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.materialplanboom.MaterialPlanBoomService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 物料需求计划加工件明细")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/material-plan-boom")
|
||||||
|
@Validated
|
||||||
|
public class MaterialPlanBoomController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialPlanBoomService materialPlanBoomService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建物料需求计划加工件明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:create')")
|
||||||
|
public CommonResult<Long> createMaterialPlanBoom(@Valid @RequestBody MaterialPlanBoomSaveReqVO createReqVO) {
|
||||||
|
return success(materialPlanBoomService.createMaterialPlanBoom(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新物料需求计划加工件明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:update')")
|
||||||
|
public CommonResult<Boolean> updateMaterialPlanBoom(@Valid @RequestBody MaterialPlanBoomSaveReqVO updateReqVO) {
|
||||||
|
materialPlanBoomService.updateMaterialPlanBoom(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除物料需求计划加工件明细")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:delete')")
|
||||||
|
public CommonResult<Boolean> deleteMaterialPlanBoom(@RequestParam("id") Long id) {
|
||||||
|
materialPlanBoomService.deleteMaterialPlanBoom(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得物料需求计划加工件明细")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||||
|
public CommonResult<MaterialPlanBoomRespVO> getMaterialPlanBoom(@RequestParam("id") Long id) {
|
||||||
|
MaterialPlanBoomDO materialPlanBoom = materialPlanBoomService.getMaterialPlanBoom(id);
|
||||||
|
return success(BeanUtils.toBean(materialPlanBoom, MaterialPlanBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得物料需求计划加工件明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||||
|
public CommonResult<PageResult<MaterialPlanBoomRespVO>> getMaterialPlanBoomPage(@Valid MaterialPlanBoomPageReqVO pageReqVO) {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getMaterialPlanBoomPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page-sum")
|
||||||
|
@Operation(summary = "获得物料需求计划加工件明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||||
|
public CommonResult<PageResult<MaterialPlanBoomRespVO>> getMaterialPlanBoomSumPage(@Valid MaterialPlanBoomPageReqVO pageReqVO) {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getMaterialPlanBoomSumPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出物料需求计划加工件明细 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportMaterialPlanBoomExcel(@Valid MaterialPlanBoomPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<MaterialPlanBoomDO> list = materialPlanBoomService.getMaterialPlanBoomPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "物料需求计划加工件明细.xls", "数据", MaterialPlanBoomRespVO.class,
|
||||||
|
BeanUtils.toBean(list, MaterialPlanBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/boom")
|
||||||
|
@Operation(summary = "获得物料需求计划加工件明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
|
||||||
|
public CommonResult<PageResult<ProcessBomDetailDO>> getBoomByProjectPlanId(@Valid ProcessBoomPageReqVO pageReqVO) {
|
||||||
|
PageResult<ProcessBomDetailDO> pageResult = materialPlanBoomService.getProcessBoomDetailList(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, ProcessBomDetailDO.class));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料需求计划加工件明细分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ProcessBoomPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "生产计划id")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Schema(description = "加工件名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "生产计划子项目编号")
|
||||||
|
private String projectSubCode;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料需求计划加工件明细 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ProcessBoomRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "生产计划Id")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Schema(description = "物料Id")
|
||||||
|
private Long materialId;
|
||||||
|
|
||||||
|
@Schema(description = "零件名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "生产计划子项目id")
|
||||||
|
private Long projectPlanSubId;
|
||||||
|
|
||||||
|
@Schema(description = "子项目编号")
|
||||||
|
private String projectSubCode;
|
||||||
|
|
||||||
|
@Schema(description = "加工件Id")
|
||||||
|
private Long boomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "需求数量")
|
||||||
|
private BigDecimal boomAmount;
|
||||||
|
|
||||||
|
@Schema(description = "需求到货日期")
|
||||||
|
private LocalDateTime boomArriveDate;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
@ExcelProperty("规格型号")
|
||||||
|
private String boomSpec;
|
||||||
|
|
||||||
|
@Schema(description = "系统单位")
|
||||||
|
@ExcelProperty("系统单位")
|
||||||
|
private String boomUnit;
|
||||||
|
|
||||||
|
@Schema(description = "材质")
|
||||||
|
@ExcelProperty("材质")
|
||||||
|
private String compositionName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,95 +1,103 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.servlet.http.*;
|
import javax.servlet.http.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.vo.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.materialplandetail.MaterialPlanDetailService;
|
import com.chanko.yunxi.mes.module.heli.service.materialplandetail.MaterialPlanDetailService;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 物料需求计划物料详情")
|
@Tag(name = "管理后台 - 物料需求计划物料详情")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/heli/material-plan-detail")
|
@RequestMapping("/heli/material-plan-detail")
|
||||||
@Validated
|
@Validated
|
||||||
public class MaterialPlanDetailController {
|
public class MaterialPlanDetailController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MaterialPlanDetailService materialPlanDetailService;
|
private MaterialPlanDetailService materialPlanDetailService;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建物料需求计划物料详情")
|
@Operation(summary = "创建物料需求计划物料详情")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:create')")
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:create')")
|
||||||
public CommonResult<Long> createMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO createReqVO) {
|
public CommonResult<Long> createMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO createReqVO) {
|
||||||
return success(materialPlanDetailService.createMaterialPlanDetail(createReqVO));
|
return success(materialPlanDetailService.createMaterialPlanDetail(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新物料需求计划物料详情")
|
@Operation(summary = "更新物料需求计划物料详情")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:update')")
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:update')")
|
||||||
public CommonResult<Boolean> updateMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO updateReqVO) {
|
||||||
materialPlanDetailService.updateMaterialPlanDetail(updateReqVO);
|
materialPlanDetailService.updateMaterialPlanDetail(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除物料需求计划物料详情")
|
@Operation(summary = "删除物料需求计划物料详情")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:delete')")
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:delete')")
|
||||||
public CommonResult<Boolean> deleteMaterialPlanDetail(@RequestParam("id") Long id) {
|
public CommonResult<Boolean> deleteMaterialPlanDetail(@RequestParam("id") Long id) {
|
||||||
materialPlanDetailService.deleteMaterialPlanDetail(id);
|
materialPlanDetailService.deleteMaterialPlanDetail(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得物料需求计划物料详情")
|
@Operation(summary = "获得物料需求计划物料详情")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
|
||||||
public CommonResult<MaterialPlanDetailRespVO> getMaterialPlanDetail(@RequestParam("id") Long id) {
|
public CommonResult<MaterialPlanDetailRespVO> getMaterialPlanDetail(@RequestParam("id") Long id) {
|
||||||
MaterialPlanDetailDO materialPlanDetail = materialPlanDetailService.getMaterialPlanDetail(id);
|
MaterialPlanDetailDO materialPlanDetail = materialPlanDetailService.getMaterialPlanDetail(id);
|
||||||
return success(BeanUtils.toBean(materialPlanDetail, MaterialPlanDetailRespVO.class));
|
return success(BeanUtils.toBean(materialPlanDetail, MaterialPlanDetailRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得物料需求计划物料详情分页")
|
@Operation(summary = "获得物料需求计划物料详情分页")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
|
||||||
public CommonResult<PageResult<MaterialPlanDetailRespVO>> getMaterialPlanDetailPage(@Valid MaterialPlanDetailPageReqVO pageReqVO) {
|
public CommonResult<PageResult<MaterialPlanDetailRespVO>> getMaterialPlanDetailPage(@Valid MaterialPlanDetailPageReqVO pageReqVO) {
|
||||||
PageResult<MaterialPlanDetailDO> pageResult = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO);
|
PageResult<MaterialPlanDetailDO> pageResult = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, MaterialPlanDetailRespVO.class));
|
return success(BeanUtils.toBean(pageResult, MaterialPlanDetailRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/page-sum")
|
||||||
@Operation(summary = "导出物料需求计划物料详情 Excel")
|
@Operation(summary = "获得物料需求计划物料详情分页")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:export')")
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
|
||||||
@OperateLog(type = EXPORT)
|
public CommonResult<PageResult<MaterialPlanDetailRespVO>> getMaterialPlanDetailSumPage(@Valid MaterialPlanDetailPageReqVO pageReqVO) {
|
||||||
public void exportMaterialPlanDetailExcel(@Valid MaterialPlanDetailPageReqVO pageReqVO,
|
PageResult<MaterialPlanDetailDO> pageResult = materialPlanDetailService.getMaterialPlanDetailSumPage(pageReqVO);
|
||||||
HttpServletResponse response) throws IOException {
|
return success(BeanUtils.toBean(pageResult, MaterialPlanDetailRespVO.class));
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
}
|
||||||
List<MaterialPlanDetailDO> list = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO).getList();
|
|
||||||
// 导出 Excel
|
@GetMapping("/export-excel")
|
||||||
ExcelUtils.write(response, "物料需求计划物料详情.xls", "数据", MaterialPlanDetailRespVO.class,
|
@Operation(summary = "导出物料需求计划物料详情 Excel")
|
||||||
BeanUtils.toBean(list, MaterialPlanDetailRespVO.class));
|
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:export')")
|
||||||
}
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportMaterialPlanDetailExcel(@Valid MaterialPlanDetailPageReqVO pageReqVO,
|
||||||
}
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<MaterialPlanDetailDO> list = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "物料需求计划物料详情.xls", "数据", MaterialPlanDetailRespVO.class,
|
||||||
|
BeanUtils.toBean(list, MaterialPlanDetailRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -0,0 +1,130 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plantask;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.plantask.PlanTaskService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 生产计划任务")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/plan-task")
|
||||||
|
@Validated
|
||||||
|
public class PlanTaskController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PlanTaskService planTaskService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OperateLogFrameworkService operateLogFrameworkService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HttpServletRequest request;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建生产计划任务")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:create')")
|
||||||
|
public CommonResult<Long> createPlanTask(@Valid @RequestBody PlanTaskSaveReqVO createReqVO) {
|
||||||
|
return success(planTaskService.createPlanTask(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新生产计划任务")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:update')")
|
||||||
|
public CommonResult<Boolean> updatePlanTask(@Valid @RequestBody PlanTaskSaveReqVO updateReqVO) {
|
||||||
|
LocalDateTime startTime = LocalDateTime.now();
|
||||||
|
planTaskService.updatePlanTask(updateReqVO);
|
||||||
|
|
||||||
|
// 手动记录日志
|
||||||
|
operateLogFrameworkService.createOperateLog(request,
|
||||||
|
startTime,
|
||||||
|
BusinesTypeEnum.PLAN_TASK.name(),
|
||||||
|
updateReqVO.getId(),
|
||||||
|
OperateTypeEnum.valueOf(updateReqVO.getActive()).getType(),
|
||||||
|
"");
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除生产计划任务")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:delete')")
|
||||||
|
public CommonResult<Boolean> deletePlanTask(@RequestParam("id") Long id) {
|
||||||
|
planTaskService.deletePlanTask(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得生产计划任务")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
|
||||||
|
public CommonResult<PlanTaskRespVO> getPlanTask(@RequestParam("id") Long id) {
|
||||||
|
PlanTaskDO planTask = planTaskService.getPlanTask(id);
|
||||||
|
return success(BeanUtils.toBean(planTask, PlanTaskRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得生产计划任务分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
|
||||||
|
public CommonResult<PageResult<PlanTaskRespVO>> getPlanTaskPage(@Valid PlanTaskPageReqVO pageReqVO) {
|
||||||
|
PageResult<PlanTaskDO> pageResult = planTaskService.getPlanTaskPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, PlanTaskRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出生产计划任务 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportPlanTaskExcel(@Valid PlanTaskPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<PlanTaskDO> list = planTaskService.getPlanTaskPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "生产计划任务.xls", "数据", PlanTaskRespVO.class,
|
||||||
|
BeanUtils.toBean(list, PlanTaskRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get-version-status")
|
||||||
|
@Operation(summary = "获得bom需要更新的状态")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
|
||||||
|
public CommonResult<Integer> getPlanTaskBomStatus(@RequestParam("id") Long id) {
|
||||||
|
return success(planTaskService.getPlanTaskBomStatus(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/refresh")
|
||||||
|
@Operation(summary = "刷新生产计划任务单最新数据")
|
||||||
|
@Parameter(name = "id", description = "生产计划id", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
|
||||||
|
public CommonResult<Integer> refreshPlanTaskByPlanId(@RequestParam("id") Long id) {
|
||||||
|
return success(planTaskService.refreshPlanTaskByPlanId(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantaskbom.PlanTaskBomDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 生产计划任务Bom")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/plan-task-bom")
|
||||||
|
@Validated
|
||||||
|
public class PlanTaskBomController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PlanTaskBomService planTaskBomService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建生产计划任务Bom")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:create')")
|
||||||
|
public CommonResult<Long> createPlanTaskBom(@Valid @RequestBody PlanTaskBomSaveReqVO createReqVO) {
|
||||||
|
return success(planTaskBomService.createPlanTaskBom(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新生产计划任务Bom")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:update')")
|
||||||
|
public CommonResult<Boolean> updatePlanTaskBom(@Valid @RequestBody PlanTaskBomSaveReqVO updateReqVO) {
|
||||||
|
planTaskBomService.updatePlanTaskBom(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除生产计划任务Bom")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:delete')")
|
||||||
|
public CommonResult<Boolean> deletePlanTaskBom(@RequestParam("id") Long id) {
|
||||||
|
planTaskBomService.deletePlanTaskBom(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得生产计划任务Bom")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:query')")
|
||||||
|
public CommonResult<PlanTaskBomRespVO> getPlanTaskBom(@RequestParam("id") Long id) {
|
||||||
|
PlanTaskBomDO planTaskBom = planTaskBomService.getPlanTaskBom(id);
|
||||||
|
return success(BeanUtils.toBean(planTaskBom, PlanTaskBomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得生产计划任务Bom分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:query')")
|
||||||
|
public CommonResult<PageResult<PlanTaskBomRespVO>> getPlanTaskBomPage(@Valid PlanTaskBomPageReqVO pageReqVO) {
|
||||||
|
PageResult<PlanTaskBomDO> pageResult = planTaskBomService.getPlanTaskBomPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, PlanTaskBomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出生产计划任务Bom Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportPlanTaskBomExcel(@Valid PlanTaskBomPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<PlanTaskBomDO> list = planTaskBomService.getPlanTaskBomPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "生产计划任务Bom.xls", "数据", PlanTaskBomRespVO.class,
|
||||||
|
BeanUtils.toBean(list, PlanTaskBomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 生产计划任务Bom分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class PlanTaskBomPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "生产任务id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@Schema(description = "bom明细id")
|
||||||
|
private Long bomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "负责人")
|
||||||
|
private String owner;
|
||||||
|
|
||||||
|
@Schema(description = "要求完成日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] requireEndDate;
|
||||||
|
|
||||||
|
@Schema(description = "项目id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Schema(description = "子项目id")
|
||||||
|
private Long projectSubId;
|
||||||
|
|
||||||
|
@Schema(description = "零件类型 1 标准件|2 其它")
|
||||||
|
private String materialType;
|
||||||
|
|
||||||
|
private Long projectPlanId;
|
||||||
|
|
||||||
|
private Long projectPlanSubId;
|
||||||
|
|
||||||
|
private Boolean sortByBlueprintNo;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 生产计划任务Bom Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class PlanTaskBomRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("自增字段,唯一")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "生产任务id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("生产任务id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@Schema(description = "bom明细id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("bom明细id")
|
||||||
|
private Long bomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "负责人")
|
||||||
|
@ExcelProperty("负责人")
|
||||||
|
private String owner;
|
||||||
|
|
||||||
|
@Schema(description = "要求完成日期")
|
||||||
|
@ExcelProperty("要求完成日期")
|
||||||
|
private LocalDateTime requireEndDate;
|
||||||
|
|
||||||
|
@Schema(description = "零件名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "物料名称")
|
||||||
|
private String compositionName;
|
||||||
|
|
||||||
|
@Schema(description = "图号")
|
||||||
|
private String blueprintNo;
|
||||||
|
|
||||||
|
@Schema(description = "零件类型 1 标准件|2 其它")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "物料id")
|
||||||
|
private Long materialId;
|
||||||
|
|
||||||
|
@Schema(description = "物料编码")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
@Schema(description = "材质id")
|
||||||
|
private Long compositionId;
|
||||||
|
|
||||||
|
@Schema(description = "规格")
|
||||||
|
private String spec;
|
||||||
|
|
||||||
|
@Schema(description = "单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@Schema(description = "数量")
|
||||||
|
private Integer amount;
|
||||||
|
|
||||||
|
@Schema(description = "负责人名称")
|
||||||
|
private String ownerName;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 生产计划任务Bom新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class PlanTaskBomSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "生产任务id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "生产任务id不能为空")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@Schema(description = "bom明细id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "bom明细id不能为空")
|
||||||
|
private Long bomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "负责人")
|
||||||
|
private String owner;
|
||||||
|
|
||||||
|
@Schema(description = "要求完成日期")
|
||||||
|
private LocalDateTime requireEndDate;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.convert.TimestampToDateConvert;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 项目订单 Export VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ProjectOrderExportVO {
|
||||||
|
|
||||||
|
@Schema(description = "项目编号,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("项目编号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "订单日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty(value = "订单日期", converter = TimestampToDateConvert.class)
|
||||||
|
private LocalDateTime orderTime;
|
||||||
|
|
||||||
|
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "27214")
|
||||||
|
@ExcelProperty("客户名称")
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
@Schema(description = "合同编号")
|
||||||
|
@ExcelProperty("合同编号")
|
||||||
|
private String contractNo;
|
||||||
|
|
||||||
|
@Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||||
|
@ExcelProperty("项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Schema(description = "是否有价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "28491")
|
||||||
|
@ExcelProperty(value = "是否有价格", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_common_is_or_not") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer hasPrice;
|
||||||
|
|
||||||
|
@Schema(description = "是否紧急", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty(value = "是否紧急", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_common_is_or_not") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer isUrgency;
|
||||||
|
|
||||||
|
@Schema(description = "性质", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty(value = "性质", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_project_property") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer property;
|
||||||
|
|
||||||
|
@Schema(description = "项目开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty(value = "项目开始时间", converter = TimestampToDateConvert.class)
|
||||||
|
private LocalDateTime projectStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "项目结束时间")
|
||||||
|
@ExcelProperty(value = "项目结束时间", converter = TimestampToDateConvert.class)
|
||||||
|
private LocalDateTime projectEndTime;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态 已保存/已送审/已审核/已启动/已打回/已终止", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty(value = "单据状态", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_project_order_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer orderStatus;
|
||||||
|
|
||||||
|
@Schema(description = "发货状态 未发货/部分发货/全部发货", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty(value = "发货状态", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_delivery_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer deliveryStatus;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 项目订单分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ProjectOrderSubPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "项目编号")
|
||||||
|
private String projectCode;
|
||||||
|
|
||||||
|
@Schema(description = "项目名称", example = "赵六")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Schema(description = "子项目编号")
|
||||||
|
private String projectSubCode;
|
||||||
|
|
||||||
|
@Schema(description = "子项目名称", example = "赵六")
|
||||||
|
private String projectSubName;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 项目订单子项 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ProjectOrderSubRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "项目订单id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Schema(description = "项目订单子项id")
|
||||||
|
private Long projectSubId;
|
||||||
|
|
||||||
|
@Schema(description = "项目编号")
|
||||||
|
private String projectCode;
|
||||||
|
|
||||||
|
@Schema(description = "项目名称", example = "赵六")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Schema(description = "子项目编号")
|
||||||
|
private String projectSubCode;
|
||||||
|
|
||||||
|
@Schema(description = "子项目名称", example = "赵六")
|
||||||
|
private String projectSubName;
|
||||||
|
|
||||||
|
@Schema(description = "客户名称", example = "赵六")
|
||||||
|
private String customerName;
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderboom.PurchaseOrderBoomDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.purchaseorderboom.PurchaseOrderBoomService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 采购订单加工件明细")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/purchase-order-boom")
|
||||||
|
@Validated
|
||||||
|
public class PurchaseOrderBoomController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PurchaseOrderBoomService purchaseOrderBoomService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建采购订单加工件明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:create')")
|
||||||
|
public CommonResult<Long> createPurchaseOrderBoom(@Valid @RequestBody PurchaseOrderBoomSaveReqVO createReqVO) {
|
||||||
|
return success(purchaseOrderBoomService.createPurchaseOrderBoom(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新采购订单加工件明细")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:update')")
|
||||||
|
public CommonResult<Boolean> updatePurchaseOrderBoom(@Valid @RequestBody PurchaseOrderBoomSaveReqVO updateReqVO) {
|
||||||
|
purchaseOrderBoomService.updatePurchaseOrderBoom(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除采购订单加工件明细")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:delete')")
|
||||||
|
public CommonResult<Boolean> deletePurchaseOrderBoom(@RequestParam("id") Long id) {
|
||||||
|
purchaseOrderBoomService.deletePurchaseOrderBoom(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得采购订单加工件明细")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:query')")
|
||||||
|
public CommonResult<PurchaseOrderBoomRespVO> getPurchaseOrderBoom(@RequestParam("id") Long id) {
|
||||||
|
PurchaseOrderBoomDO purchaseOrderBoom = purchaseOrderBoomService.getPurchaseOrderBoom(id);
|
||||||
|
return success(BeanUtils.toBean(purchaseOrderBoom, PurchaseOrderBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得采购订单加工件明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:query')")
|
||||||
|
public CommonResult<PageResult<PurchaseOrderBoomRespVO>> getPurchaseOrderBoomPage(@Valid PurchaseOrderBoomPageReqVO pageReqVO) {
|
||||||
|
PageResult<PurchaseOrderBoomDO> pageResult = purchaseOrderBoomService.getPurchaseOrderBoomPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, PurchaseOrderBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出采购订单加工件明细 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportPurchaseOrderBoomExcel(@Valid PurchaseOrderBoomPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<PurchaseOrderBoomDO> list = purchaseOrderBoomService.getPurchaseOrderBoomPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "采购订单加工件明细.xls", "数据", PurchaseOrderBoomRespVO.class,
|
||||||
|
BeanUtils.toBean(list, PurchaseOrderBoomRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 采购订单加工件明细分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class PurchaseOrderBoomPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "采购单编号")
|
||||||
|
private Long purchaseOrderId;
|
||||||
|
|
||||||
|
@Schema(description = "加工件boom detail id")
|
||||||
|
private Long boomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "零件名称")
|
||||||
|
private String boomName;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
private String boomSpec;
|
||||||
|
|
||||||
|
@Schema(description = "系统单位")
|
||||||
|
private Integer boomUnit;
|
||||||
|
|
||||||
|
@Schema(description = "材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
@Schema(description = "采购数量")
|
||||||
|
private BigDecimal purchaseAmount;
|
||||||
|
|
||||||
|
@Schema(description = "暂估价金额")
|
||||||
|
private BigDecimal estimatedPrice;
|
||||||
|
|
||||||
|
@Schema(description = "实际价金额")
|
||||||
|
private BigDecimal actualPrice;
|
||||||
|
|
||||||
|
@Schema(description = "预计到期日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] arriveTime;
|
||||||
|
|
||||||
|
@Schema(description = "需求到期日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] requireTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 采购订单加工件明细 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class PurchaseOrderBoomRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("自增字段,唯一")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "采购单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("采购单编号")
|
||||||
|
private Long purchaseOrderId;
|
||||||
|
|
||||||
|
@Schema(description = "加工件boom detail id")
|
||||||
|
@ExcelProperty("加工件boom detail id")
|
||||||
|
private Long boomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "零件名称")
|
||||||
|
@ExcelProperty("零件名称")
|
||||||
|
private String boomName;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
@ExcelProperty("规格型号")
|
||||||
|
private String boomSpec;
|
||||||
|
|
||||||
|
@Schema(description = "系统单位")
|
||||||
|
@ExcelProperty("系统单位")
|
||||||
|
private Integer boomUnit;
|
||||||
|
|
||||||
|
@Schema(description = "材质")
|
||||||
|
@ExcelProperty("材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
@Schema(description = "采购数量")
|
||||||
|
@ExcelProperty("采购数量")
|
||||||
|
private BigDecimal purchaseAmount;
|
||||||
|
|
||||||
|
@Schema(description = "需求数量")
|
||||||
|
@ExcelProperty("需求数量")
|
||||||
|
private BigDecimal boomAmount;
|
||||||
|
|
||||||
|
@Schema(description = "暂估价金额")
|
||||||
|
@ExcelProperty("暂估价金额")
|
||||||
|
private BigDecimal estimatedPrice;
|
||||||
|
|
||||||
|
@Schema(description = "实际价金额")
|
||||||
|
@ExcelProperty("实际价金额")
|
||||||
|
private BigDecimal actualPrice;
|
||||||
|
|
||||||
|
@Schema(description = "预计到期日期")
|
||||||
|
@ExcelProperty("预计到期日期")
|
||||||
|
private LocalDateTime arriveTime;
|
||||||
|
|
||||||
|
@Schema(description = "需求到期日期")
|
||||||
|
@ExcelProperty("需求到期日期")
|
||||||
|
private LocalDateTime requireTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 采购订单加工件明细新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class PurchaseOrderBoomSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "采购单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "采购单编号不能为空")
|
||||||
|
private Long purchaseOrderId;
|
||||||
|
|
||||||
|
@Schema(description = "加工件boom detail id")
|
||||||
|
private Long boomDetailId;
|
||||||
|
|
||||||
|
@Schema(description = "零件名称")
|
||||||
|
private String boomName;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
private String boomSpec;
|
||||||
|
|
||||||
|
@Schema(description = "系统单位")
|
||||||
|
private Integer boomUnit;
|
||||||
|
|
||||||
|
@Schema(description = "材质")
|
||||||
|
private String composition;
|
||||||
|
|
||||||
|
@Schema(description = "采购数量")
|
||||||
|
private BigDecimal purchaseAmount;
|
||||||
|
|
||||||
|
@Schema(description = "需求数量")
|
||||||
|
private BigDecimal boomAmount;
|
||||||
|
|
||||||
|
@Schema(description = "暂估价金额")
|
||||||
|
private BigDecimal estimatedPrice;
|
||||||
|
|
||||||
|
@Schema(description = "实际价金额")
|
||||||
|
private BigDecimal actualPrice;
|
||||||
|
|
||||||
|
@Schema(description = "预计到期日期")
|
||||||
|
private LocalDateTime arriveTime;
|
||||||
|
|
||||||
|
@Schema(description = "需求到期日期")
|
||||||
|
private LocalDateTime requireTime;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
}
|
@ -1,95 +1,99 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||||
import javax.annotation.Resource;
|
import com.chanko.yunxi.mes.module.heli.service.purchaseorder.PurchaseOrderService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import javax.annotation.Resource;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import javax.validation.constraints.*;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import javax.validation.*;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import javax.servlet.http.*;
|
|
||||||
import java.util.*;
|
import javax.validation.constraints.*;
|
||||||
import java.io.IOException;
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
import java.util.*;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import java.io.IOException;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
|
||||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
|
||||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial.vo.*;
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermaterial.PurchaseOrderMaterialDO;
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.purchaseordermaterial.PurchaseOrderMaterialService;
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial.vo.*;
|
||||||
@Tag(name = "管理后台 - 采购单物料")
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermaterial.PurchaseOrderMaterialDO;
|
||||||
@RestController
|
import com.chanko.yunxi.mes.module.heli.service.purchaseordermaterial.PurchaseOrderMaterialService;
|
||||||
@RequestMapping("/heli/purchase-order-material")
|
|
||||||
@Validated
|
@Tag(name = "管理后台 - 采购单物料")
|
||||||
public class PurchaseOrderMaterialController {
|
@RestController
|
||||||
|
@RequestMapping("/heli/purchase-order-material")
|
||||||
@Resource
|
@Validated
|
||||||
private PurchaseOrderMaterialService purchaseOrderMaterialService;
|
public class PurchaseOrderMaterialController {
|
||||||
|
|
||||||
@PostMapping("/create")
|
@Resource
|
||||||
@Operation(summary = "创建采购单物料")
|
private PurchaseOrderMaterialService purchaseOrderMaterialService;
|
||||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:create')")
|
|
||||||
public CommonResult<Long> createPurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO createReqVO) {
|
|
||||||
return success(purchaseOrderMaterialService.createPurchaseOrderMaterial(createReqVO));
|
@PostMapping("/create")
|
||||||
}
|
@Operation(summary = "创建采购单物料")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:create')")
|
||||||
@PutMapping("/update")
|
public CommonResult<Long> createPurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO createReqVO) {
|
||||||
@Operation(summary = "更新采购单物料")
|
return success(purchaseOrderMaterialService.createPurchaseOrderMaterial(createReqVO));
|
||||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:update')")
|
}
|
||||||
public CommonResult<Boolean> updatePurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO updateReqVO) {
|
|
||||||
purchaseOrderMaterialService.updatePurchaseOrderMaterial(updateReqVO);
|
@PutMapping("/update")
|
||||||
return success(true);
|
@Operation(summary = "更新采购单物料")
|
||||||
}
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:update')")
|
||||||
|
public CommonResult<Boolean> updatePurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO updateReqVO) {
|
||||||
@DeleteMapping("/delete")
|
purchaseOrderMaterialService.updatePurchaseOrderMaterial(updateReqVO);
|
||||||
@Operation(summary = "删除采购单物料")
|
return success(true);
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
}
|
||||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:delete')")
|
|
||||||
public CommonResult<Boolean> deletePurchaseOrderMaterial(@RequestParam("id") Long id) {
|
@DeleteMapping("/delete")
|
||||||
purchaseOrderMaterialService.deletePurchaseOrderMaterial(id);
|
@Operation(summary = "删除采购单物料")
|
||||||
return success(true);
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
}
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:delete')")
|
||||||
|
public CommonResult<Boolean> deletePurchaseOrderMaterial(@RequestParam("id") Long id) {
|
||||||
@GetMapping("/get")
|
purchaseOrderMaterialService.deletePurchaseOrderMaterial(id);
|
||||||
@Operation(summary = "获得采购单物料")
|
return success(true);
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
}
|
||||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
|
|
||||||
public CommonResult<PurchaseOrderMaterialRespVO> getPurchaseOrderMaterial(@RequestParam("id") Long id) {
|
@GetMapping("/get")
|
||||||
PurchaseOrderMaterialDO purchaseOrderMaterial = purchaseOrderMaterialService.getPurchaseOrderMaterial(id);
|
@Operation(summary = "获得采购单物料")
|
||||||
return success(BeanUtils.toBean(purchaseOrderMaterial, PurchaseOrderMaterialRespVO.class));
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
}
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
|
||||||
|
public CommonResult<PurchaseOrderMaterialRespVO> getPurchaseOrderMaterial(@RequestParam("id") Long id) {
|
||||||
@GetMapping("/page")
|
PurchaseOrderMaterialDO purchaseOrderMaterial = purchaseOrderMaterialService.getPurchaseOrderMaterial(id);
|
||||||
@Operation(summary = "获得采购单物料分页")
|
return success(BeanUtils.toBean(purchaseOrderMaterial, PurchaseOrderMaterialRespVO.class));
|
||||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
|
}
|
||||||
public CommonResult<PageResult<PurchaseOrderMaterialRespVO>> getPurchaseOrderMaterialPage(@Valid PurchaseOrderMaterialPageReqVO pageReqVO) {
|
|
||||||
PageResult<PurchaseOrderMaterialDO> pageResult = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO);
|
@GetMapping("/page")
|
||||||
return success(BeanUtils.toBean(pageResult, PurchaseOrderMaterialRespVO.class));
|
@Operation(summary = "获得采购单物料分页")
|
||||||
}
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
|
||||||
|
public CommonResult<PageResult<PurchaseOrderMaterialRespVO>> getPurchaseOrderMaterialPage(@Valid PurchaseOrderMaterialPageReqVO pageReqVO) {
|
||||||
@GetMapping("/export-excel")
|
PageResult<PurchaseOrderMaterialDO> pageResult = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO);
|
||||||
@Operation(summary = "导出采购单物料 Excel")
|
return success(BeanUtils.toBean(pageResult, PurchaseOrderMaterialRespVO.class));
|
||||||
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:export')")
|
}
|
||||||
@OperateLog(type = EXPORT)
|
|
||||||
public void exportPurchaseOrderMaterialExcel(@Valid PurchaseOrderMaterialPageReqVO pageReqVO,
|
@GetMapping("/export-excel")
|
||||||
HttpServletResponse response) throws IOException {
|
@Operation(summary = "导出采购单物料 Excel")
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:export')")
|
||||||
List<PurchaseOrderMaterialDO> list = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO).getList();
|
@OperateLog(type = EXPORT)
|
||||||
// 导出 Excel
|
public void exportPurchaseOrderMaterialExcel(@Valid PurchaseOrderMaterialPageReqVO pageReqVO,
|
||||||
ExcelUtils.write(response, "采购单物料.xls", "数据", PurchaseOrderMaterialRespVO.class,
|
HttpServletResponse response) throws IOException {
|
||||||
BeanUtils.toBean(list, PurchaseOrderMaterialRespVO.class));
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
}
|
List<PurchaseOrderMaterialDO> list = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
}
|
ExcelUtils.write(response, "采购单物料.xls", "数据", PurchaseOrderMaterialRespVO.class,
|
||||||
|
BeanUtils.toBean(list, PurchaseOrderMaterialRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -0,0 +1,92 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo.QualityFeedbackPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo.QualityFeedbackRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo.QualityFeedbackSaveReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.qualityfeedback.QualityFeedbackDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.qualityfeedback.QualityFeedbackService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 客户反馈质量")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/quality-feedback")
|
||||||
|
@Validated
|
||||||
|
public class QualityFeedbackController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QualityFeedbackService qualityFeedbackService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建客户反馈质量")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:create')")
|
||||||
|
public CommonResult<Long> createQualityFeedback(@Valid @RequestBody QualityFeedbackSaveReqVO createReqVO) {
|
||||||
|
return success(qualityFeedbackService.createQualityFeedback(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新客户反馈质量")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:update')")
|
||||||
|
public CommonResult<Long> updateQualityFeedback(@Valid @RequestBody QualityFeedbackSaveReqVO updateReqVO) {
|
||||||
|
return success(qualityFeedbackService.updateQualityFeedback(updateReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除客户反馈质量")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:delete')")
|
||||||
|
public CommonResult<Boolean> deleteQualityFeedback(@RequestParam("id") Long id) {
|
||||||
|
qualityFeedbackService.deleteQualityFeedback(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得客户反馈质量")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:query')")
|
||||||
|
public CommonResult<QualityFeedbackRespVO> getQualityFeedback(@RequestParam("id") Long id) {
|
||||||
|
QualityFeedbackDO qualityFeedback = qualityFeedbackService.getQualityFeedback(id);
|
||||||
|
return success(BeanUtils.toBean(qualityFeedback, QualityFeedbackRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得客户反馈质量分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:query')")
|
||||||
|
public CommonResult<PageResult<QualityFeedbackRespVO>> getQualityFeedbackPage(@Valid QualityFeedbackPageReqVO pageReqVO) {
|
||||||
|
PageResult<QualityFeedbackDO> pageResult = qualityFeedbackService.getQualityFeedbackPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, QualityFeedbackRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出客户反馈质量 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportQualityFeedbackExcel(@Valid QualityFeedbackPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<QualityFeedbackDO> list = qualityFeedbackService.getQualityFeedbackPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "客户反馈质量.xls", "数据", QualityFeedbackRespVO.class,
|
||||||
|
BeanUtils.toBean(list, QualityFeedbackRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo.InspectionReportPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo.InspectionReportRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.qualitymanagement.QualityManagementService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量管理
|
||||||
|
*
|
||||||
|
* @author chenxi
|
||||||
|
* @date 2024-03-11 11:13
|
||||||
|
*/
|
||||||
|
@Tag(name = "管理后台 - 质量管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/quality-management")
|
||||||
|
@Validated
|
||||||
|
public class QualityManagementController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QualityManagementService qualityManagementService;
|
||||||
|
|
||||||
|
@GetMapping("/inspection-report/page")
|
||||||
|
@Operation(summary = "获得检验报告分页")
|
||||||
|
public CommonResult<PageResult<InspectionReportRespVO>> getInspectionReportPage(@Valid InspectionReportPageReqVO pageReqVO) {
|
||||||
|
PageResult<InspectionReportRespVO> pageResult = qualityManagementService.getInspectionReportPage(pageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/inspection-report/get")
|
||||||
|
@Operation(summary = "获得检验报告")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
public CommonResult<InspectionReportRespVO> getInspectionReport(@RequestParam("id") Long id) {
|
||||||
|
InspectionReportRespVO inspectionReport = qualityManagementService.getInspectionReport(id);
|
||||||
|
return success(inspectionReport);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 检验报告分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class InspectionReportPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "项目编号")
|
||||||
|
private String projectCode;
|
||||||
|
|
||||||
|
@Schema(description = "项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Schema(description = "子项目名称")
|
||||||
|
private String projectSubName;
|
||||||
|
|
||||||
|
@Schema(description = "子项目编号")
|
||||||
|
private String projectSubCode;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 检验报告 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class InspectionReportRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19610")
|
||||||
|
@ExcelProperty("项目id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21985")
|
||||||
|
@ExcelProperty("子项目id")
|
||||||
|
private Long projectSubId;
|
||||||
|
|
||||||
|
@Schema(description = "项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@Schema(description = "项目编号")
|
||||||
|
private String projectCode;
|
||||||
|
|
||||||
|
@Schema(description = "客户名称")
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
@Schema(description = "子项目编号")
|
||||||
|
private String projectSubName;
|
||||||
|
|
||||||
|
@Schema(description = "子项目编号")
|
||||||
|
private String projectSubCode;
|
||||||
|
|
||||||
|
@Schema(description = "附件数量")
|
||||||
|
private Integer attachmentCount;
|
||||||
|
|
||||||
|
}
|
@ -1,106 +1,161 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
import javax.annotation.Resource;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService;
|
||||||
import javax.validation.constraints.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
||||||
import javax.validation.*;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
|
||||||
import javax.servlet.http.*;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
import java.util.*;
|
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||||
import java.io.IOException;
|
import com.chanko.yunxi.mes.module.heli.service.taskdispatch.TaskDispatchService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
|
import java.io.IOException;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
|
import java.time.LocalDateTime;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetail.TaskDispatchDetailDO;
|
import java.util.List;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.taskdispatch.TaskDispatchService;
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
@Tag(name = "管理后台 - 派工单")
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
@RestController
|
|
||||||
@RequestMapping("/heli/task-dispatch")
|
@Tag(name = "管理后台 - 派工单")
|
||||||
@Validated
|
@RestController
|
||||||
public class TaskDispatchController {
|
@RequestMapping("/heli/task-dispatch")
|
||||||
|
@Validated
|
||||||
@Resource
|
public class TaskDispatchController {
|
||||||
private TaskDispatchService taskDispatchService;
|
|
||||||
|
@Resource
|
||||||
@PostMapping("/create")
|
private TaskDispatchService taskDispatchService;
|
||||||
@Operation(summary = "创建派工单")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:create')")
|
@Resource
|
||||||
public CommonResult<Long> createTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO createReqVO) {
|
private OperateLogFrameworkService operateLogFrameworkService;
|
||||||
return success(taskDispatchService.createTaskDispatch(createReqVO));
|
|
||||||
}
|
@Resource
|
||||||
|
private HttpServletRequest request;
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新派工单")
|
@PostMapping("/create")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
|
@Operation(summary = "创建派工单")
|
||||||
public CommonResult<Boolean> updateTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO updateReqVO) {
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:create')")
|
||||||
taskDispatchService.updateTaskDispatch(updateReqVO);
|
public CommonResult<Long> createTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO createReqVO) {
|
||||||
return success(true);
|
return success(taskDispatchService.createTaskDispatch(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "删除派工单")
|
@Operation(summary = "更新派工单")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:delete')")
|
public CommonResult<Boolean> updateTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO updateReqVO) {
|
||||||
public CommonResult<Boolean> deleteTaskDispatch(@RequestParam("id") Long id) {
|
taskDispatchService.updateTaskDispatch(updateReqVO);
|
||||||
taskDispatchService.deleteTaskDispatch(id);
|
return success(true);
|
||||||
return success(true);
|
}
|
||||||
}
|
|
||||||
|
@PostMapping("/operate")
|
||||||
@GetMapping("/get")
|
@Operation(summary = "操作派工单")
|
||||||
@Operation(summary = "获得派工单")
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@OperateLog(enable = false)
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public CommonResult<TaskDispatchRespVO> getTaskDispatch(@RequestParam("id") Long id) {
|
public CommonResult<Long> operate(@Valid @RequestBody TaskDispatchSaveReqVO operateReqVO) {
|
||||||
TaskDispatchDO taskDispatch = taskDispatchService.getTaskDispatch(id);
|
LocalDateTime startTime = LocalDateTime.now();
|
||||||
return success(BeanUtils.toBean(taskDispatch, TaskDispatchRespVO.class));
|
taskDispatchService.operate(operateReqVO);
|
||||||
}
|
|
||||||
|
// 手动记录日志
|
||||||
@GetMapping("/page")
|
operateLogFrameworkService.createOperateLog(request,
|
||||||
@Operation(summary = "获得派工单分页")
|
startTime,
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
BusinesTypeEnum.TASK_DISPATCH.name(),
|
||||||
public CommonResult<PageResult<TaskDispatchRespVO>> getTaskDispatchPage(@Valid TaskDispatchPageReqVO pageReqVO) {
|
operateReqVO.getId(),
|
||||||
PageResult<TaskDispatchDO> pageResult = taskDispatchService.getTaskDispatchPage(pageReqVO);
|
OperateTypeEnum.valueOf(operateReqVO.getActive()).getType(),
|
||||||
return success(BeanUtils.toBean(pageResult, TaskDispatchRespVO.class));
|
operateReqVO.getActiveOpinion());
|
||||||
}
|
|
||||||
|
return success(operateReqVO.getId());
|
||||||
@GetMapping("/export-excel")
|
}
|
||||||
@Operation(summary = "导出派工单 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:export')")
|
@DeleteMapping("/delete")
|
||||||
@OperateLog(type = EXPORT)
|
@Operation(summary = "删除派工单")
|
||||||
public void exportTaskDispatchExcel(@Valid TaskDispatchPageReqVO pageReqVO,
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
HttpServletResponse response) throws IOException {
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:delete')")
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
public CommonResult<Boolean> deleteTaskDispatch(@RequestParam("id") Long id) {
|
||||||
List<TaskDispatchDO> list = taskDispatchService.getTaskDispatchPage(pageReqVO).getList();
|
taskDispatchService.deleteTaskDispatch(id);
|
||||||
// 导出 Excel
|
return success(true);
|
||||||
ExcelUtils.write(response, "派工单.xls", "数据", TaskDispatchRespVO.class,
|
}
|
||||||
BeanUtils.toBean(list, TaskDispatchRespVO.class));
|
|
||||||
}
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得派工单")
|
||||||
// ==================== 子表(派工明细) ====================
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||||
@GetMapping("/task-dispatch-detail/list-by-dispatch-id")
|
public CommonResult<TaskDispatchRespVO> getTaskDispatch(@RequestParam("id") Long id) {
|
||||||
@Operation(summary = "获得派工明细列表")
|
TaskDispatchDO taskDispatch = taskDispatchService.getTaskDispatch(id);
|
||||||
@Parameter(name = "dispatchId", description = "派工单id")
|
return success(BeanUtils.toBean(taskDispatch, TaskDispatchRespVO.class));
|
||||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
}
|
||||||
public CommonResult<List<TaskDispatchDetailDO>> getTaskDispatchDetailListByDispatchId(@RequestParam("dispatchId") Long dispatchId) {
|
|
||||||
return success(taskDispatchService.getTaskDispatchDetailListByDispatchId(dispatchId));
|
@GetMapping("/page")
|
||||||
}
|
@Operation(summary = "获得派工单分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||||
}
|
public CommonResult<PageResult<TaskDispatchRespVO>> getTaskDispatchPage(@Valid TaskDispatchPageReqVO pageReqVO) {
|
||||||
|
PageResult<TaskDispatchDO> pageResult = taskDispatchService.getTaskDispatchPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, TaskDispatchRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出派工单 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportTaskDispatchExcel(@Valid TaskDispatchPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<TaskDispatchDO> list = taskDispatchService.getTaskDispatchPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "派工单.xls", "数据", TaskDispatchRespVO.class,
|
||||||
|
BeanUtils.toBean(list, TaskDispatchRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 子表(派工明细) ====================
|
||||||
|
|
||||||
|
@GetMapping("/task-dispatch-detail/list-by-dispatch-id")
|
||||||
|
@Operation(summary = "获得派工明细列表")
|
||||||
|
@Parameter(name = "dispatchId", description = "派工单id")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||||
|
public CommonResult<List<TaskDispatchDetailDO>> getTaskDispatchDetailListByDispatchId(@RequestParam("dispatchId") Long dispatchId) {
|
||||||
|
return success(taskDispatchService.getTaskDispatchDetailListByDispatchId(dispatchId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/task-dispatch-detail/delete")
|
||||||
|
@Operation(summary = "删除派工单")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:delete')")
|
||||||
|
public CommonResult<Boolean> deleteTaskDispatchDetail(@RequestParam("id") Long id) {
|
||||||
|
taskDispatchService.deleteTaskDispatchDetail(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/task-dispatch-detail/page")
|
||||||
|
@Operation(summary = "获得派工明细分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||||
|
public CommonResult<PageResult<TaskDispatchDetailDO>> getTaskDispatchPageDetail(@Valid TaskDispatchDetailPageReqVO pageReqVO) {
|
||||||
|
PageResult<TaskDispatchDetailDO> pageResult = taskDispatchService.getTaskDispatchDetailPage(pageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/task-dispatch-detail/operate")
|
||||||
|
@Operation(summary = "操作派工任务")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
|
||||||
|
@OperateLog(enable = false)
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public CommonResult<Void> operateDetail(@Valid @RequestBody TaskDispatchDetailVO operateReqVO) {
|
||||||
|
taskDispatchService.operateDetail(operateReqVO);
|
||||||
|
return success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 派工单分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class TaskDispatchDetailPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "负责人id")
|
||||||
|
private Long owner;
|
||||||
|
|
||||||
|
@Schema(description = "工序完成状态列表")
|
||||||
|
private List<Integer> procedureStatusList;
|
||||||
|
|
||||||
|
@Schema(description = "派工类型")
|
||||||
|
private String dispatchType;
|
||||||
|
|
||||||
|
@Schema(description = "是否需要报工")
|
||||||
|
private Integer isReport;
|
||||||
|
|
||||||
|
@Schema(description = "生产任务id")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@Schema(description = "bom明细id")
|
||||||
|
private Long bomDetailId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Positive;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 派工单新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class TaskDispatchDetailVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26723")
|
||||||
|
@NotNull(message = "id不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Min(value = 0, message = "报工数量超出限定范围")
|
||||||
|
@Schema(description = "报工数量")
|
||||||
|
private Integer amount;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型")
|
||||||
|
@NotBlank(message = "操作类型不能为空")
|
||||||
|
private String active;
|
||||||
|
|
||||||
|
@Schema(description = "操作意见")
|
||||||
|
private String activeOpinion;
|
||||||
|
|
||||||
|
@Positive(message = "报工工时超出限定范围")
|
||||||
|
@Schema(description = "报工工时")
|
||||||
|
private BigDecimal workTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.taskreport;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskreport.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.taskreport.TaskReportService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 任务报工")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/task-report")
|
||||||
|
@Validated
|
||||||
|
public class TaskReportController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TaskReportService taskReportService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建任务报工")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-report:create')")
|
||||||
|
public CommonResult<Long> createTaskReport(@Valid @RequestBody TaskReportSaveReqVO createReqVO) {
|
||||||
|
return success(taskReportService.createTaskReport(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新任务报工")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-report:update')")
|
||||||
|
public CommonResult<Boolean> updateTaskReport(@Valid @RequestBody TaskReportSaveReqVO updateReqVO) {
|
||||||
|
taskReportService.updateTaskReport(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除任务报工")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-report:delete')")
|
||||||
|
public CommonResult<Boolean> deleteTaskReport(@RequestParam("id") Long id) {
|
||||||
|
taskReportService.deleteTaskReport(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得任务报工")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-report:query')")
|
||||||
|
public CommonResult<TaskReportRespVO> getTaskReport(@RequestParam("id") Long id) {
|
||||||
|
TaskReportDO taskReport = taskReportService.getTaskReport(id);
|
||||||
|
return success(BeanUtils.toBean(taskReport, TaskReportRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得任务报工分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-report:query')")
|
||||||
|
public CommonResult<PageResult<TaskReportRespVO>> getTaskReportPage(@Valid TaskReportPageReqVO pageReqVO) {
|
||||||
|
PageResult<TaskReportDO> pageResult = taskReportService.getTaskReportPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, TaskReportRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出任务报工 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:task-report:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportTaskReportExcel(@Valid TaskReportPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<TaskReportDO> list = taskReportService.getTaskReportPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "任务报工.xls", "数据", TaskReportRespVO.class,
|
||||||
|
BeanUtils.toBean(list, TaskReportRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,116 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification;
|
||||||
|
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||||
|
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchSaveReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationRespVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationSaveReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotification.UnqualifiedNotificationService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||||
|
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 品质异常通知单审核")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/unqualified-notification")
|
||||||
|
@Validated
|
||||||
|
public class UnqualifiedNotificationController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UnqualifiedNotificationService unqualifiedNotificationService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建品质异常通知单审核")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:create')")
|
||||||
|
public CommonResult<Long> createUnqualifiedNotification(@Valid @RequestBody UnqualifiedNotificationSaveReqVO createReqVO) {
|
||||||
|
return success(unqualifiedNotificationService.createUnqualifiedNotification(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新品质异常通知单审核")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:update')")
|
||||||
|
public CommonResult<Boolean> updateUnqualifiedNotification(@Valid @RequestBody UnqualifiedNotificationSaveReqVO updateReqVO) {
|
||||||
|
unqualifiedNotificationService.updateUnqualifiedNotification(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/operate")
|
||||||
|
@Operation(summary = "操作更新品质异常通知单")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:update')")
|
||||||
|
@OperateLog(enable = false)
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public CommonResult<Long> operate(@Valid @RequestBody UnqualifiedNotificationSaveReqVO operateReqVO) {
|
||||||
|
unqualifiedNotificationService.operate(operateReqVO);
|
||||||
|
return success(operateReqVO.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除品质异常通知单审核")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:delete')")
|
||||||
|
public CommonResult<Boolean> deleteUnqualifiedNotification(@RequestParam("id") Long id) {
|
||||||
|
unqualifiedNotificationService.deleteUnqualifiedNotification(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得品质异常通知单审核")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||||
|
public CommonResult<UnqualifiedNotificationRespVO> getUnqualifiedNotification(@RequestParam("id") Long id) {
|
||||||
|
UnqualifiedNotificationDO unqualifiedNotification = unqualifiedNotificationService.getUnqualifiedNotification(id);
|
||||||
|
return success(BeanUtils.toBean(unqualifiedNotification, UnqualifiedNotificationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得品质异常通知单审核分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||||
|
public CommonResult<PageResult<UnqualifiedNotificationRespVO>> getUnqualifiedNotificationPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||||
|
PageResult<UnqualifiedNotificationDO> pageResult = unqualifiedNotificationService.getUnqualifiedNotificationPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, UnqualifiedNotificationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出品质异常通知单审核 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportUnqualifiedNotificationExcel(@Valid UnqualifiedNotificationPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<UnqualifiedNotificationDO> list = unqualifiedNotificationService.getUnqualifiedNotificationPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "品质异常通知单审核.xls", "数据", UnqualifiedNotificationRespVO.class,
|
||||||
|
BeanUtils.toBean(list, UnqualifiedNotificationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/statisticPage")
|
||||||
|
@Operation(summary = "获得品质异常单统计分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||||
|
public CommonResult<PageResult<UnqualifiedNotificationRespVO>> getUnqualifiedNotificationStatisticPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||||
|
PageResult<UnqualifiedNotificationDO> pageResult = unqualifiedNotificationService.getUnqualifiedNotificationStatisticPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, UnqualifiedNotificationRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue