@things-factory/sales-base 4.3.21 → 4.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist-server/service/goods-receival-note/goods-receival-note-query.js +1 -0
  2. package/dist-server/service/goods-receival-note/goods-receival-note-query.js.map +1 -1
  3. package/dist-server/service/others/other-query.js +100 -0
  4. package/dist-server/service/others/other-query.js.map +1 -1
  5. package/dist-server/service/others/other-types.js +12 -0
  6. package/dist-server/service/others/other-types.js.map +1 -1
  7. package/dist-server/service/release-good/release-good-query.js +1 -0
  8. package/dist-server/service/release-good/release-good-query.js.map +1 -1
  9. package/dist-server/service/release-good/release-good.js +4 -0
  10. package/dist-server/service/release-good/release-good.js.map +1 -1
  11. package/dist-server/service/shipping-order/shipping-order-mutation.js +2 -5
  12. package/dist-server/service/shipping-order/shipping-order-mutation.js.map +1 -1
  13. package/dist-server/utils/inventory-util.js +29 -9
  14. package/dist-server/utils/inventory-util.js.map +1 -1
  15. package/dist-server/utils/order-no-generator.js +7 -10
  16. package/dist-server/utils/order-no-generator.js.map +1 -1
  17. package/package.json +13 -13
  18. package/server/service/others/other-query.ts +130 -0
  19. package/server/service/others/other-types.ts +9 -0
  20. package/server/service/release-good/release-good-query.ts +1 -0
  21. package/server/service/release-good/release-good.ts +3 -0
  22. package/server/service/shipping-order/shipping-order-mutation.ts +2 -2
  23. package/server/utils/inventory-util.ts +49 -29
  24. package/server/utils/order-no-generator.ts +58 -41
@@ -1,129 +1,146 @@
1
- import uuid from 'uuid/v4'
1
+ import { v4 as uuidv4 } from 'uuid'
2
2
 
