|
@@ -5,6 +5,7 @@ import com.tianbo.analysis.service.FFMInfoService; |
|
@@ -5,6 +5,7 @@ import com.tianbo.analysis.service.FFMInfoService; |
5
|
import com.tianbo.analysis.service.FWBInfoService;
|
5
|
import com.tianbo.analysis.service.FWBInfoService;
|
6
|
import com.tianbo.analysis.service.ManifestMasterService;
|
6
|
import com.tianbo.analysis.service.ManifestMasterService;
|
7
|
import com.tianbo.analysis.service.ManifestSecondService;
|
7
|
import com.tianbo.analysis.service.ManifestSecondService;
|
|
|
8
|
+import com.tianbo.util.Date.DateUtil;
|
8
|
import lombok.extern.slf4j.Slf4j;
|
9
|
import lombok.extern.slf4j.Slf4j;
|
9
|
import org.springframework.beans.factory.annotation.Autowired;
|
10
|
import org.springframework.beans.factory.annotation.Autowired;
|
10
|
import org.springframework.stereotype.Component;
|
11
|
import org.springframework.stereotype.Component;
|
|
@@ -60,10 +61,10 @@ public class FFMInfoHandle { |
|
@@ -60,10 +61,10 @@ public class FFMInfoHandle { |
60
|
if (ffmInfoList!=null && !ffmInfoList.isEmpty()){
|
61
|
if (ffmInfoList!=null && !ffmInfoList.isEmpty()){
|
61
|
for (FFMInfo item_f:ffmInfoList) {
|
62
|
for (FFMInfo item_f:ffmInfoList) {
|
62
|
|
63
|
|
63
|
- String flightDate = item_f.getFlightdate().toString();
|
64
|
+ String flightDate = DateUtil.dateToString(item_f.getFlightdate());
|
64
|
String flghtNo = item_f.getFlightno();
|
65
|
String flghtNo = item_f.getFlightno();
|
65
|
StringBuilder sb = new StringBuilder();
|
66
|
StringBuilder sb = new StringBuilder();
|
66
|
- log.info(sb.append("开始处理航班:").append(flghtNo).append("/").append(flightDate).toString());
|
67
|
+ log.warn(sb.append("开始处理航班带板箱数据:").append(flghtNo).append("/").append(flightDate).append("\n").toString());
|
67
|
|
68
|
|
68
|
//针对补发报文处理,补发的报文: FFM_INFOB表数据,存储的报文批次01对应标识是LAST
|
69
|
//针对补发报文处理,补发的报文: FFM_INFOB表数据,存储的报文批次01对应标识是LAST
|
69
|
List<FFMInfo> ffmlist_reportorder_1 = ffmInfoHandle.ffmInfoService.getFFMLastReportOrderByPallet(item_f,false);
|
70
|
List<FFMInfo> ffmlist_reportorder_1 = ffmInfoHandle.ffmInfoService.getFFMLastReportOrderByPallet(item_f,false);
|
|
@@ -77,8 +78,12 @@ public class FFMInfoHandle { |
|
@@ -77,8 +78,12 @@ public class FFMInfoHandle { |
77
|
if (ffmlist_reportorder_1 !=null && !ffmlist_reportorder_1.isEmpty()){
|
78
|
if (ffmlist_reportorder_1 !=null && !ffmlist_reportorder_1.isEmpty()){
|
78
|
for (FFMInfo item:ffmlist_reportorder_1) {
|
79
|
for (FFMInfo item:ffmlist_reportorder_1) {
|
79
|
|
80
|
|
|
|
81
|
+ log.info(new StringBuilder("--------------开始入库").append(flghtNo).append("/").append(flightDate).append(":").append(item.getWaybillnomaster()).append("------------").toString());
|
|
|
82
|
+
|
|
|
83
|
+
|
80
|
result = updateFFM2Manifest(item);
|
84
|
result = updateFFM2Manifest(item);
|
81
|
- log.info(new StringBuilder("开始入库").append(item.getFlightno()).append("/").append(item.getFlightdate()).append(":").append(item.getWaybillnomaster()).toString());
|
85
|
+
|
|
|
86
|
+ log.info("-----------入库结束--------------结果:"+result);
|
82
|
}
|
87
|
}
|
83
|
}
|
88
|
}
|
84
|
/**
|
89
|
/**
|
|
@@ -100,8 +105,14 @@ public class FFMInfoHandle { |
|
@@ -100,8 +105,14 @@ public class FFMInfoHandle { |
100
|
if (ffmlist != null && ffmlist.size() > 0){
|
105
|
if (ffmlist != null && ffmlist.size() > 0){
|
101
|
|
106
|
|
102
|
for (FFMInfo item:ffmlist) {
|
107
|
for (FFMInfo item:ffmlist) {
|
|
|
108
|
+
|
|
|
109
|
+ log.info(new StringBuilder("开始入库").append(flghtNo).append("/").append(flightDate).append(":").append(item.getWaybillnomaster()).toString());
|
|
|
110
|
+
|
|
|
111
|
+
|
103
|
result = updateFFM2Manifest(item);
|
112
|
result = updateFFM2Manifest(item);
|
104
|
- log.info(new StringBuilder("开始入库").append(item.getFlightno()).append("/").append(item.getFlightdate()).append(":").append(item.getWaybillnomaster()).toString());
|
113
|
+
|
|
|
114
|
+ log.info("------------入库结束-------------结果:"+result);
|
|
|
115
|
+
|
105
|
}
|
116
|
}
|
106
|
|
117
|
|
107
|
}
|
118
|
}
|
|
@@ -110,6 +121,9 @@ public class FFMInfoHandle { |
|
@@ -110,6 +121,9 @@ public class FFMInfoHandle { |
110
|
}
|
121
|
}
|
111
|
}
|
122
|
}
|
112
|
}
|
123
|
}
|
|
|
124
|
+
|
|
|
125
|
+ //空板箱舱单入库:
|
|
|
126
|
+// dealFFMInfoWithNullPallet();
|
113
|
}catch (Exception e){
|
127
|
}catch (Exception e){
|
114
|
e.printStackTrace();
|
128
|
e.printStackTrace();
|
115
|
}
|
129
|
}
|
|
@@ -130,19 +144,19 @@ public class FFMInfoHandle { |
|
@@ -130,19 +144,19 @@ public class FFMInfoHandle { |
130
|
* 业务库存在此航班的运单数据则不会插入,并更新ffminfo临时表的此舱单的数据状态为已处理 返回 0
|
144
|
* 业务库存在此航班的运单数据则不会插入,并更新ffminfo临时表的此舱单的数据状态为已处理 返回 0
|
131
|
* @return 0 or 1
|
145
|
* @return 0 or 1
|
132
|
*/
|
146
|
*/
|
|
|
147
|
+ String fwb = item.getWaybillnomaster();
|
133
|
Flag = ffmInfoHandle.manifestMasterService.insertManifestWithMaster(item);
|
148
|
Flag = ffmInfoHandle.manifestMasterService.insertManifestWithMaster(item);
|
134
|
- log.info(new StringBuilder("运单号:").append(item.getWaybillnomaster()).append("入库数量为:").append(Flag).toString());
|
149
|
+ log.info(new StringBuilder("运单号:").append(fwb).append("->入库:").append(Flag).toString());
|
135
|
|
150
|
|
136
|
if (Flag > 0) {
|
151
|
if (Flag > 0) {
|
137
|
|
152
|
|
138
|
-
|
|
|
139
|
//业务数据入库成功后,更新舱单待处理表的数据状态为 1,根据航班号+航班日期+主单号
|
153
|
//业务数据入库成功后,更新舱单待处理表的数据状态为 1,根据航班号+航班日期+主单号
|
140
|
int ffm_i = ffmInfoHandle.ffmInfoService.setDealstatusSuccess(item);
|
154
|
int ffm_i = ffmInfoHandle.ffmInfoService.setDealstatusSuccess(item);
|
141
|
- log.info(new StringBuilder("更新运单:").append(item.getWaybillnomaster()).append("舱单临时表状态为:").append("已处理:").append(ffm_i).toString());
|
155
|
+ log.info(new StringBuilder("更新运单:").append("舱单临时表状态为已处理:").append(ffm_i).toString());
|
142
|
|
156
|
|
143
|
//舱单报文入库后, 更新FWB信息,将FWB临时表的信息更新到 舱单业务表
|
157
|
//舱单报文入库后, 更新FWB信息,将FWB临时表的信息更新到 舱单业务表
|
144
|
int fwb_i=ffmInfoHandle.fwbInfoService.updateFwbToManifest(item.getWaybillnomaster());
|
158
|
int fwb_i=ffmInfoHandle.fwbInfoService.updateFwbToManifest(item.getWaybillnomaster());
|
145
|
- log.info(new StringBuilder("更新运单:").append(item.getWaybillnomaster()).append("运单FWB数据到业务库:").append(fwb_i).toString());
|
159
|
+ log.info(new StringBuilder("更新运单:").append("运单FWB数据到业务库:").append(fwb_i).toString());
|
146
|
|
160
|
|
147
|
//分单挂主单
|
161
|
//分单挂主单
|
148
|
int fhl_i = ffmInfoHandle.secondService.setManifestMaster(item);
|
162
|
int fhl_i = ffmInfoHandle.secondService.setManifestMaster(item);
|
|
@@ -167,6 +181,11 @@ public class FFMInfoHandle { |
|
@@ -167,6 +181,11 @@ public class FFMInfoHandle { |
167
|
// CustomsCargoSystem.Helper.Log.ffminfo_log("舱单数据入业务库调试信息", "舱单数据入业务库调试信息(板号空).txt",
|
181
|
// CustomsCargoSystem.Helper.Log.ffminfo_log("舱单数据入业务库调试信息", "舱单数据入业务库调试信息(板号空).txt",
|
168
|
//string.Format(@"{0}入业务库开始航班号:{1},航班日期:{2}" + Environment.NewLine, DateTime.Now, item_f.flightno, item_f.flightdate));
|
182
|
//string.Format(@"{0}入业务库开始航班号:{1},航班日期:{2}" + Environment.NewLine, DateTime.Now, item_f.flightno, item_f.flightdate));
|
169
|
//针对补发报文处理
|
183
|
//针对补发报文处理
|
|
|
184
|
+ String flightDate = DateUtil.dateToString(item_f.getFlightdate());
|
|
|
185
|
+ String flghtNo = item_f.getFlightno();
|
|
|
186
|
+ StringBuilder sb = new StringBuilder();
|
|
|
187
|
+ log.warn(sb.append("开始处理航班空板箱:").append(flghtNo).append("/").append(flightDate).append("\n").toString());
|
|
|
188
|
+
|
170
|
List<FFMInfo> ffmlist_reportorder_1 = ffmInfoHandle.ffmInfoService.getFFMLastReportOrderByPallet(item_f,true);
|
189
|
List<FFMInfo> ffmlist_reportorder_1 = ffmInfoHandle.ffmInfoService.getFFMLastReportOrderByPallet(item_f,true);
|
171
|
|
190
|
|
172
|
/**
|
191
|
/**
|
|
@@ -175,7 +194,9 @@ public class FFMInfoHandle { |
|
@@ -175,7 +194,9 @@ public class FFMInfoHandle { |
175
|
*/
|
194
|
*/
|
176
|
if (ffmlist_reportorder_1 !=null && !ffmlist_reportorder_1.isEmpty()){
|
195
|
if (ffmlist_reportorder_1 !=null && !ffmlist_reportorder_1.isEmpty()){
|
177
|
for (FFMInfo item:ffmlist_reportorder_1) {
|
196
|
for (FFMInfo item:ffmlist_reportorder_1) {
|
|
|
197
|
+ log.info(new StringBuilder("开始入库").append(flghtNo).append("/").append(flightDate).append(":").append(item.getWaybillnomaster()).toString());
|
178
|
result = updateFFM2Manifest(item);
|
198
|
result = updateFFM2Manifest(item);
|
|
|
199
|
+ log.info("------------入库结束-------------结果:"+result);
|
179
|
}
|
200
|
}
|
180
|
}
|
201
|
}
|
181
|
/**
|
202
|
/**
|
|
@@ -198,7 +219,10 @@ public class FFMInfoHandle { |
|
@@ -198,7 +219,10 @@ public class FFMInfoHandle { |
198
|
if (ffmlist != null && ffmlist.size() > 0){
|
219
|
if (ffmlist != null && ffmlist.size() > 0){
|
199
|
|
220
|
|
200
|
for (FFMInfo item:ffmlist) {
|
221
|
for (FFMInfo item:ffmlist) {
|
|
|
222
|
+
|
|
|
223
|
+ log.info(new StringBuilder("开始入库").append(flghtNo).append("/").append(flightDate).append(":").append(item.getWaybillnomaster()).toString());
|
201
|
result = updateFFM2Manifest(item);
|
224
|
result = updateFFM2Manifest(item);
|
|
|
225
|
+ log.info("------------入库结束-------------结果:"+result);
|
202
|
}
|
226
|
}
|
203
|
|
227
|
|
204
|
}
|
228
|
}
|