正在显示
7 个修改的文件
包含
109 行增加
和
90 行删除
@@ -189,7 +189,7 @@ public class NmsController { | @@ -189,7 +189,7 @@ public class NmsController { | ||
189 | * | 189 | * |
190 | * 机场所属城市代码 | 190 | * 机场所属城市代码 |
191 | */ | 191 | */ |
192 | - BasAirport ba = basAirportService.getBasAirportInfo(result.getDestinationStation()); | 192 | + BasAirport ba = basAirportService.getBasAirportInfo(result.getOriginatingStation()); |
193 | 193 | ||
194 | /** | 194 | /** |
195 | * 4.根据 新舱单机场代码表 中的 机场所属城市代码 ,获取 天博——机场代码表 的相应数据 | 195 | * 4.根据 新舱单机场代码表 中的 机场所属城市代码 ,获取 天博——机场代码表 的相应数据 |
@@ -215,19 +215,21 @@ public class NmsController { | @@ -215,19 +215,21 @@ public class NmsController { | ||
215 | result.setAreaDescChn(basArea.getAreaDescChn()); | 215 | result.setAreaDescChn(basArea.getAreaDescChn()); |
216 | 216 | ||
217 | // 6.根据 理货信息 中的运单号,获取预配表中的相应数据 | 217 | // 6.根据 理货信息 中的运单号,获取预配表中的相应数据 |
218 | - List<PrepareMaster> pm = prepareMasterService.getPrepareMasterInfo(result.getWaybillNoMaster()); | ||
219 | - if (pm != null && pm.size() > 0) { | ||
220 | - //发货人名称 | ||
221 | - result.setShipperName(pm.get(0).getShipperName()); | ||
222 | - //收货人名称 | ||
223 | - result.setConsigneeName(pm.get(0).getConsigneeName()); | ||
224 | - //获取目的货物目的站 | ||
225 | - result.setAimStation(pm.get(0).getDestinationStation()); | ||
226 | - } | 218 | +// List<PrepareMaster> pm = prepareMasterService.getPrepareMasterInfo(result.getWaybillNoMaster()); |
219 | +// if (pm != null && pm.size() > 0) { | ||
220 | +// //发货人名称 | ||
221 | +// result.setShipperName(pm.get(0).getShipperName()); | ||
222 | +// //收货人名称 | ||
223 | +// result.setConsigneeName(pm.get(0).getConsigneeName()); | ||
224 | +// //获取目的货物目的站 | ||
225 | +// result.setAimStation(pm.get(0).getDestinationStation()); | ||
226 | +// //获取货物起始站 | ||
227 | +// result.setStartStation(pm.get(0).getOriginatingStation()); | ||
228 | +// } | ||
227 | 229 | ||
228 | /** | 230 | /** |
229 | * 获取代理人的相关数据 | 231 | * 获取代理人的相关数据 |
230 | - */ | 232 | + * |
231 | ResultArrivalData asmInfo = new ResultArrivalData(); | 233 | ResultArrivalData asmInfo = new ResultArrivalData(); |
232 | asmInfo = getCgoAsmFeign.getInfo(result.getWaybillNoMaster()); | 234 | asmInfo = getCgoAsmFeign.getInfo(result.getWaybillNoMaster()); |
233 | //设置结算代理人 | 235 | //设置结算代理人 |
@@ -240,6 +242,7 @@ public class NmsController { | @@ -240,6 +242,7 @@ public class NmsController { | ||
240 | result.setTwoTypeName(asmInfo.getTwoTypeName()); | 242 | result.setTwoTypeName(asmInfo.getTwoTypeName()); |
241 | //设置一级类名称 | 243 | //设置一级类名称 |
242 | result.setTypeName(asmInfo.getTypeName()); | 244 | result.setTypeName(asmInfo.getTypeName()); |
245 | + */ | ||
243 | 246 | ||
244 | /** | 247 | /** |
245 | * 获取运输工具的对应数据 | 248 | * 获取运输工具的对应数据 |
@@ -17,6 +17,7 @@ import java.io.Serializable; | @@ -17,6 +17,7 @@ import java.io.Serializable; | ||
17 | public class PrepareMaster implements Serializable { | 17 | public class PrepareMaster implements Serializable { |
18 | 18 | ||
19 | private static final long serialVersionUID = 7073373008863847070L; | 19 | private static final long serialVersionUID = 7073373008863847070L; |
20 | + | ||
20 | /** | 21 | /** |
21 | * 发货人名称 | 22 | * 发货人名称 |
22 | */ | 23 | */ |
@@ -31,11 +32,16 @@ public class PrepareMaster implements Serializable { | @@ -31,11 +32,16 @@ public class PrepareMaster implements Serializable { | ||
31 | * 运单号 | 32 | * 运单号 |
32 | */ | 33 | */ |
33 | private String waybillNoMaster; | 34 | private String waybillNoMaster; |
35 | + | ||
34 | /** | 36 | /** |
35 | * 航班目的站,货物目的站 | 37 | * 航班目的站,货物目的站 |
36 | */ | 38 | */ |
37 | private String destinationStation; | 39 | private String destinationStation; |
38 | 40 | ||
41 | + /** | ||
42 | + * 货物起始站 | ||
43 | + */ | ||
44 | + private String originatingStation; | ||
39 | 45 | ||
40 | /** | 46 | /** |
41 | * id | 47 | * id |
@@ -58,10 +64,7 @@ public class PrepareMaster implements Serializable { | @@ -58,10 +64,7 @@ public class PrepareMaster implements Serializable { | ||
58 | // */ | 64 | // */ |
59 | // private Date flightDate; | 65 | // private Date flightDate; |
60 | // | 66 | // |
61 | -// /** | ||
62 | -// * 航班起始站 | ||
63 | -// */ | ||
64 | -// private String originatingStation; | 67 | + |
65 | // | 68 | // |
66 | // | 69 | // |
67 | // | 70 | // |
@@ -72,6 +72,11 @@ public class ResultArrivalData implements Serializable { | @@ -72,6 +72,11 @@ public class ResultArrivalData implements Serializable { | ||
72 | private String carrier; | 72 | private String carrier; |
73 | 73 | ||
74 | /** | 74 | /** |
75 | + * 品名 | ||
76 | + */ | ||
77 | + private String productName; | ||
78 | + | ||
79 | + /** | ||
75 | * 11.发货人名称 | 80 | * 11.发货人名称 |
76 | */ | 81 | */ |
77 | private String shipperName; | 82 | private String shipperName; |
@@ -87,6 +92,10 @@ public class ResultArrivalData implements Serializable { | @@ -87,6 +92,10 @@ public class ResultArrivalData implements Serializable { | ||
87 | private String aimStation; | 92 | private String aimStation; |
88 | 93 | ||
89 | /** | 94 | /** |
95 | + * 13.货物始发站 | ||
96 | + */ | ||
97 | + private String startStation; | ||
98 | + /** | ||
90 | * 14.国家代码 | 99 | * 14.国家代码 |
91 | */ | 100 | */ |
92 | private String country; | 101 | private String country; |
@@ -106,6 +115,8 @@ public class ResultArrivalData implements Serializable { | @@ -106,6 +115,8 @@ public class ResultArrivalData implements Serializable { | ||
106 | */ | 115 | */ |
107 | private String countName; | 116 | private String countName; |
108 | 117 | ||
118 | + | ||
119 | + | ||
109 | /** | 120 | /** |
110 | * 代理人服务 | 121 | * 代理人服务 |
111 | * 18.品名 | 122 | * 18.品名 |
@@ -30,7 +30,7 @@ import java.util.UUID; | @@ -30,7 +30,7 @@ import java.util.UUID; | ||
30 | @Slf4j | 30 | @Slf4j |
31 | @RestController | 31 | @RestController |
32 | @RequestMapping("/arrival") | 32 | @RequestMapping("/arrival") |
33 | -public class ExitExcel { | 33 | +public class ArrivalExcel { |
34 | 34 | ||
35 | @Value("${path.dir}") | 35 | @Value("${path.dir}") |
36 | private String dir; | 36 | private String dir; |
@@ -58,16 +58,15 @@ public class ExitExcel { | @@ -58,16 +58,15 @@ public class ExitExcel { | ||
58 | HSSFCellStyle cellStyle = workbook.createCellStyle(); | 58 | HSSFCellStyle cellStyle = workbook.createCellStyle(); |
59 | // 表头 | 59 | // 表头 |
60 | String[] head = { | 60 | String[] head = { |
61 | - "运单号", | 61 | + "主单号", |
62 | "件数", | 62 | "件数", |
63 | - "重量", | ||
64 | - "计费重量", | ||
65 | - "体积", | 63 | + "重量(KG)", |
66 | "品名", | 64 | "品名", |
67 | "二级品类", | 65 | "二级品类", |
68 | "一级品类", | 66 | "一级品类", |
67 | + "货物始发站", | ||
69 | "货物目的站", | 68 | "货物目的站", |
70 | - "货物目的国家/地区", | 69 | + "货物进口国家/地区", |
71 | "所属洲", | 70 | "所属洲", |
72 | "航空公司", | 71 | "航空公司", |
73 | "航班号", | 72 | "航班号", |
@@ -75,6 +74,7 @@ public class ExitExcel { | @@ -75,6 +74,7 @@ public class ExitExcel { | ||
75 | "航班时间", | 74 | "航班时间", |
76 | "航班计划日期", | 75 | "航班计划日期", |
77 | "航班计划时间", | 76 | "航班计划时间", |
77 | + "出港日期", | ||
78 | "航段", | 78 | "航段", |
79 | "机号", | 79 | "机号", |
80 | "机型", | 80 | "机型", |
@@ -94,7 +94,7 @@ public class ExitExcel { | @@ -94,7 +94,7 @@ public class ExitExcel { | ||
94 | // 设置单元格宽度 | 94 | // 设置单元格宽度 |
95 | // 256*width+184 | 95 | // 256*width+184 |
96 | sheet.setColumnWidth(i, 4000); | 96 | sheet.setColumnWidth(i, 4000); |
97 | - if (i == 14 || i == 16) { | 97 | + if (i == 13 || i == 15) { |
98 | sheet.setColumnWidth(i, 6000); | 98 | sheet.setColumnWidth(i, 6000); |
99 | } | 99 | } |
100 | if (i == 21 || i == 22) { | 100 | if (i == 21 || i == 22) { |
@@ -102,69 +102,67 @@ public class ExitExcel { | @@ -102,69 +102,67 @@ public class ExitExcel { | ||
102 | } | 102 | } |
103 | } | 103 | } |
104 | // 设置表格内容 | 104 | // 设置表格内容 |
105 | -// for (Integer i = 0; i < exitInfoList.size(); i++) { | ||
106 | -// row = sheet.createRow(i + 1); | ||
107 | -// ResultArrivalData resultExitData = exitInfoList.get(i); | ||
108 | -// // 这里是内容设置,替换则自己的数据即可 | ||
109 | -// String[] excelTitle = new String[27]; | ||
110 | -// | ||
111 | -// //取出数据,运单号 | ||
112 | -// excelTitle[0] = resultExitData.getWaybillNoMaster(); | ||
113 | -// //件数 | ||
114 | -// excelTitle[1] = resultExitData.getTallyTotalPiece(); | ||
115 | -// //重量 | ||
116 | -// excelTitle[2] = resultExitData.getTallyTotalWeight(); | ||
117 | -// //计费重量 | ||
118 | -// excelTitle[3] = String.valueOf(resultExitData.getTotalGrossWeightMeasure()); | ||
119 | -// //体积 | ||
120 | -// excelTitle[4] = String.valueOf(resultExitData.getVolumeMeasure()); | ||
121 | -// //品名 | ||
122 | -// excelTitle[5] = resultExitData.getSdCargoName(); | ||
123 | -// //二级品类 | ||
124 | -// excelTitle[6] = resultExitData.getTwoTypeName(); | ||
125 | -// //一级品类 | ||
126 | -// excelTitle[7] = resultExitData.getTypeName(); | ||
127 | -// //货物目的站 | ||
128 | -// excelTitle[8] = resultExitData.getAimStation(); | ||
129 | -// //货物目的国家/地区 | ||
130 | -// excelTitle[9] = resultExitData.getCountry(); | ||
131 | -// //所属洲 | ||
132 | -// excelTitle[10] = resultExitData.getAreaDescChn(); | ||
133 | -// //航空公司 | ||
134 | -// excelTitle[11] = resultExitData.getAirCompany(); | ||
135 | -// //航班号 | ||
136 | -// excelTitle[12] = resultExitData.getFlightNo(); | ||
137 | -// //航班日期 | ||
138 | -// excelTitle[13] = isNullShort(resultExitData.getFlightDate()); | ||
139 | -// //航班时间 | ||
140 | -// excelTitle[14] = isNullLong(resultExitData.getFlightTime()); | ||
141 | -// //航班计划日期 | ||
142 | -// excelTitle[15] = isNullShort(resultExitData.getFlightPlanDate()); | ||
143 | -// //航班计划时间 | ||
144 | -// excelTitle[16] = isNullLong(resultExitData.getFlightPlanTime()); | ||
145 | -// //航段 | ||
146 | -// excelTitle[17] = resultExitData.getSegment(); | ||
147 | -// //机号 | ||
148 | -// excelTitle[18] = resultExitData.getCfNo(); | ||
149 | -// //机型 | ||
150 | -// excelTitle[19] = resultExitData.getCfTp(); | ||
151 | -// //最大业载 | ||
152 | -// excelTitle[20] = ""; | ||
153 | -// //运单发货人 | ||
154 | -// excelTitle[21] = resultExitData.getShipperName(); | ||
155 | -// //运单收货人 | ||
156 | -// excelTitle[22] = resultExitData.getConsigneeName(); | ||
157 | -// //订舱代理人(代理人全称) | ||
158 | -// excelTitle[23] = resultExitData.getOrderName(); | ||
159 | -// //结算代理人(代理人全程) | ||
160 | -// excelTitle[24] = resultExitData.getCountName(); | ||
161 | -// //自定义项 | ||
162 | -// excelTitle[25] = ""; | ||
163 | -// | ||
164 | -// for (Integer j = 0; j < excelTitle.length; j++) { | ||
165 | -// row.createCell(j).setCellValue(excelTitle[j]); | ||
166 | -// } | ||
167 | -// } | 105 | + for (Integer i = 0; i < exitInfoList.size(); i++) { |
106 | + row = sheet.createRow(i + 1); | ||
107 | + ResultArrivalData resultExitData = exitInfoList.get(i); | ||
108 | + // 这里是内容设置,替换则自己的数据即可 | ||
109 | + String[] excelTitle = new String[27]; | ||
110 | + //取出数据,运单号 | ||
111 | + excelTitle[0] = resultExitData.getWaybillNoMaster(); | ||
112 | + //件数 | ||
113 | + excelTitle[1] = resultExitData.getTotalPiece(); | ||
114 | + //重量 | ||
115 | + excelTitle[2] = resultExitData.getTotalWeight(); | ||
116 | + //品名 | ||
117 | + excelTitle[3] = resultExitData.getProductName(); | ||
118 | + //二级品类 | ||
119 | + excelTitle[4] = ""; | ||
120 | + //一级品类 | ||
121 | + excelTitle[5] = ""; | ||
122 | + //货物始发站 | ||
123 | + excelTitle[6] = resultExitData.getOriginatingStation(); | ||
124 | + //货物目的站 | ||
125 | + excelTitle[7] = resultExitData.getDestinationStation(); | ||
126 | + //货物目的国家/地区 | ||
127 | + excelTitle[8] = resultExitData.getCountry(); | ||
128 | + //所属洲 | ||
129 | + excelTitle[9] = resultExitData.getAreaDescChn(); | ||
130 | + //航空公司 | ||
131 | + excelTitle[10] = resultExitData.getAirCompany(); | ||
132 | + //航班号 | ||
133 | + excelTitle[11] = resultExitData.getFlightNo(); | ||
134 | + //航班日期 | ||
135 | + excelTitle[12] = isNullShort(resultExitData.getFlightDate()); | ||
136 | + //航班时间 | ||
137 | + excelTitle[13] = isNullLong(resultExitData.getFlightTime()); | ||
138 | + //航班计划日期 | ||
139 | + excelTitle[14] = isNullShort(resultExitData.getFlightPlanDate()); | ||
140 | + //航班计划时间 | ||
141 | + excelTitle[15] = isNullLong(resultExitData.getFlightPlanTime()); | ||
142 | + //出港日期 | ||
143 | + excelTitle[16] = isNullShort(resultExitData.getArrivalDate()); | ||
144 | + //航段 | ||
145 | + excelTitle[17] = resultExitData.getSegment(); | ||
146 | + //机号 | ||
147 | + excelTitle[18] = resultExitData.getCfNo(); | ||
148 | + //机型 | ||
149 | + excelTitle[19] = resultExitData.getCfTp(); | ||
150 | + //最大业载 | ||
151 | + excelTitle[20] = ""; | ||
152 | + //运单发货人 | ||
153 | + excelTitle[21] = resultExitData.getShipperName(); | ||
154 | + //运单收货人 | ||
155 | + excelTitle[22] = resultExitData.getConsigneeName(); | ||
156 | + //订舱代理人(代理人全称) | ||
157 | + excelTitle[23] = resultExitData.getOrderName(); | ||
158 | + //结算代理人(代理人全程) | ||
159 | + excelTitle[24] = resultExitData.getCountName(); | ||
160 | + //自定义项 | ||
161 | + excelTitle[25] = ""; | ||
162 | + for (Integer j = 0; j < excelTitle.length; j++) { | ||
163 | + row.createCell(j).setCellValue(excelTitle[j]); | ||
164 | + } | ||
165 | + } | ||
168 | 166 | ||
169 | String file_name = UUID.randomUUID().toString().replaceAll("-", ""); | 167 | String file_name = UUID.randomUUID().toString().replaceAll("-", ""); |
170 | // 设置文件名 | 168 | // 设置文件名 |
@@ -28,7 +28,7 @@ public class DownExcel { | @@ -28,7 +28,7 @@ public class DownExcel { | ||
28 | ResultJson result = new ResultJson(); | 28 | ResultJson result = new ResultJson(); |
29 | //获取当前服务器的ip地址 | 29 | //获取当前服务器的ip地址 |
30 | String ip = InetAddress.getLocalHost().getHostAddress(); | 30 | String ip = InetAddress.getLocalHost().getHostAddress(); |
31 | - String address = "http://" + ip + ":" + port + "/exit/"; | 31 | + String address = "http://" + ip + ":" + port + "/arrival/"; |
32 | result.setCode("200"); | 32 | result.setCode("200"); |
33 | result.setMsg(address); | 33 | result.setMsg(address); |
34 | return result; | 34 | return result; |
@@ -7,11 +7,12 @@ | @@ -7,11 +7,12 @@ | ||
7 | <result column="CONSIGNEENAME" jdbcType="VARCHAR" property="consigneeName"/> | 7 | <result column="CONSIGNEENAME" jdbcType="VARCHAR" property="consigneeName"/> |
8 | <result column="SHIPPERNAME" jdbcType="VARCHAR" property="shipperName"/> | 8 | <result column="SHIPPERNAME" jdbcType="VARCHAR" property="shipperName"/> |
9 | <result column="DESTINATIONSTATION" jdbcType="VARCHAR" property="destinationStation"/> | 9 | <result column="DESTINATIONSTATION" jdbcType="VARCHAR" property="destinationStation"/> |
10 | + <result column="ORIGINATINGSTATION" jdbcType="VARCHAR" property="originatingStation"/> | ||
10 | <result column="WAYBILLNOMASTER" jdbcType="VARCHAR" property="waybillNoMaster"/> | 11 | <result column="WAYBILLNOMASTER" jdbcType="VARCHAR" property="waybillNoMaster"/> |
11 | </resultMap> | 12 | </resultMap> |
12 | <sql id="Base_Column_List"> | 13 | <sql id="Base_Column_List"> |
13 | <!--@mbg.generated--> | 14 | <!--@mbg.generated--> |
14 | - CONSIGNEENAME,SHIPPERNAME,DESTINATIONSTATION,WAYBILLNOMASTER | 15 | + CONSIGNEENAME,SHIPPERNAME,ORIGINATINGSTATION,DESTINATIONSTATION,WAYBILLNOMASTER |
15 | </sql> | 16 | </sql> |
16 | <select id="getPrepareMasterInfo" parameterType="java.lang.String" resultMap="BaseResultMap"> | 17 | <select id="getPrepareMasterInfo" parameterType="java.lang.String" resultMap="BaseResultMap"> |
17 | select | 18 | select |
@@ -10,13 +10,16 @@ | @@ -10,13 +10,16 @@ | ||
10 | <result column="FLIGHT_DATE" jdbcType="TIMESTAMP" property="flightDate"/> | 10 | <result column="FLIGHT_DATE" jdbcType="TIMESTAMP" property="flightDate"/> |
11 | <result column="ORIGINATINGSTATION" jdbcType="VARCHAR" property="originatingStation"/> | 11 | <result column="ORIGINATINGSTATION" jdbcType="VARCHAR" property="originatingStation"/> |
12 | <result column="DESTINATIONSTATION" jdbcType="VARCHAR" property="destinationStation"/> | 12 | <result column="DESTINATIONSTATION" jdbcType="VARCHAR" property="destinationStation"/> |
13 | - <result column="TOTALPIECE" jdbcType="VARCHAR" property="totalPiece"/> | ||
14 | - <result column="TOTALWEIGHT" jdbcType="VARCHAR" property="totalWeight"/> | 13 | + <result column="MANIFESTTOTALPIECE" jdbcType="VARCHAR" property="totalPiece"/> |
14 | + <result column="MANIFESTTOTALWEIGHT" jdbcType="VARCHAR" property="totalWeight"/> | ||
15 | + <result column="SHIPPERNAME" jdbcType="VARCHAR" property="shipperName"/> | ||
16 | + <result column="CONSIGNEENAME" jdbcType="VARCHAR" property="consigneeName"/> | ||
17 | + <result column="PRODUCTNAME" jdbcType="VARCHAR" property="productName"/> | ||
15 | </resultMap> | 18 | </resultMap> |
16 | <sql id="Base_Column_List"> | 19 | <sql id="Base_Column_List"> |
17 | <!--@mbg.generated--> | 20 | <!--@mbg.generated--> |
18 | AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE, ORIGINATINGSTATION, DESTINATIONSTATION, | 21 | AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE, ORIGINATINGSTATION, DESTINATIONSTATION, |
19 | - TOTALPIECE, TOTALWEIGHT | 22 | + MANIFESTTOTALPIECE, MANIFESTTOTALWEIGHT,SHIPPERNAME,CONSIGNEENAME,PRODUCTNAME |
20 | </sql> | 23 | </sql> |
21 | <select id="getResultArrivalDataInfo" parameterType="com.sunyo.wlpt.cgonms.arrival.domain.ResultArrivalData" | 24 | <select id="getResultArrivalDataInfo" parameterType="com.sunyo.wlpt.cgonms.arrival.domain.ResultArrivalData" |
22 | resultMap="BaseResultMap"> | 25 | resultMap="BaseResultMap"> |
-
请 注册 或 登录 后发表评论