Compare commits
760
Commits
dev_v3.0.5
...
dev-ty1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e60f22979c | ||
|
|
84ff45b43d | ||
|
|
892cc30999 | ||
|
|
da76816533 | ||
|
|
b86ab75dcf | ||
|
|
796bb99a8b | ||
|
|
f9a50ae353 | ||
|
|
2094ea31cd | ||
|
|
788bae9a16 | ||
|
|
a65cca1cfa | ||
|
|
cae62e83a5 | ||
|
|
e2da7177f0 | ||
|
|
0b45ad181f | ||
|
|
260ec1f369 | ||
|
|
b28575c34d | ||
|
|
8af8197901 | ||
|
|
12f1d99e02 | ||
|
|
244fbf9759 | ||
|
|
e3826d6333 | ||
|
|
f217d6ec5c | ||
|
|
e58b6cb9ce | ||
|
|
b7cacaeb8d | ||
|
|
715883f1d4 | ||
|
|
139a3a82da | ||
|
|
fcc8102d9e | ||
|
|
7649585715 | ||
|
|
7511d211c6 | ||
|
|
fd3a9afddf | ||
|
|
0358c694ea | ||
|
|
009dc5b3a6 | ||
|
|
178b7697af | ||
|
|
32364baba8 | ||
|
|
6c6a491ff8 | ||
|
|
a496fc235b | ||
|
|
06202b652a | ||
|
|
5d748a9ac6 | ||
|
|
361a91d701 | ||
|
|
3471874139 | ||
|
|
a38e28bb97 | ||
|
|
ab7a4e265f | ||
|
|
976ab715af | ||
|
|
6856899afc | ||
|
|
6d7be15d97 | ||
|
|
0babc7dbf8 | ||
|
|
1a80f715dd | ||
|
|
7742d11d1c | ||
|
|
c4df9b3403 | ||
|
|
7ed34df81e | ||
|
|
0ace96ea9f | ||
|
|
34014f40a5 | ||
|
|
acbf7c9fdf | ||
|
|
9e1c5d8570 | ||
|
|
98b5ce81cc | ||
|
|
b6a69411f1 | ||
|
|
34b27eabd2 | ||
|
|
1c4b520f5a | ||
|
|
32459fd443 | ||
|
|
625b195183 | ||
|
|
0c95470300 | ||
|
|
ba3a540a94 | ||
|
|
a484e81b32 | ||
|
|
627f63cbd3 | ||
|
|
f6c454765e | ||
|
|
25102b5207 | ||
|
|
6708353379 | ||
|
|
20d11dc9b2 | ||
|
|
fa7db5df0c | ||
|
|
cb1a1ec9a6 | ||
|
|
3abac7b3d6 | ||
|
|
3c81e37e32 | ||
|
|
cecfe3e777 | ||
|
|
104fc8bbef | ||
|
|
d9e5cede10 | ||
|
|
1689da1911 | ||
|
|
c043da88e4 | ||
|
|
d10a81fc42 | ||
|
|
10bba6fd9e | ||
|
|
bc09b77695 | ||
|
|
a7a387f215 | ||
|
|
4d0ea8522e | ||
|
|
700eb3ee95 | ||
|
|
fd62a7aff5 | ||
|
|
b05c87e291 | ||
|
|
7790850da3 | ||
|
|
8ddf20f3e7 | ||
|
|
9e186bc034 | ||
|
|
c0065074d3 | ||
|
|
be8ba45067 | ||
|
|
c0bcedbdc3 | ||
|
|
84558fe2f6 | ||
|
|
b46483263b | ||
|
|
4755d4e62b | ||
|
|
3081460143 | ||
|
|
6c6afe4342 | ||
|
|
befdb82b53 | ||
|
|
5a329904c3 | ||
|
|
c25a9a5f68 | ||
|
|
6b3912aae9 | ||
|
|
12e43080b8 | ||
|
|
77e0c77fbf | ||
|
|
03978d23d7 | ||
|
|
ee7dbfcfb9 | ||
|
|
94d05cca9c | ||
|
|
9fd3d34610 | ||
|
|
edb7a5343d | ||
|
|
6108606daa | ||
|
|
762c49cd0f | ||
|
|
1b8511c092 | ||
|
|
ce3bb036fa | ||
|
|
71515e74f5 | ||
|
|
7d3c229b9a | ||
|
|
a549ac1507 | ||
|
|
bf3f0a2bfe | ||
|
|
35b026c8bd | ||
|
|
0eb47793a8 | ||
|
|
fee891dad0 | ||
|
|
34496de969 | ||
|
|
7a3021f82a | ||
|
|
c9c3062789 | ||
|
|
4ad31a870a | ||
|
|
9447604c96 | ||
|
|
1577eddc7b | ||
|
|
f5300fdd5d | ||
|
|
3880755df0 | ||
|
|
28bf58e8d1 | ||
|
|
3a5af634dd | ||
|
|
4f45a73505 | ||
|
|
b5f710cd33 | ||
|
|
bfffc6bbf1 | ||
|
|
a8815ade02 | ||
|
|
57312753ed | ||
|
|
03ce38ed9b | ||
|
|
b09b07978f | ||
|
|
87dae51a15 | ||
|
|
49ab26a8e9 | ||
|
|
c1f483f0a0 | ||
|
|
6d7e42bcde | ||
|
|
61572c536a | ||
|
|
572b25ee88 | ||
|
|
3576d734af | ||
|
|
028af3dd2f | ||
|
|
3af78d5d7b | ||
|
|
e821619a96 | ||
|
|
434348f972 | ||
|
|
72cb1d8c07 | ||
|
|
f5a7c8c1f3 | ||
|
|
3989d75f05 | ||
|
|
471b515a45 | ||
|
|
19e897cae0 | ||
|
|
91bdb99ec2 | ||
|
|
004580e252 | ||
|
|
da3c58a366 | ||
|
|
1cec762930 | ||
|
|
4deaeaa89d | ||
|
|
1208e02fe7 | ||
|
|
2c60dc8f84 | ||
|
|
77fb71dab4 | ||
|
|
cd41c616bb | ||
|
|
a4f27ab643 | ||
|
|
c174ea8742 | ||
|
|
2bbd6784c4 | ||
|
|
923afda21c | ||
|
|
bb3ca932d2 | ||
|
|
a588264849 | ||
|
|
1300a4e1f8 | ||
|
|
bf96f5f005 | ||
|
|
a983ae639e | ||
|
|
a74afd837c | ||
|
|
bc3afbacb1 | ||
|
|
5ba6a3b73d | ||
|
|
da84b7bb69 | ||
|
|
2d1e4b5912 | ||
|
|
2781f0d8d9 | ||
|
|
8a9bbb3cef | ||
|
|
155f1866b4 | ||
|
|
d4446e8482 | ||
|
|
3349552e10 | ||
|
|
254a804a17 | ||
|
|
4c4b8f4e29 | ||
|
|
06cf5ce861 | ||
|
|
7a01315ca8 | ||
|
|
d0773a40d2 | ||
|
|
6349181cc3 | ||
|
|
e95feb5c24 | ||
|
|
afa502eeaf | ||
|
|
627376da07 | ||
|
|
5127123236 | ||
|
|
7b0d08a132 | ||
|
|
ccdbbda165 | ||
|
|
e3058d8eb1 | ||
|
|
5e3a0d86d0 | ||
|
|
76d95c1b2d | ||
|
|
e4b29858a4 | ||
|
|
f1dec2298d | ||
|
|
7b52764ae1 | ||
|
|
1006860698 | ||
|
|
1e00681289 | ||
|
|
353300b643 | ||
|
|
9eb2f347f7 | ||
|
|
182438e1dc | ||
|
|
0be73e9bfe | ||
|
|
5e369bdd99 | ||
|
|
a5a222a78e | ||
|
|
b1840c8965 | ||
|
|
02a0b7aab6 | ||
|
|
42ab5160ed | ||
|
|
df66287455 | ||
|
|
e2ce186aba | ||
|
|
9be0de0ae7 | ||
|
|
4410162f39 | ||
|
|
3060fcd6a4 | ||
|
|
7d8e1c3872 | ||
|
|
59249be9b0 | ||
|
|
8fe5e079dd | ||
|
|
d1d55ce52a | ||
|
|
b12517e5b5 | ||
|
|
09d24217b5 | ||
|
|
3c2f252347 | ||
|
|
940e4c56b0 | ||
|
|
09ab103d1d | ||
|
|
8dcb2334d5 | ||
|
|
7a5e124f98 | ||
|
|
c5a2508a36 | ||
|
|
7353021d92 | ||
|
|
735cf9af9f | ||
|
|
f2f3fb9c19 | ||
|
|
a62ed7c60f | ||
|
|
4168f921f6 | ||
|
|
1916152775 | ||
|
|
83f4cce451 | ||
|
|
f5f792d3f8 | ||
|
|
dbd61c0519 | ||
|
|
cb5d933e0a | ||
|
|
5298e9d4e3 | ||
|
|
06f61d7957 | ||
|
|
4567f00858 | ||
|
|
e8328b0159 | ||
|
|
bb3dfaed4a | ||
|
|
0eb2f323c7 | ||
|
|
a35030e2f5 | ||
|
|
d1b1b27ab0 | ||
|
|
4a6a2798e8 | ||
|
|
9068fa0e40 | ||
|
|
99cb355640 | ||
|
|
c9520c65be | ||
|
|
2a4e39f755 | ||
|
|
a08d8a7fd5 | ||
|
|
ab7219e600 | ||
|
|
1b3b1a6394 | ||
|
|
072a4f7d1f | ||
|
|
63a19fbbcd | ||
|
|
5fc491f612 | ||
|
|
b209d8cb6d | ||
|
|
06aae196c7 | ||
|
|
e91c5801eb | ||
|
|
8704df738c | ||
|
|
000092952f | ||
|
|
22f2b66ffa | ||
|
|
3aec384ba0 | ||
|
|
27f3fceb6e | ||
|
|
3e5ed28d69 | ||
|
|
78d40d35be | ||
|
|
8fedb6d6ed | ||
|
|
b8de1c00eb | ||
|
|
bf080609fe | ||
|
|
b415ed6fa0 | ||
|
|
694ed699ec | ||
|
|
0b26692a34 | ||
|
|
c2af421c7f | ||
|
|
57f87baf85 | ||
|
|
e23edadde6 | ||
|
|
530254e000 | ||
|
|
33d085f9b9 | ||
|
|
21fcc24e2e | ||
|
|
64350f565b | ||
|
|
ff2b1965f7 | ||
|
|
7a769071e4 | ||
|
|
b05f994e74 | ||
|
|
ef13d890be | ||
|
|
cc943d164b | ||
|
|
624b7d7d6e | ||
|
|
0b61b813a5 | ||
|
|
77420e9617 | ||
|
|
fa51580985 | ||
|
|
362f1b5e2f | ||
|
|
b859aa99d3 | ||
|
|
83f05dd11d | ||
|
|
6252866f7c | ||
|
|
dd0bf32c35 | ||
|
|
7ed12c9405 | ||
|
|
15c8a2b6e6 | ||
|
|
72e445ea16 | ||
|
|
f50a3e690a | ||
|
|
8692b38671 | ||
|
|
f77d89fa7f | ||
|
|
0ff327a071 | ||
|
|
6661c016e8 | ||
|
|
4b434a2cd2 | ||
|
|
0376f8328c | ||
|
|
bca8b5fbed | ||
|
|
58e3882ef4 | ||
|
|
e489015e3e | ||
|
|
1d96322370 | ||
|
|
19857686aa | ||
|
|
d079e35374 | ||
|
|
466a9fa31f | ||
|
|
d74a28bceb | ||
|
|
1cc123917b | ||
|
|
39ebcb70ed | ||
|
|
e7e64252e7 | ||
|
|
a400a34b0c | ||
|
|
ac349ea8a8 | ||
|
|
7356208228 | ||
|
|
5963f6ed3a | ||
|
|
6f28cfdda0 | ||
|
|
5c472ad04e | ||
|
|
070cdcd5de | ||
|
|
061c5bc600 | ||
|
|
e5fea50466 | ||
|
|
6a87c5a75a | ||
|
|
63dcfaf028 | ||
|
|
c80e4b3ca3 | ||
|
|
3240e57c3e | ||
|
|
e35fa7d48e | ||
|
|
d5bdb5b419 | ||
|
|
fd1436da9c | ||
|
|
802a2994cc | ||
|
|
3d3036cebf | ||
|
|
123a5af241 | ||
|
|
da31a81415 | ||
|
|
84d4df0809 | ||
|
|
d17146dc4b | ||
|
|
44e9eb47bc | ||
|
|
bc9a4f7204 | ||
|
|
b37edf7c63 | ||
|
|
f6125e68bf | ||
|
|
d6037d5846 | ||
|
|
df51abe33f | ||
|
|
5cf46604fa | ||
|
|
208024a6cc | ||
|
|
1d01431354 | ||
|
|
cbaab0ffee | ||
|
|
a310c9dfa6 | ||
|
|
3866bfee05 | ||
|
|
5032cf2413 | ||
|
|
a10cfb0f55 | ||
|
|
59ede5ceb7 | ||
|
|
de4d4fa70d | ||
|
|
7e496834ae | ||
|
|
300b5ac239 | ||
|
|
9519d8610b | ||
|
|
064a87e751 | ||
|
|
9e2dc508a8 | ||
|
|
6a84abf6dd | ||
|
|
8b4e785de3 | ||
|
|
c95fdfc067 | ||
|
|
40a906a9fb | ||
|
|
d91aadca0b | ||
|
|
898cc32452 | ||
|
|
6cf2a8bc74 | ||
|
|
bce9969589 | ||
|
|
b73eb84b87 | ||
|
|
7d0d24ea77 | ||
|
|
dd5280ab78 | ||
|
|
bc6b2ba777 | ||
|
|
f58691615b | ||
|
|
15fdace0bc | ||
|
|
0904b78846 | ||
|
|
734b51bfec | ||
|
|
784d04ebec | ||
|
|
b29632cebc | ||
|
|
3211cfe892 | ||
|
|
32e8be5363 | ||
|
|
207734c75e | ||
|
|
8eb280f2b9 | ||
|
|
14a5aedf15 | ||
|
|
d4f660bc7e | ||
|
|
64bb96c97c | ||
|
|
9df65779ad | ||
|
|
176a0aa879 | ||
|
|
1241256787 | ||
|
|
5e65d63a4f | ||
|
|
296176c85e | ||
|
|
993746ee41 | ||
|
|
6a0818350a | ||
|
|
1b8a75aea5 | ||
|
|
76a290dc58 | ||
|
|
969d90fff5 | ||
|
|
23b5f96a0c | ||
|
|
02de8706e2 | ||
|
|
e6aa8d59e2 | ||
|
|
4b29406701 | ||
|
|
1c29c7e5e4 | ||
|
|
add7ef60db | ||
|
|
d14cea759a | ||
|
|
4fde6e1a9c | ||
|
|
0f88ad75b9 | ||
|
|
067fe1c2c9 | ||
|
|
6b2adce82f | ||
|
|
bee31cf944 | ||
|
|
552a685bb1 | ||
|
|
1c46de4fb7 | ||
|
|
a66177e21b | ||
|
|
fedeece533 | ||
|
|
ae138915ae | ||
|
|
57b8dcfb02 | ||
|
|
b45af55cdd | ||
|
|
3991496617 | ||
|
|
261bb07fb0 | ||
|
|
b18fa5938a | ||
|
|
ba3a90471a | ||
|
|
c5a39d23f2 | ||
|
|
cb136a19b4 | ||
|
|
0f26cd3d0d | ||
|
|
57649dbdfa | ||
|
|
b55c890f7e | ||
|
|
315d96063a | ||
|
|
897e5f195f | ||
|
|
b5b7143d7c | ||
|
|
f06c210ae9 | ||
|
|
4f38ac7cd6 | ||
|
|
488fdfc50e | ||
|
|
1cdc1878a0 | ||
|
|
2c91368278 | ||
|
|
c0f70715c7 | ||
|
|
c93445ca4c | ||
|
|
cb9d09c899 | ||
|
|
f3aec5d42f | ||
|
|
bcd7991725 | ||
|
|
db5e0e1a66 | ||
|
|
ba8dbdd859 | ||
|
|
f1967dd40f | ||
|
|
505f0aff5e | ||
|
|
b9dd2999f1 | ||
|
|
091c971f30 | ||
|
|
2de4efbe65 | ||
|
|
e5ef8740de | ||
|
|
661e57ce62 | ||
|
|
49233cf19b | ||
|
|
b96db591f2 | ||
|
|
236b047f5e | ||
|
|
feba6ff672 | ||
|
|
8caf83b823 | ||
|
|
789c9ac29c | ||
|
|
925eeba899 | ||
|
|
568ce3f96d | ||
|
|
56b39702b5 | ||
|
|
0ee27d796f | ||
|
|
7842ceaf71 | ||
|
|
987a7c564d | ||
|
|
18c8c4d18d | ||
|
|
0f4da97358 | ||
|
|
2787f7651e | ||
|
|
b9fe4bc4d2 | ||
|
|
7a6c570a88 | ||
|
|
f1567eb81e | ||
|
|
885d38565c | ||
|
|
8414fa1509 | ||
|
|
4b382e4d8f | ||
|
|
b80668145a | ||
|
|
476d7c8b0e | ||
|
|
93dd653ca9 | ||
|
|
f84c7b0843 | ||
|
|
3feb3851e4 | ||
|
|
38a04d6d30 | ||
|
|
81841b7ad0 | ||
|
|
e366f78081 | ||
|
|
a12ac94dd3 | ||
|
|
d1ce20abae | ||
|
|
df6b11a8bb | ||
|
|
c58112a719 | ||
|
|
a4a29c7c8e | ||
|
|
9283cc9df8 | ||
|
|
076c915a4c | ||
|
|
55c958bde5 | ||
|
|
ef53355b87 | ||
|
|
c5babe103e | ||
|
|
287ae8f22b | ||
|
|
04545a8219 | ||
|
|
1779bc2b23 | ||
|
|
2a56ce433f | ||
|
|
2dd8e7f0a2 | ||
|
|
b8605c6b43 | ||
|
|
5fec54ac63 | ||
|
|
564b8ff8aa | ||
|
|
76a5c987b2 | ||
|
|
f6ee1a3eee | ||
|
|
1297f920be | ||
|
|
d4ba4f0c0b | ||
|
|
0ed45fee69 | ||
|
|
69412f7293 | ||
|
|
2bd4d5bb63 | ||
|
|
8b9b29dbf1 | ||
|
|
5890660fe4 | ||
|
|
fa6ccad965 | ||
|
|
95d232623b | ||
|
|
e12beb1e0c | ||
|
|
8c722deac6 | ||
|
|
a1494846db | ||
|
|
0d70450997 | ||
|
|
6c6649368c | ||
|
|
92d53ad90d | ||
|
|
8b9cd8c749 | ||
|
|
498574763b | ||
|
|
c200645a15 | ||
|
|
c852ef1b8b | ||
|
|
674f56b2c2 | ||
|
|
44e7581b2c | ||
|
|
01b2723e1f | ||
|
|
489515f865 | ||
|
|
d8aa1e9490 | ||
|
|
07d9dacded | ||
|
|
538a3b42bd | ||
|
|
f660c66027 | ||
|
|
c1e062082a | ||
|
|
55dfb6f4a1 | ||
|
|
1f84ad71d8 | ||
|
|
4d0eb901c9 | ||
|
|
23984e69d6 | ||
|
|
a1f4953fb5 | ||
|
|
25ed516000 | ||
|
|
9f2e8f1855 | ||
|
|
1488405397 | ||
|
|
ad55d49d6b | ||
|
|
7aa7576799 | ||
|
|
96c95dabc6 | ||
|
|
f3fc2b3093 | ||
|
|
a112aa1163 | ||
|
|
e77937fb89 | ||
|
|
6b78248531 | ||
|
|
57cce338b1 | ||
|
|
33a6e875ce | ||
|
|
cdc098fdd3 | ||
|
|
e544b76db6 | ||
|
|
4f727fadc1 | ||
|
|
5b98ae9435 | ||
|
|
82909efe6b | ||
|
|
21db85ef2b | ||
|
|
f32f43ab18 | ||
|
|
eb3ada8335 | ||
|
|
49f6832d3f | ||
|
|
60bc140195 | ||
|
|
d268718f9b | ||
|
|
895c8d6a4b | ||
|
|
914a751d96 | ||
|
|
fc16c1edf2 | ||
|
|
4bd655e4da | ||
|
|
a96b03a060 | ||
|
|
8681042a32 | ||
|
|
44c9953875 | ||
|
|
c48b8aa39a | ||
|
|
36b31e5d52 | ||
|
|
f5c096fe39 | ||
|
|
75e77c0476 | ||
|
|
709b151e3f | ||
|
|
fa731e1fa5 | ||
|
|
d1448b2746 | ||
|
|
32d38b7721 | ||
|
|
ebc7bee5be | ||
|
|
19ca4bbe6c | ||
|
|
2f6988abac | ||
|
|
e322e28d05 | ||
|
|
9f70b236a0 | ||
|
|
7dcedab498 | ||
|
|
e2f5896be2 | ||
|
|
effa681709 | ||
|
|
8ea6a82acd | ||
|
|
e7f2a79dee | ||
|
|
8a78122fcb | ||
|
|
49b3722328 | ||
|
|
cb96a3700d | ||
|
|
9250d03ab1 | ||
|
|
494f49ee1b | ||
|
|
be597775d9 | ||
|
|
9eff15e483 | ||
|
|
496548558b | ||
|
|
7bd2e0b87c | ||
|
|
266d416912 | ||
|
|
f2216adb06 | ||
|
|
b825f1a789 | ||
|
|
6177b70b34 | ||
|
|
30dd4abe43 | ||
|
|
5dd23e9f42 | ||
|
|
f91a2248af | ||
|
|
b4db0a8cdb | ||
|
|
65fd1e6a19 | ||
|
|
bab7f048eb | ||
|
|
f543c4a00f | ||
|
|
98004ba989 | ||
|
|
76c8b1f5aa | ||
|
|
8542a25238 | ||
|
|
22590abbb8 | ||
|
|
bb68e118fa | ||
|
|
1d28170d46 | ||
|
|
1b85098063 | ||
|
|
d6d9ee1d5e | ||
|
|
2d9a4eaad2 | ||
|
|
1423d5d140 | ||
|
|
80e1639b83 | ||
|
|
07862301e6 | ||
|
|
d6fae412cd | ||
|
|
7ee70dd06c | ||
|
|
6f33fc3b64 | ||
|
|
a9e3d6cb6b | ||
|
|
5fe5ce7e82 | ||
|
|
5cc987c2c4 | ||
|
|
9ed1797b59 | ||
|
|
2373be59e6 | ||
|
|
587550025d | ||
|
|
9dfcf4ef5a | ||
|
|
914957e683 | ||
|
|
a852c0844e | ||
|
|
50b10ad19f | ||
|
|
aff19e1536 | ||
|
|
4c58838842 | ||
|
|
d27cca0217 | ||
|
|
6f5fa138d9 | ||
|
|
cf0a42ec8a | ||
|
|
5c591d3b57 | ||
|
|
165927bc3d | ||
|
|
2d03084f0c | ||
|
|
1f0703bc64 | ||
|
|
9bb5a7c2cf | ||
|
|
a7eed8590f | ||
|
|
4fad415cb7 | ||
|
|
a23a4acef3 | ||
|
|
0cd0a9535d | ||
|
|
71765b339f | ||
|
|
521e4ca5bd | ||
|
|
47688bfe34 | ||
|
|
b0999402cd | ||
|
|
dde4698fc6 | ||
|
|
5513b0af08 | ||
|
|
357fb0bd65 | ||
|
|
16627950e2 | ||
|
|
81dc017b68 | ||
|
|
80b96b0f17 | ||
|
|
d683774b88 | ||
|
|
20f60d490f | ||
|
|
73f7bbd803 | ||
|
|
5029ae8d42 | ||
|
|
87eea6a8cd | ||
|
|
72b2a153a0 | ||
|
|
7326407d13 | ||
|
|
4091f20e7a | ||
|
|
7bcf11baaf | ||
|
|
11ad2ea20f | ||
|
|
b303c78b39 | ||
|
|
2fb7d117c0 | ||
|
|
cdb21fe961 | ||
|
|
2151555f31 | ||
|
|
ce4f56962f | ||
|
|
c3b4923ce9 | ||
|
|
c536d2c5c6 | ||
|
|
fad5eb66fa | ||
|
|
52172dc3d7 | ||
|
|
34a146514f | ||
|
|
8377d9f2a5 | ||
|
|
0f2e2e769b | ||
|
|
73b1a76cb6 | ||
|
|
81c30d752d | ||
|
|
38b2de852b | ||
|
|
35122c0fca | ||
|
|
f1c7dd453b | ||
|
|
f1aa799809 | ||
|
|
d5dfa96859 | ||
|
|
23fe5eca9c | ||
|
|
69d5276bd9 | ||
|
|
876430874c | ||
|
|
24c234bcb7 | ||
|
|
c52b9f092e | ||
|
|
61b68804f0 | ||
|
|
23bffb32b3 | ||
|
|
9f9b0867ac | ||
|
|
1a309cb042 | ||
|
|
226360ef3a | ||
|
|
444b6add0a | ||
|
|
46757ed2f1 | ||
|
|
1548a28c9e | ||
|
|
2755ed1a33 | ||
|
|
5030ca2a8a | ||
|
|
4852b4496a | ||
|
|
e2bfb032a7 | ||
|
|
762c9d4bf4 | ||
|
|
f4f2573af7 | ||
|
|
1381bcee72 | ||
|
|
bbe8ce3523 | ||
|
|
7ae6ed2aac | ||
|
|
d45206a644 | ||
|
|
f7faed5e44 | ||
|
|
fa5f8d68cc | ||
|
|
b0a28a101e | ||
|
|
b24d02f4a6 | ||
|
|
a9aba71e0c | ||
|
|
687404b47f | ||
|
|
d4e3b36974 | ||
|
|
162f35b752 | ||
|
|
9cb99c915d | ||
|
|
9a58a7b41c | ||
|
|
3c594d4a91 | ||
|
|
dc9d491d61 | ||
|
|
d0cde81dcd | ||
|
|
81cd4b3317 | ||
|
|
442ca4977c | ||
|
|
2abdb6e8d1 | ||
|
|
53e9f977a1 | ||
|
|
1dcd38aaa2 | ||
|
|
50b7be1e4f | ||
|
|
4ce7b3afec | ||
|
|
aeff793901 | ||
|
|
187bddc820 | ||
|
|
360cb8d95c | ||
|
|
a589cfd3af | ||
|
|
f80b0bbddb | ||
|
|
76596ac927 | ||
|
|
2a33823ef2 | ||
|
|
930894b37e | ||
|
|
02acda9e23 | ||
|
|
41fa3991d9 | ||
|
|
a221c05ec9 | ||
|
|
57fb245715 | ||
|
|
79cda62fb4 | ||
|
|
0fba417b77 | ||
|
|
ed8d3fafd9 | ||
|
|
fea9ac6277 | ||
|
|
8e1cd9b185 | ||
|
|
bc2fc833a2 | ||
|
|
196410331b | ||
|
|
9351bd8816 | ||
|
|
429c279b78 | ||
|
|
4a6421c9cf | ||
|
|
9e71401716 | ||
|
|
fceaf38db9 | ||
|
|
4a90bbd9ad | ||
|
|
4ced5f9b65 | ||
|
|
07d43b393d | ||
|
|
ab0c0fdc17 | ||
|
|
0425b41cf4 | ||
|
|
9e3cedb596 | ||
|
|
5678399a34 | ||
|
|
dc0416510b | ||
|
|
cf85ffa37f | ||
|
|
7d26d7915c | ||
|
|
185b68bde9 | ||
|
|
553e0eebee | ||
|
|
fb4c508873 | ||
|
|
ebfd3c3f2e | ||
|
|
62ecfddb95 | ||
|
|
19696cbb6a | ||
|
|
40c16f17cc | ||
|
|
bd2170e0be | ||
|
|
e4a3835ee0 | ||
|
|
98e94682eb | ||
|
|
eb07b799f6 | ||
|
|
615e0d34e4 | ||
|
|
8b66aea296 | ||
|
|
eec6752b9a | ||
|
|
2907a55c96 | ||
|
|
08762490dd | ||
|
|
9e2d84fc5c |
Binary file not shown.
@@ -3,6 +3,7 @@ package com.mhd.system.api;
|
|||||||
import com.mhd.common.core.constant.ServiceNameConstants;
|
import com.mhd.common.core.constant.ServiceNameConstants;
|
||||||
import com.mhd.common.core.domain.dto.BusinessDataPushDTO;
|
import com.mhd.common.core.domain.dto.BusinessDataPushDTO;
|
||||||
import com.mhd.common.core.web.domain.AjaxResult;
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
|
import com.mhd.system.api.domain.BusinessDocumentFeign;
|
||||||
import com.mhd.system.api.factory.RemoteBmsFeignFallbackFactory;
|
import com.mhd.system.api.factory.RemoteBmsFeignFallbackFactory;
|
||||||
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
@@ -18,7 +19,7 @@ import java.util.Set;
|
|||||||
/**
|
/**
|
||||||
* bms财务结算系统feign调用接口
|
* bms财务结算系统feign调用接口
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.102.192.32:8019",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "BmsService", value = ServiceNameConstants.BMS_SERVICE, url = "http://10.33.0.109:8012",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
public interface BmsServiceFeign {
|
public interface BmsServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
@@ -68,4 +69,17 @@ public interface BmsServiceFeign {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/businessDocumentApi/wholeRentSynchronizationZXF")
|
@PostMapping("/businessDocumentApi/wholeRentSynchronizationZXF")
|
||||||
public AjaxResult wholeRentSynchronizationZXF(@RequestBody BusinessDataPushDTO businessDataPushDTO);
|
public AjaxResult wholeRentSynchronizationZXF(@RequestBody BusinessDataPushDTO businessDataPushDTO);
|
||||||
|
|
||||||
|
@PostMapping("/businessDocumentApi/feignSave")
|
||||||
|
public AjaxResult feignSaveBusinessDocument(@RequestBody BusinessDocumentFeign businessDocumentFeign);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据结算对象id查询结算对象参数列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/settlementCustomersParametersApi/getListBySettlementCustomersId")
|
||||||
|
AjaxResult getListBySettlementCustomersId(@RequestParam("settlementCustomersId") Long settlementCustomersId);
|
||||||
|
|
||||||
|
@PostMapping("/settlementCustomersApi/updatePushContractManageJobId")
|
||||||
|
AjaxResult updatePushContractManageJobId(@RequestParam("settlementCustomersId") Long settlementCustomersId,
|
||||||
|
@RequestParam("jobId") Integer jobId);
|
||||||
}
|
}
|
||||||
@@ -12,11 +12,12 @@ import org.springframework.scheduling.annotation.Async;
|
|||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017", fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
public interface OmsServiceFeign {
|
public interface OmsServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
@@ -28,6 +29,10 @@ public interface OmsServiceFeign {
|
|||||||
@PostMapping(value = "/reservationStockInOrderApi/pushInOrderDetail")
|
@PostMapping(value = "/reservationStockInOrderApi/pushInOrderDetail")
|
||||||
public AjaxResult pushInOrderDetail(@RequestBody InMaterialDetailTZPD inMaterialDetail);
|
public AjaxResult pushInOrderDetail(@RequestBody InMaterialDetailTZPD inMaterialDetail);
|
||||||
|
|
||||||
|
@ApiOperation("wms回传入库结果:按入库单号同步入库状态(3-收货中 4-上架中 5-已入库)到OMS入库业务单,type非1为入库")
|
||||||
|
@GetMapping(value = "/executionStockInOrderApi/returnResult")
|
||||||
|
public AjaxResult returnInResult(@RequestParam("orderNumber") String orderNumber, @RequestParam("status") Long status, @RequestParam("type") String type);
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("wms推送入库单")
|
@ApiOperation("wms推送入库单")
|
||||||
@PostMapping(value = "/reservationStockOutOrderApi/pushOutOrder")
|
@PostMapping(value = "/reservationStockOutOrderApi/pushOutOrder")
|
||||||
@@ -66,4 +71,8 @@ public interface OmsServiceFeign {
|
|||||||
@ApiOperation("批量推送")
|
@ApiOperation("批量推送")
|
||||||
@PostMapping("/reservationStockOutOrderApi/batchPushByNumber")
|
@PostMapping("/reservationStockOutOrderApi/batchPushByNumber")
|
||||||
public AjaxResult batchPushByNumber(@RequestBody List<String> numberList);
|
public AjaxResult batchPushByNumber(@RequestBody List<String> numberList);
|
||||||
|
|
||||||
|
@ApiOperation("保存电子签名记录")
|
||||||
|
@PostMapping("/electronicSignatureApi/saveSignature")
|
||||||
|
public AjaxResult saveSignature(@RequestBody ElectronicSignatureSyncDTO saveDTO);
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,8 @@ import com.mhd.common.core.domain.entity.R;
|
|||||||
import com.mhd.common.core.domain.po.SysMultistageDictPo;
|
import com.mhd.common.core.domain.po.SysMultistageDictPo;
|
||||||
import com.mhd.common.core.web.domain.AjaxResult;
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
import com.mhd.system.api.domain.ContainerFeignPO;
|
import com.mhd.system.api.domain.ContainerFeignPO;
|
||||||
|
import com.mhd.system.api.domain.ContractManageFeignDTO;
|
||||||
|
import com.mhd.system.api.domain.ContractManageParametersFeign;
|
||||||
import com.mhd.system.api.domain.SysDictData;
|
import com.mhd.system.api.domain.SysDictData;
|
||||||
import com.mhd.system.api.factory.RemoteSystemFeignFallbackFactory;
|
import com.mhd.system.api.factory.RemoteSystemFeignFallbackFactory;
|
||||||
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
||||||
@@ -237,6 +239,12 @@ public interface SystemServiceFeign {
|
|||||||
@GetMapping("/warehouseApi/getInfo/{warehouseId}")
|
@GetMapping("/warehouseApi/getInfo/{warehouseId}")
|
||||||
public AjaxResult getWarehouseInfoByWarehouseId(@PathVariable("warehouseId") Long warehouseId);
|
public AjaxResult getWarehouseInfoByWarehouseId(@PathVariable("warehouseId") Long warehouseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据warehouseId获取仓库及下库区及库位树(与前端 warehouseApi/getWarehouseChildren 一致,用于PC上架页默认库位回显)
|
||||||
|
*/
|
||||||
|
@GetMapping("/warehouseApi/getWarehouseChildren")
|
||||||
|
public AjaxResult getWarehouseChildren(@RequestParam("warehouseId") Long warehouseId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据storageSectionId获取对应库区信息
|
* 根据storageSectionId获取对应库区信息
|
||||||
*/
|
*/
|
||||||
@@ -384,4 +392,13 @@ public interface SystemServiceFeign {
|
|||||||
public AjaxResult matchForMaterialImport(@RequestParam("keyword") String keyword,
|
public AjaxResult matchForMaterialImport(@RequestParam("keyword") String keyword,
|
||||||
@RequestParam("organizationId") Long organizationId);
|
@RequestParam("organizationId") Long organizationId);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("保存临时合同管理")
|
||||||
|
@PostMapping("/contractManageApi/feignSave")
|
||||||
|
public AjaxResult feignSave(@RequestBody ContractManageFeignDTO contractManageFeignDTO);
|
||||||
|
|
||||||
|
@ApiOperation("Feign保存合约信息规则维护")
|
||||||
|
@PostMapping("/contractManageParametersApi/feignSave")
|
||||||
|
public AjaxResult feignSaveContractParameters(@RequestBody ContractManageParametersFeign contractManageParametersFeign);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -165,6 +165,10 @@ public interface UserServiceFeign {
|
|||||||
@GetMapping("/userShipperApi/userShipperListAll")
|
@GetMapping("/userShipperApi/userShipperListAll")
|
||||||
public AjaxResult<?> userShipperListAll();
|
public AjaxResult<?> userShipperListAll();
|
||||||
|
|
||||||
|
@ApiOperation("查询租户下全部托运人")
|
||||||
|
@GetMapping("/userShipperApi/userShipperListAllByOrg")
|
||||||
|
public AjaxResult<?> userShipperListAllByOrg(@RequestParam("orgCode") Long orgCode);
|
||||||
|
|
||||||
@ApiOperation("查询租户下全部承运人")
|
@ApiOperation("查询租户下全部承运人")
|
||||||
@GetMapping("/userDriverApi/userDriverListAll")
|
@GetMapping("/userDriverApi/userDriverListAll")
|
||||||
public AjaxResult<?> userDriverListAll();
|
public AjaxResult<?> userDriverListAll();
|
||||||
@@ -223,4 +227,7 @@ public interface UserServiceFeign {
|
|||||||
@ApiOperation("查询赊销额度")
|
@ApiOperation("查询赊销额度")
|
||||||
@PostMapping("/userShipperApi/querySaleCreditLimitFeign")
|
@PostMapping("/userShipperApi/querySaleCreditLimitFeign")
|
||||||
public AjaxResult querySaleCreditLimitFeign(@RequestBody UserShipperFeignDTO userShipperDTO);
|
public AjaxResult querySaleCreditLimitFeign(@RequestBody UserShipperFeignDTO userShipperDTO);
|
||||||
|
|
||||||
|
@GetMapping("/userApi/getUserByUserAccount")
|
||||||
|
R<LoginUser> getUserByUserAccount(@RequestParam("userAccount") String account);
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.102.192.31:8014",configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "commonWlhyServiceFeign",value = ServiceNameConstants.WLHY_SERVICE,url = "http://10.33.0.129:8014",configuration = FeignAutoConfiguration.class)
|
||||||
public interface WlhyServiceFeign {
|
public interface WlhyServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -539,6 +539,13 @@ public interface WlhyServiceFeign {
|
|||||||
@GetMapping("/feign/order/cancelIssueDocuments")
|
@GetMapping("/feign/order/cancelIssueDocuments")
|
||||||
public AjaxResult cancelIssueDocuments(@RequestParam(name="executeOrderId") String executeOrderId);
|
public AjaxResult cancelIssueDocuments(@RequestParam(name="executeOrderId") String executeOrderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OMS出库业务单反审联动: 按执行单货源编号软删TMS整条链路(货源单->运单->运输作业单, is_delete=1), 幂等,
|
||||||
|
* 与 cancelIssueDocuments(仅关闭货源单且有有效运单即拒绝)不同, 反审口径不留TMS数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/feign/order/deleteChainByExecuteOrderNumber")
|
||||||
|
public AjaxResult deleteChainByExecuteOrderNumber(@RequestParam(name="executeOrderNumber") String executeOrderNumber);
|
||||||
|
|
||||||
@GetMapping(value = "/ntocc/tmsSettlementExchangeRate/queryList")
|
@GetMapping(value = "/ntocc/tmsSettlementExchangeRate/queryList")
|
||||||
public AjaxResult<?> queryList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
public AjaxResult<?> queryList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
|||||||
* @description: TODO
|
* @description: TODO
|
||||||
* @date 2024/5/10 8:58
|
* @date 2024/5/10 8:58
|
||||||
**/
|
**/
|
||||||
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE, url = "http://10.102.192.32:8016", fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "remoteWmsServiceFeign",value = ServiceNameConstants.WMS_SERVICE,url = "http://10.33.0.109:8016",fallbackFactory = RemoteWmsFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
public interface WmsServiceFeign {
|
public interface WmsServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,33 +74,33 @@ public interface WmsServiceFeign {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("oms下发单保存")
|
@ApiOperation("oms下发单保存")
|
||||||
@PostMapping(value = "/stockOutOrderApi/omsOutOrderAdd")
|
@PostMapping(value = "/stockOutOrderApi/omsOutOrderAdd")
|
||||||
public void omsOutOrderAdd(@RequestBody StockOutOrder stockOutOrder);
|
public AjaxResult omsOutOrderAdd(@RequestBody StockOutOrder stockOutOrder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* oms下发单明细保存
|
* oms下发单明细保存
|
||||||
*/
|
*/
|
||||||
@ApiOperation("oms下发单明细保存")
|
@ApiOperation("oms下发单明细保存")
|
||||||
@PostMapping(value = "/stockOutOrderApi/omsOutOrderAddDetail")
|
@PostMapping(value = "/stockOutOrderApi/omsOutOrderAddDetail")
|
||||||
public void omsOutOrderAddDetail(@RequestBody List<OutMaterialDetail> outMaterialDetails);
|
public AjaxResult omsOutOrderAddDetail(@RequestBody List<OutMaterialDetail> outMaterialDetails);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* oms下发单明细保存
|
* oms下发单明细保存
|
||||||
*/
|
*/
|
||||||
@ApiOperation("oms下发单明细保存")
|
@ApiOperation("oms下发单明细保存")
|
||||||
@PostMapping(value = "/stockOutOrderApi/omsOutOrderAddDeliveryDetailsLink")
|
@PostMapping(value = "/stockOutOrderApi/omsOutOrderAddDeliveryDetailsLink")
|
||||||
public void omsOutOrderAddDeliveryDetailsLink(@RequestBody List<DeliveryDetailsLink> deliveryDetailsLinks);
|
public AjaxResult omsOutOrderAddDeliveryDetailsLink(@RequestBody List<DeliveryDetailsLink> deliveryDetailsLinks);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* oms下发单保存
|
* oms下发单保存(返回执行结果,失败时OMS据此回滚下发标记,避免"OMS已下发/WMS无数据"的阻断)
|
||||||
*/
|
*/
|
||||||
@ApiOperation("oms下发单保存")
|
@ApiOperation("oms下发单保存")
|
||||||
@PostMapping(value = "/stockInOrderApi/omsInOrderAdd")
|
@PostMapping(value = "/stockInOrderApi/omsInOrderAdd")
|
||||||
public void omsInOrderAdd(@RequestBody StockInOrder stockInOrder);
|
public AjaxResult omsInOrderAdd(@RequestBody StockInOrder stockInOrder);
|
||||||
|
|
||||||
@ApiOperation("oms取消下发单保存")
|
@ApiOperation("oms取消下发单保存")
|
||||||
@PostMapping(value = "/stockOutOrderApi/cancelExecutionOrder")
|
@PostMapping(value = "/stockOutOrderApi/cancelExecutionOrder")
|
||||||
public void omsCancelExecutionOrder(@RequestBody StockOutOrder stockOutOrder);
|
public AjaxResult omsCancelExecutionOrder(@RequestBody StockOutOrder stockOutOrder);
|
||||||
|
|
||||||
@ApiOperation("oms取消下发单自动分配")
|
@ApiOperation("oms取消下发单自动分配")
|
||||||
@PostMapping(value = "/stockOutOrderApi/omsAutoAssign")
|
@PostMapping(value = "/stockOutOrderApi/omsAutoAssign")
|
||||||
@@ -111,11 +111,48 @@ public interface WmsServiceFeign {
|
|||||||
public AjaxResult execution(@RequestBody com.mhd.system.api.domain.StockOutOrderDTO stockOutOrderDTO);
|
public AjaxResult execution(@RequestBody com.mhd.system.api.domain.StockOutOrderDTO stockOutOrderDTO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* oms下发单明细保存
|
* oms下发前库存校验:可用库存不足时返回错误,OMS据此在推送前拦截下发,
|
||||||
|
* 避免单据先落库、分配才失败而在WMS残留"已审核"状态的垃圾单
|
||||||
|
*/
|
||||||
|
@ApiOperation("oms下发前库存校验")
|
||||||
|
@PostMapping(value = "/stockOutOrderApi/checkOmsAssignInventory")
|
||||||
|
public AjaxResult checkOmsAssignInventory(@RequestBody List<OutMaterialDetail> outMaterialDetails);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* oms下发单明细保存(返回执行结果,明细保存含自动审核链路,失败时OMS据此回滚)
|
||||||
*/
|
*/
|
||||||
@ApiOperation("oms下发单明细保存")
|
@ApiOperation("oms下发单明细保存")
|
||||||
@PostMapping(value = "/stockInOrderApi/omsInOrderAddDetail")
|
@PostMapping(value = "/stockInOrderApi/omsInOrderAddDetail")
|
||||||
public void omsInOrderAddDetail(@RequestBody List<InMaterialDetail> inMaterialDetails);
|
public AjaxResult omsInOrderAddDetail(@RequestBody List<InMaterialDetail> inMaterialDetails);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* oms取消下发入库执行单:WMS侧一个事务内逻辑删除下发链路产生的全部数据
|
||||||
|
* (入库单/明细、收货单/明细、收货任务、收货作业单/明细、质检单),已开始收货则报错拦截
|
||||||
|
*/
|
||||||
|
@ApiOperation("oms取消下发入库单清理")
|
||||||
|
@PostMapping(value = "/stockInOrderApi/omsCancelInOrder")
|
||||||
|
public AjaxResult omsCancelInOrder(@RequestBody StockInOrder stockInOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* oms出库执行单反审(已出库/已复核单据客户通知回退场景):WMS侧还原实物库存并推送OMS库存、
|
||||||
|
* 逻辑删除出库链路单据、生成1条出库异常【反审记录】;反审原因经 remark 透传。
|
||||||
|
* 已产生下游不可逆数据时返回错误,OMS据此整体回滚。
|
||||||
|
*/
|
||||||
|
@ApiOperation("oms出库执行单反审WMS回退")
|
||||||
|
@PostMapping(value = "/stockOutOrderApi/omsReverseExecutionOrder")
|
||||||
|
public AjaxResult omsReverseExecutionOrder(@RequestBody StockOutOrder stockOutOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* oms入库业务单反审:WMS侧一个事务内回退已入库/收货中/上架中单据——
|
||||||
|
* 校验未产生出库(按入库单号+动作"分配库存/出库"查库存调整记录>0即有出库) ->
|
||||||
|
* 按库存行整行回退库存扣减 -> 软删W入库单/W收货单/W上架单全链并打已反审标记
|
||||||
|
* (各页面【已反审】tab按"已软删+已反审"查询归档数据)-> 写1条入库异常【反审记录】(type=3)。
|
||||||
|
* 入参: inOrderNumber=执行入库单号, remark=业务单号+反审原因, updateBy/updateByName=反审人;
|
||||||
|
* WMS无该单数据时幂等返回成功(未下发单反审不产生WMS数据)。
|
||||||
|
*/
|
||||||
|
@ApiOperation("oms入库单反审WMS回退")
|
||||||
|
@PostMapping(value = "/stockInOrderApi/omsReverseInOrder")
|
||||||
|
public AjaxResult omsReverseInOrder(@RequestBody StockInOrder stockInOrder);
|
||||||
|
|
||||||
@ApiOperation("oms查询物料列表")
|
@ApiOperation("oms查询物料列表")
|
||||||
@GetMapping("/materialBaseInfoApi/queryList")
|
@GetMapping("/materialBaseInfoApi/queryList")
|
||||||
@@ -141,4 +178,22 @@ public interface WmsServiceFeign {
|
|||||||
@ApiOperation("生成拣货单")
|
@ApiOperation("生成拣货单")
|
||||||
@PostMapping("/stockOutOrderApi/genPickingOrderByOms")
|
@PostMapping("/stockOutOrderApi/genPickingOrderByOms")
|
||||||
public AjaxResult genPickingOrderByOms(@RequestBody com.mhd.system.api.domain.StockOutOrderDTO stockOutOrderDTO);
|
public AjaxResult genPickingOrderByOms(@RequestBody com.mhd.system.api.domain.StockOutOrderDTO stockOutOrderDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OMS批量签名:更新WMS入/出库单签名字段
|
||||||
|
*
|
||||||
|
* <p>OMS端勾选记录批量签名后,通过此Feign调用WMS的 /stockSignatureApi/batchSign 接口,
|
||||||
|
* 同步更新WMS stock_in_order / stock_out_order 表的签名状态、签名时间、签名图片、签名备注。</p>
|
||||||
|
*/
|
||||||
|
@ApiOperation("OMS批量签名-同步WMS入/出库单签名字段")
|
||||||
|
@PostMapping("/stockSignatureApi/batchSign")
|
||||||
|
public AjaxResult batchSignWms(@RequestBody SignatureBatchFeignDTO dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OMS查询WMS线路管理列表(按线路编码模糊查,OMS侧自行精确匹配),
|
||||||
|
* 出库导入时校验送貨線號/車次并回填线路名称
|
||||||
|
*/
|
||||||
|
@ApiOperation("OMS查询WMS线路管理列表")
|
||||||
|
@GetMapping("/lineManagementApi/listByApp")
|
||||||
|
public AjaxResult listLineManagement(@RequestParam("routeCode") String routeCode);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.mhd.system.api;
|
||||||
|
|
||||||
|
|
||||||
|
import com.mhd.common.core.constant.ServiceNameConstants;
|
||||||
|
import com.mhd.common.core.domain.entity.R;
|
||||||
|
import com.mhd.common.core.domain.dto.YmsSysUserDTO;
|
||||||
|
import com.mhd.system.api.domain.YmsLoginUser;
|
||||||
|
import com.mhd.system.api.factory.RemoteBmsFeignFallbackFactory;
|
||||||
|
import com.mhd.system.api.factory.RemoteXxlJobFeignFallbackFactory;
|
||||||
|
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@FeignClient(contextId = "XxlJobService", value = ServiceNameConstants.XXL_JOB_SERVICE,url = "http://127.0.0.1:8020",fallbackFactory = RemoteXxlJobFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
|
public interface XxlJobServiceFeign {
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/user/openFeignTest")
|
||||||
|
public R<Map<String, Object>> openFeignTest(@RequestParam("param") String string);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ import com.mhd.system.api.feign.FeignAutoConfiguration;
|
|||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,fallbackFactory = RemoteBmsFeignFallbackFactory.class,url = "http://10.102.192.33:8018", configuration = FeignAutoConfiguration.class)
|
@FeignClient(contextId = "YmsService", value = ServiceNameConstants.YMS_SERVICE,url = "http://10.33.0.99:8018",fallbackFactory = RemoteBmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
|
||||||
public interface YmsServiceFeign {
|
public interface YmsServiceFeign {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+203
@@ -0,0 +1,203 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务单据对象 business_document
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-21
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusinessDocumentFeign extends BaseVOEntity{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务单据记录id")
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long businessDocumentId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务流水")
|
||||||
|
@Excel(name = "业务流水")
|
||||||
|
private String businessFlow;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态(1-未生效,2-已生效,3-已计费,4-已驳回,5-已作废")
|
||||||
|
@Excel(name = "状态", readConverterExp = "状态(1-未生效,2-已生效,3-已计费,4-已驳回,5-已作废")
|
||||||
|
private Integer businessState;
|
||||||
|
|
||||||
|
@ApiModelProperty("来源模块")
|
||||||
|
@Excel(name = "来源模块")
|
||||||
|
private String belongModule;
|
||||||
|
|
||||||
|
@ApiModelProperty("来源模块code")
|
||||||
|
@Excel(name = "来源模块code")
|
||||||
|
private String belongModuleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据来源(1-系统生成,2-手工录入)")
|
||||||
|
@Excel(name = "数据来源", readConverterExp = "1=-系统生成,2-手工录入")
|
||||||
|
private Integer dataSources;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据类型id")
|
||||||
|
@Excel(name = "单据类型id")
|
||||||
|
private Long documentTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据类型code")
|
||||||
|
@Excel(name = "单据类型code")
|
||||||
|
private String documentTypeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据类型")
|
||||||
|
@Excel(name = "单据类型")
|
||||||
|
private String documentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("原始业务单号")
|
||||||
|
@Excel(name = "原始业务单号")
|
||||||
|
private String originalBusinessNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目编码")
|
||||||
|
@Excel(name = "项目编码")
|
||||||
|
private String projectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目名称")
|
||||||
|
@Excel(name = "项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
@Excel(name = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("账单金额")
|
||||||
|
@Excel(name = "账单金额")
|
||||||
|
private BigDecimal billAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("预计费金额")
|
||||||
|
@Excel(name = "预计费金额")
|
||||||
|
private BigDecimal estimatedCost;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级费用科目code")
|
||||||
|
@Excel(name = "一级费用科目code")
|
||||||
|
private String firstSubjectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级费用科目(结算项)")
|
||||||
|
@Excel(name = "一级费用科目")
|
||||||
|
private String firstSubjectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("二级费用科目code")
|
||||||
|
@Excel(name = "二级费用科目code")
|
||||||
|
private String secondSubjectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("二级费用科目(结算项)")
|
||||||
|
@Excel(name = "二级费用科目")
|
||||||
|
private String secondSubjectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算对象id")
|
||||||
|
@Excel(name = "结算对象id")
|
||||||
|
private Long settlementCustomersId;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算对象code")
|
||||||
|
@Excel(name = "结算对象code")
|
||||||
|
private String settlementCustomersCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算对象")
|
||||||
|
@Excel(name = "结算对象")
|
||||||
|
private String settlementEntity;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "计费时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date billingTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据表单json数据")
|
||||||
|
@Excel(name = "单据表单json数据")
|
||||||
|
private String documentFormJson;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
@Excel(name = "合同管理id", readConverterExp = "合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目管理id")
|
||||||
|
@Excel(name = "项目管理id", readConverterExp = "项目管理id")
|
||||||
|
private Long projectManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("原始流水号")
|
||||||
|
@Excel(name = "原始流水号")
|
||||||
|
private String originalSerialNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类型code(服务项)")
|
||||||
|
@Excel(name = "费用类型code(服务项)")
|
||||||
|
private String serviceItemsCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类型")
|
||||||
|
@Excel(name = "费用类型")
|
||||||
|
private String serviceItemsName;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类型id(服务项)")
|
||||||
|
@Excel(name = "费用类型id(服务项)")
|
||||||
|
private Long serviceItemsManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据备注")
|
||||||
|
@Excel(name = "单据备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核备注")
|
||||||
|
@Excel(name = "审核备注")
|
||||||
|
private String reviewRemarks;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算方式(1-现金,2-油卡)")
|
||||||
|
private Integer settlementWay;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算币种")
|
||||||
|
private String settlementCurrency;
|
||||||
|
@ApiModelProperty("业务员ID")
|
||||||
|
private String salesmanId;
|
||||||
|
@ApiModelProperty("业务员名称")
|
||||||
|
private String salesmanName;
|
||||||
|
@ApiModelProperty("税率")
|
||||||
|
private Double taxRate;
|
||||||
|
@ApiModelProperty("收款帐户")
|
||||||
|
private String paymentAccountId;
|
||||||
|
@ApiModelProperty("收款帐户名称")
|
||||||
|
private String paymentAccountName;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费单位")
|
||||||
|
private String billingUnit;
|
||||||
|
@ApiModelProperty("计费单位2")
|
||||||
|
private String billingUnit2;
|
||||||
|
@ApiModelProperty("计费数量")
|
||||||
|
private BigDecimal billingNum;
|
||||||
|
@ApiModelProperty("计费单价")
|
||||||
|
private BigDecimal billingUnitPrice;
|
||||||
|
@ApiModelProperty("nc科目编码")
|
||||||
|
private String ncSubjectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否推送")
|
||||||
|
private Integer isPush;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库类型")
|
||||||
|
private String warehouseType;
|
||||||
|
}
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同管理详情对象 contract_manage_detail
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractManageDetailFeignDTO extends BaseVOEntity{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理详情id")
|
||||||
|
private Long contractManageDetailId;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
@Excel(name = "合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算科目类型(1-通用,2-临时)")
|
||||||
|
@Excel(name = "结算科目类型", readConverterExp = "1=-通用,2-临时")
|
||||||
|
private Integer subjectType;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级费用科目code")
|
||||||
|
@Excel(name = "一级费用科目code")
|
||||||
|
private String firstSubjectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级费用科目")
|
||||||
|
@Excel(name = "一级费用科目")
|
||||||
|
private String firstSubjectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("二级费用科目code")
|
||||||
|
@Excel(name = "二级费用科目code")
|
||||||
|
private String secondSubjectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("二级费用科目")
|
||||||
|
@Excel(name = "二级费用科目")
|
||||||
|
private String secondSubjectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费策略id")
|
||||||
|
@Excel(name = "计费策略id")
|
||||||
|
private Long accountingStrategyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费策略")
|
||||||
|
@Excel(name = "计费策略")
|
||||||
|
private String accountingStrategy;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费策略编码")
|
||||||
|
@Excel(name = "计费策略编码")
|
||||||
|
private String accountingStrategyCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费周期")
|
||||||
|
@Excel(name = "计费周期")
|
||||||
|
private String billingAttributes;
|
||||||
|
|
||||||
|
@ApiModelProperty("计费周期编码")
|
||||||
|
@Excel(name = "计费周期编码")
|
||||||
|
private String billingAttributesCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同有效日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同有效日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date subjectEffectiveDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同到期日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同到期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date subjectExpirationDate;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "组织ID集合")
|
||||||
|
private List<Long> organizationIdList;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "权限菜单ID")
|
||||||
|
private Long permissionMenuId;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据类型code")
|
||||||
|
private String documentTypeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("单据类型")
|
||||||
|
private String documentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别编码")
|
||||||
|
private String serviceItemsCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别名称")
|
||||||
|
private String serviceItemsName;
|
||||||
|
}
|
||||||
+228
@@ -0,0 +1,228 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同管理对象 contract_manage
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractManageFeignDTO extends BaseVOEntity{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("原始合同编号")
|
||||||
|
@Excel(name = "原始合同编号")
|
||||||
|
private String originalContractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
@Excel(name = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否通用合同(1-是,2-否)")
|
||||||
|
@Excel(name = "是否通用合同", readConverterExp = "1=-是,2-否")
|
||||||
|
private Integer commonContractFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同类型(1-仓储,2-运输,3-其他)")
|
||||||
|
@Excel(name = "合同类型", readConverterExp = "1=-仓储,2-运输,3=-其他")
|
||||||
|
private Integer contractType;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同状态(1-未生效,2-使用中,3-已过期,4-已作废)")
|
||||||
|
@Excel(name = "合同状态", readConverterExp = "1=-未生效,2-使用中,3-已过期,4-已作废")
|
||||||
|
private Integer contractState;
|
||||||
|
|
||||||
|
@ApiModelProperty("签订单位")
|
||||||
|
@Excel(name = "签订单位")
|
||||||
|
private String signingUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算主体")
|
||||||
|
@Excel(name = "结算主体")
|
||||||
|
private String settlementCustomers;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算主体id")
|
||||||
|
@Excel(name = "结算主体id")
|
||||||
|
private Long settlementCustomersId;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算主体code")
|
||||||
|
@Excel(name = "结算主体code")
|
||||||
|
private String settlementCustomersCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("我司身份(1-甲方,2-乙方)")
|
||||||
|
@Excel(name = "我司身份", readConverterExp = "1=-甲方,2-乙方")
|
||||||
|
private Integer ourIdentity;
|
||||||
|
|
||||||
|
@ApiModelProperty("账期(1-每月,2-双月,3-季度)")
|
||||||
|
@Excel(name = "账期", readConverterExp = "1=-每月,2-双月,3-季度")
|
||||||
|
private Integer accountingPeriod;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同签订日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同签订日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date signingDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同生效日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同生效日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date effectiveDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同到期日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同到期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date expirationDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同正本附件地址")
|
||||||
|
@Excel(name = "合同正本附件地址")
|
||||||
|
private String contractOriginalUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("廉政协议附件地址")
|
||||||
|
@Excel(name = "廉政协议附件地址")
|
||||||
|
private String integrityAgreementUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全协议附件地址")
|
||||||
|
@Excel(name = "安全协议附件地址")
|
||||||
|
private String securityProtocolUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他附件地址")
|
||||||
|
@Excel(name = "其他附件地址")
|
||||||
|
private String otherAttachmentsUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同正本附件原始文件名")
|
||||||
|
private String contractOriginalName;
|
||||||
|
|
||||||
|
@ApiModelProperty("廉政协议附件原始文件名")
|
||||||
|
private String integrityAgreementName;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全协议附件原始文件名")
|
||||||
|
private String securityProtocolName;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他附件原始文件名(多文件时与 otherAttachmentsUrl 同分隔符、同顺序)")
|
||||||
|
private String otherAttachmentsName;
|
||||||
|
|
||||||
|
@ApiModelProperty("我司签订人")
|
||||||
|
@Excel(name = "我司签订人")
|
||||||
|
private String ourSinged;
|
||||||
|
|
||||||
|
@ApiModelProperty("我司签订人联系方式")
|
||||||
|
@Excel(name = "我司签订人联系方式")
|
||||||
|
private String ourSingedPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty("我司经办人")
|
||||||
|
@Excel(name = "我司经办人")
|
||||||
|
private String ourOperator;
|
||||||
|
|
||||||
|
@ApiModelProperty("我司经办人联系方式")
|
||||||
|
@Excel(name = "我司经办人联系方式")
|
||||||
|
private String ourOperatorPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty("对方签订人")
|
||||||
|
@Excel(name = "对方签订人")
|
||||||
|
private String theySinged;
|
||||||
|
|
||||||
|
@ApiModelProperty("对方签订人联系方式")
|
||||||
|
@Excel(name = "对方签订人联系方式")
|
||||||
|
private String theySingedPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty("对方经办人")
|
||||||
|
@Excel(name = "对方经办人")
|
||||||
|
private String theyOperator;
|
||||||
|
|
||||||
|
@ApiModelProperty("对方经办人联系方式")
|
||||||
|
@Excel(name = "对方经办人联系方式")
|
||||||
|
private String theyOperatorPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "组织ID集合")
|
||||||
|
private List<Long> organizationIdList;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "权限菜单ID")
|
||||||
|
private Long permissionMenuId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "合同科目详情列表")
|
||||||
|
private List<ContractManageDetailFeignDTO> contractManageDetailDTOList;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理ids")
|
||||||
|
private String contractManageIds;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "合同签订查询条件开始日期")
|
||||||
|
private String signingDateStart;
|
||||||
|
@ApiModelProperty(name = "合同签订查询条件结束日期")
|
||||||
|
private String signingDateEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "合同生效查询条件开始日期")
|
||||||
|
private String effectiveDateStart;
|
||||||
|
@ApiModelProperty(name = "合同生效查询条件结束日期")
|
||||||
|
private String effectiveDateEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "合同到期查询条件开始日期")
|
||||||
|
private String expirationDateStart;
|
||||||
|
@ApiModelProperty(name = "合同到期查询条件结束日期")
|
||||||
|
private String expirationDateEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "结算主体基础数据id(可以是用户id也可以是企业id)")
|
||||||
|
private String settlementId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "是否自动出账(1-是,2-否)")
|
||||||
|
private Integer automaticFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("出账日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date paymentDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "出账天数")
|
||||||
|
private Integer billDays;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "主体类型(1-货主,2-客户,3-承运商)")
|
||||||
|
private Integer principalType;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型")
|
||||||
|
private String customerType;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型编码")
|
||||||
|
private String customerTypeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
||||||
|
private Integer transportationCosts;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型")
|
||||||
|
private String contractRentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型编码")
|
||||||
|
private String contractRentTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型")
|
||||||
|
private String warehouseTempLayerType;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型编码")
|
||||||
|
private String warehouseTempLayerTypeName;
|
||||||
|
}
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractManageParametersFeign extends BaseVOEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
@Excel(name = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合约信息规则维护")
|
||||||
|
@Excel(name = "合约信息规则维护表")
|
||||||
|
private String parametersJson;
|
||||||
|
}
|
||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电子签名同步DTO(WMS端通过Feign调用OMS)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ElectronicSignatureSyncDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("订单ID")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty("订单号")
|
||||||
|
private String orderNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("订单类型:IN-入库 OUT-出库")
|
||||||
|
private String orderType;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库ID")
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库编码")
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建人姓名")
|
||||||
|
private String createByName;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料明细列表")
|
||||||
|
private List<MaterialDetailItem> materialDetailList;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MaterialDetailItem {
|
||||||
|
|
||||||
|
@ApiModelProperty("物料基础信息ID")
|
||||||
|
private Long materialBaseInfoId;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料编码")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料名称")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位代码")
|
||||||
|
private String unitCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位名称")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ApiModelProperty("批次号")
|
||||||
|
private String batchNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("LOT编号")
|
||||||
|
private String lotNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库ID")
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库编码")
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
@ApiModelProperty("库区ID")
|
||||||
|
private Long storageSectionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("库区编码")
|
||||||
|
private String storageSectionCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("库区名称")
|
||||||
|
private String storageSectionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("库位ID")
|
||||||
|
private Long storageLocationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("库位编码")
|
||||||
|
private String storageLocationCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("库位名称")
|
||||||
|
private String storageLocationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("业务唯一ID")
|
||||||
|
private Long uniqueId;
|
||||||
|
}
|
||||||
|
}
|
||||||
+26
-3
@@ -240,9 +240,7 @@ public class InMaterialDetail extends BaseVOEntity {
|
|||||||
@ApiModelProperty("父级唯一Id")
|
@ApiModelProperty("父级唯一Id")
|
||||||
private Long parentUniqueId;
|
private Long parentUniqueId;
|
||||||
|
|
||||||
@ApiModelProperty("备注")
|
|
||||||
@Excel(name = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@ApiModelProperty("越库单id")
|
@ApiModelProperty("越库单id")
|
||||||
private Long overStockId;
|
private Long overStockId;
|
||||||
@@ -376,4 +374,29 @@ public class InMaterialDetail extends BaseVOEntity {
|
|||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
private Date drinkDate;
|
private Date drinkDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("过期日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date expiryDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("来货验收是否合格;1 合格,0 不合格")
|
||||||
|
@Excel(name = "来货验收是否合格;1 合格,0 不合格")
|
||||||
|
private String arrivalAcceptQualified;
|
||||||
|
|
||||||
|
@ApiModelProperty("包装是否破损;1 破损,0 完好")
|
||||||
|
@Excel(name = "包装是否破损;1 破损,0 完好")
|
||||||
|
private String packageDamaged;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否解冻 / 水渍;1 是,0 否")
|
||||||
|
@Excel(name = "是否解冻 / 水渍;1 是,0 否")
|
||||||
|
private String isThawWaterstain;
|
||||||
|
|
||||||
|
@ApiModelProperty("问题货是否已通知客户;1 已通知,0 未通知")
|
||||||
|
@Excel(name = "问题货是否已通知客户;1 已通知,0 未通知")
|
||||||
|
private String notifyCustomerAbnormal;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String remark;
|
||||||
}
|
}
|
||||||
+22
@@ -244,4 +244,26 @@ public class MaterialBaseInfoFeign extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty(name = "单位")
|
@ApiModelProperty(name = "单位")
|
||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "组织(多个用,分开)")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "是否正常物料: 0-是 1-否")
|
||||||
|
private Integer isNormalMaterial;
|
||||||
|
|
||||||
|
@ApiModelProperty("每月仓租")
|
||||||
|
@Excel(name = "每月仓租")
|
||||||
|
private BigDecimal monthlyWarehouseRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("半月仓租")
|
||||||
|
@Excel(name = "半月仓租")
|
||||||
|
private BigDecimal halfMonthWarehouseRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("每月仓租单位")
|
||||||
|
@Excel(name = "每月仓租单位")
|
||||||
|
private String monthlyWarehouseRentUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("半月仓租单位")
|
||||||
|
@Excel(name = "半月仓租单位")
|
||||||
|
private String halfMonthWarehouseRentUnit;
|
||||||
}
|
}
|
||||||
+2
@@ -83,6 +83,8 @@ public class MaterialInventoryOmsParamDO extends BaseVOEntity {
|
|||||||
private Date productionDate;
|
private Date productionDate;
|
||||||
//过期日期
|
//过期日期
|
||||||
private Date expiryDate;
|
private Date expiryDate;
|
||||||
|
//进货日期
|
||||||
|
private Date purchaseDate;
|
||||||
|
|
||||||
private String executioOrderNumber;
|
private String executioOrderNumber;
|
||||||
|
|
||||||
|
|||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OMS→WMS 批量签名 Feign DTO
|
||||||
|
*
|
||||||
|
* <p>OMS端批量签名时,通过此DTO调用WMS的批量签名接口,
|
||||||
|
* 更新WMS stock_in_order / stock_out_order 表的签名字段。</p>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SignatureBatchFeignDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("入库单ID列表")
|
||||||
|
private List<Long> inOrderIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("出库单ID列表")
|
||||||
|
private List<Long> outOrderIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("签名状态:2-已签名")
|
||||||
|
private Integer signatureStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("签名时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date signatureTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("手写签名图片(base64或URL,单张)")
|
||||||
|
private String signaturePic;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍照取证图片(逗号分隔多张URL)")
|
||||||
|
private String evidencePics;
|
||||||
|
|
||||||
|
@ApiModelProperty("签名备注")
|
||||||
|
private String signatureRemark;
|
||||||
|
}
|
||||||
@@ -50,8 +50,8 @@ public class StockOutOrder extends BaseVOEntity {
|
|||||||
@Excel(name = "出库单号")
|
@Excel(name = "出库单号")
|
||||||
private String outOrderNumber;
|
private String outOrderNumber;
|
||||||
|
|
||||||
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核")
|
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核 13-已交接")
|
||||||
@Excel(name = "出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核")
|
@Excel(name = "出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核 13-已交接")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty("出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
@ApiModelProperty("出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||||
@@ -405,4 +405,13 @@ public class StockOutOrder extends BaseVOEntity {
|
|||||||
@Excel(name = "车次")
|
@Excel(name = "车次")
|
||||||
private Integer trainNo;
|
private Integer trainNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("线路编码(取自WMS线路管理)")
|
||||||
|
private String lineCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("线路名称(冗余存储)")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty("车次序号(显示: 线路编码-车次, 如31-4)")
|
||||||
|
private String shuttleNo;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -46,8 +46,8 @@ TmsOrderAddDTO implements Serializable {
|
|||||||
@ApiModelProperty(value = "装货电话")
|
@ApiModelProperty(value = "装货电话")
|
||||||
private String loadingPhone="";
|
private String loadingPhone="";
|
||||||
@ApiModelProperty(value = "装货时间日期(年月日)",required = true)
|
@ApiModelProperty(value = "装货时间日期(年月日)",required = true)
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private java.util.Date loadingDate;
|
private java.util.Date loadingDate;
|
||||||
// @ApiModelProperty(value = "装货时间(上午、下午、24小时)")
|
// @ApiModelProperty(value = "装货时间(上午、下午、24小时)")
|
||||||
// private String loadingTime="";
|
// private String loadingTime="";
|
||||||
|
|||||||
+23
-1
@@ -116,6 +116,28 @@ public class WarehouseFeignPO extends BaseVOEntity{
|
|||||||
@Excel(name = "是否作废: 1-否 2-是")
|
@Excel(name = "是否作废: 1-否 2-是")
|
||||||
private Integer nullify;
|
private Integer nullify;
|
||||||
|
|
||||||
|
@ApiModelProperty("任务模式")
|
||||||
|
@Excel(name = "任务模式")
|
||||||
|
private String taskMode;
|
||||||
|
|
||||||
|
@ApiModelProperty("作业模式")
|
||||||
|
@Excel(name = "作业模式")
|
||||||
|
private String workMode;
|
||||||
|
|
||||||
}
|
@ApiModelProperty("订单号生成规则(0-日期累加 1-历史累加)")
|
||||||
|
@Excel(name = "单号生成规则")
|
||||||
|
private String orderNoGenerateRule;
|
||||||
|
|
||||||
|
@ApiModelProperty("入库单号首字母前缀")
|
||||||
|
@Excel(name = "入库单号首字母前缀")
|
||||||
|
private String inOrderNoPrefix;
|
||||||
|
|
||||||
|
@ApiModelProperty("出库单号首字母前缀")
|
||||||
|
@Excel(name = "出库单号首字母前缀")
|
||||||
|
private String outOrderNoPrefix;
|
||||||
|
|
||||||
|
@ApiModelProperty("样品出库单号首字母前缀")
|
||||||
|
@Excel(name = "样品出库单号首字母前缀")
|
||||||
|
private String sampleOutOrderNoPrefix;
|
||||||
|
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
package com.mhd.system.api.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库联动树节点(Feign侧)
|
||||||
|
* 镜像system端WarehouseLinkagePO/StorageSectionLinkagePO/StorageLocationLinkagePO三级结构:仓库→库区→库位
|
||||||
|
*
|
||||||
|
* @author rcx
|
||||||
|
* @date 2026-08-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WarehouseLinkageFeignPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 仓库id / 库区id(storageSectionId) / 库位id(storageLocationId) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** warehouseCode / storageCode / storageLocationCode */
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/** warehouseName / storageName / storageLocationName */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 下级节点:仓库下为库区列表,库区下为库位列表,库位无children */
|
||||||
|
private List<WarehouseLinkageFeignPO> children;
|
||||||
|
}
|
||||||
+17
-1
@@ -6,6 +6,7 @@ import com.mhd.common.core.domain.po.OrganizationPo;
|
|||||||
import com.mhd.common.core.web.domain.AjaxResult;
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
import com.mhd.system.api.BmsServiceFeign;
|
import com.mhd.system.api.BmsServiceFeign;
|
||||||
import com.mhd.system.api.ProductServiceFeign;
|
import com.mhd.system.api.ProductServiceFeign;
|
||||||
|
import com.mhd.system.api.domain.BusinessDocumentFeign;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
@@ -66,6 +67,21 @@ public class RemoteBmsFeignFallbackFactory implements FallbackFactory<BmsService
|
|||||||
public AjaxResult wholeRentSynchronizationZXF(BusinessDataPushDTO businessDataPushDTO) {
|
public AjaxResult wholeRentSynchronizationZXF(BusinessDataPushDTO businessDataPushDTO) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult feignSaveBusinessDocument(BusinessDocumentFeign businessDocumentFeign) {
|
||||||
|
return AjaxResult.error("保存业务单据失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getListBySettlementCustomersId(Long settlementCustomersId) {
|
||||||
|
return AjaxResult.error(throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult updatePushContractManageJobId(Long settlementCustomersId, Integer jobId) {
|
||||||
|
return AjaxResult.error(throwable.getMessage());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
@@ -41,6 +41,11 @@ public class RemoteOmsFeignFallbackFactory implements FallbackFactory<OmsService
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult returnInResult(String orderNumber, Long status, String type) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult pushOutOrder(StockOutOrderTZPD stockOutOrder) {
|
public AjaxResult pushOutOrder(StockOutOrderTZPD stockOutOrder) {
|
||||||
return null;
|
return null;
|
||||||
@@ -90,6 +95,11 @@ public class RemoteOmsFeignFallbackFactory implements FallbackFactory<OmsService
|
|||||||
public AjaxResult batchPushByNumber(List<String> numberList) {
|
public AjaxResult batchPushByNumber(List<String> numberList) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult saveSignature(ElectronicSignatureSyncDTO saveDTO) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+18
@@ -13,6 +13,8 @@ import com.mhd.common.core.web.domain.AjaxResult;
|
|||||||
import com.mhd.system.api.AssociationWarehouseFeign;
|
import com.mhd.system.api.AssociationWarehouseFeign;
|
||||||
import com.mhd.system.api.SystemServiceFeign;
|
import com.mhd.system.api.SystemServiceFeign;
|
||||||
import com.mhd.system.api.domain.ContainerFeignPO;
|
import com.mhd.system.api.domain.ContainerFeignPO;
|
||||||
|
import com.mhd.system.api.domain.ContractManageFeignDTO;
|
||||||
|
import com.mhd.system.api.domain.ContractManageParametersFeign;
|
||||||
import com.mhd.system.api.domain.SysDictData;
|
import com.mhd.system.api.domain.SysDictData;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -20,6 +22,7 @@ import org.springframework.cloud.openfeign.FallbackFactory;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -184,6 +187,11 @@ public class RemoteSystemFeignFallbackFactory implements FallbackFactory<SystemS
|
|||||||
return AjaxResult.error("根据仓库ID获取仓库信息失败");
|
return AjaxResult.error("根据仓库ID获取仓库信息失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getWarehouseChildren(@RequestParam("warehouseId") Long warehouseId) {
|
||||||
|
return AjaxResult.error("根据仓库ID获取仓库及下库区及库位树失败");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getStorageSectionInfoByStorageSectionId(@PathVariable("storageSectionId") Long storageSectionId) {
|
public AjaxResult getStorageSectionInfoByStorageSectionId(@PathVariable("storageSectionId") Long storageSectionId) {
|
||||||
return AjaxResult.error("根据库区ID获取库区信息失败");
|
return AjaxResult.error("根据库区ID获取库区信息失败");
|
||||||
@@ -312,6 +320,16 @@ public class RemoteSystemFeignFallbackFactory implements FallbackFactory<SystemS
|
|||||||
public AjaxResult matchForMaterialImport(String keyword, Long organizationId) {
|
public AjaxResult matchForMaterialImport(String keyword, Long organizationId) {
|
||||||
return AjaxResult.error("物料分类匹配失败");
|
return AjaxResult.error("物料分类匹配失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult feignSave(ContractManageFeignDTO contractManageFeignDTO) {
|
||||||
|
return AjaxResult.error("新增合同失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult feignSaveContractParameters(ContractManageParametersFeign contractManageParametersFeign) {
|
||||||
|
return AjaxResult.error("保存合同参数失败");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
@@ -140,6 +140,11 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
|||||||
return AjaxResult.error("获取租户托运人失败");
|
return AjaxResult.error("获取租户托运人失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult<?> userShipperListAllByOrg(Long orgCode) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult<?> userDriverListAll() {
|
public AjaxResult<?> userDriverListAll() {
|
||||||
return AjaxResult.error("获取租户承运人失败");
|
return AjaxResult.error("获取租户承运人失败");
|
||||||
@@ -170,6 +175,11 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
|||||||
return R.fail("获取组织用户失败:" + throwable.getMessage());
|
return R.fail("获取组织用户失败:" + throwable.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<LoginUser> getUserByUserAccount(String userAccount) {
|
||||||
|
return R.fail("获取用户失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<LoginUser> getUserByTopOrganizationUserPhone(@RequestBody UserDTO userDTO, String source) {
|
public R<LoginUser> getUserByTopOrganizationUserPhone(@RequestBody UserDTO userDTO, String source) {
|
||||||
return R.fail("获取组织用户失败:" + throwable.getMessage());
|
return R.fail("获取组织用户失败:" + throwable.getMessage());
|
||||||
|
|||||||
+6
@@ -551,6 +551,12 @@ public class RemoteWlhyFallbackFactory implements FallbackFactory<WlhyServiceFei
|
|||||||
return AjaxResult.error(cause.getMessage());
|
return AjaxResult.error(cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult deleteChainByExecuteOrderNumber(String executeOrderNumber) {
|
||||||
|
//返回错误而非静默成功, 让OMS反审事务能感知失败并整体回滚
|
||||||
|
return AjaxResult.error("TMS反审联动软删链路失败(服务降级):" + cause.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult<?> queryList(Integer pageNo, Integer pageSize, String pushStatus, String organizationId) {
|
public AjaxResult<?> queryList(Integer pageNo, Integer pageSize, String pushStatus, String organizationId) {
|
||||||
return AjaxResult.error(cause.getMessage());
|
return AjaxResult.error(cause.getMessage());
|
||||||
|
|||||||
+53
-8
@@ -57,25 +57,38 @@ public class RemoteWmsFallbackFactory implements FallbackFactory<WmsServiceFeign
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void omsOutOrderAdd(StockOutOrder stockOutOrder) {
|
public AjaxResult omsOutOrderAdd(StockOutOrder stockOutOrder) {
|
||||||
|
//返回错误而非静默成功: 降级吞掉会让OMS继续走分配, 残留"有单无明细"的垃圾单
|
||||||
|
return AjaxResult.error("WMS下发单保存失败(服务降级):" + cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void omsOutOrderAddDetail(List<OutMaterialDetail> outMaterialDetails) {
|
public AjaxResult omsOutOrderAddDetail(List<OutMaterialDetail> outMaterialDetails) {
|
||||||
|
return AjaxResult.error("WMS下发单明细保存失败(服务降级):" + cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void omsOutOrderAddDeliveryDetailsLink(List<DeliveryDetailsLink> deliveryDetailsLinks) {
|
public AjaxResult omsOutOrderAddDeliveryDetailsLink(List<DeliveryDetailsLink> deliveryDetailsLinks) {
|
||||||
|
return AjaxResult.error("WMS下发单配送明细保存失败(服务降级):" + cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void omsInOrderAdd(StockInOrder stockInOrder) {
|
public AjaxResult omsInOrderAdd(StockInOrder stockInOrder) {
|
||||||
|
//返回错误而非静默成功:下发主单保存失败必须让OMS感知并回滚下发标记,
|
||||||
|
//否则OMS显示已下发、WMS无数据,下游收货流程无从进行(流程阻断)
|
||||||
|
return AjaxResult.error("WMS入库单保存失败(服务降级):" + cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void omsCancelExecutionOrder(StockOutOrder stockOutOrder) {
|
public AjaxResult omsCancelExecutionOrder(StockOutOrder stockOutOrder) {
|
||||||
|
//返回错误而非静默成功,让OMS侧补偿清理能感知失败并记录告警
|
||||||
|
return AjaxResult.error("WMS取消下发清理失败:" + cause.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult omsReverseExecutionOrder(StockOutOrder stockOutOrder) {
|
||||||
|
//返回错误而非静默成功,让OMS反审事务能感知失败并整体回滚
|
||||||
|
return AjaxResult.error("WMS出库执行单反审失败(服务降级):" + cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -85,11 +98,31 @@ public class RemoteWmsFallbackFactory implements FallbackFactory<WmsServiceFeign
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult execution(StockOutOrderDTO stockOutOrderDTO) {
|
public AjaxResult execution(StockOutOrderDTO stockOutOrderDTO) {
|
||||||
return null;
|
return AjaxResult.error(cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void omsInOrderAddDetail(List<InMaterialDetail> inMaterialDetails) {
|
public AjaxResult checkOmsAssignInventory(List<OutMaterialDetail> outMaterialDetails) {
|
||||||
|
//校验接口本身不可用时返回错误,OMS会阻止下发(不能在WMS状态未知时盲目推送)
|
||||||
|
return AjaxResult.error("WMS库存校验服务不可用:" + cause.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult omsInOrderAddDetail(List<InMaterialDetail> inMaterialDetails) {
|
||||||
|
//返回错误而非静默成功:明细保存(含自动审核)失败必须让OMS感知并回滚下发标记
|
||||||
|
return AjaxResult.error("WMS入库单明细保存失败(服务降级):" + cause.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult omsCancelInOrder(StockInOrder stockInOrder) {
|
||||||
|
//返回错误而非静默成功,让OMS侧取消下发能感知清理失败并整体回滚(取消下发可重试,WMS清理幂等)
|
||||||
|
return AjaxResult.error("WMS取消下发清理失败:" + cause.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult omsReverseInOrder(StockInOrder stockInOrder) {
|
||||||
|
//返回错误而非静默成功,让OMS侧反审能感知回退失败并整体回滚(反审可重试,WMS回退幂等)
|
||||||
|
return AjaxResult.error("WMS入库单反审回退失败(服务降级):" + cause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -119,6 +152,18 @@ public class RemoteWmsFallbackFactory implements FallbackFactory<WmsServiceFeign
|
|||||||
public AjaxResult genPickingOrderByOms(StockOutOrderDTO stockOutOrderDTO) {
|
public AjaxResult genPickingOrderByOms(StockOutOrderDTO stockOutOrderDTO) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult batchSignWms(SignatureBatchFeignDTO dto) {
|
||||||
|
log.error("WMS批量签名调用失败");
|
||||||
|
return AjaxResult.error("WMS批量签名调用失败:" + cause.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult listLineManagement(String routeCode) {
|
||||||
|
log.error("OMS查询WMS线路管理失败, routeCode:{}", routeCode);
|
||||||
|
return AjaxResult.error("WMS线路管理查询失败:" + cause.getMessage());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
package com.mhd.system.api.factory;
|
||||||
|
|
||||||
|
import com.mhd.common.core.domain.dto.BusinessDataPushDTO;
|
||||||
|
import com.mhd.common.core.domain.entity.R;
|
||||||
|
import com.mhd.common.core.domain.po.OrganizationPo;
|
||||||
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
|
import com.mhd.system.api.BmsServiceFeign;
|
||||||
|
import com.mhd.system.api.ProductServiceFeign;
|
||||||
|
import com.mhd.system.api.XxlJobServiceFeign;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author zg
|
||||||
|
* @Version 1.0
|
||||||
|
* @Date 2023/11/3 14:37
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class RemoteXxlJobFeignFallbackFactory implements FallbackFactory<XxlJobServiceFeign> {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoteXxlJobFeignFallbackFactory.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public XxlJobServiceFeign create(Throwable throwable) {
|
||||||
|
log.error("系统服务调用失败:{}", throwable.getMessage());
|
||||||
|
return new XxlJobServiceFeign() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Map<String, Object>> openFeignTest(String string) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
+54
-21
@@ -179,34 +179,67 @@ public class TokenLoginApplicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册
|
* App注册(手机号 + 注册短信验证码 + 密码)
|
||||||
*/
|
*/
|
||||||
public void register(String username, String password) {
|
public void register(LoginDTO loginDTO) {
|
||||||
// 用户名或密码为空 错误
|
String userPhone = loginDTO.getUserPhone(); // LoginDTO.java:27-28
|
||||||
if (StringUtils.isAnyBlank(username, password)) {
|
String verificationCode = loginDTO.getVerificationCode(); // LoginDTO.java:30-31
|
||||||
throw new ServiceException("用户/密码必须填写");
|
String password = loginDTO.getPassword();
|
||||||
|
|
||||||
|
// 1. 基础校验
|
||||||
|
if (StringUtils.isAnyBlank(userPhone, verificationCode, password)) {
|
||||||
|
throw new ServiceException("手机号、验证码、密码必须填写");
|
||||||
}
|
}
|
||||||
if (username.length() < UserConstants.USERNAME_MIN_LENGTH
|
if (!RegexUtil.isPhoneLegal(userPhone)) {
|
||||||
|| username.length() > UserConstants.USERNAME_MAX_LENGTH) {
|
throw new DigitalLogisticsException(UserError.USER_PHONE_REG_ERROR);
|
||||||
throw new ServiceException("账户长度必须在2到20个字符之间");
|
|
||||||
}
|
|
||||||
if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
|
||||||
|| password.length() > UserConstants.PASSWORD_MAX_LENGTH) {
|
|
||||||
throw new ServiceException("密码长度必须在5到20个字符之间");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注册用户信息
|
// 2. 校验注册短信验证码(发送时写入 redis,见 SmsApplicationService.java:112, :165)
|
||||||
SysUser sysUser = new SysUser();
|
String key = CacheConstants.SMS_REGISTER + userPhone; // "sms_register:" CacheConstants.java:51
|
||||||
sysUser.setUserName(username);
|
Object cache = redisService.getCacheObject(key);
|
||||||
sysUser.setNickName(username);
|
if (cache == null || !ObjectUtil.equal(String.valueOf(cache), verificationCode)) {
|
||||||
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
recordLogininfor(userPhone, Constants.LOGIN_FAIL, "注册验证码错误", 1);
|
||||||
//TODO app注册没写
|
throw new ServiceException("验证码错误或已过期");
|
||||||
/*R<?> registerResult = userServiceFeign.registerUserInfo(sysUser, SecurityConstants.INNER);
|
}
|
||||||
|
|
||||||
|
// 3. 域名 → 一级组织(与 loginByVerificationCode :103-110 一致)
|
||||||
|
String path = loginDTO.getPath();
|
||||||
|
AjaxResult topOrganizationIdR = organizationServiceFeign.getOrganizationByPath(path);
|
||||||
|
if (ObjectUtil.isNull(topOrganizationIdR) || ObjectUtil.isNull(topOrganizationIdR.get("data"))) {
|
||||||
|
throw new ServiceException("组织不存在,请检查登录域名");
|
||||||
|
}
|
||||||
|
SysTenantsPo sysTenantsPo = JSON.parseObject(JSON.toJSONString(topOrganizationIdR.get("data")), SysTenantsPo.class);
|
||||||
|
Long topOrganizationId = sysTenantsPo.getOrganizationId();
|
||||||
|
Long selectedOrgId = loginDTO.getOrganizationId(); // LoginDTO.java:37-38,App 选择组织时传
|
||||||
|
Long organizationId = (selectedOrgId != null) ? selectedOrgId : topOrganizationId;
|
||||||
|
|
||||||
|
// 4. 手机号已注册则直接提示(UserMapper.xml:199 按 user_phone+top_organization_id 查)
|
||||||
|
UserDTO query = new UserDTO();
|
||||||
|
query.setUserPhone(userPhone);
|
||||||
|
query.setTopOrganizationId(topOrganizationId);
|
||||||
|
R<LoginUser> exist = userServiceFeign.getUserByTopOrganizationUserPhone(query, SecurityConstants.INNER);
|
||||||
|
if (exist != null && exist.getData() != null && exist.getData().getUserPo() != null) {
|
||||||
|
throw new ServiceException("该手机号已注册,请直接登录");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 创建用户(复用验证码登录自动注册的同一链路:
|
||||||
|
// auth feign UserServiceFeign.java:47-48 → user-center UserAPI.java:332-336
|
||||||
|
// → UserApplicationService.registerAddUser:1820-1927,内部已处理默认角色/YMS同步)
|
||||||
|
UserDTO userDTO = new UserDTO();
|
||||||
|
userDTO.setUserPhone(userPhone);
|
||||||
|
userDTO.setUserPassword(SecurityUtils.encryptPassword(password));
|
||||||
|
userDTO.setTopOrganizationId(topOrganizationId);
|
||||||
|
userDTO.setOrganizationId(organizationId);
|
||||||
|
userDTO.setOrganizationName(StringUtils.isNotBlank(loginDTO.getOrganizationName())
|
||||||
|
? loginDTO.getOrganizationName() : sysTenantsPo.getOrganizationName());
|
||||||
|
R<LoginUser> registerResult = userServiceFeign.registerAddUser(userDTO, SecurityConstants.INNER);
|
||||||
if (R.FAIL == registerResult.getCode()) {
|
if (R.FAIL == registerResult.getCode()) {
|
||||||
throw new ServiceException(registerResult.getMsg());
|
throw new ServiceException(registerResult.getMsg());
|
||||||
}*/
|
}
|
||||||
// recordLogininfor(username, Constants.REGISTER, "注册成功");
|
|
||||||
|
// 6. 注册成功后清掉验证码并记日志
|
||||||
|
redisService.deleteObject(key);
|
||||||
|
recordLogininfor(userPhone, Constants.REGISTER, "注册成功", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ public class AppTokenController extends BaseController {
|
|||||||
|
|
||||||
@PostMapping("register")
|
@PostMapping("register")
|
||||||
public R<?> register(@RequestBody LoginDTO loginDTO) {
|
public R<?> register(@RequestBody LoginDTO loginDTO) {
|
||||||
// 用户注册
|
// 用户注册(手机号+短信验证码+密码)
|
||||||
tokenLoginApplicationService.register(loginDTO.getUsername(), loginDTO.getPassword());
|
tokenLoginApplicationService.register(loginDTO);
|
||||||
return R.ok();
|
return R.ok("注册成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.mhd.auth.system.controller;
|
||||||
|
|
||||||
|
import com.mhd.auth.system.service.SsoAuthorizeService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
|
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.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSO单点登录控制器
|
||||||
|
* 子系统端实现:接收中台传递的签名参数,验签后自动登录并重定向
|
||||||
|
*
|
||||||
|
* @author mhd
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/auth")
|
||||||
|
@CrossOrigin
|
||||||
|
public class SsoAuthorizeController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SsoAuthorizeService ssoAuthorizeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSO单点登录授权接口
|
||||||
|
* 中台点击子系统链接后,将签名参数传递给此接口
|
||||||
|
* 验签通过后自动登录并重定向到前端页面,携带token
|
||||||
|
*
|
||||||
|
* @param signature 签名信息(Base64编码后再URL编码),签名源数据格式:appkey=xxx&account=xxx×tamp=xxxxxx
|
||||||
|
* @param appkey 对方的应用key,值固定为nanguang
|
||||||
|
* @param account 账号
|
||||||
|
* @param timestamp 当前时间戳(毫秒),用于防止签名被盗用,超过24小时视为失效
|
||||||
|
*/
|
||||||
|
@GetMapping("/sso-authorize")
|
||||||
|
public void ssoAuthorize(@RequestParam("signature") String signature,
|
||||||
|
@RequestParam("appkey") String appkey,
|
||||||
|
@RequestParam("account") String account,
|
||||||
|
@RequestParam("timestamp") Long timestamp,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
log.info("SSO单点登录请求, appkey={}, account={}, timestamp={}", appkey, account, timestamp);
|
||||||
|
|
||||||
|
String redirectUrl = ssoAuthorizeService.getRedirectUrl();
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. 校验时间戳是否超过24小时,防止签名被盗用
|
||||||
|
long ONE_DAY_MILLIS = 24L * 60 * 60 * 1000;
|
||||||
|
long currentTime = System.currentTimeMillis();
|
||||||
|
if ((currentTime - timestamp) > ONE_DAY_MILLIS) {
|
||||||
|
log.warn("SSO签名已过期, appkey={}, account={}, timestamp={}, 距今{}小时",
|
||||||
|
appkey, account, timestamp, (currentTime - timestamp) / (60 * 60 * 1000));
|
||||||
|
response.sendRedirect(redirectUrl + "?msg=" + URLEncoder.encode("登录失败:签名已超过24小时,请重新发起", StandardCharsets.UTF_8.name()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 构造签名源数据(包含timestamp)
|
||||||
|
String sourceData = "appkey=" + appkey + "&account=" + account + "×tamp=" + timestamp;
|
||||||
|
|
||||||
|
// 3. 验证签名
|
||||||
|
boolean verifyResult = ssoAuthorizeService.verifySignature(sourceData, signature);
|
||||||
|
if (!verifyResult) {
|
||||||
|
log.warn("SSO验签失败, appkey={}, account={}, timestamp={}", appkey, account, timestamp);
|
||||||
|
response.sendRedirect(redirectUrl + "?msg=" + URLEncoder.encode("登录失败:签名验证不通过", StandardCharsets.UTF_8.name()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 验签通过,使用account进行登录,获取token
|
||||||
|
Map<String, Object> loginResult = ssoAuthorizeService.ssoLogin(account);
|
||||||
|
String accessToken = (String) loginResult.get("access_token");
|
||||||
|
|
||||||
|
// 5. 重定向到前端页面,token通过URL参数传递
|
||||||
|
// 前端页面需读取URL中的token参数并存入localStorage
|
||||||
|
log.info("SSO单点登录成功, account={}", account);
|
||||||
|
log.info("SSO单点登录成功, account={}, token={} , redirectUrl={}", account, accessToken, redirectUrl);
|
||||||
|
response.sendRedirect(redirectUrl + "?token=" + URLEncoder.encode(accessToken, StandardCharsets.UTF_8.name()));
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("SSO单点登录异常, appkey={}, account={}, timestamp={}", appkey, account, timestamp, e);
|
||||||
|
response.sendRedirect(redirectUrl + "?msg=" + URLEncoder.encode("登录失败:" + e.getMessage(), StandardCharsets.UTF_8.name()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
package com.mhd.auth.system.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.mhd.common.core.constant.CacheConstants;
|
||||||
|
import com.mhd.common.core.constant.Constants;
|
||||||
|
import com.mhd.common.core.constant.SecurityConstants;
|
||||||
|
import com.mhd.common.core.domain.entity.R;
|
||||||
|
import com.mhd.common.core.domain.po.OrganizationPo;
|
||||||
|
import com.mhd.common.core.domain.po.RolePO;
|
||||||
|
import com.mhd.common.core.domain.po.UserPo;
|
||||||
|
import com.mhd.common.core.enums.UserStatus;
|
||||||
|
import com.mhd.common.core.exception.ServiceException;
|
||||||
|
import com.mhd.common.core.utils.ServletUtils;
|
||||||
|
import com.mhd.common.core.utils.ip.IpUtil;
|
||||||
|
import com.mhd.common.core.utils.ip.IpUtils;
|
||||||
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
|
import com.mhd.common.log.service.AsyncLogService;
|
||||||
|
import com.mhd.common.security.service.TokenService;
|
||||||
|
import com.mhd.system.api.SystemServiceFeign;
|
||||||
|
import com.mhd.system.api.UserServiceFeign;
|
||||||
|
import com.mhd.system.api.domain.UserDTO;
|
||||||
|
import com.mhd.system.api.domain.UserUpdateDTO;
|
||||||
|
import com.mhd.system.api.model.LoginUser;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.security.KeyFactory;
|
||||||
|
import java.security.PublicKey;
|
||||||
|
import java.security.Signature;
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSO单点登录服务
|
||||||
|
*
|
||||||
|
* @author mhd
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class SsoAuthorizeService {
|
||||||
|
|
||||||
|
@Value("${sso.public-key}")
|
||||||
|
private String publicKeyStr;
|
||||||
|
|
||||||
|
@Value("${sso.redirect-url}")
|
||||||
|
private String redirectUrl;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UserServiceFeign userServiceFeign;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TokenService tokenService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AsyncLogService asyncLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SystemServiceFeign systemServiceFeign;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private com.mhd.auth.app.infrastructure.feign.OrganizationServiceFeign organizationServiceFeign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证RSA签名
|
||||||
|
*
|
||||||
|
* @param sourceData 签名源数据,格式:appkey=xxx&account=xxx×tamp=xxxxxx
|
||||||
|
* @param signatureStr Base64编码的签名(可能经过URL编码)
|
||||||
|
* @return 验签结果
|
||||||
|
*/
|
||||||
|
public boolean verifySignature(String sourceData, String signatureStr) {
|
||||||
|
try {
|
||||||
|
// Spring @RequestParam 已自动完成 URL 解码,此处直接 Base64 解码即可
|
||||||
|
byte[] signatureBytes = Base64.getDecoder().decode(signatureStr);
|
||||||
|
|
||||||
|
PublicKey publicKey = generatePublicKey(publicKeyStr);
|
||||||
|
Signature signature = Signature.getInstance("SHA256withRSA");
|
||||||
|
signature.initVerify(publicKey);
|
||||||
|
signature.update(sourceData.getBytes("UTF-8"));
|
||||||
|
return signature.verify(signatureBytes);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("SSO验签失败, sourceData={}, signature={}", sourceData, signatureStr, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据公钥字符串生成PublicKey对象
|
||||||
|
*/
|
||||||
|
private PublicKey generatePublicKey(String keyStr) throws Exception {
|
||||||
|
// 去除头尾标记和空白字符
|
||||||
|
String publicKeyContent = keyStr
|
||||||
|
.replace("-----BEGIN PUBLIC KEY-----", "")
|
||||||
|
.replace("-----END PUBLIC KEY-----", "")
|
||||||
|
.replaceAll("\\s+", "");
|
||||||
|
byte[] keyBytes = Base64.getDecoder().decode(publicKeyContent);
|
||||||
|
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
|
||||||
|
java.security.spec.X509EncodedKeySpec keySpec = new java.security.spec.X509EncodedKeySpec(keyBytes);
|
||||||
|
return keyFactory.generatePublic(keySpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSO登录:根据account查找用户并创建token
|
||||||
|
*
|
||||||
|
* @param account 账号
|
||||||
|
* @return 包含token等信息的Map
|
||||||
|
*/
|
||||||
|
public Map<String, Object> ssoLogin(String account) {
|
||||||
|
// 根据账号查找用户(SSO登录不区分组织,仅通过userAccount查询)
|
||||||
|
R<LoginUser> userResult = userServiceFeign.getUserByUserAccount(account);
|
||||||
|
if (R.FAIL == userResult.getCode()) {
|
||||||
|
throw new ServiceException(userResult.getMsg());
|
||||||
|
}
|
||||||
|
if (userResult.getData() == null) {
|
||||||
|
throw new ServiceException("SSO登录用户不存在:" + account);
|
||||||
|
}
|
||||||
|
|
||||||
|
LoginUser userInfo = userResult.getData();
|
||||||
|
UserPo userPo = userInfo.getUserPo();
|
||||||
|
|
||||||
|
// 校验用户状态
|
||||||
|
if (userPo == null) {
|
||||||
|
throw new ServiceException("SSO登录用户信息异常:" + account);
|
||||||
|
}
|
||||||
|
// 删除标记
|
||||||
|
if (UserStatus.DELETED.getCode().equals(String.valueOf(userPo.getDelFlag()))) {
|
||||||
|
throw new ServiceException("对不起,您的账号:" + account + " 已被删除");
|
||||||
|
}
|
||||||
|
// 用户状态
|
||||||
|
if (UserStatus.DELETED.getCode().equals(String.valueOf(userPo.getUserStatus()))) {
|
||||||
|
throw new ServiceException("对不起,您的账号:" + account + " 已停用");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取组织信息
|
||||||
|
com.mhd.common.core.domain.entity.R<OrganizationPo> organizationInfo = organizationServiceFeign.getInfoForIdList(userPo.getOrganizationId());
|
||||||
|
if (ObjectUtil.isNull(organizationInfo) || ObjectUtil.isNull(organizationInfo.getData())) {
|
||||||
|
throw new ServiceException("登录用户组织不存在");
|
||||||
|
}
|
||||||
|
userInfo.setOrganizationPo(organizationInfo.getData());
|
||||||
|
|
||||||
|
// 查询用户角色
|
||||||
|
AjaxResult roleListAjaxResult = userServiceFeign.getRoleListByUserId(userPo.getUserId());
|
||||||
|
if ("200".equals(String.valueOf(roleListAjaxResult.get("code"))) && ObjectUtil.isNotNull(roleListAjaxResult.get("data"))) {
|
||||||
|
List<RolePO> rolePOS = JSONUtil.toList(JSONUtil.toJsonStr(roleListAjaxResult.get("data")), RolePO.class);
|
||||||
|
if (rolePOS != null && !rolePOS.isEmpty()) {
|
||||||
|
userInfo.setRoleList(rolePOS.stream().map(RolePO::getRoleName).collect(Collectors.toList()));
|
||||||
|
userInfo.setRoleIdList(rolePOS.stream().map(RolePO::getRoleId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新登录信息
|
||||||
|
UserUpdateDTO userUpdateDTO = new UserUpdateDTO();
|
||||||
|
userUpdateDTO.setLastLoginTime(new Date());
|
||||||
|
userUpdateDTO.setLastLoginIp(IpUtils.getIpAddr(ServletUtils.getRequest()));
|
||||||
|
userUpdateDTO.setUserName(account);
|
||||||
|
userServiceFeign.updateWhenLogin(userUpdateDTO, SecurityConstants.INNER);
|
||||||
|
|
||||||
|
// 创建token
|
||||||
|
Map<String, Object> result = tokenService.createTokenApi(userInfo);
|
||||||
|
|
||||||
|
// 记录登录日志
|
||||||
|
recordLogininfor(userPo, Constants.LOGIN_SUCCESS, "SSO单点登录成功", 1);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录登录信息
|
||||||
|
*/
|
||||||
|
private void recordLogininfor(UserPo userPo, String status, String message, Integer behaviorType) {
|
||||||
|
com.mhd.system.api.domain.SysLogininforPo logininfor = new com.mhd.system.api.domain.SysLogininforPo();
|
||||||
|
logininfor.setUserAccount(userPo.getUserAccount());
|
||||||
|
logininfor.setUserName(userPo.getUserName());
|
||||||
|
logininfor.setIpaddr(IpUtils.getIpAddr(ServletUtils.getRequest()));
|
||||||
|
logininfor.setLocation(StrUtil.isNotEmpty(logininfor.getIpaddr()) ? IpUtil.getLocationSplicing(logininfor.getIpaddr()) : "");
|
||||||
|
logininfor.setBehaviorType(behaviorType);
|
||||||
|
logininfor.setMsg(message);
|
||||||
|
logininfor.setOrganizationId(userPo.getOrganizationId());
|
||||||
|
logininfor.setOrganizationName(userPo.getOrganizationName());
|
||||||
|
logininfor.setTopOrganizationId(userPo.getTopOrganizationId());
|
||||||
|
logininfor.setAccessTime(cn.hutool.core.date.DateUtil.date());
|
||||||
|
if (org.apache.commons.lang3.StringUtils.equalsAny(status, Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER)) {
|
||||||
|
logininfor.setStatus(Constants.LOGIN_SUCCESS_STATUS);
|
||||||
|
} else if (Constants.LOGIN_FAIL.equals(status)) {
|
||||||
|
logininfor.setStatus(Constants.LOGIN_FAIL_STATUS);
|
||||||
|
}
|
||||||
|
asyncLogService.saveLogininfor(logininfor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRedirectUrl() {
|
||||||
|
return redirectUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -550,11 +550,11 @@ public class SysLoginService {
|
|||||||
throw new ServiceException("请输入手机号和短信验证码");
|
throw new ServiceException("请输入手机号和短信验证码");
|
||||||
}
|
}
|
||||||
|
|
||||||
//调用工具类校验,校验手机号格式错误
|
// //调用工具类校验,校验手机号格式错误
|
||||||
if (!RegexUtil.isPhoneLegal(userPhone)) {
|
// if (!RegexUtil.isPhoneLegal(userPhone)) {
|
||||||
recordLogininfor(userPhone, Constants.LOGIN_FAIL, UserError.USER_PHONE_REG_ERROR.errmsg(), 1);
|
// recordLogininfor(userPhone, Constants.LOGIN_FAIL, UserError.USER_PHONE_REG_ERROR.errmsg(), 1);
|
||||||
throw new DigitalLogisticsException(UserError.USER_PHONE_REG_ERROR);
|
// throw new DigitalLogisticsException(UserError.USER_PHONE_REG_ERROR);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//根据域名获取一级组织ID
|
//根据域名获取一级组织ID
|
||||||
AjaxResult topOrganizationIdR = organizationServiceFeign.getOrganizationByPath(path, SecurityConstants.INNER);
|
AjaxResult topOrganizationIdR = organizationServiceFeign.getOrganizationByPath(path, SecurityConstants.INNER);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.mhd.common.redis.service.RedisService;
|
|||||||
import com.mhd.common.security.utils.password.PasswordUtil;
|
import com.mhd.common.security.utils.password.PasswordUtil;
|
||||||
import com.mhd.system.api.RemoteLogService;
|
import com.mhd.system.api.RemoteLogService;
|
||||||
import com.mhd.system.api.domain.SysLogininforPo;
|
import com.mhd.system.api.domain.SysLogininforPo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -39,6 +40,7 @@ import javax.annotation.Resource;
|
|||||||
* @description: 登录密码方法
|
* @description: 登录密码方法
|
||||||
* @date 2023/12/26 15:33
|
* @date 2023/12/26 15:33
|
||||||
**/
|
**/
|
||||||
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class SysPasswordService
|
public class SysPasswordService
|
||||||
{
|
{
|
||||||
@@ -76,29 +78,31 @@ public class SysPasswordService
|
|||||||
if (retryCount == null) {
|
if (retryCount == null) {
|
||||||
retryCount = 0;
|
retryCount = 0;
|
||||||
}
|
}
|
||||||
//TODO 从三方配置表中取值
|
//TODO 从三方配置表中取值(失败时用默认值,保证登录错误提示可用)
|
||||||
SysDepartInterfaceInfoDTO sysDepartInterfaceInfoDTO = new SysDepartInterfaceInfoDTO();
|
int maxRetryCount = 5; // 默认:密码错5次锁定
|
||||||
sysDepartInterfaceInfoDTO.setTopOrganizationId(userPo.getTopOrganizationId());
|
long lockTime = 30L; // 默认:锁定30分钟
|
||||||
sysDepartInterfaceInfoDTO.setInterfaceType("login");
|
try {
|
||||||
sysDepartInterfaceInfoDTO.setInterfaceTypeKey("maxRetryCount");
|
SysDepartInterfaceInfoDTO dto = new SysDepartInterfaceInfoDTO();
|
||||||
List<SysDepartInterfaceInfoPo> sysDepartInterfaceInfoPos = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO);
|
dto.setTopOrganizationId(userPo.getTopOrganizationId());
|
||||||
if (sysDepartInterfaceInfoPos.isEmpty()){
|
dto.setInterfaceType("login");
|
||||||
String errMsg = "缺少登录信息配置,请联系管理员";
|
dto.setInterfaceTypeKey("maxRetryCount");
|
||||||
recordLogininfor(userPo, Constants.LOGIN_FAIL, errMsg, 1);
|
List<SysDepartInterfaceInfoPo> pos = thirdPartyServiceFeign.queryListByFeign(dto);
|
||||||
throw new ServiceException(errMsg);
|
if (pos != null && !pos.isEmpty()) {
|
||||||
|
maxRetryCount = Integer.parseInt(pos.get(0).getInterfaceTypeValue());
|
||||||
|
} else {
|
||||||
|
log.warn("组织[{}]缺少登录配置 login/maxRetryCount,使用默认值{}", userPo.getTopOrganizationId(), maxRetryCount);
|
||||||
|
}
|
||||||
|
dto.setInterfaceTypeKey("lockTime");
|
||||||
|
pos = thirdPartyServiceFeign.queryListByFeign(dto);
|
||||||
|
if (pos != null && !pos.isEmpty()) {
|
||||||
|
lockTime = Long.parseLong(pos.get(0).getInterfaceTypeValue());
|
||||||
|
} else {
|
||||||
|
log.warn("组织[{}]缺少登录配置 login/lockTime,使用默认值{}", userPo.getTopOrganizationId(), lockTime);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("读取登录配置失败,使用默认重试策略", e);
|
||||||
}
|
}
|
||||||
SysDepartInterfaceInfoPo sysDepartInterfaceInfoPo = sysDepartInterfaceInfoPos.get(0);
|
if (retryCount >= maxRetryCount) {
|
||||||
Integer maxRetryCount = Integer.valueOf(sysDepartInterfaceInfoPo.getInterfaceTypeValue());
|
|
||||||
sysDepartInterfaceInfoDTO.setInterfaceTypeKey("lockTime");
|
|
||||||
sysDepartInterfaceInfoPos = thirdPartyServiceFeign.queryListByFeign(sysDepartInterfaceInfoDTO);
|
|
||||||
if (sysDepartInterfaceInfoPos.isEmpty()){
|
|
||||||
String errMsg = "缺少登录信息配置,请联系管理员";
|
|
||||||
recordLogininfor(userPo, Constants.LOGIN_FAIL, errMsg, 1);
|
|
||||||
throw new ServiceException(errMsg);
|
|
||||||
}
|
|
||||||
sysDepartInterfaceInfoPo = sysDepartInterfaceInfoPos.get(0);
|
|
||||||
Long lockTime = Long.valueOf(sysDepartInterfaceInfoPo.getInterfaceTypeValue());
|
|
||||||
if (retryCount >= maxRetryCount){
|
|
||||||
String errMsg = String.format("密码输入错误%s次,帐户锁定%s分钟", maxRetryCount, lockTime);
|
String errMsg = String.format("密码输入错误%s次,帐户锁定%s分钟", maxRetryCount, lockTime);
|
||||||
recordLogininfor(userPo, Constants.LOGIN_FAIL, errMsg, 1);
|
recordLogininfor(userPo, Constants.LOGIN_FAIL, errMsg, 1);
|
||||||
throw new ServiceException(errMsg);
|
throw new ServiceException(errMsg);
|
||||||
|
|||||||
@@ -12,22 +12,23 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# username: nacos
|
# server-addr: 10.102.192.31:6848
|
||||||
# password: manhuoda@2023
|
|
||||||
#线上正式环境
|
|
||||||
server-addr: 10.102.192.31:6848
|
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
|
#线上正式环境
|
||||||
|
# server-addr: 10.102.192.5:6848
|
||||||
|
# username: nacos
|
||||||
|
# password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
|
# server-addr: 10.102.192.31:6848
|
||||||
# 测试环境配置 容器名+端口号
|
# 测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
#
|
# server-addr: 10.102.192.5:6848
|
||||||
server-addr: 10.102.192.31:6848
|
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
@@ -36,3 +37,19 @@ spring:
|
|||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
|
||||||
|
# SSO单点登录配置
|
||||||
|
sso:
|
||||||
|
# RSA公钥(由中台openssl私钥导出)
|
||||||
|
public-key: |
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA62dYkl2Nvy2wW9028dQ7
|
||||||
|
HdxFNhwEriFNzFMFq+m1jTvZWdU6e9a1iCGWTVV2fTo4PWSyhjWyzv2ZBEuanWBq
|
||||||
|
y/bfh/jOTjT/tlWvMeJZ1TV4suCbigHq5TGxDsY6ZC6if9ULhU3NWkgnPNn6HfO9
|
||||||
|
NVvBTfx9MgWtCtT33kq30KgxC6LqVdCe08+gD0KB3df0DK8OJorVFfxYVc7TjGEL
|
||||||
|
xqUuE7PcgZgDb8KvdgO66OxBqFIB0qfc73oALKGoq/8kvjrqE/amaIZPv3jE2Rc7
|
||||||
|
0rIhGHrFcoA3W01nNRGQKY/E/VKOGBn/uDNdi5iMXsFjKxiBbXB07bBxdhUH7698
|
||||||
|
AwIDAQAB
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
|
# SSO登录成功后跳转的前端页面地址
|
||||||
|
redirect-url: "https://diglog.namkwong.com.mo/main_app/sso"
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.mapper;
|
||||||
|
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台监测-真实数据 Mapper
|
||||||
|
* 数据来源:TEST_NGWL_YMS 库(达梦,跨库访问)
|
||||||
|
* 注:列名按达梦默认大写规则;若实际库中小写请反馈调整
|
||||||
|
*/
|
||||||
|
public interface BiPlatformRealDataMapper {
|
||||||
|
|
||||||
|
/** 作业车辆状态列表 */
|
||||||
|
List<RealPlatformVehiclePO> queryVehicles();
|
||||||
|
|
||||||
|
/** 月台实时概览(总数 / 当前作业中) */
|
||||||
|
RealPlatformOverviewPO queryPlatformOverview();
|
||||||
|
|
||||||
|
/** 今日作业任务数 */
|
||||||
|
Long countTodayTasks();
|
||||||
|
|
||||||
|
/** 车辆状态统计(今日) */
|
||||||
|
RealVehicleStatusPO queryVehicleStatusToday();
|
||||||
|
|
||||||
|
/** 本月任务量 */
|
||||||
|
Long countMonthTasks();
|
||||||
|
|
||||||
|
/** 任务负荷(今日 24 小时) */
|
||||||
|
List<RealTaskLoadPO> queryTaskLoadToday();
|
||||||
|
|
||||||
|
/** 今日预约-业务类型统计(按 businessName 分组统计今日预约数量) */
|
||||||
|
List<RealBusinessTypeStatPO> queryTodayBusinessTypeStats();
|
||||||
|
|
||||||
|
/** 月台监控-按楼层统计月台车辆(楼层、月台数量、今日预约车辆、当前作业车辆) */
|
||||||
|
List<RealPlatformFloorStatPO> queryPlatformFloorStats();
|
||||||
|
|
||||||
|
/** 月台管理列表(YMS qms_window_info,含机构/鹤位/状态/楼层/UUID 等完整信息) */
|
||||||
|
List<RealPlatformInfoPO> queryPlatformInfoList();
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日预约-业务类型统计(真实数据,来自 TEST_NGWL_YMS.QMS_MAIN_BUSINESS)
|
||||||
|
* 按业务类型分组统计今日预约数量
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealBusinessTypeStatPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 业务类型名称(qms_main_business.businessName) */
|
||||||
|
private String businessName;
|
||||||
|
|
||||||
|
/** 今日预约数量 */
|
||||||
|
private Long count;
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台监控-月台车辆统计(按楼层分组)
|
||||||
|
* 数据来源:TEST_NGWL_YMS.QMS_WINDOW_INFO(楼层+月台)与 QMS_MAIN_BUSINESS(当日预约/作业)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealPlatformFloorStatPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 楼层(从叫号月台 WINDOW_NAME 解析,如 S1-01 -> F1) */
|
||||||
|
private String floorNo;
|
||||||
|
|
||||||
|
/** 该楼层的月台数量 */
|
||||||
|
private Long platformCount;
|
||||||
|
|
||||||
|
/** 今日预约车辆数(按 WINDOW_NAME 关联楼层) */
|
||||||
|
private Long todayReservedVehicles;
|
||||||
|
|
||||||
|
/** 当前作业车辆数(FLOW_STATUS IN 5,6,7,8,9,10) */
|
||||||
|
private Long operatingVehicles;
|
||||||
|
}
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台管理列表(真实数据,来自 TEST_NGWL_YMS.QMS_WINDOW_INFO)
|
||||||
|
* 对应 YMS qms_window_info 月台/鹤位窗口表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealPlatformInfoPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 机构代码(org_no) */
|
||||||
|
private String orgNo;
|
||||||
|
|
||||||
|
/** 机构名称(dept_name) */
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/** 鹤位号/月台号(window_number) */
|
||||||
|
private String windowNumber;
|
||||||
|
|
||||||
|
/** 鹤位名称/月台名称(window_name) */
|
||||||
|
private String windowName;
|
||||||
|
|
||||||
|
/** 优先级别(priority_set) */
|
||||||
|
private String prioritySet;
|
||||||
|
|
||||||
|
/** 鹤位状态/月台状态(running_status) */
|
||||||
|
private String runningStatus;
|
||||||
|
|
||||||
|
/** uuid */
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
/** 鹤位屏名字集合/绑定月台屏(berr_names) */
|
||||||
|
private String berrNames;
|
||||||
|
|
||||||
|
/** 最新业务状态(new_flow_status) */
|
||||||
|
private String newFlowStatus;
|
||||||
|
|
||||||
|
/** 月台图片(guide_images) */
|
||||||
|
private String guideImages;
|
||||||
|
|
||||||
|
/** 月台楼层(platform_floor) */
|
||||||
|
private String platformFloor;
|
||||||
|
|
||||||
|
/** 作业状态 0-空闲 1-占用(job_status) */
|
||||||
|
private Integer jobStatus;
|
||||||
|
|
||||||
|
/** 创建人(create_by) */
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/** 创建时间(create_time) */
|
||||||
|
private String createTime;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台实时概览(真实数据,来自 TEST_NGWL_YMS.QMS_WINDOW_INFO)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealPlatformOverviewPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 月台总数 */
|
||||||
|
private Long totalPlatforms;
|
||||||
|
|
||||||
|
/** 当前作业中(月台作业状态=占用) */
|
||||||
|
private Long operatingPlatforms;
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台监测-作业车辆(真实数据,来自 TEST_NGWL_YMS.QMS_MAIN_BUSINESS 等)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealPlatformVehiclePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 车牌号(qms_main_business.CARNO) */
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/** 流程状态(qms_main_business.FLOWSTATUS) */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 叫号月台(qms_queue_list.WINDOWNAME) */
|
||||||
|
private String platformId;
|
||||||
|
|
||||||
|
/** 月台作业时长,分钟(EXITTIME - ENTRYTIME) */
|
||||||
|
private Long platformDuration;
|
||||||
|
|
||||||
|
/** 预约申请时间(qms_main_business.CREATE_TIME) */
|
||||||
|
private String appointmentTime;
|
||||||
|
|
||||||
|
/** 作业楼层(qms_window_info.PLATFORMFLOOR) */
|
||||||
|
private String workFloor;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务负荷统计(按小时,来自 TEST_NGWL_YMS.QMS_MAIN_BUSINESS)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealTaskLoadPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 0-23 小时 */
|
||||||
|
private Integer hourOfDay;
|
||||||
|
|
||||||
|
/** 该小时段任务数 */
|
||||||
|
private Long taskCount;
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.repository.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业车辆状态统计(真实数据,来自 TEST_NGWL_YMS.QMS_MAIN_BUSINESS)
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealVehicleStatusPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 今日预约车辆 */
|
||||||
|
private Long todayReservedVehicles;
|
||||||
|
|
||||||
|
/** 当前未签到 */
|
||||||
|
private Long notCheckedIn;
|
||||||
|
|
||||||
|
/** 当前作业中 */
|
||||||
|
private Long operatingVehicles;
|
||||||
|
|
||||||
|
/** 作业完成 */
|
||||||
|
private Long completedVehicles;
|
||||||
|
}
|
||||||
+350
@@ -0,0 +1,350 @@
|
|||||||
|
package com.mhd.bi.domain.biPlatformRealData.service;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.mapper.BiPlatformRealDataMapper;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformSurveillance.repository.mapper.BiPlatformSurveillanceReportMapper;
|
||||||
|
import com.mhd.bi.domain.biSnapshotSync.repository.mapper.BiSnapshotWriteMapper;
|
||||||
|
import com.mhd.bi.domain.biSnapshotSync.support.BiSnapshotWeeklyRandomDataBuilder;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformVehicleItemVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.TaskLoadItemVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台监测-真实数据业务层(封装 YMS 跨库查询)
|
||||||
|
* 注:列名大小写、字段类型需以实际库为准;若 YMS 库无数据/无权限,相关方法应返回空/0,不影响写死字段写入快照
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class BiPlatformRealDataService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BiPlatformRealDataMapper biPlatformRealDataMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BiSnapshotWriteMapper biSnapshotWriteMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BiPlatformSurveillanceReportMapper biPlatformSurveillanceReportMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
private static final String REMARK_REALTIME = "realtime platform-surveillance";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时组装月台监测数据;仅当真实业务数据(YMS 库查出的字段)发生变化时,
|
||||||
|
* 才覆盖更新 BI_PLATFORM_SURVEILLANCE_SNAPSHOT 快照表最新一条后返回。
|
||||||
|
* 写死字段变化不触发更新;表中尚无记录时插入一条兜底。
|
||||||
|
*/
|
||||||
|
public PlatformSurveillanceVO buildRealTimePlatformSurveillanceAndPersist() {
|
||||||
|
PlatformSurveillanceVO vo = buildRealTimePlatformSurveillance();
|
||||||
|
try {
|
||||||
|
String fullJson = objectMapper.writeValueAsString(vo);
|
||||||
|
String fingerprint = realDataFingerprint(vo);
|
||||||
|
|
||||||
|
String latestJson = biPlatformSurveillanceReportMapper.selectLatestPayloadJson();
|
||||||
|
if (StringUtils.isNotBlank(latestJson)) {
|
||||||
|
PlatformSurveillanceVO latestVo = objectMapper.readValue(latestJson.trim(), PlatformSurveillanceVO.class);
|
||||||
|
if (Objects.equals(fingerprint, realDataFingerprint(latestVo))) {
|
||||||
|
log.info("BI 月台监测真实业务数据未变化,跳过落库");
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int rows = biSnapshotWriteMapper.updateLatestPlatformSurveillanceSnapshot(fullJson, REMARK_REALTIME);
|
||||||
|
if (rows < 1) {
|
||||||
|
// 表中无最新记录可更新,插入一条兜底
|
||||||
|
biSnapshotWriteMapper.insertPlatformSurveillanceSnapshot(fullJson, REMARK_REALTIME);
|
||||||
|
}
|
||||||
|
log.info("BI 月台监测实时数据已落库(覆盖最新, 数据变化), affectedRows={}", rows);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("BI 月台监测实时数据落库失败", e);
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提取月台监测的「真实业务数据」指纹(仅含 YMS 库查出的字段),用于判断业务数据是否变化。
|
||||||
|
* 写死/随机字段不纳入指纹,故其变化不会触发更新。
|
||||||
|
*/
|
||||||
|
private String realDataFingerprint(PlatformSurveillanceVO vo) throws Exception {
|
||||||
|
Map<String, Object> fp = new LinkedHashMap<>();
|
||||||
|
if (vo.getPlatformOverview() != null) {
|
||||||
|
fp.put("totalPlatforms", vo.getPlatformOverview().getTotalPlatforms());
|
||||||
|
fp.put("operatingPlatforms", vo.getPlatformOverview().getOperatingPlatforms());
|
||||||
|
fp.put("todayTasks", vo.getPlatformOverview().getTodayTasks());
|
||||||
|
}
|
||||||
|
if (vo.getVehicleStatus() != null) {
|
||||||
|
fp.put("todayReservedVehicles", vo.getVehicleStatus().getTodayReservedVehicles());
|
||||||
|
fp.put("notCheckedIn", vo.getVehicleStatus().getNotCheckedIn());
|
||||||
|
fp.put("operatingVehicles", vo.getVehicleStatus().getOperatingVehicles());
|
||||||
|
fp.put("completedVehicles", vo.getVehicleStatus().getCompletedVehicles());
|
||||||
|
}
|
||||||
|
if (vo.getMonthlyTaskStatistics() != null) {
|
||||||
|
fp.put("taskTotal", vo.getMonthlyTaskStatistics().getTaskTotal());
|
||||||
|
}
|
||||||
|
if (vo.getVehicles() != null) {
|
||||||
|
List<Map<String, Object>> vehicles = new ArrayList<>();
|
||||||
|
for (PlatformVehicleItemVO v : vo.getVehicles()) {
|
||||||
|
Map<String, Object> m = new LinkedHashMap<>();
|
||||||
|
m.put("appointmentTime", v.getAppointmentTime());
|
||||||
|
m.put("workFloor", v.getWorkFloor());
|
||||||
|
m.put("plateNumber", v.getPlateNumber());
|
||||||
|
m.put("status", v.getStatus());
|
||||||
|
m.put("platformId", v.getPlatformId());
|
||||||
|
m.put("platformDuration", v.getPlatformDuration());
|
||||||
|
vehicles.add(m);
|
||||||
|
}
|
||||||
|
fp.put("vehicles", vehicles);
|
||||||
|
}
|
||||||
|
if (vo.getTaskLoadStatistics() != null) {
|
||||||
|
List<Map<String, Object>> loads = new ArrayList<>();
|
||||||
|
for (TaskLoadItemVO item : vo.getTaskLoadStatistics()) {
|
||||||
|
Map<String, Object> m = new LinkedHashMap<>();
|
||||||
|
m.put("time", item.getTime());
|
||||||
|
m.put("taskCount", item.getTaskCount());
|
||||||
|
loads.add(m);
|
||||||
|
}
|
||||||
|
fp.put("taskLoadStatistics", loads);
|
||||||
|
}
|
||||||
|
return objectMapper.writeValueAsString(fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RealPlatformVehiclePO> queryVehicles() {
|
||||||
|
try {
|
||||||
|
return biPlatformRealDataMapper.queryVehicles();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】查询作业车辆列表失败: {}", e.getMessage(), e);
|
||||||
|
return java.util.Collections.emptyList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RealPlatformOverviewPO queryPlatformOverview() {
|
||||||
|
try {
|
||||||
|
RealPlatformOverviewPO po = biPlatformRealDataMapper.queryPlatformOverview();
|
||||||
|
if (po == null) {
|
||||||
|
po = new RealPlatformOverviewPO();
|
||||||
|
}
|
||||||
|
if (po.getTotalPlatforms() == null) po.setTotalPlatforms(0L);
|
||||||
|
if (po.getOperatingPlatforms() == null) po.setOperatingPlatforms(0L);
|
||||||
|
return po;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】查询月台概览失败: {}", e.getMessage(), e);
|
||||||
|
RealPlatformOverviewPO po = new RealPlatformOverviewPO();
|
||||||
|
po.setTotalPlatforms(0L);
|
||||||
|
po.setOperatingPlatforms(0L);
|
||||||
|
return po;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public long countTodayTasks() {
|
||||||
|
try {
|
||||||
|
Long n = biPlatformRealDataMapper.countTodayTasks();
|
||||||
|
return n == null ? 0L : n;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】统计今日作业任务失败: {}", e.getMessage(), e);
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RealVehicleStatusPO queryVehicleStatusToday() {
|
||||||
|
try {
|
||||||
|
RealVehicleStatusPO po = biPlatformRealDataMapper.queryVehicleStatusToday();
|
||||||
|
if (po == null) po = new RealVehicleStatusPO();
|
||||||
|
if (po.getTodayReservedVehicles() == null) po.setTodayReservedVehicles(0L);
|
||||||
|
if (po.getNotCheckedIn() == null) po.setNotCheckedIn(0L);
|
||||||
|
if (po.getOperatingVehicles() == null) po.setOperatingVehicles(0L);
|
||||||
|
if (po.getCompletedVehicles() == null) po.setCompletedVehicles(0L);
|
||||||
|
return po;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】统计车辆状态失败: {}", e.getMessage(), e);
|
||||||
|
RealVehicleStatusPO po = new RealVehicleStatusPO();
|
||||||
|
po.setTodayReservedVehicles(0L);
|
||||||
|
po.setNotCheckedIn(0L);
|
||||||
|
po.setOperatingVehicles(0L);
|
||||||
|
po.setCompletedVehicles(0L);
|
||||||
|
return po;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public long countMonthTasks() {
|
||||||
|
try {
|
||||||
|
Long n = biPlatformRealDataMapper.countMonthTasks();
|
||||||
|
return n == null ? 0L : n;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】统计本月任务量失败: {}", e.getMessage(), e);
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RealTaskLoadPO> queryTaskLoadToday() {
|
||||||
|
try {
|
||||||
|
return biPlatformRealDataMapper.queryTaskLoadToday();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】统计任务负荷失败: {}", e.getMessage(), e);
|
||||||
|
return java.util.Collections.emptyList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日预约-业务类型统计:按业务类型分组统计今日预约数量。
|
||||||
|
* 例:今日预约航空打板 3 条 → 返回 {businessName:"航空打板", count:3}
|
||||||
|
*/
|
||||||
|
public List<RealBusinessTypeStatPO> queryTodayBusinessTypeStats() {
|
||||||
|
try {
|
||||||
|
return biPlatformRealDataMapper.queryTodayBusinessTypeStats();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】统计今日业务类型失败: {}", e.getMessage(), e);
|
||||||
|
return java.util.Collections.emptyList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台监控-按楼层统计月台车辆:返回 {floorNo, platformCount, todayReservedVehicles, operatingVehicles}
|
||||||
|
* 实时查 YMS 库,不落库。
|
||||||
|
*/
|
||||||
|
public List<RealPlatformFloorStatPO> queryPlatformFloorStats() {
|
||||||
|
try {
|
||||||
|
return biPlatformRealDataMapper.queryPlatformFloorStats();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】月台监控按楼层统计失败: {}", e.getMessage(), e);
|
||||||
|
return java.util.Collections.emptyList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台管理列表:实时查 YMS qms_window_info,返回月台/鹤位窗口完整信息,不落库。
|
||||||
|
*/
|
||||||
|
public List<RealPlatformInfoPO> queryPlatformInfoList() {
|
||||||
|
try {
|
||||||
|
return biPlatformRealDataMapper.queryPlatformInfoList();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("【YMS】查询月台管理列表失败: {}", e.getMessage(), e);
|
||||||
|
return java.util.Collections.emptyList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时组装月台监测数据:原则「有真实数据源用真实,无真实数据源用写死模拟」。
|
||||||
|
* 有真实数据源的字段(vehicles / platformOverview / vehicleStatus / taskLoad / taskTotal)
|
||||||
|
* 无条件用 YMS 真实查询覆盖,真实为空即为空,不用模板兜底;
|
||||||
|
* 无真实数据源的字段(效率统计、趋势、告警、任务类型等)保留模板写死值。
|
||||||
|
* 每次调用实时查库,不经过快照表。
|
||||||
|
*/
|
||||||
|
public PlatformSurveillanceVO buildRealTimePlatformSurveillance() {
|
||||||
|
// 固定种子生成写死模板:仅用于没有真实数据源的字段
|
||||||
|
Random r = new Random(20260825L);
|
||||||
|
PlatformSurveillanceVO template = BiSnapshotWeeklyRandomDataBuilder.platformSurveillance(r);
|
||||||
|
|
||||||
|
// 作业车辆列表:真实数据源,无条件覆盖(真实为空则返回空列表,不用模板模拟)
|
||||||
|
List<RealPlatformVehiclePO> realVehicles = queryVehicles();
|
||||||
|
List<PlatformVehicleItemVO> vehicleVos = new ArrayList<>();
|
||||||
|
for (RealPlatformVehiclePO rv : realVehicles) {
|
||||||
|
PlatformVehicleItemVO v = new PlatformVehicleItemVO();
|
||||||
|
v.setAppointmentTime(rv.getAppointmentTime());
|
||||||
|
v.setWorkFloor(rv.getWorkFloor());
|
||||||
|
v.setPlateNumber(rv.getPlateNumber());
|
||||||
|
v.setStatus(translateFlowStatus(rv.getStatus()));
|
||||||
|
v.setPlatformId(rv.getPlatformId());
|
||||||
|
v.setPlatformDuration(rv.getPlatformDuration() == null ? 0 : rv.getPlatformDuration().intValue());
|
||||||
|
vehicleVos.add(v);
|
||||||
|
}
|
||||||
|
template.setVehicles(vehicleVos);
|
||||||
|
|
||||||
|
// 月台实时概览:真实数据源,无条件覆盖
|
||||||
|
if (template.getPlatformOverview() != null) {
|
||||||
|
RealPlatformOverviewPO ov = queryPlatformOverview();
|
||||||
|
int total = ov.getTotalPlatforms().intValue();
|
||||||
|
int occ = ov.getOperatingPlatforms().intValue();
|
||||||
|
double rate = total > 0 ? Math.round(((double) occ / total) * 100.0 * 100.0) / 100.0 : 0d;
|
||||||
|
template.getPlatformOverview().setTotalPlatforms(total);
|
||||||
|
template.getPlatformOverview().setOperatingPlatforms(occ);
|
||||||
|
template.getPlatformOverview().setCurrentOccupancyRate(rate);
|
||||||
|
template.getPlatformOverview().setTodayTasks((int) countTodayTasks());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 作业车辆状态统计:真实数据源,无条件覆盖
|
||||||
|
if (template.getVehicleStatus() != null) {
|
||||||
|
RealVehicleStatusPO vs = queryVehicleStatusToday();
|
||||||
|
template.getVehicleStatus().setTodayReservedVehicles(vs.getTodayReservedVehicles().intValue());
|
||||||
|
template.getVehicleStatus().setNotCheckedIn(vs.getNotCheckedIn().intValue());
|
||||||
|
template.getVehicleStatus().setOperatingVehicles(vs.getOperatingVehicles().intValue());
|
||||||
|
template.getVehicleStatus().setCompletedVehicles(vs.getCompletedVehicles().intValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 本月任务统计:taskTotal 有真实数据源无条件覆盖;YoY 等无真实数据源保留模板写死值
|
||||||
|
if (template.getMonthlyTaskStatistics() != null) {
|
||||||
|
template.getMonthlyTaskStatistics().setTaskTotal((int) countMonthTasks());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 任务负荷:有真实数据源;真实为空则清空不用模板模拟,有数据则按真实小时覆盖
|
||||||
|
List<RealTaskLoadPO> loads = queryTaskLoadToday();
|
||||||
|
if (loads.isEmpty()) {
|
||||||
|
template.setTaskLoadStatistics(new ArrayList<>());
|
||||||
|
} else if (template.getTaskLoadStatistics() != null) {
|
||||||
|
Map<Integer, Long> hourMap = new HashMap<>();
|
||||||
|
for (RealTaskLoadPO l : loads) {
|
||||||
|
hourMap.put(l.getHourOfDay(), l.getTaskCount());
|
||||||
|
}
|
||||||
|
for (TaskLoadItemVO item : template.getTaskLoadStatistics()) {
|
||||||
|
Integer hour = parseHourFromLabel(item.getTime());
|
||||||
|
if (hour != null && hourMap.containsKey(hour)) {
|
||||||
|
item.setTaskCount(hourMap.get(hour).intValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return template;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Integer parseHourFromLabel(String label) {
|
||||||
|
if (label == null) return null;
|
||||||
|
try {
|
||||||
|
String s = label.replace("时", "").trim();
|
||||||
|
return Integer.parseInt(s);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FLOW_STATUS 数字转中文:1已预约 2已签到 3已叫号 4已过号 5已进场 6已称重 7已装车 8二次称重 9已结算 10已还卡 11已出场 12已取消
|
||||||
|
*/
|
||||||
|
private static String translateFlowStatus(String flowStatus) {
|
||||||
|
if (flowStatus == null) return null;
|
||||||
|
switch (flowStatus.trim()) {
|
||||||
|
case "1": return "已预约";
|
||||||
|
case "2": return "已签到";
|
||||||
|
case "3": return "已叫号";
|
||||||
|
case "4": return "已过号";
|
||||||
|
case "5": return "已进场";
|
||||||
|
case "6": return "已称重";
|
||||||
|
case "7": return "已装车";
|
||||||
|
case "8": return "二次称重";
|
||||||
|
case "9": return "已结算";
|
||||||
|
case "10": return "已还卡";
|
||||||
|
case "11": return "已出场";
|
||||||
|
case "12": return "已取消";
|
||||||
|
default: return flowStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -85,7 +85,7 @@ public final class BiReportSnapshotMapperSupport {
|
|||||||
.entryOvertimeRate(0).overtimeCount(0).platformOnTimeRate(0)
|
.entryOvertimeRate(0).overtimeCount(0).platformOnTimeRate(0)
|
||||||
.avgPlatformDuration(0d).yardOnTimeRate(0).avgYardDuration(0d).build())
|
.avgPlatformDuration(0d).yardOnTimeRate(0).avgYardDuration(0d).build())
|
||||||
.platformOverview(PlatformOverviewVO.builder()
|
.platformOverview(PlatformOverviewVO.builder()
|
||||||
.totalPlatforms(0).currentOccupancyRate(0).operatingPlatforms(0).todayTasks(0).build())
|
.totalPlatforms(0).currentOccupancyRate(0d).operatingPlatforms(0).todayTasks(0).build())
|
||||||
.vehicleStatus(VehicleStatusVO.builder()
|
.vehicleStatus(VehicleStatusVO.builder()
|
||||||
.todayReservedVehicles(0).notCheckedIn(0).operatingVehicles(0).completedVehicles(0).build())
|
.todayReservedVehicles(0).notCheckedIn(0).operatingVehicles(0).completedVehicles(0).build())
|
||||||
.avgOperationDurationTrend(Collections.emptyList())
|
.avgOperationDurationTrend(Collections.emptyList())
|
||||||
|
|||||||
+2
@@ -13,6 +13,8 @@ public interface BiSnapshotWriteMapper {
|
|||||||
|
|
||||||
int insertPlatformSurveillanceSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
int insertPlatformSurveillanceSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
|
|
||||||
|
int updateLatestPlatformSurveillanceSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
|
|
||||||
int insertOverallOperationSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
int insertOverallOperationSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
|
|
||||||
int insertWarehouseOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
int insertWarehouseOperationZoneSnapshot(@Param("payloadJson") String payloadJson, @Param("remark") String remark);
|
||||||
|
|||||||
+92
-2
@@ -13,10 +13,20 @@ import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillance
|
|||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformVehicleItemVO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.service.BiPlatformRealDataService;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,6 +44,7 @@ public class BiReportSnapshotSyncService {
|
|||||||
|
|
||||||
private final BiSnapshotWriteMapper biSnapshotWriteMapper;
|
private final BiSnapshotWriteMapper biSnapshotWriteMapper;
|
||||||
private final ObjectMapper objectMapper;
|
private final ObjectMapper objectMapper;
|
||||||
|
private final BiPlatformRealDataService biPlatformRealDataService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 依次同步各快照表;单表失败不影响其它表,只记日志。
|
* 依次同步各快照表;单表失败不影响其它表,只记日志。
|
||||||
@@ -137,9 +148,88 @@ public class BiReportSnapshotSyncService {
|
|||||||
return BiSnapshotWeeklyRandomDataBuilder.warehouseTransport(new Random());
|
return BiSnapshotWeeklyRandomDataBuilder.warehouseTransport(new Random());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO 业务落地:改为查询真实数据。临时实现见 {@link BiSnapshotWeeklyRandomDataBuilder#platformSurveillance(Random)}。 */
|
/** TODO 业务落地:部分字段改为真实数据,其余仍写死。 */
|
||||||
protected PlatformSurveillanceVO buildPlatformSurveillanceSnapshot() {
|
protected PlatformSurveillanceVO buildPlatformSurveillanceSnapshot() {
|
||||||
return BiSnapshotWeeklyRandomDataBuilder.platformSurveillance(new Random());
|
// 固定种子,保证写死字段每次生成值一致(真实字段随后实时覆盖)
|
||||||
|
Random r = new Random(20260825L);
|
||||||
|
// 写死数据复用原 builder
|
||||||
|
PlatformSurveillanceVO template = BiSnapshotWeeklyRandomDataBuilder.platformSurveillance(r);
|
||||||
|
|
||||||
|
// ====== 真实数据:作业车辆列表 ======
|
||||||
|
List<RealPlatformVehiclePO> realVehicles = biPlatformRealDataService.queryVehicles();
|
||||||
|
List<PlatformVehicleItemVO> vehicleVos = new ArrayList<>();
|
||||||
|
for (RealPlatformVehiclePO rv : realVehicles) {
|
||||||
|
PlatformVehicleItemVO v = new PlatformVehicleItemVO();
|
||||||
|
v.setAppointmentTime(rv.getAppointmentTime());
|
||||||
|
v.setWorkFloor(rv.getWorkFloor());
|
||||||
|
v.setPlateNumber(rv.getPlateNumber());
|
||||||
|
v.setStatus(rv.getStatus());
|
||||||
|
v.setPlatformId(rv.getPlatformId());
|
||||||
|
v.setPlatformDuration(rv.getPlatformDuration() == null ? 0 : rv.getPlatformDuration().intValue());
|
||||||
|
vehicleVos.add(v);
|
||||||
|
}
|
||||||
|
if (!vehicleVos.isEmpty()) {
|
||||||
|
template.setVehicles(vehicleVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====== 真实数据:月台实时概览 ======
|
||||||
|
RealPlatformOverviewPO ov = biPlatformRealDataService.queryPlatformOverview();
|
||||||
|
if (template.getPlatformOverview() != null) {
|
||||||
|
template.getPlatformOverview().setTotalPlatforms(ov.getTotalPlatforms().intValue());
|
||||||
|
template.getPlatformOverview().setOperatingPlatforms(ov.getOperatingPlatforms().intValue());
|
||||||
|
int total = ov.getTotalPlatforms().intValue();
|
||||||
|
int occ = ov.getOperatingPlatforms().intValue();
|
||||||
|
double rate = total > 0 ? Math.round(((double) occ / total) * 100.0 * 100.0) / 100.0 : 0d;
|
||||||
|
template.getPlatformOverview().setCurrentOccupancyRate(rate);
|
||||||
|
}
|
||||||
|
long todayTasks = biPlatformRealDataService.countTodayTasks();
|
||||||
|
if (template.getPlatformOverview() != null) {
|
||||||
|
template.getPlatformOverview().setTodayTasks((int) todayTasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====== 真实数据:作业车辆状态统计 ======
|
||||||
|
RealVehicleStatusPO vs = biPlatformRealDataService.queryVehicleStatusToday();
|
||||||
|
if (template.getVehicleStatus() != null) {
|
||||||
|
template.getVehicleStatus().setTodayReservedVehicles(vs.getTodayReservedVehicles().intValue());
|
||||||
|
template.getVehicleStatus().setNotCheckedIn(vs.getNotCheckedIn().intValue());
|
||||||
|
template.getVehicleStatus().setOperatingVehicles(vs.getOperatingVehicles().intValue());
|
||||||
|
template.getVehicleStatus().setCompletedVehicles(vs.getCompletedVehicles().intValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====== 真实数据:本月任务统计 taskTotal ======
|
||||||
|
long monthTasks = biPlatformRealDataService.countMonthTasks();
|
||||||
|
if (template.getMonthlyTaskStatistics() != null) {
|
||||||
|
template.getMonthlyTaskStatistics().setTaskTotal((int) monthTasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====== 真实数据:任务负荷(今日 24 小时) ======
|
||||||
|
List<RealTaskLoadPO> loads = biPlatformRealDataService.queryTaskLoadToday();
|
||||||
|
if (!loads.isEmpty() && template.getTaskLoadStatistics() != null) {
|
||||||
|
Map<Integer, Long> hourMap = new HashMap<>();
|
||||||
|
for (RealTaskLoadPO l : loads) {
|
||||||
|
hourMap.put(l.getHourOfDay(), l.getTaskCount());
|
||||||
|
}
|
||||||
|
for (com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.TaskLoadItemVO item : template.getTaskLoadStatistics()) {
|
||||||
|
Integer hour = parseHourFromLabel(item.getTime());
|
||||||
|
if (hour != null) {
|
||||||
|
Long n = hourMap.get(hour);
|
||||||
|
if (n != null) item.setTaskCount(n.intValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return template;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Integer parseHourFromLabel(String label) {
|
||||||
|
if (label == null) return null;
|
||||||
|
// "15时" -> 15
|
||||||
|
try {
|
||||||
|
String s = label.replace("时", "").trim();
|
||||||
|
return Integer.parseInt(s);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+5
-1
@@ -127,6 +127,8 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
for (String[] row : Baseline.P_PLATES) {
|
for (String[] row : Baseline.P_PLATES) {
|
||||||
int dur = jitterInt(Integer.parseInt(row[3]), r);
|
int dur = jitterInt(Integer.parseInt(row[3]), r);
|
||||||
vehicles.add(PlatformVehicleItemVO.builder()
|
vehicles.add(PlatformVehicleItemVO.builder()
|
||||||
|
.appointmentTime(Baseline.P_APPOINTMENT_TIME)
|
||||||
|
.workFloor(Baseline.P_WORK_FLOOR)
|
||||||
.plateNumber(row[0])
|
.plateNumber(row[0])
|
||||||
.status(row[1])
|
.status(row[1])
|
||||||
.platformId(row[2])
|
.platformId(row[2])
|
||||||
@@ -145,7 +147,7 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
|
|
||||||
PlatformOverviewVO overview = PlatformOverviewVO.builder()
|
PlatformOverviewVO overview = PlatformOverviewVO.builder()
|
||||||
.totalPlatforms(Math.max(1, jitterInt(Baseline.P_TOT_PL, r)))
|
.totalPlatforms(Math.max(1, jitterInt(Baseline.P_TOT_PL, r)))
|
||||||
.currentOccupancyRate(jitterPercentInt(Baseline.P_OCC, r))
|
.currentOccupancyRate((double) jitterPercentInt(Baseline.P_OCC, r))
|
||||||
.operatingPlatforms(Math.max(0, jitterInt(Baseline.P_OP, r)))
|
.operatingPlatforms(Math.max(0, jitterInt(Baseline.P_OP, r)))
|
||||||
.todayTasks(Math.max(0, jitterInt(Baseline.P_TASKS, r)))
|
.todayTasks(Math.max(0, jitterInt(Baseline.P_TASKS, r)))
|
||||||
.build();
|
.build();
|
||||||
@@ -394,6 +396,8 @@ public final class BiSnapshotWeeklyRandomDataBuilder {
|
|||||||
static final String[] W_CUST_NAMES = {"华东冷链", "华南汽配", "西南快消", "华北家电", "跨境达"};
|
static final String[] W_CUST_NAMES = {"华东冷链", "华南汽配", "西南快消", "华北家电", "跨境达"};
|
||||||
static final int[] W_CUST_AMT = {198, 172, 205, 189, 221};
|
static final int[] W_CUST_AMT = {198, 172, 205, 189, 221};
|
||||||
|
|
||||||
|
static final String P_APPOINTMENT_TIME = "2026-08-03 09:30:00";
|
||||||
|
static final String P_WORK_FLOOR = "一楼";
|
||||||
static final String[][] P_PLATES = {
|
static final String[][] P_PLATES = {
|
||||||
{"粤A12345", "待入场", "#12", "88"},
|
{"粤A12345", "待入场", "#12", "88"},
|
||||||
{"闽D99887", "作业中", "#07", "142"},
|
{"闽D99887", "作业中", "#07", "142"},
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ package com.mhd.bi.interfaces.facadeApi.biReport;
|
|||||||
import com.mhd.bi.domain.biSnapshotSync.service.BiReportSnapshotSyncService;
|
import com.mhd.bi.domain.biSnapshotSync.service.BiReportSnapshotSyncService;
|
||||||
import com.mhd.bi.domain.biComprehensive.service.BiComprehensiveReportService;
|
import com.mhd.bi.domain.biComprehensive.service.BiComprehensiveReportService;
|
||||||
import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceReportService;
|
import com.mhd.bi.domain.biPlatformSurveillance.service.BiPlatformSurveillanceReportService;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.service.BiPlatformRealDataService;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO;
|
||||||
|
import com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO;
|
||||||
import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService;
|
import com.mhd.bi.domain.biOverallOperation.service.BiOverallOperationReportService;
|
||||||
import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService;
|
import com.mhd.bi.domain.biHkMacaoServiceZone.service.BiHkMacaoServiceZoneReportService;
|
||||||
import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService;
|
import com.mhd.bi.domain.biTransportOperationZone.service.BiTransportOperationZoneReportService;
|
||||||
@@ -11,12 +15,17 @@ import com.mhd.bi.domain.biWarehouseTransport.service.BiWarehouseTransportReport
|
|||||||
import com.mhd.bi.interfaces.facadeApi.biReport.dto.BiApiResult;
|
import com.mhd.bi.interfaces.facadeApi.biReport.dto.BiApiResult;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.ComprehensiveSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.WarehouseTransportSituationVO;
|
||||||
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.gps.NanqiGpsLocationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.overall.OverallOperationSituationVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.platform.PlatformSurveillanceVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone.HkMacaoServiceZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.transportZone.TransportOperationZoneVO;
|
||||||
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
import com.mhd.bi.interfaces.facadeApi.biReport.vo.warehouseZone.WarehouseOperationZoneVO;
|
||||||
|
import com.mhd.common.core.exception.ServiceException;
|
||||||
|
import com.mhd.common.core.feign.ThirdPartyServiceFeign;
|
||||||
import com.mhd.common.core.web.controller.BaseController;
|
import com.mhd.common.core.web.controller.BaseController;
|
||||||
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
@@ -29,6 +38,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BI 报表接口
|
* BI 报表接口
|
||||||
*/
|
*/
|
||||||
@@ -48,6 +59,9 @@ public class BiReportApi extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BiPlatformSurveillanceReportService biPlatformSurveillanceReportService;
|
private BiPlatformSurveillanceReportService biPlatformSurveillanceReportService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BiPlatformRealDataService biPlatformRealDataService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BiOverallOperationReportService biOverallOperationReportService;
|
private BiOverallOperationReportService biOverallOperationReportService;
|
||||||
|
|
||||||
@@ -63,6 +77,12 @@ public class BiReportApi extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BiReportSnapshotSyncService biReportSnapshotSyncService;
|
private BiReportSnapshotSyncService biReportSnapshotSyncService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ThirdPartyServiceFeign thirdPartyServiceFeign;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "手动触发快照同步", notes = "立即写入各 BI 快照表(综合、仓储运输、月台监测、总体运营、仓储运营专区、运输运营专区、港澳服务专区);须带 X-BI-Access-Token")
|
@ApiOperation(value = "手动触发快照同步", notes = "立即写入各 BI 快照表(综合、仓储运输、月台监测、总体运营、仓储运营专区、运输运营专区、港澳服务专区);须带 X-BI-Access-Token")
|
||||||
@PostMapping("/snapshotSync/run")
|
@PostMapping("/snapshotSync/run")
|
||||||
@@ -92,14 +112,67 @@ public class BiReportApi extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 月台监测指标查询(按照 del_flag=1,按 create_time 最新一条)
|
* 月台监测指标查询(实时查 YMS 库,真实字段 + 写死字段),并落库一条到 BI_PLATFORM_SURVEILLANCE_SNAPSHOT
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "月台监测指标查询", notes = "返回 DEL_FLAG=1 且 CREATE_TIME 最新的一条快照")
|
@ApiOperation(value = "月台监测指标查询", notes = "每次调用实时查询 YMS 库组装并写入快照表;部分字段为真实业务数据,部分为写死数据")
|
||||||
@GetMapping("/platformSurveillance")
|
@GetMapping("/platformSurveillance")
|
||||||
public BiApiResult<PlatformSurveillanceVO> platformSurveillance() {
|
public BiApiResult<PlatformSurveillanceVO> platformSurveillance() {
|
||||||
PlatformSurveillanceVO data = biPlatformSurveillanceReportService.loadLatestPlatformSurveillance();
|
PlatformSurveillanceVO data = biPlatformRealDataService.buildRealTimePlatformSurveillanceAndPersist();
|
||||||
return BiApiResult.ok(data);
|
return BiApiResult.ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日预约-业务类型统计(实时查 YMS 库,不落库)
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "今日预约业务类型统计", notes = "按业务类型分组统计今日预约数量,实时查询 YMS 库,不落库;例:航空打板 3 条")
|
||||||
|
@GetMapping("/businessTypeStats")
|
||||||
|
public BiApiResult<List<RealBusinessTypeStatPO>> businessTypeStats() {
|
||||||
|
List<RealBusinessTypeStatPO> data = biPlatformRealDataService.queryTodayBusinessTypeStats();
|
||||||
|
return BiApiResult.ok(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台监控-按楼层统计月台车辆(实时查 YMS 库,不落库)
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "月台车辆统计(按楼层)", notes = "按楼层统计月台数量、今日预约车辆、当前作业车辆,实时查询 YMS 库,不落库")
|
||||||
|
@GetMapping("/platformFloorStats")
|
||||||
|
public BiApiResult<List<RealPlatformFloorStatPO>> platformFloorStats() {
|
||||||
|
List<RealPlatformFloorStatPO> data = biPlatformRealDataService.queryPlatformFloorStats();
|
||||||
|
return BiApiResult.ok(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月台管理列表(实时查 YMS qms_window_info,不落库)
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "月台管理列表", notes = "实时查询 YMS 库 qms_window_info,返回月台/鹤位窗口列表(机构、月台号、月台名称、楼层、绑定屏、UUID、状态等),不落库")
|
||||||
|
@GetMapping("/platformInfoList")
|
||||||
|
public BiApiResult<List<RealPlatformInfoPO>> platformInfoList() {
|
||||||
|
List<RealPlatformInfoPO> data = biPlatformRealDataService.queryPlatformInfoList();
|
||||||
|
return BiApiResult.ok(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 南岐GPS:根据车牌号查询车辆实时定位
|
||||||
|
* (内部经 ThirdPartyServiceFeign 转发到 mhd_thrid_party 的 /nanqiGps/queryByPlate,逻辑仍在 mhd_thrid_party)
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据车牌号查询车辆实时定位(南岐GPS)", notes = "按车牌号查询南岐GPS车辆实时定位,实时转发到三方服务")
|
||||||
|
@GetMapping("/nanqiGps/queryByPlate")
|
||||||
|
public BiApiResult<NanqiGpsLocationVO> nanqiQueryByPlate(
|
||||||
|
@ApiParam(value = "车牌号")
|
||||||
|
@RequestParam(value = "carPlate") String carPlate) {
|
||||||
|
if (carPlate == null || carPlate.trim().isEmpty()) {
|
||||||
|
throw new ServiceException("车牌号不能为空");
|
||||||
|
}
|
||||||
|
AjaxResult result = thirdPartyServiceFeign.nanqiQueryByPlate(carPlate);
|
||||||
|
Object codeObj = result == null ? null : result.get("code");
|
||||||
|
if (codeObj == null || !"200".equals(String.valueOf(codeObj))) {
|
||||||
|
String msg = result == null ? "南岐GPS查询失败" : String.valueOf(result.get("msg"));
|
||||||
|
throw new ServiceException(msg);
|
||||||
|
}
|
||||||
|
Object data = result.get("data");
|
||||||
|
NanqiGpsLocationVO vo = objectMapper.convertValue(data, NanqiGpsLocationVO.class);
|
||||||
|
return BiApiResult.ok(vo);
|
||||||
|
}
|
||||||
//园区物流大屏接口----------------------------------------------------------------------
|
//园区物流大屏接口----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* 总体运营态势
|
* 总体运营态势
|
||||||
|
|||||||
+248
@@ -0,0 +1,248 @@
|
|||||||
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.gps;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 南岐GPS 车辆定位信息 VO(与 mhd_thrid_party.NanqiGpsLocationVO 同构,供 BI 开放接口返回)
|
||||||
|
*
|
||||||
|
* @author mhd
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("南岐GPS 车辆定位信息")
|
||||||
|
public class NanqiGpsLocationVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("应答结果:1成功 0失败")
|
||||||
|
private Integer rspCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("应答描述")
|
||||||
|
private String rspDesc;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆id")
|
||||||
|
private String carId;
|
||||||
|
|
||||||
|
@ApiModelProperty("车牌号")
|
||||||
|
private String carPlate;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆名")
|
||||||
|
private String carName;
|
||||||
|
|
||||||
|
@ApiModelProperty("车队id")
|
||||||
|
private String teamId;
|
||||||
|
|
||||||
|
@ApiModelProperty("车队名称")
|
||||||
|
private String teamName;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端号")
|
||||||
|
private String tmnNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息序列号")
|
||||||
|
private String tmnKey;
|
||||||
|
|
||||||
|
@ApiModelProperty("卡号")
|
||||||
|
private String simCard;
|
||||||
|
|
||||||
|
@ApiModelProperty("定位时间")
|
||||||
|
private String time;
|
||||||
|
|
||||||
|
@ApiModelProperty("经度(WGS84)")
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
@ApiModelProperty("纬度(WGS84)")
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
@ApiModelProperty("百度经度")
|
||||||
|
private BigDecimal blng;
|
||||||
|
|
||||||
|
@ApiModelProperty("百度纬度")
|
||||||
|
private BigDecimal blat;
|
||||||
|
|
||||||
|
@ApiModelProperty("谷歌/高德经度")
|
||||||
|
private BigDecimal glng;
|
||||||
|
|
||||||
|
@ApiModelProperty("谷歌/高德纬度")
|
||||||
|
private BigDecimal glat;
|
||||||
|
|
||||||
|
@ApiModelProperty("海拔(米)")
|
||||||
|
private BigDecimal height;
|
||||||
|
|
||||||
|
@ApiModelProperty("速度(千米/小时)")
|
||||||
|
private BigDecimal speed;
|
||||||
|
|
||||||
|
@ApiModelProperty("方向 0~360")
|
||||||
|
private String drct;
|
||||||
|
|
||||||
|
@ApiModelProperty("昨日平台总里程(千米)")
|
||||||
|
private String prevDayTotalMile;
|
||||||
|
|
||||||
|
@ApiModelProperty("平台总里程(千米)")
|
||||||
|
private String mile;
|
||||||
|
|
||||||
|
@ApiModelProperty("今日里程(千米)")
|
||||||
|
private String preMile;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端里程(千米)")
|
||||||
|
private String tmnMile;
|
||||||
|
|
||||||
|
@ApiModelProperty("定位信号:0无 弱<=3 中<=6 强>6")
|
||||||
|
private String satl;
|
||||||
|
|
||||||
|
@ApiModelProperty("通讯信号:0无 弱<=10 中<=20 强>20")
|
||||||
|
private String sgn;
|
||||||
|
|
||||||
|
@ApiModelProperty("地理描述")
|
||||||
|
private String addr;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆定位状态")
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆状态文字")
|
||||||
|
private String stateCn;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员")
|
||||||
|
private String drvName;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员电话")
|
||||||
|
private String drvPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty("车牌颜色")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆类型")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@ApiModelProperty("地图图标")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@ApiModelProperty("地图图标完整链接")
|
||||||
|
private String iconLink;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否上传自定义图片:true取上传图片 false取大图")
|
||||||
|
private String uploadFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("大图片")
|
||||||
|
private String bigIcon;
|
||||||
|
|
||||||
|
@ApiModelProperty("大图片完整链接")
|
||||||
|
private String bigIconLink;
|
||||||
|
|
||||||
|
@ApiModelProperty("实时照片")
|
||||||
|
private String photoIcon;
|
||||||
|
|
||||||
|
@ApiModelProperty("中文方向")
|
||||||
|
private String drctCn;
|
||||||
|
|
||||||
|
@ApiModelProperty("今日行驶时长(秒)")
|
||||||
|
private String todayRun;
|
||||||
|
|
||||||
|
@ApiModelProperty("行停时长")
|
||||||
|
private String runStopTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("行停时长(秒),排序时使用")
|
||||||
|
private String runStopTimeSecond;
|
||||||
|
|
||||||
|
@ApiModelProperty("ACC时长")
|
||||||
|
private String accTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("ACC总时长")
|
||||||
|
private String totalAccTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("离线时长")
|
||||||
|
private String offLineTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("信号线(返回集合,每记录含name/value)")
|
||||||
|
private String sgnStts;
|
||||||
|
|
||||||
|
@ApiModelProperty("提醒信息(返回集合,每记录含name/value)")
|
||||||
|
private String reminds;
|
||||||
|
|
||||||
|
@ApiModelProperty("油量(返回集合,每记录含name/value)")
|
||||||
|
private String st1;
|
||||||
|
|
||||||
|
@ApiModelProperty("载重(返回集合,每记录含name/value)")
|
||||||
|
private String st2;
|
||||||
|
|
||||||
|
@ApiModelProperty("温度(返回集合,每记录含name/value)")
|
||||||
|
private String st3;
|
||||||
|
|
||||||
|
@ApiModelProperty("湿度(返回集合,每记录含name/value)")
|
||||||
|
private String st4;
|
||||||
|
|
||||||
|
@ApiModelProperty("水位(返回集合,每记录含name/value)")
|
||||||
|
private String st5;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务到期状态:1已到期 0未到期")
|
||||||
|
private String expState;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务期限")
|
||||||
|
private String expTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("油量")
|
||||||
|
private String oil;
|
||||||
|
|
||||||
|
@ApiModelProperty("定位附加项(JSON)")
|
||||||
|
private String protocols;
|
||||||
|
|
||||||
|
@ApiModelProperty("扩展字段(JSON)")
|
||||||
|
private String exts;
|
||||||
|
|
||||||
|
@ApiModelProperty("模拟量1")
|
||||||
|
private String moni1;
|
||||||
|
|
||||||
|
@ApiModelProperty("模拟量2")
|
||||||
|
private String moni2;
|
||||||
|
|
||||||
|
@ApiModelProperty("模拟量3")
|
||||||
|
private String moni3;
|
||||||
|
|
||||||
|
@ApiModelProperty("模拟量4")
|
||||||
|
private String moni4;
|
||||||
|
|
||||||
|
@ApiModelProperty("视频通道(JSON)")
|
||||||
|
private String videos;
|
||||||
|
|
||||||
|
@ApiModelProperty("未处理报警类型名称(逗号分隔)")
|
||||||
|
private String alarms;
|
||||||
|
|
||||||
|
@ApiModelProperty("未处理报警类型ID(逗号分隔)")
|
||||||
|
private String alarmTypeIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端型号")
|
||||||
|
private String tmnType;
|
||||||
|
|
||||||
|
@ApiModelProperty("终端到期时间")
|
||||||
|
private String tmnExpirTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("视频设备报警id集合")
|
||||||
|
private String videoAlarmTypes;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员登签姓名(卡号)")
|
||||||
|
private String driverSign;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员登签电话号码")
|
||||||
|
private String driverSignPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员登签时间")
|
||||||
|
private String driverSignTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("驾驶员登签时长")
|
||||||
|
private String drvSignTimeLong;
|
||||||
|
|
||||||
|
@ApiModelProperty("车辆基本状态(16进制位掩码)")
|
||||||
|
private String carStts;
|
||||||
|
|
||||||
|
@ApiModelProperty("报警状态(16进制位掩码)")
|
||||||
|
private String alarmStts;
|
||||||
|
|
||||||
|
@ApiModelProperty("协议版本")
|
||||||
|
private String prtcVer;
|
||||||
|
|
||||||
|
@ApiModelProperty("接入端口")
|
||||||
|
private String tmnPort;
|
||||||
|
}
|
||||||
+2
@@ -1,5 +1,6 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -17,6 +18,7 @@ import java.util.List;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
@ApiModel("BI-港澳服务专区")
|
@ApiModel("BI-港澳服务专区")
|
||||||
public class HkMacaoServiceZoneVO {
|
public class HkMacaoServiceZoneVO {
|
||||||
|
|
||||||
|
|||||||
+2
@@ -1,5 +1,6 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -11,6 +12,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
@ApiModel("BI-港澳服务专区-地图点位")
|
@ApiModel("BI-港澳服务专区-地图点位")
|
||||||
public class HkMapPointVO {
|
public class HkMapPointVO {
|
||||||
|
|
||||||
|
|||||||
+21
@@ -1,5 +1,6 @@
|
|||||||
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
package com.mhd.bi.interfaces.facadeApi.biReport.vo.hkMacaoZone;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -38,4 +39,24 @@ public class HkVehicleDetailsVO {
|
|||||||
@JsonProperty("update_time")
|
@JsonProperty("update_time")
|
||||||
@ApiModelProperty("更新时间")
|
@ApiModelProperty("更新时间")
|
||||||
private String updateTime;
|
private String updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@ApiModelProperty("运输方向")
|
||||||
|
private String direction;
|
||||||
|
|
||||||
|
@ApiModelProperty("货物类型")
|
||||||
|
private String cargo;
|
||||||
|
|
||||||
|
@ApiModelProperty("预计到达时间")
|
||||||
|
private String eta;
|
||||||
|
|
||||||
|
@JsonProperty("transportion_number")
|
||||||
|
@ApiModelProperty("运单号")
|
||||||
|
private String transportionNumber;
|
||||||
|
|
||||||
|
@JsonProperty("cargo_source")
|
||||||
|
@ApiModelProperty("货源")
|
||||||
|
private String cargoSource;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ public class PlatformOverviewVO {
|
|||||||
private Integer totalPlatforms;
|
private Integer totalPlatforms;
|
||||||
|
|
||||||
@ApiModelProperty("当前占用率,单位:%")
|
@ApiModelProperty("当前占用率,单位:%")
|
||||||
private Integer currentOccupancyRate;
|
private Double currentOccupancyRate;
|
||||||
|
|
||||||
@ApiModelProperty("当前作业中,单位:个")
|
@ApiModelProperty("当前作业中,单位:个")
|
||||||
private Integer operatingPlatforms;
|
private Integer operatingPlatforms;
|
||||||
|
|||||||
+6
@@ -14,6 +14,12 @@ import lombok.NoArgsConstructor;
|
|||||||
@ApiModel("月台监测-作业车辆")
|
@ApiModel("月台监测-作业车辆")
|
||||||
public class PlatformVehicleItemVO {
|
public class PlatformVehicleItemVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("预约申请时间")
|
||||||
|
private String appointmentTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("作业楼层")
|
||||||
|
private String workFloor;
|
||||||
|
|
||||||
@ApiModelProperty("车牌号码")
|
@ApiModelProperty("车牌号码")
|
||||||
private String plateNumber;
|
private String plateNumber;
|
||||||
|
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ spring:
|
|||||||
# username: nacos
|
# username: nacos
|
||||||
# password: manhuoda@2023
|
# password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
server-addr: 10.102.192.31:6848
|
server-addr: 10.102.192.30:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.31:6848
|
server-addr: 10.102.192.30:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
|
|||||||
@@ -0,0 +1,146 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.mhd.bi.domain.biPlatformRealData.repository.mapper.BiPlatformRealDataMapper">
|
||||||
|
|
||||||
|
<!-- 作业车辆状态列表(vehicles):仅查询预约日期是今天(TARGET_DATE)的车辆
|
||||||
|
plateNumber <- qms_main_business.CAR_NO
|
||||||
|
status <- qms_main_business.FLOW_STATUS
|
||||||
|
platformId <- qms_main_business.WINDOW_NAME(叫号月台,主业务表直接有)
|
||||||
|
platformDuration <- qms_main_business.EXIT_TIME - ENTRY_TIME(分钟)
|
||||||
|
appointmentTime <- qms_main_business.CREATE_TIME
|
||||||
|
workFloor <- qms_window_info.PLATFORM_FLOOR(按 WINDOW_NAME 关联)
|
||||||
|
-->
|
||||||
|
<select id="queryVehicles" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformVehiclePO">
|
||||||
|
SELECT
|
||||||
|
mb.CAR_NO AS plateNumber,
|
||||||
|
mb.FLOW_STATUS AS status,
|
||||||
|
mb.WINDOW_NAME AS platformId,
|
||||||
|
CASE
|
||||||
|
WHEN mb.EXIT_TIME IS NOT NULL AND mb.ENTRY_TIME IS NOT NULL
|
||||||
|
THEN CAST((mb.EXIT_TIME - mb.ENTRY_TIME) * 24 * 60 AS BIGINT)
|
||||||
|
ELSE 0
|
||||||
|
END AS platformDuration,
|
||||||
|
TO_CHAR(mb.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') AS appointmentTime,
|
||||||
|
wi.PLATFORM_FLOOR AS workFloor
|
||||||
|
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS mb
|
||||||
|
LEFT JOIN NGWL_TEST_YMS.QMS_WINDOW_INFO wi
|
||||||
|
ON wi.WINDOW_NAME = mb.WINDOW_NAME
|
||||||
|
WHERE mb.TARGET_DATE IS NOT NULL
|
||||||
|
AND TRUNC(mb.TARGET_DATE) = TRUNC(SYSDATE)
|
||||||
|
ORDER BY mb.CREATE_TIME DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 月台概览:totalPlatforms(总条数)、operatingPlatforms(作业状态=占用,JOB_STATUS: 0空闲 1占用) -->
|
||||||
|
<select id="queryPlatformOverview" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformOverviewPO">
|
||||||
|
SELECT
|
||||||
|
COUNT(1) AS totalPlatforms,
|
||||||
|
SUM(CASE WHEN JOB_STATUS = 1 THEN 1 ELSE 0 END) AS operatingPlatforms
|
||||||
|
FROM NGWL_TEST_YMS.QMS_WINDOW_INFO
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 今日作业任务:实际进入时间是今日的 -->
|
||||||
|
<select id="countTodayTasks" resultType="java.lang.Long">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS
|
||||||
|
WHERE ENTRY_TIME IS NOT NULL
|
||||||
|
AND TRUNC(ENTRY_TIME) = TRUNC(SYSDATE)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 车辆状态统计:今日的统计(按创建时间 CREATE_TIME / 流程状态)
|
||||||
|
todayReservedVehicles 改为按预约日期 TARGET_DATE(其它 3 项保持 CREATE_TIME)
|
||||||
|
FLOW_STATUS: 1已预约 2已签到 3已叫号 4已过号 5已进场 6已称重 7已装车 8二次称重 9已结算 10已还卡 11已出场 12已取消 -->
|
||||||
|
<select id="queryVehicleStatusToday" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealVehicleStatusPO">
|
||||||
|
SELECT
|
||||||
|
SUM(CASE WHEN TRUNC(TARGET_DATE) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS todayReservedVehicles,
|
||||||
|
SUM(CASE WHEN FLOW_STATUS = '1' AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS notCheckedIn,
|
||||||
|
SUM(CASE WHEN FLOW_STATUS IN ('5','6','7','8','9','10') AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS operatingVehicles,
|
||||||
|
SUM(CASE WHEN FLOW_STATUS = '11' AND TRUNC(CREATE_TIME) = TRUNC(SYSDATE) THEN 1 ELSE 0 END) AS completedVehicles
|
||||||
|
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 本月任务量:实际进入时间是本月的 -->
|
||||||
|
<select id="countMonthTasks" resultType="java.lang.Long">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS
|
||||||
|
WHERE ENTRY_TIME IS NOT NULL
|
||||||
|
AND TO_CHAR(ENTRY_TIME, 'YYYY-MM') = TO_CHAR(SYSDATE, 'YYYY-MM')
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 今日预约-业务名称统计:按 BUSINESS_NAME(业务名称)分组统计今日预约数量,按预约日期 TARGET_DATE 过滤 -->
|
||||||
|
<select id="queryTodayBusinessTypeStats" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealBusinessTypeStatPO">
|
||||||
|
SELECT
|
||||||
|
BUSINESS_NAME AS businessName,
|
||||||
|
COUNT(1) AS count
|
||||||
|
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS
|
||||||
|
WHERE BUSINESS_NAME IS NOT NULL
|
||||||
|
AND TRUNC(TARGET_DATE) = TRUNC(SYSDATE)
|
||||||
|
GROUP BY BUSINESS_NAME
|
||||||
|
ORDER BY COUNT(1) DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 月台监控-按楼层统计:楼层从叫号月台 WINDOW_NAME 解析(如 S1-01 / N1-02 -> F1),不依赖字母前缀,只取 - 前面那段的数字
|
||||||
|
platformCount 来自 QMS_WINDOW_INFO;todayReservedVehicles/operatingVehicles 来自 QMS_MAIN_BUSINESS(按 TARGET_DATE=今天) -->
|
||||||
|
<select id="queryPlatformFloorStats" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformFloorStatPO">
|
||||||
|
SELECT
|
||||||
|
'F' || SUBSTR(W.WINDOW_NAME, INSTR(W.WINDOW_NAME,'-')-1, 1) AS floorNo,
|
||||||
|
COUNT(DISTINCT W.WINDOW_NAME) AS platformCount,
|
||||||
|
COUNT(DISTINCT CASE
|
||||||
|
WHEN TRUNC(mb.TARGET_DATE) = TRUNC(SYSDATE) THEN mb.CAR_NO
|
||||||
|
END) AS todayReservedVehicles,
|
||||||
|
COUNT(DISTINCT CASE
|
||||||
|
WHEN TRUNC(mb.TARGET_DATE) = TRUNC(SYSDATE)
|
||||||
|
AND mb.FLOW_STATUS IN ('5','6','7','8','9','10')
|
||||||
|
THEN mb.CAR_NO
|
||||||
|
END) AS operatingVehicles
|
||||||
|
FROM NGWL_TEST_YMS.QMS_WINDOW_INFO W
|
||||||
|
LEFT JOIN NGWL_TEST_YMS.QMS_MAIN_BUSINESS mb
|
||||||
|
ON mb.WINDOW_NAME = W.WINDOW_NAME
|
||||||
|
WHERE W.WINDOW_NAME LIKE '%-%'
|
||||||
|
GROUP BY SUBSTR(W.WINDOW_NAME, INSTR(W.WINDOW_NAME,'-')-1, 1)
|
||||||
|
ORDER BY 1 DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 任务负荷(今日 24 小时时段):按 EXTRACT(HOUR FROM ENTRY_TIME) 统计 -->
|
||||||
|
<select id="queryTaskLoadToday" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealTaskLoadPO">
|
||||||
|
SELECT
|
||||||
|
EXTRACT(HOUR FROM ENTRY_TIME) AS hourOfDay,
|
||||||
|
COUNT(1) AS taskCount
|
||||||
|
FROM NGWL_TEST_YMS.QMS_MAIN_BUSINESS
|
||||||
|
WHERE ENTRY_TIME IS NOT NULL
|
||||||
|
AND TRUNC(ENTRY_TIME) = TRUNC(SYSDATE)
|
||||||
|
GROUP BY EXTRACT(HOUR FROM ENTRY_TIME)
|
||||||
|
ORDER BY EXTRACT(HOUR FROM ENTRY_TIME)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 月台管理列表:查询 YMS qms_window_info 月台/鹤位窗口
|
||||||
|
机构名称 deptName <- sys_dept.DEPT_NAME(d.dept_id = a.ORG_NO 关联)
|
||||||
|
鹤位屏名称 berrNames <- qms_window_berr(WINDOW_ID/BERR_ID) join qms_berr_config(ID/BERR_NAME),WM_CONCAT 拼接
|
||||||
|
其余列来自 qms_window_info 本身 -->
|
||||||
|
<select id="queryPlatformInfoList" resultType="com.mhd.bi.domain.biPlatformRealData.repository.po.RealPlatformInfoPO">
|
||||||
|
SELECT
|
||||||
|
a.ID AS id,
|
||||||
|
a.ORG_NO AS orgNo,
|
||||||
|
d.DEPT_NAME AS deptName,
|
||||||
|
a.WINDOW_NUMBER AS windowNumber,
|
||||||
|
a.WINDOW_NAME AS windowName,
|
||||||
|
a.PRIORITY_SET AS prioritySet,
|
||||||
|
a.RUNNING_STATUS AS runningStatus,
|
||||||
|
a.CREATE_BY AS createBy,
|
||||||
|
TO_CHAR(a.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') AS createTime,
|
||||||
|
a.UUID AS uuid,
|
||||||
|
a.GUIDE_IMAGES AS guideImages,
|
||||||
|
a.PLATFORM_FLOOR AS platformFloor,
|
||||||
|
a.JOB_STATUS AS jobStatus,
|
||||||
|
(
|
||||||
|
SELECT WM_CONCAT(qbc.BERR_NAME)
|
||||||
|
FROM NGWL_TEST_YMS.QMS_WINDOW_BERR qwb
|
||||||
|
LEFT JOIN NGWL_TEST_YMS.QMS_BERR_CONFIG qbc ON qbc.ID = qwb.BERR_ID
|
||||||
|
WHERE qwb.WINDOW_ID = a.ID
|
||||||
|
) AS berrNames
|
||||||
|
FROM NGWL_TEST_YMS.QMS_WINDOW_INFO a
|
||||||
|
LEFT JOIN NGWL_TEST_YMS.SYS_DEPT d ON d.DEPT_ID = a.ORG_NO
|
||||||
|
ORDER BY a.PLATFORM_FLOOR, a.WINDOW_NUMBER
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -18,6 +18,15 @@
|
|||||||
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateLatestPlatformSurveillanceSnapshot">
|
||||||
|
update NGWL_TEST_BI.BI_PLATFORM_SURVEILLANCE_SNAPSHOT
|
||||||
|
set PAYLOAD_JSON = #{payloadJson},
|
||||||
|
UPDATE_TIME = SYSDATE,
|
||||||
|
REMARK = #{remark}
|
||||||
|
where DEL_FLAG = 1
|
||||||
|
and ID = (select max(t.ID) from NGWL_TEST_BI.BI_PLATFORM_SURVEILLANCE_SNAPSHOT t where t.DEL_FLAG = 1)
|
||||||
|
</update>
|
||||||
|
|
||||||
<insert id="insertOverallOperationSnapshot">
|
<insert id="insertOverallOperationSnapshot">
|
||||||
insert into NGWL_TEST_BI.BI_OVERALL_OPERATION_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME, DEL_FLAG, REMARK)
|
insert into NGWL_TEST_BI.BI_OVERALL_OPERATION_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME, DEL_FLAG, REMARK)
|
||||||
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
values (#{payloadJson}, SYSDATE, SYSDATE, 1, #{remark})
|
||||||
|
|||||||
+3
@@ -66,6 +66,9 @@ public class ServiceNameConstants
|
|||||||
//YMS系统
|
//YMS系统
|
||||||
public static final String YMS_SERVICE = "mhd-yms-service";
|
public static final String YMS_SERVICE = "mhd-yms-service";
|
||||||
|
|
||||||
|
//YMS系统
|
||||||
|
public static final String XXL_JOB_SERVICE = "xxl-job-service";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
-2
@@ -32,8 +32,8 @@ public class TmsAddressMultiDTO {
|
|||||||
@ApiModelProperty(value = "装卸货联系人电话")
|
@ApiModelProperty(value = "装卸货联系人电话")
|
||||||
private String contactPhone;
|
private String contactPhone;
|
||||||
@ApiModelProperty(value = "装卸货日期(年月日)")
|
@ApiModelProperty(value = "装卸货日期(年月日)")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date layDate;
|
private Date layDate;
|
||||||
@ApiModelProperty(value = "装卸货时间(上午、下午、24小时)")
|
@ApiModelProperty(value = "装卸货时间(上午、下午、24小时)")
|
||||||
private String layTime;
|
private String layTime;
|
||||||
|
|||||||
+7
-2
@@ -88,5 +88,10 @@ public class SettlementCustomersPO extends BaseVOEntity{
|
|||||||
|
|
||||||
private String settlementObject;
|
private String settlementObject;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "散租推送计费单据/流水任务id")
|
||||||
}
|
private Integer pushBillingRecordJobId;
|
||||||
|
@ApiModelProperty(name = "整租推送计费单据/流水任务id")
|
||||||
|
private Integer pushContractManageToBmsJobId;
|
||||||
|
@ApiModelProperty(name = "生成应收账单任务id")
|
||||||
|
private Integer pushBillManageJobId;
|
||||||
|
}
|
||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
package com.mhd.common.core.domain.po;
|
||||||
|
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "结算对象参数对象", description = "结算对象参数响应对象")
|
||||||
|
public class SettlementCustomersParametersPO extends BaseVOEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算对象id")
|
||||||
|
private Long settlementCustomersId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算对象编码")
|
||||||
|
@Excel(name = "结算对象编码")
|
||||||
|
private String settlementCustomersCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算主体id")
|
||||||
|
@Excel(name = "结算主体id")
|
||||||
|
private Long settlementEntityId;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算主体")
|
||||||
|
@Excel(name = "结算主体")
|
||||||
|
private String settlementEntity;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("参数内容")
|
||||||
|
@Excel(name = "参数内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty("参数名称")
|
||||||
|
@Excel(name = "参数名称")
|
||||||
|
private String parametersName;
|
||||||
|
}
|
||||||
+2
@@ -33,4 +33,6 @@ public class WarehousePO implements Serializable {
|
|||||||
@Excel(name = "仓库名称")
|
@Excel(name = "仓库名称")
|
||||||
private String warehouseName;
|
private String warehouseName;
|
||||||
|
|
||||||
|
@Excel(name = "是否启用: 1-否 2-是")
|
||||||
|
private Integer isEnable;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -46,6 +46,9 @@ public class MdmMerchantRecordDTO implements Serializable {
|
|||||||
@ApiModelProperty("电子邮件")
|
@ApiModelProperty("电子邮件")
|
||||||
private String desc16;
|
private String desc16;
|
||||||
|
|
||||||
|
@ApiModelProperty("nc编码")
|
||||||
|
private String desc17;
|
||||||
|
|
||||||
@ApiModelProperty("身份证号")
|
@ApiModelProperty("身份证号")
|
||||||
private String desc23;
|
private String desc23;
|
||||||
|
|
||||||
|
|||||||
+1
-10
@@ -95,21 +95,12 @@ public final class MdmMerchantSyncFilter {
|
|||||||
|
|
||||||
public static SkipReason resolveSkipReason(MdmMerchantRecordDTO record, String orgNcCode,
|
public static SkipReason resolveSkipReason(MdmMerchantRecordDTO record, String orgNcCode,
|
||||||
Long syncOrganizationId, Long topOrganizationId) {
|
Long syncOrganizationId, Long topOrganizationId) {
|
||||||
if (record == null || StringUtils.isEmpty(record.getCode())) {
|
if (StringUtils.isEmpty(trim(record.getDesc17()))) {
|
||||||
return SkipReason.EMPTY_CODE;
|
return SkipReason.EMPTY_CODE;
|
||||||
}
|
}
|
||||||
if (!isCustomer(record)) {
|
|
||||||
return SkipReason.NOT_CUSTOMER;
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotEmpty(orgNcCode) && !orgNcCode.equals(trim(record.getCode()))) {
|
|
||||||
return SkipReason.ORG_MISMATCH;
|
|
||||||
}
|
|
||||||
if (StringUtils.isEmpty(trim(record.getDesc1()))) {
|
if (StringUtils.isEmpty(trim(record.getDesc1()))) {
|
||||||
return SkipReason.MISSING_NAME;
|
return SkipReason.MISSING_NAME;
|
||||||
}
|
}
|
||||||
if (isDisabled(record)) {
|
|
||||||
return SkipReason.DISABLED;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ public enum RoleEnum {
|
|||||||
STORE_ADMIN("店铺管理员", "store_admin"),
|
STORE_ADMIN("店铺管理员", "store_admin"),
|
||||||
OWNER_CARGO("货主", "ownerCargo"),
|
OWNER_CARGO("货主", "ownerCargo"),
|
||||||
SUPPLIER("供应商", "supplier"),
|
SUPPLIER("供应商", "supplier"),
|
||||||
CUSTOMER("客户", "customer");
|
CUSTOMER("客户", "customer"),
|
||||||
|
TENANT("租户", "tenant");
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private String code;
|
private String code;
|
||||||
|
|||||||
+9
-1
@@ -26,7 +26,7 @@ import java.io.InputStream;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@FeignClient(value = "mhd-third-party-service", configuration = FeignAutoConfiguration.class)
|
@FeignClient(value = "mhd-third-party-service",url = "http://10.33.0.129:8012", configuration = FeignAutoConfiguration.class)
|
||||||
public interface ThirdPartyServiceFeign {
|
public interface ThirdPartyServiceFeign {
|
||||||
|
|
||||||
//查询当前组织所有三方接口信息
|
//查询当前组织所有三方接口信息
|
||||||
@@ -334,4 +334,12 @@ public interface ThirdPartyServiceFeign {
|
|||||||
@PostMapping("/mdmMasterData/queryMerchant")
|
@PostMapping("/mdmMasterData/queryMerchant")
|
||||||
R<com.mhd.common.core.domain.thirdparty.MdmMerchantQueryResultDTO> queryMdmMerchant(
|
R<com.mhd.common.core.domain.thirdparty.MdmMerchantQueryResultDTO> queryMdmMerchant(
|
||||||
@RequestBody com.mhd.common.core.domain.thirdparty.MdmMerchantQueryDTO queryDTO);
|
@RequestBody com.mhd.common.core.domain.thirdparty.MdmMerchantQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 南岐GPS:根据车牌号查询车辆实时定位
|
||||||
|
* @param carPlate 车牌号
|
||||||
|
* @return AjaxResult,data 为车辆定位信息(code=200 成功)
|
||||||
|
*/
|
||||||
|
@GetMapping("/nanqiGps/queryByPlate")
|
||||||
|
AjaxResult nanqiQueryByPlate(@RequestParam("carPlate") String carPlate);
|
||||||
}
|
}
|
||||||
+112
@@ -0,0 +1,112 @@
|
|||||||
|
package com.mhd.common.core.jackson;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.databind.BeanProperty;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.deser.ContextualDeserializer;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.ParsePosition;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宽松日期反序列化:兼容 yyyy-MM-dd(纯日期)等常见格式。
|
||||||
|
*
|
||||||
|
* 背景:库存查询等接口日期只保留年月日后,前端可能把 "2026-07-06" 这类纯日期回传,
|
||||||
|
* 而实体/DTO 上 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 是严格格式,反序列化直接报
|
||||||
|
* InvalidFormatException。本反序列化器解析顺序:
|
||||||
|
* 1) 字段 @JsonFormat 指定的模式(严格全匹配,保持原行为);
|
||||||
|
* 2) 兜底常见格式:yyyy-MM-dd HH:mm:ss → yyyy-MM-dd HH:mm → yyyy-MM-dd;
|
||||||
|
* 3) 纯数字按毫秒时间戳;
|
||||||
|
* 4) 交给 Jackson 默认解析(ISO-8601 等)。
|
||||||
|
* 仅放宽接受范围,不影响任何既有格式的解析结果;由各服务 DateCompatibilityConfig 显式注册生效。
|
||||||
|
*
|
||||||
|
* @author rcx
|
||||||
|
* @date 2026-09-05
|
||||||
|
*/
|
||||||
|
public class FlexibleDateDeserializer extends JsonDeserializer<Date> implements ContextualDeserializer {
|
||||||
|
|
||||||
|
/** 兜底格式按长度降序排列,避免长文本被短格式部分解析 */
|
||||||
|
private static final String[] FALLBACK_PATTERNS = {
|
||||||
|
"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd"
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 字段 @JsonFormat 指定的模式,可为空 */
|
||||||
|
private final String pattern;
|
||||||
|
|
||||||
|
public FlexibleDateDeserializer() {
|
||||||
|
this(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlexibleDateDeserializer(String pattern) {
|
||||||
|
this.pattern = pattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException {
|
||||||
|
String value = parser.getText();
|
||||||
|
if (value == null || value.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
value = value.trim();
|
||||||
|
|
||||||
|
// 纯数字按毫秒时间戳(10位秒级时间戳也兼容)
|
||||||
|
if (value.matches("\\d{10,}")) {
|
||||||
|
return new Date(Long.parseLong(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1) 字段 @JsonFormat 指定的模式优先
|
||||||
|
Date parsed = tryParse(value, pattern);
|
||||||
|
// 2) 兜底常见格式
|
||||||
|
if (parsed == null) {
|
||||||
|
for (String fallback : FALLBACK_PATTERNS) {
|
||||||
|
parsed = tryParse(value, fallback);
|
||||||
|
if (parsed != null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 3) 交给 Jackson 默认解析(ISO-8601 等)
|
||||||
|
if (parsed == null) {
|
||||||
|
try {
|
||||||
|
parsed = ctxt.parseDate(value);
|
||||||
|
} catch (IllegalArgumentException ignore) {
|
||||||
|
// 走不到默认解析时统一在下方抛出友好异常
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (parsed == null) {
|
||||||
|
throw ctxt.weirdStringException(value, Date.class,
|
||||||
|
"支持格式:yyyy-MM-dd HH:mm:ss / yyyy-MM-dd HH:mm / yyyy-MM-dd");
|
||||||
|
}
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 严格全匹配解析:解析失败或文本未完整消费(如按 yyyy-MM-dd 解析 "2026-07-06 10:00:00")
|
||||||
|
* 都视为不匹配返回 null,交由下一个格式尝试
|
||||||
|
*/
|
||||||
|
private Date tryParse(String value, String pattern) {
|
||||||
|
if (pattern == null || pattern.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
|
||||||
|
sdf.setLenient(false);
|
||||||
|
ParsePosition pos = new ParsePosition(0);
|
||||||
|
Date date = sdf.parse(value, pos);
|
||||||
|
return (date != null && pos.getIndex() == value.length()) ? date : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) {
|
||||||
|
if (property != null) {
|
||||||
|
JsonFormat jsonFormat = property.getAnnotation(JsonFormat.class);
|
||||||
|
if (jsonFormat != null && jsonFormat.pattern() != null && !jsonFormat.pattern().isEmpty()) {
|
||||||
|
return new FlexibleDateDeserializer(jsonFormat.pattern());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-2
@@ -88,7 +88,8 @@ public class GlobalExceptionHandler
|
|||||||
{
|
{
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
log.error("请求地址'{}',发生未知异常.", requestURI, e);
|
log.error("请求地址'{}',发生未知异常.", requestURI, e);
|
||||||
return AjaxResult.error(e.getMessage());
|
String msg = StringUtils.isEmpty(e.getMessage()) ? "系统繁忙,请稍后重试" : e.getMessage();
|
||||||
|
return AjaxResult.error(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,7 +100,8 @@ public class GlobalExceptionHandler
|
|||||||
{
|
{
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
log.error("请求地址'{}',发生系统异常.", requestURI, e);
|
log.error("请求地址'{}',发生系统异常.", requestURI, e);
|
||||||
return AjaxResult.error(e.getMessage());
|
String msg = StringUtils.isEmpty(e.getMessage()) ? "系统繁忙,请稍后重试" : e.getMessage();
|
||||||
|
return AjaxResult.error(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ public class CaptchaConfig
|
|||||||
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode");
|
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode");
|
||||||
// 验证码文本字符长度 默认为5
|
// 验证码文本字符长度 默认为5
|
||||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4");
|
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4");
|
||||||
|
// 验证码文本字符源 默认为abcde2345678gfynmnpqr 改为纯数字
|
||||||
|
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_STRING, "0123456789");
|
||||||
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
// 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
|
||||||
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier");
|
||||||
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
// 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ public class AuthFilter implements GlobalFilter, Ordered
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取请求token
|
* 获取请求token
|
||||||
|
* 优先从 Authorization 请求头获取,其次从 URL 参数 token 获取(SSO场景)
|
||||||
*/
|
*/
|
||||||
private String getToken(ServerHttpRequest request)
|
private String getToken(ServerHttpRequest request)
|
||||||
{
|
{
|
||||||
@@ -200,6 +201,11 @@ public class AuthFilter implements GlobalFilter, Ordered
|
|||||||
{
|
{
|
||||||
token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);
|
token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);
|
||||||
}
|
}
|
||||||
|
// 兜底:从URL参数中获取token(SSO单点登录场景,前端尚未存入localStorage时)
|
||||||
|
if (StringUtils.isEmpty(token))
|
||||||
|
{
|
||||||
|
token = request.getQueryParams().getFirst("token");
|
||||||
|
}
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,22 +13,15 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# server-addr: 10.102.192.30:6848
|
||||||
# server-addr: 10.102.192.31:6848
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.33.0.129:6010
|
|
||||||
#线上正式环境
|
|
||||||
# server-addr: 127.0.0.1:8848
|
|
||||||
# server-addr: 10.102.192.31:6848
|
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.102.192.30:6848
|
||||||
#线上正式环境
|
|
||||||
# server-addr: 127.0.0.1:8848
|
|
||||||
# server-addr: 10.102.192.31:6848
|
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
|
|||||||
@@ -111,6 +111,16 @@
|
|||||||
<version>2.24</version>
|
<version>2.24</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.xuxueli</groupId>
|
||||||
|
<artifactId>xxl-job-core</artifactId>
|
||||||
|
<version>2.4.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jsoup</groupId>
|
||||||
|
<artifactId>jsoup</artifactId>
|
||||||
|
<version>1.17.2</version>
|
||||||
|
</dependency>
|
||||||
<!-- JPush推送 -->
|
<!-- JPush推送 -->
|
||||||
<!-- jpush极光推送导入start -->
|
<!-- jpush极光推送导入start -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|||||||
+128
-3
@@ -40,6 +40,14 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.mhd.basic.interfaces.dto.shipperLeaseDetailsApi.WarehouseLeaseExportVO;
|
||||||
|
import com.mhd.common.core.utils.poi.ExcelUtil;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -270,14 +278,15 @@ public class LeaseApplicationService {
|
|||||||
* 货主租赁明细
|
* 货主租赁明细
|
||||||
* 定时任务:每天凌晨1点执行,计算前一天的货主租赁明细
|
* 定时任务:每天凌晨1点执行,计算前一天的货主租赁明细
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0 1 * * ?")
|
// @Scheduled(cron = "0 0 1 * * ?")
|
||||||
public void shipperLeaseDetails() {
|
public void shipperLeaseDetails() {
|
||||||
log.info("开始执行货主租赁明细定时任务");
|
log.info("开始执行货主租赁明细定时任务");
|
||||||
// 计算前一天的日期,将时间设置为当天的0点0分0秒,只保留日期部分
|
// 计算前一天的日期,将时间设置为当天的0点0分0秒,只保留日期部分
|
||||||
final Date yesterday = DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), -1));
|
final Date yesterday = DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), -1));
|
||||||
|
|
||||||
LeaseDO leaseDO = new LeaseDO();
|
LeaseDO leaseDO = new LeaseDO();
|
||||||
leaseDO.setTime(yesterday);
|
leaseDO.setTime(yesterday); // 设置查询时间
|
||||||
|
leaseDO.setStatus(1); // 只查询启用状态的租赁,停用的不参与出租率计算
|
||||||
//查询有效期内的租赁
|
//查询有效期内的租赁
|
||||||
List<LeasePO> leasePOS = queryList(leaseDO);
|
List<LeasePO> leasePOS = queryList(leaseDO);
|
||||||
List<LeasePO> entireUnit = leasePOS.stream()
|
List<LeasePO> entireUnit = leasePOS.stream()
|
||||||
@@ -494,6 +503,103 @@ public class LeaseApplicationService {
|
|||||||
return warehouseOccupancyRatesList;
|
return warehouseOccupancyRatesList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出仓库出租率及客户租赁明细(单 sheet,明细行带仓库当日汇总列)
|
||||||
|
* 参数与 /warehouseOccupancyRate、/list 一致
|
||||||
|
*/
|
||||||
|
public void exportOccupancyRate(HttpServletResponse response, ShipperLeaseDetailsDO shipperLeaseDetailsDO) throws IOException {
|
||||||
|
// 注意:本方法不调用 warehouseOccupancyRate(),因为该方法在不传 warehouseId 时
|
||||||
|
// totalArea 会算成全系统所有仓库库区面积之和(如 6168),导致导出面积/日租率错误。
|
||||||
|
// 这里自行按 (业务日期 + 仓库) 维度计算,保证多仓库导出时每个仓库的面积/日租率正确。
|
||||||
|
|
||||||
|
// ===== 1. 查全部明细(用副本 DO,避免影响外部)=====
|
||||||
|
ShipperLeaseDetailsDO detailDO = new ShipperLeaseDetailsDO();
|
||||||
|
BeanUtils.copyProperties(shipperLeaseDetailsDO, detailDO);
|
||||||
|
List<ShipperLeaseDetailsPO> detailList = shipperLeaseDetailsService.queryList(detailDO);
|
||||||
|
if (detailList == null) {
|
||||||
|
detailList = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== 2. 预算每个仓库的总面积(启用库区的 storageRegion 累加),建 warehouseId -> totalArea 映射 =====
|
||||||
|
Set<Long> warehouseIds = detailList.stream()
|
||||||
|
.map(ShipperLeaseDetailsPO::getWarehouseId)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
Map<Long, BigDecimal> warehouseTotalAreaMap = new HashMap<>();
|
||||||
|
for (Long wid : warehouseIds) {
|
||||||
|
StorageSectionDO storageSectionDO = new StorageSectionDO();
|
||||||
|
storageSectionDO.setWarehouseId(wid);
|
||||||
|
storageSectionDO.setOpeningUp(1);
|
||||||
|
List<StorageSectionPO> sections = storageSectionApplicationService.queryList(storageSectionDO);
|
||||||
|
BigDecimal area = BigDecimal.ZERO;
|
||||||
|
for (StorageSectionPO s : sections) {
|
||||||
|
area = area.add(s.getStorageRegion() == null ? BigDecimal.ZERO : s.getStorageRegion());
|
||||||
|
}
|
||||||
|
warehouseTotalAreaMap.put(wid, area);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== 3. 按 (业务日期 + 仓库ID) 聚合,算每个仓库当天的整租/散租面积 =====
|
||||||
|
// summaryMap: key -> [整租面积, 散租面积]
|
||||||
|
SimpleDateFormat keySdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Map<String, BigDecimal[]> summaryMap = new HashMap<>();
|
||||||
|
for (ShipperLeaseDetailsPO d : detailList) {
|
||||||
|
String key = (d.getBusinessDate() == null ? "" : keySdf.format(d.getBusinessDate()))
|
||||||
|
+ "_" + d.getWarehouseId();
|
||||||
|
BigDecimal[] arr = summaryMap.computeIfAbsent(key, k -> new BigDecimal[]{BigDecimal.ZERO, BigDecimal.ZERO});
|
||||||
|
BigDecimal leaseArea = d.getLeaseArea() == null ? BigDecimal.ZERO : d.getLeaseArea();
|
||||||
|
if ("整租".equals(d.getLeaseType())) {
|
||||||
|
arr[0] = arr[0].add(leaseArea);
|
||||||
|
} else {
|
||||||
|
arr[1] = arr[1].add(leaseArea);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== 4. 明细为主,每行拼上对应仓库当天的汇总(总面积/日租率按仓库单独算)=====
|
||||||
|
List<WarehouseLeaseExportVO> exportList = new ArrayList<>();
|
||||||
|
for (ShipperLeaseDetailsPO d : detailList) {
|
||||||
|
WarehouseLeaseExportVO vo = new WarehouseLeaseExportVO();
|
||||||
|
// 明细列
|
||||||
|
vo.setBusinessDate(d.getBusinessDate());
|
||||||
|
vo.setOrganizationName(d.getOrganizationName());
|
||||||
|
vo.setWarehouseName(d.getWarehouseName());
|
||||||
|
vo.setCargoOwnerName(d.getCargoOwnerName());
|
||||||
|
vo.setLeaseType(d.getLeaseType());
|
||||||
|
vo.setLeaseArea(d.getLeaseArea());
|
||||||
|
// 汇总列
|
||||||
|
String key = (d.getBusinessDate() == null ? "" : keySdf.format(d.getBusinessDate()))
|
||||||
|
+ "_" + d.getWarehouseId();
|
||||||
|
BigDecimal[] arr = summaryMap.get(key);
|
||||||
|
BigDecimal entireLeaseArea = (arr != null) ? arr[0] : BigDecimal.ZERO;
|
||||||
|
BigDecimal fractionalLeaseArea = (arr != null) ? arr[1] : BigDecimal.ZERO;
|
||||||
|
vo.setEntireLeaseArea(entireLeaseArea);
|
||||||
|
vo.setFractionalLeaseArea(fractionalLeaseArea);
|
||||||
|
// 该仓库的总面积(按仓库单独算,不再用全局总和)
|
||||||
|
BigDecimal widTotalArea = warehouseTotalAreaMap.getOrDefault(d.getWarehouseId(), BigDecimal.ZERO);
|
||||||
|
vo.setTotalArea(widTotalArea);
|
||||||
|
// 日租率 = (整租+散租) / 总面积 × 100,保留2位小数(直接输出百分比值,如 10.00)
|
||||||
|
BigDecimal leaseSum = entireLeaseArea.add(fractionalLeaseArea);
|
||||||
|
BigDecimal dailyRate = widTotalArea.compareTo(BigDecimal.ZERO) == 0
|
||||||
|
? BigDecimal.ZERO
|
||||||
|
: leaseSum.multiply(new BigDecimal("100")).divide(widTotalArea, 2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
vo.setDailyRentalRate(dailyRate);
|
||||||
|
exportList.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== 5. 按业务日期降序、仓库名升序排序(null 排最后)=====
|
||||||
|
exportList.sort(Comparator
|
||||||
|
.comparing(WarehouseLeaseExportVO::getBusinessDate, Comparator.nullsLast(Comparator.reverseOrder()))
|
||||||
|
.thenComparing(WarehouseLeaseExportVO::getWarehouseName, Comparator.nullsLast(Comparator.naturalOrder())));
|
||||||
|
|
||||||
|
// ===== 6. 用 ExcelUtil 导出(项目通用做法,单 sheet)=====
|
||||||
|
String fileName = URLEncoder.encode("仓库出租率导出", "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||||
|
|
||||||
|
ExcelUtil<WarehouseLeaseExportVO> util = new ExcelUtil<>(WarehouseLeaseExportVO.class);
|
||||||
|
util.exportExcel(response, exportList, "仓库出租率");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务整租推送到bms
|
* 定时任务整租推送到bms
|
||||||
@@ -537,7 +643,7 @@ public class LeaseApplicationService {
|
|||||||
/**
|
/**
|
||||||
* 定时任务散租推送到bms
|
* 定时任务散租推送到bms
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0 0 * * ?")
|
// @Scheduled(cron = "0 0 0 * * ?")
|
||||||
public void ScatteredRentalSynchronization() {
|
public void ScatteredRentalSynchronization() {
|
||||||
LeaseDO leaseDO = new LeaseDO();
|
LeaseDO leaseDO = new LeaseDO();
|
||||||
leaseDO.setTime(new Date());
|
leaseDO.setTime(new Date());
|
||||||
@@ -581,6 +687,25 @@ public class LeaseApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用/停用租赁
|
||||||
|
* @param leaseIds 租赁ID列表
|
||||||
|
* @param status 目标状态:1=启用,0=停用
|
||||||
|
*/
|
||||||
|
public Boolean updateStatus(List<Long> leaseIds, Integer status) {
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
Long updateBy = loginUser != null ? loginUser.getUserid() : null;
|
||||||
|
String updateByName = loginUser != null ? loginUser.getUsername() : null;
|
||||||
|
if (leaseIds == null || leaseIds.isEmpty()) {
|
||||||
|
throw new ServiceException("租赁ID不能为空");
|
||||||
|
}
|
||||||
|
if (status == null || (status != 0 && status != 1)) {
|
||||||
|
throw new ServiceException("状态值无效:1=启用,0=停用");
|
||||||
|
}
|
||||||
|
log.info("启用/停用租赁--结束,leaseIds={},状态={},更新人id={},更新人名称={}",leaseIds,status==0?"停用":"启用",updateBy,updateByName);
|
||||||
|
return leaseDomainService.updateStatus(leaseIds, status, updateBy, updateByName);
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @description 设置数据字典键值
|
// * @description 设置数据字典键值
|
||||||
// * @author ZhouGY
|
// * @author ZhouGY
|
||||||
|
|||||||
+23
-1
@@ -461,7 +461,8 @@ public class MessageManageApplicationService
|
|||||||
//获取当前登录人
|
//获取当前登录人
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if(null == loginUser){
|
if(null == loginUser){
|
||||||
throw new ServiceException("获取登录人失败");
|
//未登录(游客):返回空消息中心结构,保证小程序界面正常展示而不报错
|
||||||
|
return buildEmptyAppNoticeList();
|
||||||
}
|
}
|
||||||
noticeMessageLoggingDo.setUserId(loginUser.getUserid());
|
noticeMessageLoggingDo.setUserId(loginUser.getUserid());
|
||||||
//获取每种类型的最新一条
|
//获取每种类型的最新一条
|
||||||
@@ -522,6 +523,27 @@ public class MessageManageApplicationService
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未登录(游客)时返回空的消息中心结构,避免前端页面因无登录上下文而报错
|
||||||
|
* @return NoticeMessageLoggingAppListPo
|
||||||
|
*/
|
||||||
|
private NoticeMessageLoggingAppListPo buildEmptyAppNoticeList() {
|
||||||
|
NoticeMessageLoggingAppListPo result = new NoticeMessageLoggingAppListPo();
|
||||||
|
NoticeMessageLoggingAppListPo.CommonNotice serviceNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
|
||||||
|
serviceNotice.setUnreadNum("0");
|
||||||
|
NoticeMessageLoggingAppListPo.CommonNotice activityNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
|
||||||
|
activityNotice.setUnreadNum("0");
|
||||||
|
NoticeMessageLoggingAppListPo.CommonNotice logisticsNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
|
||||||
|
logisticsNotice.setUnreadNum("0");
|
||||||
|
NoticeMessageLoggingAppListPo.CommonNotice systemNotice = new NoticeMessageLoggingAppListPo.CommonNotice();
|
||||||
|
systemNotice.setUnreadNum("0");
|
||||||
|
result.setServiceNotice(serviceNotice);
|
||||||
|
result.setActivityNotice(activityNotice);
|
||||||
|
result.setLogisticsNotice(logisticsNotice);
|
||||||
|
result.setSystemNotice(systemNotice);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP根据类型获取消息通知
|
* APP根据类型获取消息通知
|
||||||
* @param noticeMessageLoggingDo
|
* @param noticeMessageLoggingDo
|
||||||
|
|||||||
+556
-4
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -11,16 +12,26 @@ import com.mhd.basic.domain.contractManage.entity.ContractManage;
|
|||||||
import com.mhd.basic.domain.contractManage.repository.mapper.ContractManageMapper;
|
import com.mhd.basic.domain.contractManage.repository.mapper.ContractManageMapper;
|
||||||
import com.mhd.basic.domain.contractManage.repository.po.ContractManagePO;
|
import com.mhd.basic.domain.contractManage.repository.po.ContractManagePO;
|
||||||
import com.mhd.basic.domain.contractManage.repository.todo.ContractManageDO;
|
import com.mhd.basic.domain.contractManage.repository.todo.ContractManageDO;
|
||||||
|
import com.mhd.basic.domain.contractManage.repository.util.HttpWebServiceUtil;
|
||||||
|
import com.mhd.basic.domain.contractManage.repository.util.XxlJobOpenApiUtil;
|
||||||
import com.mhd.basic.domain.contractManage.service.ContractManageDomainService;
|
import com.mhd.basic.domain.contractManage.service.ContractManageDomainService;
|
||||||
import com.mhd.basic.domain.contractManageDetail.entity.ContractManageDetail;
|
import com.mhd.basic.domain.contractManageDetail.entity.ContractManageDetail;
|
||||||
import com.mhd.basic.domain.contractManageDetail.repository.mapper.ContractManageDetailMapper;
|
import com.mhd.basic.domain.contractManageDetail.repository.mapper.ContractManageDetailMapper;
|
||||||
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
|
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
|
||||||
import com.mhd.basic.domain.contractManageDetail.repository.todo.ContractManageDetailDO;
|
import com.mhd.basic.domain.contractManageDetail.repository.todo.ContractManageDetailDO;
|
||||||
import com.mhd.basic.domain.contractManageDetail.service.ContractManageDetailDomainService;
|
import com.mhd.basic.domain.contractManageDetail.service.ContractManageDetailDomainService;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.mapper.ContractManageParametersMapper;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.service.ContractManageParametersDomainService;
|
||||||
import com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO;
|
import com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO;
|
||||||
import com.mhd.basic.domain.expenseAccount.service.ExpenseAccountDomainService;
|
import com.mhd.basic.domain.expenseAccount.service.ExpenseAccountDomainService;
|
||||||
import com.mhd.basic.interfaces.dto.contractManage.*;
|
import com.mhd.basic.interfaces.dto.contractManage.*;
|
||||||
|
import com.mhd.basic.interfaces.assember.contractManageParameters.ContractManageParametersAssembler;
|
||||||
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
|
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
|
||||||
|
import com.mhd.basic.interfaces.dto.contractManageParameters.ContractManageParametersDTO;
|
||||||
import com.mhd.common.core.domain.po.*;
|
import com.mhd.common.core.domain.po.*;
|
||||||
import com.mhd.common.core.enums.DictCode;
|
import com.mhd.common.core.enums.DictCode;
|
||||||
import com.mhd.common.core.exception.ServiceException;
|
import com.mhd.common.core.exception.ServiceException;
|
||||||
@@ -32,18 +43,23 @@ import com.mhd.common.core.web.domain.AjaxResult;
|
|||||||
import com.mhd.common.security.utils.SecurityUtils;
|
import com.mhd.common.security.utils.SecurityUtils;
|
||||||
import com.mhd.system.api.BmsServiceFeign;
|
import com.mhd.system.api.BmsServiceFeign;
|
||||||
import com.mhd.system.api.SystemServiceFeign;
|
import com.mhd.system.api.SystemServiceFeign;
|
||||||
|
import com.mhd.system.api.domain.BusinessDocumentFeign;
|
||||||
|
import com.mhd.system.api.domain.MaterialInventoryPO;
|
||||||
import com.mhd.system.api.domain.SysDictData;
|
import com.mhd.system.api.domain.SysDictData;
|
||||||
import com.mhd.system.api.model.LoginUser;
|
import com.mhd.system.api.model.LoginUser;
|
||||||
import com.mhd.system.service.ISysDictTypeService;
|
import com.mhd.system.service.ISysDictTypeService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
@@ -75,6 +91,20 @@ public class ContractManageApplicationService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SystemServiceFeign systemServiceFeign;
|
private SystemServiceFeign systemServiceFeign;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ContractManageParametersDomainService contractManageParametersDomainService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ContractManageParametersAssembler contractManageParametersAssembler;
|
||||||
|
@Autowired
|
||||||
|
private ContractManageParametersMapper contractManageParametersMapper;
|
||||||
|
@Autowired
|
||||||
|
private IContractManageParametersService contractManageParametersService;
|
||||||
|
@Resource
|
||||||
|
private XxlJobOpenApiUtil apiUtil;
|
||||||
|
@Value("${xxl.job.admin.addresses}")
|
||||||
|
private String adminAddresses;
|
||||||
|
private static final String token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjozNTYzLCJ0b3BPcmdhbml6YXRpb25JZCI6MjgyNywidXNlcl9rZXkiOiI0N2MzY2U4My0wMmFjLTQ0NTQtOTdiYS1lYmQwMDc2MzNiNDMiLCJ1c2VybmFtZSI6ImNhbmdtYSJ9.tnZyywwburfBo3Kizdhfk5eYdXbrrZ9976Z0W7GrS6UqSpKwfI2RwdRwfYx7DbD7Ri1Fdj_eOVxBkjvdFF226Q";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询合同管理列表
|
* 分页查询合同管理列表
|
||||||
@@ -126,7 +156,21 @@ public class ContractManageApplicationService {
|
|||||||
contractManageDO.setTopOrganizationId(2827L);
|
contractManageDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return contractManageDomainService.queryList(contractManageDO);
|
List<ContractManagePO> list = contractManageDomainService.queryList(contractManageDO);
|
||||||
|
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
List<Long> contractManageIds = list.stream()
|
||||||
|
.map(ContractManagePO::getContractManageId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<ContractManageParametersPO> allParams = contractManageParametersDomainService.queryListByManageIds(contractManageIds);
|
||||||
|
Map<Long, List<ContractManageParametersPO>> paramsMap = allParams.stream()
|
||||||
|
.collect(Collectors.groupingBy(ContractManageParametersPO::getContractManageId));
|
||||||
|
for (ContractManagePO po : list) {
|
||||||
|
po.setContractManageParametersList(paramsMap.getOrDefault(po.getContractManageId(), new ArrayList<>()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public BigDecimal getAmount(List<SubjectAndPriceReturn> subjectAndPriceReturnList) {
|
// public BigDecimal getAmount(List<SubjectAndPriceReturn> subjectAndPriceReturnList) {
|
||||||
@@ -610,6 +654,7 @@ public class ContractManageApplicationService {
|
|||||||
*/
|
*/
|
||||||
//20260702取消同一时间段不能有相同合同校验
|
//20260702取消同一时间段不能有相同合同校验
|
||||||
//checkContract(contractManageDO);
|
//checkContract(contractManageDO);
|
||||||
|
checkUniqueActiveContract(contractManageDO);
|
||||||
handleData(contractManageDO);
|
handleData(contractManageDO);
|
||||||
handleDict(contractManageDO);
|
handleDict(contractManageDO);
|
||||||
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
|
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
|
||||||
@@ -618,9 +663,42 @@ public class ContractManageApplicationService {
|
|||||||
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||||
boolean flag = contractManageDomainService.insert(contractManageDO);
|
boolean flag = contractManageDomainService.insert(contractManageDO);
|
||||||
handleDetils(contractManageDO, true);
|
handleDetils(contractManageDO, true);
|
||||||
|
handleParameters(contractManageDO);
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合同管理
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public ContractManageDO insertFeign(ContractManageDO contractManageDO) {
|
||||||
|
//获取当前登录人信息
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
|
}
|
||||||
|
validateContractType(contractManageDO.getContractType());
|
||||||
|
/*
|
||||||
|
通用合同:同一时间段、同一合同类型,只能存在一个
|
||||||
|
特殊合同:同一结算主体、同一时间段、同一合同类型,只能存在一个
|
||||||
|
*/
|
||||||
|
//20260702取消同一时间段不能有相同合同校验
|
||||||
|
//checkContract(contractManageDO);
|
||||||
|
checkUniqueActiveContract(contractManageDO);
|
||||||
|
handleData(contractManageDO);
|
||||||
|
handleDict(contractManageDO);
|
||||||
|
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
|
||||||
|
contractManageDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||||
|
contractManageDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||||
|
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||||
|
boolean flag = contractManageDomainService.insert(contractManageDO);
|
||||||
|
if (!flag) {
|
||||||
|
throw new ServiceException("新增合同管理失败,请检查数据");
|
||||||
|
}
|
||||||
|
handleDetils(contractManageDO, true);
|
||||||
|
return contractManageDO;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理数据字典
|
* 处理数据字典
|
||||||
*/
|
*/
|
||||||
@@ -748,6 +826,26 @@ public class ContractManageApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkUniqueActiveContract(ContractManageDO contractManageDO) {
|
||||||
|
if (contractManageDO.getContractState() != null && contractManageDO.getContractState() != 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (contractManageDO.getSettlementCustomersId() == null
|
||||||
|
|| StringUtils.isEmpty(contractManageDO.getWarehouseTempLayerType())
|
||||||
|
|| StringUtils.isEmpty(contractManageDO.getContractRentType())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
long count = contractManageDomainService.countByUniqueKey(
|
||||||
|
contractManageDO.getSettlementCustomersId(),
|
||||||
|
contractManageDO.getWarehouseTempLayerType(),
|
||||||
|
contractManageDO.getContractRentType(),
|
||||||
|
contractManageDO.getContractManageId()
|
||||||
|
);
|
||||||
|
if (count > 0) {
|
||||||
|
throw new ServiceException("同一结算客户、同一温层、同一租赁类型只能存在一个使用中的合同");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理合同详情
|
* 处理合同详情
|
||||||
*/
|
*/
|
||||||
@@ -759,6 +857,10 @@ public class ContractManageApplicationService {
|
|||||||
}
|
}
|
||||||
//根据合同编码查询保存合同信息
|
//根据合同编码查询保存合同信息
|
||||||
ContractManagePO contractManagePO = contractManageDomainService.getInfoByCode1(contractManageDO.getOriginalContractNumber());
|
ContractManagePO contractManagePO = contractManageDomainService.getInfoByCode1(contractManageDO.getOriginalContractNumber());
|
||||||
|
//修改时,不管前端是否传明细,都需要先删除该合同原有的明细,避免明细为空时老明细仍在
|
||||||
|
if (!isInsert) {
|
||||||
|
contractManageDetailMapper.delete(new LambdaQueryWrapper<ContractManageDetail>().eq(ContractManageDetail::getContractManageId, contractManageDO.getContractManageId()));
|
||||||
|
}
|
||||||
//保存合同详情科目
|
//保存合同详情科目
|
||||||
List<ContractManageDetailDTO> contractManageDetailDTOList = contractManageDO.getContractManageDetailDTOList();
|
List<ContractManageDetailDTO> contractManageDetailDTOList = contractManageDO.getContractManageDetailDTOList();
|
||||||
if(null != contractManageDetailDTOList && contractManageDetailDTOList.size()>0){
|
if(null != contractManageDetailDTOList && contractManageDetailDTOList.size()>0){
|
||||||
@@ -830,8 +932,9 @@ public class ContractManageApplicationService {
|
|||||||
if (isInsert) {
|
if (isInsert) {
|
||||||
// 新增/复制时使用新插入的合同ID
|
// 新增/复制时使用新插入的合同ID
|
||||||
contractManageDetailDO.setContractManageId(contractManageDO.getContractManageId());
|
contractManageDetailDO.setContractManageId(contractManageDO.getContractManageId());
|
||||||
} else if(null != contractManagePO){
|
} else {
|
||||||
contractManageDetailDO.setContractManageId(contractManagePO.getContractManageId());
|
// 修改时使用当前正在修改的合同ID,不能用 getInfoByCode1 查到的(避免多条合同 originalContractNumber 相同导致明细错绑)
|
||||||
|
contractManageDetailDO.setContractManageId(contractManageDO.getContractManageId());
|
||||||
}
|
}
|
||||||
contractManageDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
contractManageDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||||
contractManageDetailDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
contractManageDetailDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||||
@@ -841,6 +944,111 @@ public class ContractManageApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleParameters(ContractManageDO contractManageDO) {
|
||||||
|
List<ContractManageParametersPO> existingList = contractManageParametersDomainService.queryListByManageId(contractManageDO.getContractManageId());
|
||||||
|
if (!existingList.isEmpty()) {
|
||||||
|
Long[] ids = existingList.stream().map(ContractManageParametersPO::getId).toArray(Long[]::new);
|
||||||
|
contractManageParametersDomainService.delete(ids);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(contractManageDO.getParametersJson())) {
|
||||||
|
ContractManageParametersDTO dto = new ContractManageParametersDTO();
|
||||||
|
dto.setContractManageId(contractManageDO.getContractManageId());
|
||||||
|
dto.setContractNumber(contractManageDO.getContractNumber());
|
||||||
|
dto.setContractName(contractManageDO.getContractName());
|
||||||
|
dto.setParametersJson(contractManageDO.getParametersJson());
|
||||||
|
dto.setOrganizationId(contractManageDO.getOrganizationId());
|
||||||
|
dto.setOrganizationName(contractManageDO.getOrganizationName());
|
||||||
|
dto.setTopOrganizationId(contractManageDO.getTopOrganizationId());
|
||||||
|
ContractManageParametersDO parametersDO = contractManageParametersAssembler.toDO(dto);
|
||||||
|
contractManageParametersDomainService.insert(parametersDO);
|
||||||
|
if(StringUtils.isNotEmpty(contractManageDO.getSettlementCustomersCode())){
|
||||||
|
AjaxResult ajaxResult = bmsServiceFeign.getCustomersInfoByCode(contractManageDO.getSettlementCustomersCode());
|
||||||
|
if (!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||||
|
throw new ServiceException("获取结算客户信息失败");
|
||||||
|
}
|
||||||
|
SettlementCustomersPO settlementCustomersPO = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), SettlementCustomersPO.class);
|
||||||
|
if(null == settlementCustomersPO){
|
||||||
|
throw new ServiceException("结算客户信息未找到");
|
||||||
|
}
|
||||||
|
Long settlementEntityId = settlementCustomersPO.getSettlementEntityId();
|
||||||
|
if(null != settlementEntityId){
|
||||||
|
Integer pushContractManageToBmsJobId = settlementCustomersPO.getPushContractManageToBmsJobId();
|
||||||
|
if (null != pushContractManageToBmsJobId) {
|
||||||
|
stopXxlJob(pushContractManageToBmsJobId);
|
||||||
|
}
|
||||||
|
Integer jobId = addXxlJob(settlementEntityId.toString());
|
||||||
|
settlementCustomersPO.setPushContractManageToBmsJobId(jobId);
|
||||||
|
AjaxResult updateResult = bmsServiceFeign.updatePushContractManageJobId(settlementCustomersPO.getSettlementCustomersId(), jobId);
|
||||||
|
if (!"200".equals(String.valueOf(updateResult.get("code")))) {
|
||||||
|
throw new ServiceException("更新结算对象定时任务ID失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建夜间23点定时任务
|
||||||
|
* @param shipperId 结算对象id,作为任务参数
|
||||||
|
* @return xxlJobId 保存到业务表,后续用于删除/暂停
|
||||||
|
*/
|
||||||
|
public Integer addXxlJob(String shipperId) {
|
||||||
|
XxlJobOpenApiUtil.JobInfoAddReq req = new XxlJobOpenApiUtil.JobInfoAddReq();
|
||||||
|
req.setJobGroup(5);
|
||||||
|
//生成唯一业务流水号拼接至JobDesc,保证本次新建任务的JobDesc唯一,据此查询jobId不会命中历史任务
|
||||||
|
String xxlJobBizNo = generateXxlJobBizNo();
|
||||||
|
req.setJobDesc("整租推送计费单据/流水任务,结算对象id:" + shipperId + ",业务流水号:" + xxlJobBizNo);
|
||||||
|
req.setAuthor("system");
|
||||||
|
req.setAlarmEmail("");
|
||||||
|
req.setScheduleType("CRON");
|
||||||
|
// 每天晚上23点执行
|
||||||
|
req.setScheduleConf("0 0 1 * * ?");
|
||||||
|
req.setGlueType("BEAN");
|
||||||
|
req.setExecutorHandler("pushContractManageToBms");
|
||||||
|
req.setExecutorParam(shipperId);
|
||||||
|
req.setGlueRemark("");
|
||||||
|
req.setGlueSource("");
|
||||||
|
req.setExecutorRouteStrategy("FIRST");
|
||||||
|
req.setChildJobId(null);
|
||||||
|
req.setMisfireStrategy("DO_NOTHING");
|
||||||
|
req.setExecutorBlockStrategy("SERIAL_EXECUTION");
|
||||||
|
req.setExecutorTimeout(0);
|
||||||
|
req.setExecutorFailRetryCount(0);
|
||||||
|
|
||||||
|
boolean addOk = apiUtil.addJob(req);
|
||||||
|
if (!addOk) {
|
||||||
|
throw new RuntimeException("创建夜间定时任务失败");
|
||||||
|
}
|
||||||
|
Integer xxlJobId = apiUtil.queryJobIdByDescAndParam(req.getJobDesc(), shipperId,"5");
|
||||||
|
if (xxlJobId == null) {
|
||||||
|
throw new RuntimeException("定时任务创建成功,但查询jobId失败");
|
||||||
|
}
|
||||||
|
return xxlJobId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void stopXxlJob(Integer shipperId) {
|
||||||
|
//1.实例化工具类,建议交给Spring管理
|
||||||
|
XxlJobOpenApiUtil apiUtil = new XxlJobOpenApiUtil(adminAddresses,token);
|
||||||
|
//3.调用创建任务接口 ,返回任务ID
|
||||||
|
apiUtil.pauseJob(shipperId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final DateTimeFormatter JOB_BIZ_NO_FORMATTER = DateTimeFormatter.ofPattern("yyMMddHHmmssSSS");
|
||||||
|
private static final Random RANDOM = new Random();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成xxl-job任务业务流水号:JOB + 当天yyMMddHHmmssSSS + 6位随机数字,保证每次创建的JobDesc唯一
|
||||||
|
* 示例:JOB260905102030123123456
|
||||||
|
* @return 业务流水号字符串
|
||||||
|
*/
|
||||||
|
private static String generateXxlJobBizNo() {
|
||||||
|
String dateTimeStr = LocalDateTime.now().format(JOB_BIZ_NO_FORMATTER);
|
||||||
|
int randomNum = RANDOM.nextInt(1_000_000);
|
||||||
|
String randomStr = String.format("%06d", randomNum);
|
||||||
|
return "JOB" + dateTimeStr + randomStr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改合同管理
|
* 修改合同管理
|
||||||
*/
|
*/
|
||||||
@@ -848,8 +1056,10 @@ public class ContractManageApplicationService {
|
|||||||
public Boolean update(ContractManageDO contractManageDO) {
|
public Boolean update(ContractManageDO contractManageDO) {
|
||||||
validateContractType(contractManageDO.getContractType());
|
validateContractType(contractManageDO.getContractType());
|
||||||
//checkContract(contractManageDO);
|
//checkContract(contractManageDO);
|
||||||
|
checkUniqueActiveContract(contractManageDO);
|
||||||
handleData(contractManageDO);
|
handleData(contractManageDO);
|
||||||
handleDetils(contractManageDO, false);
|
handleDetils(contractManageDO, false);
|
||||||
|
handleParameters(contractManageDO);
|
||||||
handleDict(contractManageDO);
|
handleDict(contractManageDO);
|
||||||
return contractManageDomainService.update(contractManageDO);
|
return contractManageDomainService.update(contractManageDO);
|
||||||
}
|
}
|
||||||
@@ -875,6 +1085,8 @@ public class ContractManageApplicationService {
|
|||||||
ContractManagePO result = contractManageDomainService.getInfo(contractManageId);
|
ContractManagePO result = contractManageDomainService.getInfo(contractManageId);
|
||||||
List<ContractManageDetailPO> contractManageDetailPOList = contractManageDetailDomainService.queryListByManageId(result.getContractManageId());
|
List<ContractManageDetailPO> contractManageDetailPOList = contractManageDetailDomainService.queryListByManageId(result.getContractManageId());
|
||||||
result.setContractManageDetailPOList(contractManageDetailPOList);
|
result.setContractManageDetailPOList(contractManageDetailPOList);
|
||||||
|
List<ContractManageParametersPO> paramsList = contractManageParametersDomainService.queryListByManageId(result.getContractManageId());
|
||||||
|
result.setContractManageParametersList(paramsList);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -977,7 +1189,8 @@ public class ContractManageApplicationService {
|
|||||||
&& Objects.equals(item.getContractType(), contractType))
|
&& Objects.equals(item.getContractType(), contractType))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (contractManagePOs != null && contractManagePOs.size() > 1) {
|
if (contractManagePOs != null && contractManagePOs.size() > 1) {
|
||||||
throw new ServiceException("存在多条相同费用科目的合同,请检查");
|
resultContract.setIsMany("1");
|
||||||
|
return resultContract;
|
||||||
}
|
}
|
||||||
if(contractManagePOList != null && contractManagePOList.size()>0){
|
if(contractManagePOList != null && contractManagePOList.size()>0){
|
||||||
if(StringUtils.isNotEmpty(settlementCustomersCode)){
|
if(StringUtils.isNotEmpty(settlementCustomersCode)){
|
||||||
@@ -1118,4 +1331,343 @@ public class ContractManageApplicationService {
|
|||||||
public ContractManagePO getGeneralContract() {
|
public ContractManagePO getGeneralContract() {
|
||||||
return contractManageDomainService.getGeneralContract();
|
return contractManageDomainService.getGeneralContract();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同导出(合同头字段 + 明细拍平成一行一条明细)
|
||||||
|
*/
|
||||||
|
public List<ContractManageExportVO> buildExportList(ContractManageDO contractManageDO) {
|
||||||
|
List<ContractManagePO> contractList = this.queryList(contractManageDO);
|
||||||
|
List<ContractManageExportVO> exportList = new ArrayList<>();
|
||||||
|
if (contractList == null || contractList.isEmpty()) {
|
||||||
|
return exportList;
|
||||||
|
}
|
||||||
|
List<Long> contractManageIds = contractList.stream()
|
||||||
|
.map(ContractManagePO::getContractManageId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
Map<Long, List<ContractManageDetailPO>> detailMap = contractManageDetailDomainService
|
||||||
|
.queryListByManageIds(contractManageIds).stream()
|
||||||
|
.collect(Collectors.groupingBy(ContractManageDetailPO::getContractManageId));
|
||||||
|
|
||||||
|
for (ContractManagePO contract : contractList) {
|
||||||
|
List<ContractManageDetailPO> details = detailMap.get(contract.getContractManageId());
|
||||||
|
if (details != null && !details.isEmpty()) {
|
||||||
|
for (ContractManageDetailPO detail : details) {
|
||||||
|
ContractManageExportVO vo = new ContractManageExportVO();
|
||||||
|
// 合同头字段整体复制
|
||||||
|
BeanUtils.copyProperties(contract, vo);
|
||||||
|
// 明细字段显式赋值(合同头/明细存在同名字段,避免互相覆盖)
|
||||||
|
vo.setSubjectType(detail.getSubjectType());
|
||||||
|
vo.setFirstSubjectCode(detail.getFirstSubjectCode());
|
||||||
|
vo.setFirstSubjectName(detail.getFirstSubjectName());
|
||||||
|
vo.setSecondSubjectCode(detail.getSecondSubjectCode());
|
||||||
|
vo.setSecondSubjectName(detail.getSecondSubjectName());
|
||||||
|
vo.setAccountingStrategy(detail.getAccountingStrategy());
|
||||||
|
vo.setBillingAttributes(detail.getBillingAttributes());
|
||||||
|
vo.setSubjectEffectiveDate(detail.getSubjectEffectiveDate());
|
||||||
|
vo.setSubjectExpirationDate(detail.getSubjectExpirationDate());
|
||||||
|
vo.setDocumentType(detail.getDocumentType());
|
||||||
|
vo.setServiceItemsName(detail.getServiceItemsName());
|
||||||
|
exportList.add(vo);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 无明细的合同也保留一行头字段
|
||||||
|
ContractManageExportVO vo = new ContractManageExportVO();
|
||||||
|
BeanUtils.copyProperties(contract, vo);
|
||||||
|
exportList.add(vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return exportList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 获取结算对象
|
||||||
|
* */
|
||||||
|
public SettlementCustomersPO getSettlementCustomers(Long shipperId) {
|
||||||
|
try {
|
||||||
|
Long topOrganizationId = null;
|
||||||
|
AjaxResult ajaxResult = bmsServiceFeign.getCustomersInfoBySettlementEntityId(shipperId, topOrganizationId);
|
||||||
|
if (ajaxResult == null || !"200".equals(String.valueOf(ajaxResult.get("code"))) || ajaxResult.get("data") == null) {
|
||||||
|
log.warn("按 settlementEntityId 查询结算对象未成功:shipperId={}, code={}", shipperId, ajaxResult != null ? ajaxResult.get("code") : null);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")), SettlementCustomersPO.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("按 settlementEntityId 查询结算对象异常,shipperId={}", shipperId, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 根据结算对象id获取结算对象参数列表
|
||||||
|
* */
|
||||||
|
public List<SettlementCustomersParametersPO> getSettlementCustomersParameters(Long settlementCustomersId) {
|
||||||
|
try {
|
||||||
|
AjaxResult ajaxResult = bmsServiceFeign.getListBySettlementCustomersId(settlementCustomersId);
|
||||||
|
if (ajaxResult == null || !"200".equals(String.valueOf(ajaxResult.get("code"))) || ajaxResult.get("data") == null) {
|
||||||
|
log.warn("按 settlementCustomersId 查询结算对象参数未成功:settlementCustomersId={}, code={}", settlementCustomersId, ajaxResult != null ? ajaxResult.get("code") : null);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JSON.parseArray(JSON.toJSONString(ajaxResult.get("data")), SettlementCustomersParametersPO.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("按 settlementCustomersId 查询结算对象参数异常,settlementCustomersId={}", settlementCustomersId, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void pushContractManageToBms(String shipperId) {
|
||||||
|
SettlementCustomersPO settlementCustomers = getSettlementCustomers(Long.valueOf(shipperId));
|
||||||
|
if (settlementCustomers == null) {
|
||||||
|
log.warn("pushContractManageToBms 未找到结算对象,shipperId={}", shipperId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Long settlementCustomersId = settlementCustomers.getSettlementCustomersId();
|
||||||
|
List<SettlementCustomersParametersPO> parametersList = getSettlementCustomersParameters(settlementCustomersId);
|
||||||
|
if (parametersList == null || parametersList.isEmpty()) {
|
||||||
|
log.warn("pushContractManageToBms 未找到结算对象参数,settlementCustomersId={}", settlementCustomersId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (SettlementCustomersParametersPO param : parametersList) {
|
||||||
|
String parametersName = param.getParametersName();
|
||||||
|
String content = param.getContent();
|
||||||
|
if (StringUtils.isEmpty(content)) {
|
||||||
|
log.warn("结算对象参数 content 为空,parametersName={}, settlementCustomersId={}", parametersName, settlementCustomersId);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Map<String, Object> contentMap = JSON.parseObject(content, new TypeReference<Map<String, Object>>() {});
|
||||||
|
Integer sfzdcz = Integer.valueOf(contentMap.get("sfzdcz").toString());
|
||||||
|
if (sfzdcz != 1) {
|
||||||
|
log.info("结算对象参数 sfzdcz 不为1,跳过推送,parametersName={}, sfzdcz={}", parametersName, sfzdcz);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
String warehouseTempLayerType;
|
||||||
|
String serviceItemsName;
|
||||||
|
Boolean isGc = false;
|
||||||
|
if ("冻仓计费配置".equals(parametersName)) {
|
||||||
|
warehouseTempLayerType = "DC";
|
||||||
|
serviceItemsName = "冻仓仓租费用";
|
||||||
|
} else if ("干仓计费配置".equals(parametersName)) {
|
||||||
|
warehouseTempLayerType = "GC";
|
||||||
|
serviceItemsName = "干仓仓租费用";
|
||||||
|
isGc=true;
|
||||||
|
} else {
|
||||||
|
log.warn("未知的结算对象参数类型,parametersName={}", parametersName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ContractManage> contractManages = contractManageMapper.selectList(new LambdaQueryWrapper<ContractManage>()
|
||||||
|
.eq(ContractManage::getContractRentType, "NORMAL")
|
||||||
|
.eq(ContractManage::getContractState, 2)
|
||||||
|
.eq(ContractManage::getDelFlag, 1)
|
||||||
|
.eq(ContractManage::getSettlementCustomersId, settlementCustomersId)
|
||||||
|
.eq(ContractManage::getWarehouseTempLayerType, warehouseTempLayerType));
|
||||||
|
if (contractManages == null || contractManages.isEmpty()) {
|
||||||
|
log.warn("未找到正式合同,warehouseTempLayerType={}, settlementCustomersId={}", warehouseTempLayerType, settlementCustomersId);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (ContractManage contractManage : contractManages) {
|
||||||
|
Long contractManageId = contractManage.getContractManageId();
|
||||||
|
ContractManageParameters contractManageParameters = contractManageParametersService.getOne(new LambdaQueryWrapper<ContractManageParameters>()
|
||||||
|
.eq(ContractManageParameters::getContractManageId, contractManageId), false);
|
||||||
|
if (contractManageParameters == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String parametersJson = contractManageParameters.getParametersJson();
|
||||||
|
Map<String, Object> parametersMap = JSON.parseObject(parametersJson, new TypeReference<Map<String, Object>>() {});
|
||||||
|
BigDecimal hyj = (BigDecimal) parametersMap.get("hyj");
|
||||||
|
buildBusinessDocument(hyj, settlementCustomers, contractManage, "0D01", "租金(固定租)", warehouseTempLayerType, serviceItemsName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildBusinessDocument(BigDecimal fee, SettlementCustomersPO settlementCustomers, ContractManage contractManage, String code, String name, String warehouseType, String serviceItemsName) {
|
||||||
|
|
||||||
|
Long settlementCustomersId = settlementCustomers.getSettlementCustomersId();
|
||||||
|
Long settlementEntityId = settlementCustomers.getSettlementEntityId();
|
||||||
|
String settlementEntity = settlementCustomers.getSettlementEntity();
|
||||||
|
String settlementCustomersCode = settlementCustomers.getSettlementCustomersCode();
|
||||||
|
BusinessDocumentFeign businessDocumentFeign = new BusinessDocumentFeign();
|
||||||
|
businessDocumentFeign.setBillAmount(fee);
|
||||||
|
businessDocumentFeign.setOrganizationId(contractManage.getOrganizationId());
|
||||||
|
businessDocumentFeign.setOrganizationName(contractManage.getOrganizationName());
|
||||||
|
businessDocumentFeign.setTopOrganizationId(contractManage.getTopOrganizationId());
|
||||||
|
businessDocumentFeign.setBelongModuleCode("wms");
|
||||||
|
businessDocumentFeign.setBelongModule("WMS");
|
||||||
|
businessDocumentFeign.setDataSources(1);
|
||||||
|
businessDocumentFeign.setSettlementEntity(settlementEntity);
|
||||||
|
businessDocumentFeign.setSettlementCustomersId(settlementCustomersId);
|
||||||
|
businessDocumentFeign.setSettlementCustomersCode(settlementCustomersCode);
|
||||||
|
businessDocumentFeign.setDocumentTypeId(4l);
|
||||||
|
businessDocumentFeign.setDocumentTypeCode("CM_ZL");
|
||||||
|
businessDocumentFeign.setDocumentType("仓库租赁单");
|
||||||
|
businessDocumentFeign.setFirstSubjectCode(code);
|
||||||
|
businessDocumentFeign.setFirstSubjectName(name);
|
||||||
|
businessDocumentFeign.setBillingTime(new Date());
|
||||||
|
businessDocumentFeign.setServiceItemsCode("GC_CZ");
|
||||||
|
businessDocumentFeign.setServiceItemsName(serviceItemsName);
|
||||||
|
businessDocumentFeign.setSettlementWay(1);
|
||||||
|
businessDocumentFeign.setOriginalBusinessNum(contractManage.getContractNumber());
|
||||||
|
businessDocumentFeign.setWarehouseType(warehouseType);
|
||||||
|
String contractName = contractManage.getContractName();
|
||||||
|
String contractNumber = contractManage.getContractNumber();
|
||||||
|
Long contractManageId = contractManage.getContractManageId();
|
||||||
|
businessDocumentFeign.setContractName(contractName);
|
||||||
|
businessDocumentFeign.setContractNumber(contractNumber);
|
||||||
|
businessDocumentFeign.setContractManageId(contractManageId);
|
||||||
|
businessDocumentFeign.setBusinessFlow(OrderSequence.getOrderCode("LS"));
|
||||||
|
businessDocumentFeign.setIsPush(1);
|
||||||
|
AjaxResult ajaxResult = bmsServiceFeign.feignSaveBusinessDocument(businessDocumentFeign);
|
||||||
|
if (ajaxResult == null || !"200".equals(String.valueOf(ajaxResult.get("code")))) {
|
||||||
|
log.error("保存业务单据失败: {}", ajaxResult != null ? ajaxResult.get("msg") : "feign调用异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static final String WEBSERVICE_URL = "http://10.33.0.116:8080/sys/webservice/ngLegalByFindWebserviceService";
|
||||||
|
|
||||||
|
public List<com.alibaba.fastjson.JSONObject> getContractNosByCompanyName(String companyName, int pageNum, int pageSize) {
|
||||||
|
List<com.alibaba.fastjson.JSONObject> contractList = new ArrayList<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
log.info("=== 开始查询合同列表 ===");
|
||||||
|
log.info("查询公司: {}, 页码: {}, 每页数量: {}", companyName, pageNum, pageSize);
|
||||||
|
|
||||||
|
String httpRequest = buildXmlRequest(companyName, pageNum, pageSize);
|
||||||
|
log.info("XML请求: {}", httpRequest);
|
||||||
|
log.info("XML请求生成完成,长度: {} 字符", httpRequest.length());
|
||||||
|
|
||||||
|
log.info("正在调用WebService...");
|
||||||
|
String httpResponse = HttpWebServiceUtil.callWebService(httpRequest, WEBSERVICE_URL);
|
||||||
|
|
||||||
|
String jsonData = extractJsonFromResponse(httpResponse);
|
||||||
|
|
||||||
|
log.info("正在解析JSON..."+jsonData);
|
||||||
|
|
||||||
|
if (jsonData == null || jsonData.trim().isEmpty()) {
|
||||||
|
log.warn("未提取到JSON数据,返回空列表");
|
||||||
|
return contractList;
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("提取到JSON数据,长度: {} 字符", jsonData.length());
|
||||||
|
|
||||||
|
List<com.alibaba.fastjson.JSONObject> result = parseContractListFromJson(jsonData);
|
||||||
|
contractList.addAll(result);
|
||||||
|
|
||||||
|
log.info("=== 查询完成 ===");
|
||||||
|
log.info("找到 {} 个合同", contractList.size());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("查询合同列表失败", e);
|
||||||
|
throw new RuntimeException("查询合同列表失败: " + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return contractList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建XML请求 - 动态分页
|
||||||
|
*/
|
||||||
|
private String buildXmlRequest(String companyName, int pageNum, int pageSize) {
|
||||||
|
String jsonParam = "{\"fdName\":\"" + companyName + "\"}";
|
||||||
|
|
||||||
|
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
|
||||||
|
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"" +
|
||||||
|
" xmlns:web=\"http://webservice.legal.ng.kmss.landray.com/\">" +
|
||||||
|
"<soapenv:Body>" +
|
||||||
|
"<web:findNgLegal>" +
|
||||||
|
"<arg0 xmlns=\"\">" +
|
||||||
|
"<fdPageNo>" + pageNum + "</fdPageNo>" +
|
||||||
|
"<fdRowSize>" + pageSize + "</fdRowSize>" +
|
||||||
|
"<fdRelativePerson><![CDATA[" + jsonParam + "]]></fdRelativePerson>" +
|
||||||
|
"<fdContractNo></fdContractNo>" +
|
||||||
|
"<fdPersonNo>NA0301</fdPersonNo>" +
|
||||||
|
"<fdSponsor></fdSponsor>" +
|
||||||
|
"<docCreateTimeStar></docCreateTimeStar>" +
|
||||||
|
"<docCreateTimeEnd></docCreateTimeEnd>" +
|
||||||
|
"</arg0>" +
|
||||||
|
"</web:findNgLegal>" +
|
||||||
|
"</soapenv:Body>" +
|
||||||
|
"</soapenv:Envelope>";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从SOAP响应中提取JSON
|
||||||
|
*/
|
||||||
|
private String extractJsonFromResponse(String soapResponse) {
|
||||||
|
if (soapResponse == null || soapResponse.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 直接查找JSON部分
|
||||||
|
int jsonStart = soapResponse.indexOf("{\"returnState\":");
|
||||||
|
int jsonEnd = soapResponse.indexOf("}</return>");
|
||||||
|
|
||||||
|
if (jsonStart != -1 && jsonEnd != -1) {
|
||||||
|
// 找到JSON结束位置
|
||||||
|
jsonEnd = jsonEnd + 1; // 包含右大括号
|
||||||
|
|
||||||
|
String json = soapResponse.substring(jsonStart, jsonEnd);
|
||||||
|
log.info("直接提取JSON成功");
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 备用方法:查找<return>标签
|
||||||
|
int start = soapResponse.indexOf("<return>");
|
||||||
|
int end = soapResponse.indexOf("</return>");
|
||||||
|
|
||||||
|
if (start != -1 && end != -1) {
|
||||||
|
start += "<return>".length();
|
||||||
|
String json = soapResponse.substring(start, end);
|
||||||
|
|
||||||
|
// 解码XML实体
|
||||||
|
json = json.replace("<", "<")
|
||||||
|
.replace(">", ">")
|
||||||
|
.replace("&", "&")
|
||||||
|
.replace(""", "\"")
|
||||||
|
.replace("'", "'");
|
||||||
|
|
||||||
|
log.info("从<return>标签提取JSON成功");
|
||||||
|
return json.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
log.warn("无法从响应中提取JSON");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析JSON获取完整合同列表
|
||||||
|
*/
|
||||||
|
private List<com.alibaba.fastjson.JSONObject> parseContractListFromJson(String jsonData) {
|
||||||
|
List<com.alibaba.fastjson.JSONObject> contractList = new ArrayList<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(jsonData);
|
||||||
|
|
||||||
|
String returnState = jsonObject.getString("returnState");
|
||||||
|
if (!"2".equals(returnState)) {
|
||||||
|
log.warn("返回状态异常: {}", returnState);
|
||||||
|
return contractList;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONArray dataArray = jsonObject.getJSONArray("data");
|
||||||
|
if (dataArray == null || dataArray.isEmpty()) {
|
||||||
|
log.info("查询成功,但未找到合同数据");
|
||||||
|
return contractList;
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("找到 {} 个合同", dataArray.size());
|
||||||
|
|
||||||
|
for (int i = 0; i < dataArray.size(); i++) {
|
||||||
|
com.alibaba.fastjson.JSONObject contract = dataArray.getJSONObject(i);
|
||||||
|
contractList.add(contract);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("JSON解析失败", e);
|
||||||
|
log.error("原始JSON: {}", jsonData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return contractList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+72
@@ -0,0 +1,72 @@
|
|||||||
|
package com.mhd.basic.application.service.contractManageParameters;
|
||||||
|
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.service.ContractManageParametersDomainService;
|
||||||
|
import com.mhd.common.security.utils.SecurityUtils;
|
||||||
|
import com.mhd.system.api.model.LoginUser;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表ApplicationService
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ContractManageParametersApplicationService {
|
||||||
|
@Autowired
|
||||||
|
private ContractManageParametersDomainService contractManageParametersDomainService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询合约信息规则维护表列表
|
||||||
|
*/
|
||||||
|
|
||||||
|
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
if (loginUser != null){
|
||||||
|
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||||
|
if (topOrganizationId != null && topOrganizationId != 1){
|
||||||
|
contractManageParametersDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return contractManageParametersDomainService.queryList(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
|
||||||
|
return contractManageParametersDomainService.insert(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean update(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
return contractManageParametersDomainService.update(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public boolean delete(Long[] ids) {
|
||||||
|
return contractManageParametersDomainService.delete(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取合约信息规则维护表详细信息
|
||||||
|
*/
|
||||||
|
public ContractManageParametersPO getInfo(Long id)
|
||||||
|
{
|
||||||
|
return contractManageParametersDomainService.getInfo(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+92
-5
@@ -13,6 +13,7 @@ import com.mhd.basic.application.service.contractManage.ContractManageApplicatio
|
|||||||
import com.mhd.basic.domain.expenseAccount.service.ExpenseAccountDomainService;
|
import com.mhd.basic.domain.expenseAccount.service.ExpenseAccountDomainService;
|
||||||
import com.mhd.basic.infrastructure.feign.vo.SysDictDataVo;
|
import com.mhd.basic.infrastructure.feign.vo.SysDictDataVo;
|
||||||
import com.mhd.basic.interfaces.dto.expenseAccount.ExpenseAccountDTO;
|
import com.mhd.basic.interfaces.dto.expenseAccount.ExpenseAccountDTO;
|
||||||
|
import com.mhd.basic.interfaces.dto.expenseAccount.ExpenseAccountExportVO;
|
||||||
import com.mhd.basic.interfaces.dto.expenseAccount.SearchExpenseAccountDTO;
|
import com.mhd.basic.interfaces.dto.expenseAccount.SearchExpenseAccountDTO;
|
||||||
import com.mhd.common.core.enums.DictCode;
|
import com.mhd.common.core.enums.DictCode;
|
||||||
import com.mhd.common.core.exception.ServiceException;
|
import com.mhd.common.core.exception.ServiceException;
|
||||||
@@ -27,14 +28,11 @@ import com.mhd.system.api.SystemServiceFeign;
|
|||||||
import com.mhd.system.api.model.LoginUser;
|
import com.mhd.system.api.model.LoginUser;
|
||||||
import com.mhd.common.core.domain.po.UserPo;
|
import com.mhd.common.core.domain.po.UserPo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@@ -382,6 +380,55 @@ public class ExpenseAccountApplicationService {
|
|||||||
return expenseAccountDomainService.getInfo(expenseAccountId);
|
return expenseAccountDomainService.getInfo(expenseAccountId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复制费用科目-获取原科目数据供前端回显
|
||||||
|
* <p>前端拿到数据后回显到新增弹窗,用户填写新科目编码后通过 /edit 接口(id 为空走新增)提交保存。
|
||||||
|
* 清空科目编码是为了避免直接复制出重复编码(费用科目编码无唯一性校验)。</p>
|
||||||
|
*/
|
||||||
|
public ExpenseAccountPO copy(ExpenseAccountDTO expenseAccountDTO) {
|
||||||
|
if (expenseAccountDTO == null || expenseAccountDTO.getExpenseAccountId() == null) {
|
||||||
|
throw new ServiceException("原费用科目id不能为空");
|
||||||
|
}
|
||||||
|
// 获取原费用科目信息
|
||||||
|
ExpenseAccountPO original = expenseAccountDomainService.getInfo(expenseAccountDTO.getExpenseAccountId());
|
||||||
|
if (null == original) {
|
||||||
|
throw new ServiceException("原费用科目信息未找到");
|
||||||
|
}
|
||||||
|
// 清空主键,前端提交时走新增
|
||||||
|
original.setExpenseAccountId(null);
|
||||||
|
// 清空科目编码,强制用户输入新编码,避免编码重复
|
||||||
|
original.setSubjectCode(null);
|
||||||
|
// 清空审计字段,新增时由 ExpenseAccountAssembler 重新生成
|
||||||
|
original.setCreateBy(null);
|
||||||
|
original.setCreateByName(null);
|
||||||
|
original.setCreateTime(null);
|
||||||
|
original.setUpdateBy(null);
|
||||||
|
original.setUpdateByName(null);
|
||||||
|
original.setUpdateTime(null);
|
||||||
|
original.setDelFlag(null);
|
||||||
|
// 清空非表字段
|
||||||
|
original.setUnit(null);
|
||||||
|
original.setExpenseAccountPOList(null);
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建费用科目导出数据(不分页全量,按列表页查询条件 + 数据权限过滤)
|
||||||
|
*/
|
||||||
|
public List<ExpenseAccountExportVO> buildExportList(ExpenseAccountDO expenseAccountDO) {
|
||||||
|
List<ExpenseAccountExportVO> exportList = new ArrayList<>();
|
||||||
|
List<ExpenseAccountPO> list = this.queryList(expenseAccountDO);
|
||||||
|
if (list == null || list.isEmpty()) {
|
||||||
|
return exportList;
|
||||||
|
}
|
||||||
|
for (ExpenseAccountPO po : list) {
|
||||||
|
ExpenseAccountExportVO vo = new ExpenseAccountExportVO();
|
||||||
|
BeanUtils.copyProperties(po, vo);
|
||||||
|
exportList.add(vo);
|
||||||
|
}
|
||||||
|
return exportList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改状态
|
* 修改状态
|
||||||
* @param expenseAccountDTO
|
* @param expenseAccountDTO
|
||||||
@@ -580,6 +627,46 @@ public class ExpenseAccountApplicationService {
|
|||||||
return expenseAccountDomainService.getInfoByCode2(subjectCode,topOrganizationId);
|
return expenseAccountDomainService.getInfoByCode2(subjectCode,topOrganizationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编码和组织ID查询
|
||||||
|
*/
|
||||||
|
public ExpenseAccountPO getInfoByOrgAndCode(String subjectCode, Long organizationId) {
|
||||||
|
if(!StringUtils.isNotEmpty(subjectCode)){
|
||||||
|
throw new ServiceException("费用科目编码不能为空");
|
||||||
|
}
|
||||||
|
if(organizationId == null){
|
||||||
|
throw new ServiceException("组织ID不能为空");
|
||||||
|
}
|
||||||
|
ExpenseAccountPO expenseAccountPO = expenseAccountDomainService.getInfoByOrgAndCode(subjectCode, organizationId);
|
||||||
|
// // 组装计费单位列表:单位-单位英文
|
||||||
|
// List<String> unit = new ArrayList<>();
|
||||||
|
// if (expenseAccountPO != null) {
|
||||||
|
// unit.add(expenseAccountPO.getBillingUnit() + "-" + expenseAccountPO.getBillingUnitEn());
|
||||||
|
// unit.add(expenseAccountPO.getBillingUnit2() + "-" + expenseAccountPO.getBillingUnitEn2());
|
||||||
|
// expenseAccountPO.setUnit(unit);
|
||||||
|
// }
|
||||||
|
// 组装计费单位列表(数组),中文和英文都为null时过滤掉,避免出现"null-null"
|
||||||
|
List<Map<String, String>> unit = new ArrayList<>();
|
||||||
|
if (expenseAccountPO != null) {
|
||||||
|
addUnitIfPresent(unit, expenseAccountPO.getBillingUnit(), expenseAccountPO.getBillingUnitEn());
|
||||||
|
addUnitIfPresent(unit, expenseAccountPO.getBillingUnit2(), expenseAccountPO.getBillingUnitEn2());
|
||||||
|
expenseAccountPO.setUnit(unit);
|
||||||
|
}
|
||||||
|
return expenseAccountPO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组装计费单位,中文和英文都为null时不加入列表
|
||||||
|
*/
|
||||||
|
private void addUnitIfPresent(List<Map<String, String>> unit, String billingUnit, String billingUnitEn) {
|
||||||
|
if (billingUnit == null && billingUnitEn == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Map<String, String> unitMap = new HashMap<>();
|
||||||
|
unitMap.put("unit", billingUnit + "-" + billingUnitEn);
|
||||||
|
unit.add(unitMap);
|
||||||
|
}
|
||||||
|
|
||||||
public List<QueryExpenseAccountPO> selectExpenseAccount(SearchExpenseAccountDO searchExpenseAccountDO){
|
public List<QueryExpenseAccountPO> selectExpenseAccount(SearchExpenseAccountDO searchExpenseAccountDO){
|
||||||
setDataPermissionForSearch(searchExpenseAccountDO);
|
setDataPermissionForSearch(searchExpenseAccountDO);
|
||||||
return expenseAccountDomainService.selectExpenseAccount(searchExpenseAccountDO);
|
return expenseAccountDomainService.selectExpenseAccount(searchExpenseAccountDO);
|
||||||
|
|||||||
+13
-10
@@ -157,15 +157,18 @@ public class MaterialBaseInfoApplicationService {
|
|||||||
* @param materialBaseInfoDO
|
* @param materialBaseInfoDO
|
||||||
*/
|
*/
|
||||||
private void shipperParam(MaterialBaseInfoDO materialBaseInfoDO){
|
private void shipperParam(MaterialBaseInfoDO materialBaseInfoDO){
|
||||||
AjaxResult ajaxResult = userServiceFeign.getInfo(materialBaseInfoDO.getShipperId());
|
Long shipperId = materialBaseInfoDO.getShipperId();
|
||||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
if (shipperId != null && shipperId != 0l) {
|
||||||
throw new ServiceException("获取货主信息失败");
|
AjaxResult ajaxResult = userServiceFeign.getInfo(materialBaseInfoDO.getShipperId());
|
||||||
}
|
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||||
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
throw new ServiceException("获取货主信息失败");
|
||||||
// 如果原始shipperName不为空,保留原始值(导入或手动输入时应该保留完整名称)
|
}
|
||||||
// 只有在原始shipperName为空时,才使用查询到的userName
|
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
||||||
if (materialBaseInfoDO.getShipperName() == null || materialBaseInfoDO.getShipperName().trim().isEmpty()) {
|
// 如果原始shipperName不为空,保留原始值(导入或手动输入时应该保留完整名称)
|
||||||
materialBaseInfoDO.setShipperName(userPo.getUserName());
|
// 只有在原始shipperName为空时,才使用查询到的userName
|
||||||
|
if (materialBaseInfoDO.getShipperName() == null || materialBaseInfoDO.getShipperName().trim().isEmpty()) {
|
||||||
|
materialBaseInfoDO.setShipperName(userPo.getUserName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,4 +185,4 @@ public class MaterialBaseInfoApplicationService {
|
|||||||
//return materialBaseInfoDomainService.getMaterialStockList(shipperName,materialName,machineCode,topOrganizationId,pageNum,pageSize);/**/
|
//return materialBaseInfoDomainService.getMaterialStockList(shipperName,materialName,machineCode,topOrganizationId,pageNum,pageSize);/**/
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+34
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.mhd.basic.domain.storageLocation.repository.po.StorageLocationPO;
|
import com.mhd.basic.domain.storageLocation.repository.po.StorageLocationPO;
|
||||||
import com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO;
|
import com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO;
|
||||||
import com.mhd.basic.domain.storageLocation.service.StorageLocationDomainService;
|
import com.mhd.basic.domain.storageLocation.service.StorageLocationDomainService;
|
||||||
|
import com.mhd.basic.interfaces.dto.storageLocation.StorageLocationDTO;
|
||||||
import com.mhd.basic.domain.storageSection.repository.todo.StorageSectionDO;
|
import com.mhd.basic.domain.storageSection.repository.todo.StorageSectionDO;
|
||||||
import com.mhd.basic.infrastructure.feign.vo.SysDictDataVo;
|
import com.mhd.basic.infrastructure.feign.vo.SysDictDataVo;
|
||||||
import com.mhd.common.core.domain.po.UserPo;
|
import com.mhd.common.core.domain.po.UserPo;
|
||||||
@@ -207,6 +208,39 @@ public class StorageLocationApplicationService {
|
|||||||
return storageLocationDomainService.getInfo(storageLocationId);
|
return storageLocationDomainService.getInfo(storageLocationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复制库位-获取原库位数据供前端回显
|
||||||
|
* 前端拿到数据后跳转到新增库位页面,用户修改编码后通过edit接口提交新增
|
||||||
|
*/
|
||||||
|
public StorageLocationPO copyStorageLocation(StorageLocationDTO storageLocationDTO) {
|
||||||
|
if (storageLocationDTO.getStorageLocationId() == null) {
|
||||||
|
throw new ServiceException("原库位id不能为空");
|
||||||
|
}
|
||||||
|
// 获取原库位信息
|
||||||
|
StorageLocationPO originalStorageLocation = storageLocationDomainService.getInfo(storageLocationDTO.getStorageLocationId());
|
||||||
|
if (null == originalStorageLocation) {
|
||||||
|
throw new ServiceException("原库位信息未找到");
|
||||||
|
}
|
||||||
|
// 清空唯一性字段:库位id不清空会导致提交后走修改分支覆盖原库位;
|
||||||
|
// 库位编码同组织同仓库唯一,须由用户重新填写;条码为物理唯一标识,一并清空
|
||||||
|
originalStorageLocation.setStorageLocationId(null);
|
||||||
|
originalStorageLocation.setStorageLocationCode(null);
|
||||||
|
originalStorageLocation.setLocationBarCode(null);
|
||||||
|
// 状态重置为初始值:新库位无库存(空)、启用、未作废
|
||||||
|
originalStorageLocation.setStatus(1);
|
||||||
|
originalStorageLocation.setOpeningUp(1);
|
||||||
|
originalStorageLocation.setNullify(1);
|
||||||
|
// 清空审计字段,提交新增时由Assembler按当前登录人重新生成
|
||||||
|
originalStorageLocation.setCreateBy(null);
|
||||||
|
originalStorageLocation.setCreateByName(null);
|
||||||
|
originalStorageLocation.setCreateTime(null);
|
||||||
|
originalStorageLocation.setUpdateBy(null);
|
||||||
|
originalStorageLocation.setUpdateByName(null);
|
||||||
|
originalStorageLocation.setUpdateTime(null);
|
||||||
|
// 其余业务字段(仓库/库区/库位组、分类/种类/混放策略、限制、长宽高、坐标、备注)保留回显
|
||||||
|
return originalStorageLocation;
|
||||||
|
}
|
||||||
|
|
||||||
public int getStorageLocationCount(StorageLocationDO storageLocationDO)
|
public int getStorageLocationCount(StorageLocationDO storageLocationDO)
|
||||||
{
|
{
|
||||||
return storageLocationDomainService.getStorageLocationCount(storageLocationDO);
|
return storageLocationDomainService.getStorageLocationCount(storageLocationDO);
|
||||||
|
|||||||
+23
-2
@@ -21,6 +21,7 @@ import com.mhd.system.service.ISysDictTypeService;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 库区ApplicationService
|
* 库区ApplicationService
|
||||||
@@ -42,11 +43,32 @@ public class StorageSectionApplicationService {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public List<StorageSectionPO> queryList(StorageSectionDO storageSectionDO) {
|
public List<StorageSectionPO> queryList(StorageSectionDO storageSectionDO) {
|
||||||
|
//设置查询数据权限
|
||||||
|
applyQueryDataPermission(storageSectionDO);
|
||||||
|
return storageSectionDomainService.queryList(storageSectionDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库区面积合计:与 /list 相同的数据权限和筛选条件,SQL 直接 SUM(库区面积),
|
||||||
|
* 保证合计数与列表中各行库区面积之和一致
|
||||||
|
*/
|
||||||
|
public BigDecimal sumStorageRegion(StorageSectionDO storageSectionDO) {
|
||||||
|
//与 /list 共用同一数据权限,保证合计与列表口径一致
|
||||||
|
applyQueryDataPermission(storageSectionDO);
|
||||||
|
return storageSectionDomainService.sumStorageRegion(storageSectionDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 设置查询数据权限(queryList 与 sumStorageRegion 共用)
|
||||||
|
* @author ZhouGY
|
||||||
|
* @param storageSectionDO
|
||||||
|
*/
|
||||||
|
private void applyQueryDataPermission(StorageSectionDO storageSectionDO) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if (loginUser != null && loginUser.getUserPo() != null) {
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
Long frontendOrganizationId = storageSectionDO.getOrganizationId(); // 前端传递的 organizationId
|
Long frontendOrganizationId = storageSectionDO.getOrganizationId(); // 前端传递的 organizationId
|
||||||
|
|
||||||
// 数据权限:根据 organizationId 来设置查询权限
|
// 数据权限:根据 organizationId 来设置查询权限
|
||||||
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己
|
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己
|
||||||
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
||||||
@@ -91,7 +113,6 @@ public class StorageSectionApplicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return storageSectionDomainService.queryList(storageSectionDO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+38
@@ -126,6 +126,18 @@ public class ContractManage extends BaseVOEntity{
|
|||||||
@Excel(name = "其他附件地址")
|
@Excel(name = "其他附件地址")
|
||||||
private String otherAttachmentsUrl;
|
private String otherAttachmentsUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同正本附件原始文件名")
|
||||||
|
private String contractOriginalName;
|
||||||
|
|
||||||
|
@ApiModelProperty("廉政协议附件原始文件名")
|
||||||
|
private String integrityAgreementName;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全协议附件原始文件名")
|
||||||
|
private String securityProtocolName;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他附件原始文件名(多文件时与 otherAttachmentsUrl 同分隔符、同顺序)")
|
||||||
|
private String otherAttachmentsName;
|
||||||
|
|
||||||
@ApiModelProperty("我司签订人")
|
@ApiModelProperty("我司签订人")
|
||||||
@Excel(name = "我司签订人")
|
@Excel(name = "我司签订人")
|
||||||
private String ourSinged;
|
private String ourSinged;
|
||||||
@@ -180,4 +192,30 @@ public class ContractManage extends BaseVOEntity{
|
|||||||
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
||||||
private Integer transportationCosts;
|
private Integer transportationCosts;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同租赁类型")
|
||||||
|
private String contractRentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同租赁类型")
|
||||||
|
private String contractRentTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型")
|
||||||
|
private String warehouseTempLayerType;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型")
|
||||||
|
private String warehouseTempLayerTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("续期提前天数")
|
||||||
|
private Integer renewalAdvanceDays;
|
||||||
|
|
||||||
|
@ApiModelProperty("标的物")
|
||||||
|
private String subjectMatter;
|
||||||
|
|
||||||
|
@ApiModelProperty("性质")
|
||||||
|
private String nature;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同最初起始日")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date initialStartDate;
|
||||||
|
|
||||||
}
|
}
|
||||||
+43
@@ -1,6 +1,7 @@
|
|||||||
package com.mhd.basic.domain.contractManage.repository.po;
|
package com.mhd.basic.domain.contractManage.repository.po;
|
||||||
|
|
||||||
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
|
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
|
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
|
||||||
import com.mhd.common.core.annotation.Excel;
|
import com.mhd.common.core.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -124,6 +125,18 @@ public class ContractManagePO extends BaseVOEntity{
|
|||||||
@Excel(name = "其他附件地址")
|
@Excel(name = "其他附件地址")
|
||||||
private String otherAttachmentsUrl;
|
private String otherAttachmentsUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同正本附件原始文件名")
|
||||||
|
private String contractOriginalName;
|
||||||
|
|
||||||
|
@ApiModelProperty("廉政协议附件原始文件名")
|
||||||
|
private String integrityAgreementName;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全协议附件原始文件名")
|
||||||
|
private String securityProtocolName;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他附件原始文件名(多文件时与 otherAttachmentsUrl 同分隔符、同顺序)")
|
||||||
|
private String otherAttachmentsName;
|
||||||
|
|
||||||
@ApiModelProperty("我司签订人")
|
@ApiModelProperty("我司签订人")
|
||||||
@Excel(name = "我司签订人")
|
@Excel(name = "我司签订人")
|
||||||
private String ourSinged;
|
private String ourSinged;
|
||||||
@@ -184,4 +197,34 @@ public class ContractManagePO extends BaseVOEntity{
|
|||||||
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
||||||
private Integer transportationCosts;
|
private Integer transportationCosts;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型")
|
||||||
|
private String contractRentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型编码")
|
||||||
|
private String contractRentTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型")
|
||||||
|
private String warehouseTempLayerType;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型编码")
|
||||||
|
private String warehouseTempLayerTypeName;
|
||||||
|
|
||||||
|
private String isMany;
|
||||||
|
|
||||||
|
@ApiModelProperty("合约信息规则维护列表")
|
||||||
|
private List<ContractManageParametersPO> contractManageParametersList;
|
||||||
|
|
||||||
|
@ApiModelProperty("续期提前天数")
|
||||||
|
private Integer renewalAdvanceDays;
|
||||||
|
|
||||||
|
@ApiModelProperty("标的物")
|
||||||
|
private String subjectMatter;
|
||||||
|
|
||||||
|
@ApiModelProperty("性质")
|
||||||
|
private String nature;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同最初起始日")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date initialStartDate;
|
||||||
}
|
}
|
||||||
+40
@@ -121,6 +121,18 @@ public class ContractManageDO extends BaseVOEntity{
|
|||||||
@Excel(name = "其他附件地址")
|
@Excel(name = "其他附件地址")
|
||||||
private String otherAttachmentsUrl;
|
private String otherAttachmentsUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同正本附件原始文件名")
|
||||||
|
private String contractOriginalName;
|
||||||
|
|
||||||
|
@ApiModelProperty("廉政协议附件原始文件名")
|
||||||
|
private String integrityAgreementName;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全协议附件原始文件名")
|
||||||
|
private String securityProtocolName;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他附件原始文件名(多文件时与 otherAttachmentsUrl 同分隔符、同顺序)")
|
||||||
|
private String otherAttachmentsName;
|
||||||
|
|
||||||
@ApiModelProperty("我司签订人")
|
@ApiModelProperty("我司签订人")
|
||||||
@Excel(name = "我司签订人")
|
@Excel(name = "我司签订人")
|
||||||
private String ourSinged;
|
private String ourSinged;
|
||||||
@@ -214,6 +226,34 @@ public class ContractManageDO extends BaseVOEntity{
|
|||||||
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
|
||||||
private Integer transportationCosts;
|
private Integer transportationCosts;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型")
|
||||||
|
private String contractRentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("客户类型编码")
|
||||||
|
private String contractRentTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型")
|
||||||
|
private String warehouseTempLayerType;
|
||||||
|
|
||||||
|
@ApiModelProperty("仓库温层类型编码")
|
||||||
|
private String warehouseTempLayerTypeName;
|
||||||
|
|
||||||
@ApiModelProperty("一级费用科目code")
|
@ApiModelProperty("一级费用科目code")
|
||||||
private String firstSubjectCode;
|
private String firstSubjectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("合约信息规则维护JSON")
|
||||||
|
private String parametersJson;
|
||||||
|
|
||||||
|
@ApiModelProperty("续期提前天数")
|
||||||
|
private Integer renewalAdvanceDays;
|
||||||
|
|
||||||
|
@ApiModelProperty("标的物")
|
||||||
|
private String subjectMatter;
|
||||||
|
|
||||||
|
@ApiModelProperty("性质")
|
||||||
|
private String nature;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同最初起始日")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date initialStartDate;
|
||||||
}
|
}
|
||||||
+96
@@ -0,0 +1,96 @@
|
|||||||
|
package com.mhd.basic.domain.contractManage.repository.util;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.http.*;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.zip.GZIPInputStream;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class HttpWebServiceUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用HTTP WebService
|
||||||
|
*/
|
||||||
|
public static String callWebService(String requestBody, String endpointUrl) {
|
||||||
|
try {
|
||||||
|
// 创建RestTemplate
|
||||||
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
|
||||||
|
// 设置请求头
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
// headers.setContentType(MediaType.TEXT_XML);
|
||||||
|
// headers.setAccept(Collections.singletonList(MediaType.TEXT_XML));
|
||||||
|
headers.setContentType(MediaType.parseMediaType("text/xml; charset=UTF-8")); // 核心修复
|
||||||
|
headers.setAccept(Collections.singletonList(MediaType.ALL));
|
||||||
|
headers.set("SOAPAction", "");
|
||||||
|
headers.set("User-Agent", "PostmanRuntime/7.26.10");
|
||||||
|
headers.set("Cache-Control", "no-cache");
|
||||||
|
headers.set("Accept-Encoding", "gzip, deflate");
|
||||||
|
headers.set("Connection", "keep-alive");
|
||||||
|
|
||||||
|
// 创建请求实体
|
||||||
|
HttpEntity<String> entity = new HttpEntity<>(requestBody, headers);
|
||||||
|
|
||||||
|
log.info("发送请求到: {}", endpointUrl);
|
||||||
|
|
||||||
|
// 发送请求
|
||||||
|
ResponseEntity<byte[]> response = restTemplate.exchange(
|
||||||
|
endpointUrl,
|
||||||
|
HttpMethod.POST,
|
||||||
|
entity,
|
||||||
|
byte[].class
|
||||||
|
);
|
||||||
|
|
||||||
|
log.info("响应状态: {}", response.getStatusCode());
|
||||||
|
|
||||||
|
// 处理响应
|
||||||
|
byte[] rawResponse = response.getBody();
|
||||||
|
if (rawResponse == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否gzip压缩
|
||||||
|
String contentEncoding = response.getHeaders().getFirst("Content-Encoding");
|
||||||
|
String responseBody;
|
||||||
|
|
||||||
|
if ("gzip".equalsIgnoreCase(contentEncoding)) {
|
||||||
|
responseBody = decompressGzip(rawResponse);
|
||||||
|
log.info("已解压gzip响应,长度: {} 字符", responseBody.length());
|
||||||
|
} else {
|
||||||
|
responseBody = new String(rawResponse, StandardCharsets.UTF_8);
|
||||||
|
log.info("响应长度: {} 字符", responseBody.length());
|
||||||
|
}
|
||||||
|
|
||||||
|
return responseBody;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("WebService调用失败", e);
|
||||||
|
throw new RuntimeException("WebService调用失败: " + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解压缩GZIP内容
|
||||||
|
*/
|
||||||
|
private static String decompressGzip(byte[] compressedData) throws IOException {
|
||||||
|
try (GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(compressedData));
|
||||||
|
InputStreamReader reader = new InputStreamReader(gis, StandardCharsets.UTF_8)) {
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
char[] buffer = new char[1024];
|
||||||
|
int len;
|
||||||
|
while ((len = reader.read(buffer)) != -1) {
|
||||||
|
sb.append(buffer, 0, len);
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
package com.mhd.basic.domain.contractManage.repository.util;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class XxlJobBusinessConfig {
|
||||||
|
|
||||||
|
@Value("${xxl.job.admin.address}")
|
||||||
|
private String adminAddress;
|
||||||
|
|
||||||
|
@Value("${xxl.job.admin.cookie}")
|
||||||
|
private String adminCookie;
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public XxlJobOpenApiUtil xxlJobOpenApiUtil() {
|
||||||
|
return new XxlJobOpenApiUtil(adminAddress, adminCookie);
|
||||||
|
}
|
||||||
|
}
|
||||||
+218
@@ -0,0 +1,218 @@
|
|||||||
|
package com.mhd.basic.domain.contractManage.repository.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用XXL‑JOB后台页面接口
|
||||||
|
* 列表接口返回JSON,不再返回HTML
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class XxlJobOpenApiUtil {
|
||||||
|
|
||||||
|
private final String adminUrl;
|
||||||
|
private final String cookie;
|
||||||
|
|
||||||
|
public XxlJobOpenApiUtil(String adminUrl, String cookie) {
|
||||||
|
this.adminUrl = StrUtil.removeSuffix(adminUrl, "/");
|
||||||
|
this.cookie = cookie;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增定时任务 POST /jobinfo/add
|
||||||
|
* @param addReq 请求实体,与浏览器payload字段完全对齐
|
||||||
|
* @return true=新增成功,false=失败
|
||||||
|
*/
|
||||||
|
public boolean addJob(JobInfoAddReq addReq) {
|
||||||
|
String url = adminUrl + "/jobinfo/add";
|
||||||
|
try {
|
||||||
|
Map<String, Object> formMap = BeanUtil.beanToMap(addReq);
|
||||||
|
HttpResponse response = HttpRequest.post(url)
|
||||||
|
.header("Cookie", cookie)
|
||||||
|
.form(formMap)
|
||||||
|
.execute();
|
||||||
|
int status = response.getStatus();
|
||||||
|
log.info("[XxlJob] addJob status:{}", status);
|
||||||
|
// 新增成功200重定向到列表页
|
||||||
|
return status == 200;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("[XxlJob] addJob异常", e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据【任务描述+执行器参数】查询jobId
|
||||||
|
* 适配返回JSON格式的pageList接口
|
||||||
|
* @param jobDesc 任务描述
|
||||||
|
* @param executorParam 任务参数(业务shipperId)
|
||||||
|
* @return jobId,查不到返回null
|
||||||
|
*/
|
||||||
|
public Integer queryJobIdByDescAndParam(String jobDesc, String executorParam,String jobGroup) {
|
||||||
|
StringBuilder querySb = new StringBuilder();
|
||||||
|
// start length必须
|
||||||
|
querySb.append("start=0&length=10");
|
||||||
|
|
||||||
|
// jobGroup:为空就不拼接这个参数!!不要 jobGroup=""
|
||||||
|
// 你们业务固定jobGroup=3,直接写死3,不用传空
|
||||||
|
if(StrUtil.isNotBlank(jobGroup)){
|
||||||
|
querySb.append("&jobGroup=").append(jobGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
// jobDesc
|
||||||
|
if(StrUtil.isNotBlank(jobDesc)){
|
||||||
|
querySb.append("&jobDesc=").append(cn.hutool.core.net.URLEncodeUtil.encode(jobDesc));
|
||||||
|
}
|
||||||
|
// executorParam
|
||||||
|
if(StrUtil.isNotBlank(executorParam)){
|
||||||
|
querySb.append("&executorParam=").append(cn.hutool.core.net.URLEncodeUtil.encode(executorParam));
|
||||||
|
}
|
||||||
|
// executorHandler为空,直接不携带
|
||||||
|
// triggerStatus=-1
|
||||||
|
querySb.append("&triggerStatus=-1");
|
||||||
|
|
||||||
|
String url = adminUrl + "/jobinfo/pageList?" + querySb;
|
||||||
|
log.info("[XxlJob] pageList请求url:{}",url);
|
||||||
|
try {
|
||||||
|
HttpResponse response = HttpRequest.get(url)
|
||||||
|
.header("Authorization", cookie)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
String jsonStr = response.body();
|
||||||
|
log.info("[XxlJob] pageList响应:{}",jsonStr);
|
||||||
|
if (StrUtil.isBlank(jsonStr)) {
|
||||||
|
log.warn("[XxlJob] pageList返回空响应");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
JSONObject jsonObj = JSON.parseObject(jsonStr);
|
||||||
|
JSONArray jsonArray = jsonObj.getJSONArray("data");
|
||||||
|
if(jsonArray == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<JobPageItem> dataList = jsonArray.toList(JobPageItem.class);
|
||||||
|
if (dataList == null || dataList.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (JobPageItem item : dataList) {
|
||||||
|
if (StrUtil.equals(item.jobDesc, jobDesc) && StrUtil.equals(item.executorParam, executorParam)) {
|
||||||
|
return item.id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("[XxlJob] queryJobId异常", e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停任务 POST /jobinfo/pause
|
||||||
|
* @param jobId xxl任务id
|
||||||
|
* @return true成功
|
||||||
|
*/
|
||||||
|
public boolean pauseJob(Integer jobId) {
|
||||||
|
if (jobId == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String url = adminUrl + "/jobinfo/pause";
|
||||||
|
try {
|
||||||
|
HttpResponse response = HttpRequest.post(url)
|
||||||
|
.header("Cookie", cookie)
|
||||||
|
.form("id", jobId)
|
||||||
|
.execute();
|
||||||
|
return response.getStatus() == 200;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("[XxlJob] pauseJob jobId:{}异常", jobId, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开启任务 POST /jobinfo/start
|
||||||
|
* @param jobId xxl任务id
|
||||||
|
* @return true成功
|
||||||
|
*/
|
||||||
|
public boolean startJob(Integer jobId) {
|
||||||
|
if (jobId == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String url = adminUrl + "/jobinfo/start";
|
||||||
|
try {
|
||||||
|
HttpResponse response = HttpRequest.post(url)
|
||||||
|
.header("Cookie", cookie)
|
||||||
|
.form("id", jobId)
|
||||||
|
.execute();
|
||||||
|
return response.getStatus() == 200;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("[XxlJob] startJob jobId:{}异常", jobId, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除任务 POST /jobinfo/remove
|
||||||
|
* @param jobId xxl任务id
|
||||||
|
* @return true成功
|
||||||
|
*/
|
||||||
|
public boolean removeJob(Integer jobId) {
|
||||||
|
if (jobId == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String url = adminUrl + "/jobinfo/remove";
|
||||||
|
try {
|
||||||
|
HttpResponse response = HttpRequest.post(url)
|
||||||
|
.header("Cookie", cookie)
|
||||||
|
.form("id", jobId)
|
||||||
|
.execute();
|
||||||
|
return response.getStatus() == 200;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("[XxlJob] removeJob jobId:{}异常", jobId, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pageList 返回data数组中每一项实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class JobPageItem {
|
||||||
|
private Integer id;
|
||||||
|
private String jobDesc;
|
||||||
|
private String executorParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add接口请求实体,与浏览器F12抓包payload字段一一对应
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class JobInfoAddReq {
|
||||||
|
private Integer jobGroup;
|
||||||
|
private String jobDesc;
|
||||||
|
private String author;
|
||||||
|
private String alarmEmail;
|
||||||
|
private String scheduleType;
|
||||||
|
private String scheduleConf;
|
||||||
|
private String glueType;
|
||||||
|
private String executorHandler;
|
||||||
|
private String executorParam;
|
||||||
|
private String glueRemark;
|
||||||
|
private String glueSource;
|
||||||
|
private String executorRouteStrategy;
|
||||||
|
private Integer childJobId;
|
||||||
|
private String misfireStrategy;
|
||||||
|
private String executorBlockStrategy;
|
||||||
|
private Integer executorTimeout;
|
||||||
|
private Integer executorFailRetryCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
-4
@@ -23,10 +23,7 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@@ -193,6 +190,22 @@ public class ContractManageDomainService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同结算客户+同温层+同租赁类型+使用中 的合同数量(用于唯一性校验)
|
||||||
|
*/
|
||||||
|
public long countByUniqueKey(Long settlementCustomersId, String warehouseTempLayerType, String contractRentType, Long excludeId) {
|
||||||
|
LambdaQueryWrapper<ContractManage> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(ContractManage::getSettlementCustomersId, settlementCustomersId);
|
||||||
|
wrapper.eq(ContractManage::getWarehouseTempLayerType, warehouseTempLayerType);
|
||||||
|
wrapper.eq(ContractManage::getContractRentType, contractRentType);
|
||||||
|
wrapper.eq(ContractManage::getContractState, 2);
|
||||||
|
wrapper.eq(ContractManage::getDelFlag, 1);
|
||||||
|
if (excludeId != null) {
|
||||||
|
wrapper.ne(ContractManage::getContractManageId, excludeId);
|
||||||
|
}
|
||||||
|
return contractManageService.count(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
public ContractManagePO getGeneralContract() {
|
public ContractManagePO getGeneralContract() {
|
||||||
ContractManagePO contractManagePO = new ContractManagePO();
|
ContractManagePO contractManagePO = new ContractManagePO();
|
||||||
LambdaQueryWrapper<ContractManage> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ContractManage> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
@@ -228,4 +241,6 @@ public class ContractManageDomainService {
|
|||||||
}
|
}
|
||||||
return contractManagePO;
|
return contractManagePO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -98,4 +98,10 @@ public class ContractManageDetail extends BaseVOEntity{
|
|||||||
@ApiModelProperty("单据类型")
|
@ApiModelProperty("单据类型")
|
||||||
private String documentType;
|
private String documentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别编码")
|
||||||
|
private String serviceItemsCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别名称")
|
||||||
|
private String serviceItemsName;
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -97,4 +97,10 @@ public class ContractManageDetailPO extends BaseVOEntity{
|
|||||||
@ApiModelProperty("单据类型")
|
@ApiModelProperty("单据类型")
|
||||||
private String documentType;
|
private String documentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别编码")
|
||||||
|
private String serviceItemsCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别名称")
|
||||||
|
private String serviceItemsName;
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -102,4 +102,10 @@ public class ContractManageDetailDO extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty("单据类型")
|
@ApiModelProperty("单据类型")
|
||||||
private String documentType;
|
private String documentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别编码")
|
||||||
|
private String serviceItemsCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("费用类别名称")
|
||||||
|
private String serviceItemsName;
|
||||||
}
|
}
|
||||||
+25
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 合同管理详情
|
* 合同管理详情
|
||||||
@@ -95,5 +96,29 @@ public class ContractManageDetailDomainService {
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据多个合同管理id批量查询合同科目详情(一次SQL查询,避免逐合同N+1)
|
||||||
|
* @param contractManageIds 合同管理id集合
|
||||||
|
* @return 合同科目详情列表
|
||||||
|
*/
|
||||||
|
public List<ContractManageDetailPO> queryListByManageIds(Collection<Long> contractManageIds) {
|
||||||
|
List<ContractManageDetailPO> resultList = new ArrayList<>();
|
||||||
|
if (contractManageIds == null || contractManageIds.isEmpty()) {
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<ContractManageDetail> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.in(ContractManageDetail::getContractManageId, contractManageIds);
|
||||||
|
queryWrapper.eq(ContractManageDetail::getDelFlag, 1);
|
||||||
|
List<ContractManageDetail> contractManageDetails = contractManageDetailService.list(queryWrapper);
|
||||||
|
if (contractManageDetails != null && contractManageDetails.size() > 0) {
|
||||||
|
for (ContractManageDetail contractManageDetail : contractManageDetails) {
|
||||||
|
ContractManageDetailPO contractManageDetailPO = new ContractManageDetailPO();
|
||||||
|
BeanUtils.copyProperties(contractManageDetail, contractManageDetailPO);
|
||||||
|
resultList.add(contractManageDetailPO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractManageParameters extends BaseVOEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
@Excel(name = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合约信息规则维护")
|
||||||
|
@Excel(name = "合约信息规则维护表")
|
||||||
|
private String parametersJson;
|
||||||
|
}
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.repository.facade;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表Service接口
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
public interface IContractManageParametersService extends IService<ContractManageParameters>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 分页查询合约信息规则维护表列表
|
||||||
|
*/
|
||||||
|
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean insert(ContractManageParametersDO contractManageParametersDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean update(ContractManageParametersDO contractManageParametersDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean delete(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public ContractManageParametersPO getInfo(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同管理id查询合约信息规则维护列表
|
||||||
|
*/
|
||||||
|
List<ContractManageParametersPO> getListByContractManageId(Long contractManageId);
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.repository.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表Mapper接口
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
public interface ContractManageParametersMapper extends BaseMapper<ContractManageParameters>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询合约信息规则维护表列表
|
||||||
|
*/
|
||||||
|
public List<ContractManageParametersPO> queryList(@Param("contractManageParametersDO") ContractManageParametersDO contractManageParametersDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同管理id查询合约信息规则维护列表
|
||||||
|
*/
|
||||||
|
List<ContractManageParametersPO> getListByContractManageId(@Param("contractManageId") Long contractManageId);
|
||||||
|
}
|
||||||
+86
@@ -0,0 +1,86 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.repository.persistence;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.mapper.ContractManageParametersMapper;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表Service业务层处理
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ContractManageParametersImpl extends ServiceImpl<ContractManageParametersMapper, ContractManageParameters> implements IContractManageParametersService{
|
||||||
|
@Autowired
|
||||||
|
private ContractManageParametersMapper contractManageParametersMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询合约信息规则维护表列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO)
|
||||||
|
{
|
||||||
|
return contractManageParametersMapper.queryList(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合约信息规则维护表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
ContractManageParameters contractManageParameters = new ContractManageParameters();
|
||||||
|
BeanUtils.copyProperties(contractManageParametersDO,contractManageParameters);
|
||||||
|
return this.save(contractManageParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改合约信息规则维护表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean update(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
ContractManageParameters contractManageParameters = new ContractManageParameters();
|
||||||
|
BeanUtils.copyProperties(contractManageParametersDO,contractManageParameters);
|
||||||
|
return this.updateById(contractManageParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除合约信息规则维护表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean delete(Long[] ids ) {
|
||||||
|
List<ContractManageParameters> list = new ArrayList<>();
|
||||||
|
for (Long id : ids) {
|
||||||
|
ContractManageParameters contractManageParameters = new ContractManageParameters();
|
||||||
|
contractManageParameters.setId(id);
|
||||||
|
contractManageParameters.setDelFlag(2);
|
||||||
|
list.add(contractManageParameters);
|
||||||
|
}
|
||||||
|
return this.updateBatchById(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询合约信息规则维护表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ContractManageParametersPO getInfo(Long id) {
|
||||||
|
ContractManageParameters contractManageParameters = this.getById(id);
|
||||||
|
ContractManageParametersPO contractManageParametersPO = new ContractManageParametersPO();
|
||||||
|
BeanUtils.copyProperties(contractManageParameters,contractManageParametersPO);
|
||||||
|
return contractManageParametersPO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ContractManageParametersPO> getListByContractManageId(Long contractManageId) {
|
||||||
|
return contractManageParametersMapper.getListByContractManageId(contractManageId);
|
||||||
|
}
|
||||||
|
}
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.repository.po;
|
||||||
|
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表对象 contract_manage_parameters
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "合约信息规则维护表对象", description = "合约信息规则维护表响应对象")
|
||||||
|
public class ContractManageParametersPO extends BaseVOEntity{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
@Excel(name = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合约信息规则维护")
|
||||||
|
@Excel(name = "合约信息规则维护表")
|
||||||
|
private String parametersJson;
|
||||||
|
}
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.repository.todo;
|
||||||
|
|
||||||
|
import com.mhd.common.core.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表对象 contract_manage_parameters
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractManageParametersDO extends BaseVOEntity{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同管理id")
|
||||||
|
private Long contractManageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("一级组织表ID")
|
||||||
|
@Excel(name = "一级组织表ID")
|
||||||
|
private Long topOrganizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织表ID")
|
||||||
|
@Excel(name = "组织表ID")
|
||||||
|
private Long organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("组织名称")
|
||||||
|
@Excel(name = "组织名称")
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
@Excel(name = "合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("合约信息规则维护")
|
||||||
|
@Excel(name = "合约信息规则维护表")
|
||||||
|
private String parametersJson;
|
||||||
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
package com.mhd.basic.domain.contractManageParameters.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
|
||||||
|
import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 合约信息规则维护表
|
||||||
|
*
|
||||||
|
* @author gen
|
||||||
|
* @date 2024-06-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ContractManageParametersDomainService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IContractManageParametersService contractManageParametersService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询合约信息规则维护表列表
|
||||||
|
*/
|
||||||
|
public List<ContractManageParametersPO> queryList(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
return contractManageParametersService.queryList(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
|
||||||
|
return contractManageParametersService.insert(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean update(ContractManageParametersDO contractManageParametersDO) {
|
||||||
|
return contractManageParametersService.update(contractManageParametersDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除合约信息规则维护表
|
||||||
|
*/
|
||||||
|
public Boolean delete(Long[] ids) {
|
||||||
|
return contractManageParametersService.delete(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取合约信息规则维护表详细信息
|
||||||
|
*/
|
||||||
|
public ContractManageParametersPO getInfo(Long id)
|
||||||
|
{
|
||||||
|
return contractManageParametersService.getInfo(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同管理id查询合约信息规则维护列表
|
||||||
|
* @param contractManageId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ContractManageParametersPO> queryListByManageId(Long contractManageId) {
|
||||||
|
List<ContractManageParametersPO> resultList = new ArrayList<>();
|
||||||
|
LambdaQueryWrapper<ContractManageParameters> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ContractManageParameters::getContractManageId,contractManageId);
|
||||||
|
queryWrapper.eq(ContractManageParameters::getDelFlag,1);
|
||||||
|
List<ContractManageParameters> contractManageParametersList = contractManageParametersService.list(queryWrapper);
|
||||||
|
if(contractManageParametersList.size()>0){
|
||||||
|
for (ContractManageParameters contractManageParameters : contractManageParametersList) {
|
||||||
|
ContractManageParametersPO contractManageParametersPO = new ContractManageParametersPO();
|
||||||
|
BeanUtils.copyProperties(contractManageParameters,contractManageParametersPO);
|
||||||
|
resultList.add(contractManageParametersPO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ContractManageParametersPO> queryListByManageIds(Collection<Long> contractManageIds) {
|
||||||
|
List<ContractManageParametersPO> resultList = new ArrayList<>();
|
||||||
|
if (contractManageIds == null || contractManageIds.isEmpty()) {
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<ContractManageParameters> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.in(ContractManageParameters::getContractManageId, contractManageIds);
|
||||||
|
queryWrapper.eq(ContractManageParameters::getDelFlag, 1);
|
||||||
|
List<ContractManageParameters> entityList = contractManageParametersService.list(queryWrapper);
|
||||||
|
for (ContractManageParameters entity : entityList) {
|
||||||
|
ContractManageParametersPO po = new ContractManageParametersPO();
|
||||||
|
BeanUtils.copyProperties(entity, po);
|
||||||
|
resultList.add(po);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user