| 1 | package com.d3os.d3os_batch.jcl; |
1 | package com.d3os.d3os_batch.jcl; |
| 2 | |
2 | |
| 3 | import jakarta.annotation.PostConstruct; |
3 | import jakarta.annotation.PostConstruct; |
| 4 | import org.springframework.beans.factory.annotation.Autowired; |
4 | import org.springframework.beans.factory.annotation.Autowired; |
| 5 | import org.springframework.stereotype.Component; |
5 | import org.springframework.stereotype.Component; |
| 6 | import com.d3os.d3os_batch.batch.REABAT02.BS30070; |
6 | import com.d3os.d3os_batch.batch.REABAT02.BS30070; |
| 7 | import com.d3os.d3os_batch.batch.REABAT02.BS30080; |
7 | import com.d3os.d3os_batch.batch.REABAT02.BS30080; |
| 8 | import com.d3os.d3os_batch.batch.REABAT02.BS30150; |
8 | import com.d3os.d3os_batch.batch.REABAT02.BS30150; |
| 9 | import com.d3os.d3os_batch.batch.REABAT02.BS30160; |
9 | import com.d3os.d3os_batch.batch.REABAT02.BS30160; |
| 10 | import com.d3os.d3os_batch.batch.REABAT02.BS30170; |
10 | import com.d3os.d3os_batch.batch.REABAT02.BS30170; |
| 11 | import com.d3os.d3os_batch.batch.REABAT02.BS31060; |
11 | import com.d3os.d3os_batch.batch.REABAT02.BS31060; |
| 12 | import com.d3os.d3os_batch.batch.REABAT02.BS32020; |
12 | import com.d3os.d3os_batch.batch.REABAT02.BS32020; |
| 13 | import com.d3os.d3os_batch.batch.REABAT02.BU30020; |
13 | import com.d3os.d3os_batch.batch.REABAT02.BU30020; |
| 14 | import com.d3os.d3os_batch.batch.REABAT02.BU30032; |
14 | import com.d3os.d3os_batch.batch.REABAT02.BU30032; |
| 15 | import com.d3os.d3os_batch.batch.REABAT02.BU30060; |
15 | import com.d3os.d3os_batch.batch.REABAT02.BU30060; |
| 16 | import com.d3os.d3os_batch.batch.REABAT02.BU30080; |
16 | import com.d3os.d3os_batch.batch.REABAT02.BU30080; |
| 17 | import com.d3os.d3os_batch.batch.REABAT02.BY30006; |
17 | import com.d3os.d3os_batch.batch.REABAT02.BY30006; |
| 18 | import com.d3os.d3os_batch.batch.REABAT02.BY30012; |
18 | import com.d3os.d3os_batch.batch.REABAT02.BY30012; |
| 19 | import com.d3os.d3os_batch.batch.REABAT02.BY30140; |
19 | import com.d3os.d3os_batch.batch.REABAT02.BY30140; |
| 20 | import com.d3os.d3os_batch.batch.REABAT02.BY30145; |
20 | import com.d3os.d3os_batch.batch.REABAT02.BY30145; |
| 21 | import com.d3os.d3os_batch.batch.REABAT02.SCRATCH_REABAT02; |
| |
| 22 | import com.d3os.d3os_batch.batch.REABAT02.SA30020; |
21 | import com.d3os.d3os_batch.batch.REABAT02.SA30020; |
| . | |
22 | import com.d3os.d3os_batch.batch.REABAT02.SCRATCH_REABAT02; |
| 23 | import com.d3os.d3os_batch.batch.REABAT02.SF30020; |
23 | import com.d3os.d3os_batch.batch.REABAT02.SF30020; |
| 24 | import com.d3os.d3os_batch_common.jcl.BaseJcl; |
24 | import com.d3os.d3os_batch_common.jcl.BaseJcl; |
| 25 | import com.d3os.d3os_common.enums.Result; |
25 | import com.d3os.d3os_common.enums.Result; |
| 26 | |
26 | |
| 27 | /** |
27 | /** |
| 28 | * リアルバッチ02 |
28 | * リアルバッチ2ラスト |
| 29 | */ |
29 | */ |
| 30 | @Component |
30 | @Component |
| 31 | public class REABAT02 extends BaseJcl { |
31 | public class REALAS2J extends BaseJcl { |
| 32 | |
32 | |
| 33 | /** |
33 | /** |
| 34 | * initialize |
34 | * initialize |
| 35 | */ |
35 | */ |
| 36 | @PostConstruct |
36 | @PostConstruct |
| 37 | public void init() { |
37 | public void init() { |
| 38 | |
38 | |
| 39 | // プログラム名 |
39 | // プログラム名 |
| 40 | PROGRAM_NAME = "リアルバッチ02"; |
40 | PROGRAM_NAME = "リアルバッチ2ラスト"; |
| 41 | |
41 | |
| 42 | // プログラムID |
42 | // プログラムID |
| 43 | PROGRAM_ID = "REABAT02"; |
43 | PROGRAM_ID = "REALAS2J"; |
| 44 | |
44 | |
| 45 | } |
45 | } |
| 46 | |
46 | |
| 47 | /** |
47 | /** |
| 48 | * ワークテーブルの削除 バッチ概要.使用テーブルの全レコードを削除 |
48 | * ワークテーブルの削除 バッチ概要.使用テーブルの全レコードを削除 |
| 49 | */ |
49 | */ |
| 50 | @Autowired |
50 | @Autowired |
| 51 | SCRATCH_REABAT02 rb02st10; |
51 | SCRATCH_REABAT02 rb02st10; |
| 52 | |
52 | |
| 53 | /** |
53 | /** |
| 54 | * データ振分け |
54 | * データ振分け |
| 55 | */ |
55 | */ |
| 56 | @Autowired |
56 | @Autowired |
| 57 | SA30020 sa30020; |
57 | SA30020 sa30020; |
| 58 | |
58 | |
| 59 | /** |
59 | /** |
| 60 | * 集配集計 |
60 | * 集配集計 |
| 61 | */ |
61 | */ |
| 62 | @Autowired |
62 | @Autowired |
| 63 | BS30070 bs30070; |
63 | BS30070 bs30070; |
| 64 | |
64 | |
| 65 | /** |
65 | /** |
| 66 | * 集配票手当用マスタ更新 インデータ区分:1 『WORK1020から追加・更新』 |
66 | * 集配票手当用マスタ更新 インデータ区分:1 『WORK1020から追加・更新』 |
| 67 | */ |
67 | */ |
| 68 | @Autowired |
68 | @Autowired |
| 69 | BS30150 bs30150; |
69 | BS30150 bs30150; |
| 70 | |
70 | |
| 71 | /** |
71 | /** |
| 72 | * 他社委託送り状NOマスタ更新 |
72 | * 他社委託送り状NOマスタ更新 |
| 73 | */ |
73 | */ |
| 74 | @Autowired |
74 | @Autowired |
| 75 | BS30080 bs30080; |
75 | BS30080 bs30080; |
| 76 | |
76 | |
| 77 | /** |
77 | /** |
| 78 | * スキャン漏れ送り状更新 インデータ区分:1 『WORK3000から追加・更新』 |
78 | * スキャン漏れ送り状更新 インデータ区分:1 『WORK3000から追加・更新』 |
| 79 | */ |
79 | */ |
| 80 | @Autowired |
80 | @Autowired |
| 81 | BS30160 bs30160; |
81 | BS30160 bs30160; |
| 82 | |
82 | |
| 83 | /** |
83 | /** |
| 84 | * 集貨送り状データ作成 |
84 | * 集貨送り状データ作成 |
| 85 | */ |
85 | */ |
| 86 | @Autowired |
86 | @Autowired |
| 87 | BS32020 bs32020; |
87 | BS32020 bs32020; |
| 88 | |
88 | |
| 89 | /** |
89 | /** |
| 90 | * 集貨送り状スキャン済み更新データ作成 |
90 | * 集貨送り状スキャン済み更新データ作成 |
| 91 | */ |
91 | */ |
| 92 | @Autowired |
92 | @Autowired |
| 93 | BS30170 bs30170; |
93 | BS30170 bs30170; |
| 94 | |
94 | |
| 95 | /** |
95 | /** |
| 96 | * 送付書集計 |
96 | * 送付書集計 |
| 97 | */ |
97 | */ |
| 98 | @Autowired |
98 | @Autowired |
| 99 | BU30020 bu30020; |
99 | BU30020 bu30020; |
| 100 | |
100 | |
| 101 | /** |
101 | /** |
| 102 | * 運行DB更新データ作成 |
102 | * 運行DB更新データ作成 |
| 103 | */ |
103 | */ |
| 104 | @Autowired |
104 | @Autowired |
| 105 | BU30032 bu30032; |
105 | BU30032 bu30032; |
| 106 | |
106 | |
| 107 | /** |
107 | /** |
| 108 | * 運行DB更新 インデータ区分:1 『WORK4030から追加・更新』 |
108 | * 運行DB更新 インデータ区分:1 『WORK4030から追加・更新』 |
| 109 | */ |
109 | */ |
| 110 | @Autowired |
110 | @Autowired |
| 111 | BU30060 bu30060; |
111 | BU30060 bu30060; |
| 112 | |
112 | |
| 113 | /** |
113 | /** |
| 114 | * 回送マスタ更新処理 |
114 | * 回送マスタ更新処理 |
| 115 | */ |
115 | */ |
| 116 | @Autowired |
116 | @Autowired |
| 117 | BU30080 bu30080; |
117 | BU30080 bu30080; |
| 118 | |
118 | |
| 119 | /** |
119 | /** |
| 120 | * 路線傭車料訂正鑑データ作成 |
120 | * 路線傭車料訂正鑑データ作成 |
| 121 | */ |
121 | */ |
| 122 | @Autowired |
122 | @Autowired |
| 123 | BY30006 by30006; |
123 | BY30006 by30006; |
| 124 | |
124 | |
| 125 | /** |
125 | /** |
| 126 | * 路線傭車料計算 |
126 | * 路線傭車料計算 |
| 127 | */ |
127 | */ |
| 128 | @Autowired |
128 | @Autowired |
| 129 | BY30012 by30012; |
129 | BY30012 by30012; |
| 130 | |
130 | |
| 131 | /** |
131 | /** |
| 132 | * 傭車料未精算マスター更新データ作成 |
132 | * 傭車料未精算マスター更新データ作成 |
| 133 | */ |
133 | */ |
| 134 | @Autowired |
134 | @Autowired |
| 135 | BY30140 by30140; |
135 | BY30140 by30140; |
| 136 | |
136 | |
| 137 | /** |
137 | /** |
| 138 | * 傭車料未精算マスター更新 |
138 | * 傭車料未精算マスター更新 |
| 139 | */ |
139 | */ |
| 140 | @Autowired |
140 | @Autowired |
| 141 | BY30145 by30145; |
141 | BY30145 by30145; |
| 142 | |
142 | |
| 143 | /** |
143 | /** |
| 144 | * 他社中継・配達明細DB2更新 |
144 | * 他社中継・配達明細DB2更新 |
| 145 | */ |
145 | */ |
| 146 | @Autowired |
146 | @Autowired |
| 147 | BS31060 bs31060; |
147 | BS31060 bs31060; |
| 148 | |
148 | |
| 149 | /** |
149 | /** |
| 150 | * バックログ作成 |
150 | * バックログ作成 |
| 151 | */ |
151 | */ |
| 152 | @Autowired |
152 | @Autowired |
| 153 | SF30020 sf30020; |
153 | SF30020 sf30020; |
| 154 | |
154 | |
| 155 | /** |
155 | /** |
| 156 | * JCL処理を記述 |
156 | * JCL処理を記述 |
| 157 | */ |
157 | */ |
| 158 | @Override |
158 | @Override |
| 159 | protected Result main() { |
159 | protected Result main() { |
| 160 | |
160 | |
| 161 | Result res = Result.Success; |
161 | Result res = Result.Success; |
| 162 | |
162 | |
| 163 | // 0010 SCRATCH ワークテーブルの削除 バッチ概要.使用テーブルの全レコードを削除 |
163 | // 0010 SCRATCH ワークテーブルの削除 バッチ概要.使用テーブルの全レコードを削除 |
| 164 | res = executeStep(rb02st10, "0010", "SCRATCH"); |
164 | res = executeStep(rb02st10, "0010", "SCRATCH"); |
| 165 | if (res == Result.Error) { |
165 | if (res == Result.Error) { |
| 166 | return Result.Error; |
166 | return Result.Error; |
| 167 | } |
167 | } |
| 168 | // 0020 SA30020 SA30020 データ振分け |
168 | // 0020 SA30020 SA30020 データ振分け |
| 169 | res = executeStep(sa30020, "0020", "SA30020"); |
169 | res = executeStep(sa30020, "0020", "SA30020"); |
| 170 | if (res == Result.Error) { |
170 | if (res == Result.Error) { |
| 171 | return Result.Error; |
171 | return Result.Error; |
| 172 | } |
172 | } |
| 173 | // 0030 BS30070 BS30070 集配集計 |
173 | // 0030 BS30070 BS30070 集配集計 |
| 174 | res = executeStep(bs30070, "0030", "BS30070"); |
174 | res = executeStep(bs30070, "0030", "BS30070"); |
| 175 | if (res == Result.Error) { |
175 | if (res == Result.Error) { |
| 176 | return Result.Error; |
176 | return Result.Error; |
| 177 | } |
177 | } |
| 178 | // 0040 BS30150 BS30150 集配票手当用マスタ更新 |
178 | // 0040 BS30150 BS30150 集配票手当用マスタ更新 |
| 179 | //インデータ区分:1 『WORK1020から追加・更新』 |
179 | //インデータ区分:1 『WORK1020から追加・更新』 |
| 180 | bs30150.setInDataKbn("1"); |
180 | bs30150.setInDataKbn("1"); |
| 181 | res = executeStep(bs30150, "0040", "BS30150"); |
181 | res = executeStep(bs30150, "0040", "BS30150"); |
| 182 | if (res == Result.Error) { |
182 | if (res == Result.Error) { |
| 183 | return Result.Error; |
183 | return Result.Error; |
| 184 | } |
184 | } |
| 185 | // 0050 BS30080 BS30080 他社委託送り状NOマスタ更新 |
185 | // 0050 BS30080 BS30080 他社委託送り状NOマスタ更新 |
| 186 | res = executeStep(bs30080, "0050", "BS30080"); |
186 | res = executeStep(bs30080, "0050", "BS30080"); |
| 187 | if (res == Result.Error) { |
187 | if (res == Result.Error) { |
| 188 | return Result.Error; |
188 | return Result.Error; |
| 189 | } |
189 | } |
| 190 | // 0060 BS30160 BS30160 スキャン漏れ送り状更新 |
190 | // 0060 BS30160 BS30160 スキャン漏れ送り状更新 |
| 191 | //インデータ区分:1 『WORK3000から追加・更新』 |
191 | //インデータ区分:1 『WORK3000から追加・更新』 |
| 192 | bs30160.setInDataKbn("1"); |
192 | bs30160.setInDataKbn("1"); |
| 193 | res = executeStep(bs30160, "0060", "BS30160"); |
193 | res = executeStep(bs30160, "0060", "BS30160"); |
| 194 | if (res == Result.Error) { |
194 | if (res == Result.Error) { |
| 195 | return Result.Error; |
195 | return Result.Error; |
| 196 | } |
196 | } |
| 197 | // 0070 BS32020 BS32020 集貨送り状データ作成 |
197 | // 0070 BS32020 BS32020 集貨送り状データ作成 |
| 198 | res = executeStep(bs32020, "0070", "BS32020"); |
198 | res = executeStep(bs32020, "0070", "BS32020"); |
| 199 | if (res == Result.Error) { |
199 | if (res == Result.Error) { |
| 200 | return Result.Error; |
200 | return Result.Error; |
| 201 | } |
201 | } |
| 202 | // 0080 BS30170 BS30170 集貨送り状スキャン済み更新データ作成 |
202 | // 0080 BS30170 BS30170 集貨送り状スキャン済み更新データ作成 |
| 203 | res = executeStep(bs30170, "0080", "BS30170"); |
203 | res = executeStep(bs30170, "0080", "BS30170"); |
| 204 | if (res == Result.Error) { |
204 | if (res == Result.Error) { |
| 205 | return Result.Error; |
205 | return Result.Error; |
| 206 | } |
206 | } |
| 207 | // 0090 BS30160 BS30160 スキャン漏れ送り状更新 |
207 | // 0090 BS30160 BS30160 スキャン漏れ送り状更新 |
| 208 | //インデータ区分:2 『WORK2010から追加・更新』 |
208 | //インデータ区分:2 『WORK2010から追加・更新』 |
| 209 | bs30160.setInDataKbn("2"); |
209 | bs30160.setInDataKbn("2"); |
| 210 | res = executeStep(bs30160, "0090", "BS30160"); |
210 | res = executeStep(bs30160, "0090", "BS30160"); |
| 211 | if (res == Result.Error) { |
211 | if (res == Result.Error) { |
| 212 | return Result.Error; |
212 | return Result.Error; |
| 213 | } |
213 | } |
| 214 | // 0100 BS30150 BS30150 集配票手当用マスタ更新 |
214 | // 0100 BS30150 BS30150 集配票手当用マスタ更新 |
| 215 | //インデータ区分:2 『WORK2020から追加・更新』 |
215 | //インデータ区分:2 『WORK2020から追加・更新』 |
| 216 | bs30150.setInDataKbn("2"); |
216 | bs30150.setInDataKbn("2"); |
| 217 | res = executeStep(bs30150, "0100", "BS30150"); |
217 | res = executeStep(bs30150, "0100", "BS30150"); |
| 218 | if (res == Result.Error) { |
218 | if (res == Result.Error) { |
| 219 | return Result.Error; |
219 | return Result.Error; |
| 220 | } |
220 | } |
| 221 | // 0110 BU30020 BU30020 送付書集計 |
221 | // 0110 BU30020 BU30020 送付書集計 |
| 222 | res = executeStep(bu30020, "0110", "BU30020"); |
222 | res = executeStep(bu30020, "0110", "BU30020"); |
| 223 | if (res == Result.Error) { |
223 | if (res == Result.Error) { |
| 224 | return Result.Error; |
224 | return Result.Error; |
| 225 | } |
225 | } |
| 226 | // 0120 BU30032 BU30032 運行DB更新データ作成 |
226 | // 0120 BU30032 BU30032 運行DB更新データ作成 |
| 227 | res = executeStep(bu30032, "0120", "BU30032"); |
227 | res = executeStep(bu30032, "0120", "BU30032"); |
| 228 | if (res == Result.Error) { |
228 | if (res == Result.Error) { |
| 229 | return Result.Error; |
229 | return Result.Error; |
| 230 | } |
230 | } |
| 231 | // 0130 BU30060 BU30060 運行DB更新 |
231 | // 0130 BU30060 BU30060 運行DB更新 |
| 232 | //インデータ区分:1 『WORK4030から追加・更新』 |
232 | //インデータ区分:1 『WORK4030から追加・更新』 |
| 233 | bu30060.setInDataKbn("1"); |
233 | bu30060.setInDataKbn("1"); |
| 234 | res = executeStep(bu30060, "0130", "BU30060"); |
234 | res = executeStep(bu30060, "0130", "BU30060"); |
| 235 | if (res == Result.Error) { |
235 | if (res == Result.Error) { |
| 236 | return Result.Error; |
236 | return Result.Error; |
| 237 | } |
237 | } |
| 238 | // 0140 BU30080 BU30080 回送マスタ更新処理 |
238 | // 0140 BU30080 BU30080 回送マスタ更新処理 |
| 239 | res = executeStep(bu30080, "0140", "BU30080"); |
239 | res = executeStep(bu30080, "0140", "BU30080"); |
| 240 | if (res == Result.Error) { |
240 | if (res == Result.Error) { |
| 241 | return Result.Error; |
241 | return Result.Error; |
| 242 | } |
242 | } |
| 243 | // 0150 BY30006 BY30006 路線傭車料訂正鑑データ作成 |
243 | // 0150 BY30006 BY30006 路線傭車料訂正鑑データ作成 |
| 244 | res = executeStep(by30006, "0150", "BY30006"); |
244 | res = executeStep(by30006, "0150", "BY30006"); |
| 245 | if (res == Result.Error) { |
245 | if (res == Result.Error) { |
| 246 | return Result.Error; |
246 | return Result.Error; |
| 247 | } |
247 | } |
| 248 | // 0160 BY30012 BY30012 路線傭車料計算 |
248 | // 0160 BY30012 BY30012 路線傭車料計算 |
| 249 | res = executeStep(by30012, "0160", "BY30012"); |
249 | res = executeStep(by30012, "0160", "BY30012"); |
| 250 | if (res == Result.Error) { |
250 | if (res == Result.Error) { |
| 251 | return Result.Error; |
251 | return Result.Error; |
| 252 | } |
252 | } |
| 253 | // 0170 BY30060 BU30060 運行DB2更新 |
253 | // 0170 BY30060 BU30060 運行DB2更新 |
| 254 | //インデータ区分:2 『WORK5020から追加・更新』 |
254 | //インデータ区分:2 『WORK5020から追加・更新』 |
| 255 | bu30060.setInDataKbn("2"); |
255 | bu30060.setInDataKbn("2"); |
| 256 | res = executeStep(bu30060, "0170", "BU30060"); |
256 | res = executeStep(bu30060, "0170", "BU30060"); |
| 257 | if (res == Result.Error) { |
257 | if (res == Result.Error) { |
| 258 | return Result.Error; |
258 | return Result.Error; |
| 259 | } |
259 | } |
| 260 | // 0180 BY30140 BY30140 傭車料未精算マスター更新データ作成 |
260 | // 0180 BY30140 BY30140 傭車料未精算マスター更新データ作成 |
| 261 | res = executeStep(by30140, "0180", "BY30140"); |
261 | res = executeStep(by30140, "0180", "BY30140"); |
| 262 | if (res == Result.Error) { |
262 | if (res == Result.Error) { |
| 263 | return Result.Error; |
263 | return Result.Error; |
| 264 | } |
264 | } |
| 265 | // 0190 BY30145 BY30145 傭車料未精算マスター更新 |
265 | // 0190 BY30145 BY30145 傭車料未精算マスター更新 |
| 266 | res = executeStep(by30145, "0190", "BY30145"); |
266 | res = executeStep(by30145, "0190", "BY30145"); |
| 267 | if (res == Result.Error) { |
267 | if (res == Result.Error) { |
| 268 | return Result.Error; |
268 | return Result.Error; |
| 269 | } |
269 | } |
| 270 | // 0200 BS31060 BS31060 他社中継・配達明細DB2更新 |
270 | // 0200 BS31060 BS31060 他社中継・配達明細DB2更新 |
| 271 | res = executeStep(bs31060, "0200", "BS31060"); |
271 | res = executeStep(bs31060, "0200", "BS31060"); |
| 272 | if (res == Result.Error) { |
272 | if (res == Result.Error) { |
| 273 | return Result.Error; |
273 | return Result.Error; |
| 274 | } |
274 | } |
| 275 | // 0210 SF30020 SF30020 バックログ作成 |
275 | // 0210 SF30020 SF30020 バックログ作成 |
| 276 | res = executeStep(sf30020, "0210", "SF30020"); |
276 | res = executeStep(sf30020, "0210", "SF30020"); |
| 277 | if (res == Result.Error) { |
277 | if (res == Result.Error) { |
| 278 | return Result.Error; |
278 | return Result.Error; |
| 279 | } |
279 | } |
| 280 | |
280 | |
| 281 | return Result.Success; |
281 | return Result.Success; |
| 282 | } |
282 | } |
| 283 | } |
283 | } |
| 284 | |
284 | |