3
3
  export class OrderNoGenerator {
4
4
  static arrivalNotice() {
5
5
  const currentDate = new Date()
6
- return `GAN-${currentDate.getFullYear()}${currentDate.getMonth() + 1
7
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
6
+ return `GAN-${currentDate.getFullYear()}${
7
+ currentDate.getMonth() + 1
8
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
8
9
  }
9
10
 
10
11
  static collectionOrder() {
11
12
  const currentDate = new Date()
12
- return `CO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
13
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
13
+ return `CO-${currentDate.getFullYear()}${
14
+ currentDate.getMonth() + 1
15
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
14
16
  }
15
17
 
16
18
  static cycleCount() {
17
19
  const currentDate = new Date()
18
- return `CC-${currentDate.getFullYear()}${currentDate.getMonth() + 1
19
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
20
+ return `CC-${currentDate.getFullYear()}${
21
+ currentDate.getMonth() + 1
22
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
20
23
  }
21
24
 
22
25
  static deliveryOrder() {
23
26
  const currentDate = new Date()
24
- return `DO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
25
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
27
+ return `DO-${currentDate.getFullYear()}${
28
+ currentDate.getMonth() + 1
29
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
26
30
  }
27
31
 
28
32
  static goodsReceiveNote() {
29
33
  const currentDate = new Date()
30
- return `GRN-${currentDate.getFullYear()}${currentDate.getMonth() + 1
31
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
34
+ return `GRN-${currentDate.getFullYear()}${
35
+ currentDate.getMonth() + 1
36
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
32
37
  }
33
38
 
34
39
  static jobSheet(domainName) {
35
40
  const currentDate = new Date()
36
- return `${domainName}-${currentDate.getFullYear()}${currentDate.getMonth() + 1
37
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
41
+ return `${domainName}-${currentDate.getFullYear()}${
42
+ currentDate.getMonth() + 1
43
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
38
44
  }
39
45
 
40
46
  static manifest() {
41
47
  const currentDate = new Date()
42
- return `LM-${currentDate.getFullYear()}${currentDate.getMonth() + 1
43
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
48
+ return `LM-${currentDate.getFullYear()}${
49
+ currentDate.getMonth() + 1
50
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
44
51
  }
45
52
 
46
53
  static orderInventory() {
47
- return uuid()
54
+ return uuidv4()
48
55
  }
49
56
 
50
57
  static orderProduct() {
51
- return `OP-${uuid()}`
58
+ return `OP-${uuidv4()}`
52
59
  }
53
60
 
54
61
  static invoiceProduct() {
55
- return `IP-${uuid()}`
62
+ return `IP-${uuidv4()}`
56
63
  }
57
64
 
58
65
  static orderVas() {
59
- return `OV-${uuid()}`
66
+ return `OV-${uuidv4()}`
60
67
  }
61
68
 
62
69
  static orderToteItem() {
63
- return `OTI-${uuid()}`
70
+ return `OTI-${uuidv4()}`
64
71
  }
65
72
 
66
73
  static purchaseOrder() {
67
74
  const currentDate = new Date()
68
- return `PO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
69
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
75
+ return `PO-${currentDate.getFullYear()}${
76
+ currentDate.getMonth() + 1
77
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
70
78
  }
71
79
 
72
80
  static releaseGood() {
73
81
  const currentDate = new Date()
74
- return `RO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
75
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
82
+ return `RO-${currentDate.getFullYear()}${
83
+ currentDate.getMonth() + 1
84
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
76
85
  }
77
86
 
78
87
  static draftReleaseGood() {
79
88
  const currentDate = new Date()
80
- return `ODO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
81
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
89
+ return `ODO-${currentDate.getFullYear()}${
90
+ currentDate.getMonth() + 1
91
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
82
92
  }
83
93
 
84
94
  static releaseVas() {
85
- return uuid()
95
+ return uuidv4()
86
96
  }
87
97
 
88
98
  static retailReplenishmentOrder() {
89
99
  const currentDate = new Date()
90
- return `RR-${currentDate.getFullYear()}${currentDate.getMonth() + 1
91
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
100
+ return `RR-${currentDate.getFullYear()}${
101
+ currentDate.getMonth() + 1
102
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
92
103
  }
93
104
 
94
105
  static returnOrder() {
95
106
  const currentDate = new Date()
96
- return `RTO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
97
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
107
+ return `RTO-${currentDate.getFullYear()}${
108
+ currentDate.getMonth() + 1
109
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
98
110
  }
99
111
 
100
112
  static shippingOrder() {
101
113
  const currentDate = new Date()
102
- return `SO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
103
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
114
+ return `SO-${currentDate.getFullYear()}${
115
+ currentDate.getMonth() + 1
116
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
104
117
  }
105
118
 
106
119
  static stockTake() {
107
120
  const currentDate = new Date()
108
- return `ST-${currentDate.getFullYear()}${currentDate.getMonth() + 1
109
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
121
+ return `ST-${currentDate.getFullYear()}${
122
+ currentDate.getMonth() + 1
123
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
110
124
  }
111
125
 
112
126
  static transferOrder() {
113
127
  const currentDate = new Date()
114
- return `TO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
115
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
128
+ return `TO-${currentDate.getFullYear()}${
129
+ currentDate.getMonth() + 1
130
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
116
131
  }
117
132
 
118
133
  static vasOrder() {
119
134
  const currentDate = new Date()
120
- return `VO-${currentDate.getFullYear()}${currentDate.getMonth() + 1
121
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
135
+ return `VO-${currentDate.getFullYear()}${
136
+ currentDate.getMonth() + 1
137
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
122
138
  }
123
139
 
124
140
  static invoice() {
125
141
  const currentDate = new Date()
126
- return `INV-${currentDate.getFullYear()}${currentDate.getMonth() + 1
127
- }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
142
+ return `INV-${currentDate.getFullYear()}${
143
+ currentDate.getMonth() + 1
144
+ }${currentDate.getDate()}${currentDate.getHours()}${currentDate.getMinutes()}${currentDate.getSeconds()}${currentDate.getMilliseconds()}`
128
145
  }
129
146
  }