正在显示
8 个修改的文件
包含
70 行增加
和
4 行删除
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <cxf.version>2.7.5</cxf.version> | 34 | <cxf.version>2.7.5</cxf.version> |
35 | <patchca.version>0.5.0</patchca.version> | 35 | <patchca.version>0.5.0</patchca.version> |
36 | <jxl.version>2.6.12</jxl.version> | 36 | <jxl.version>2.6.12</jxl.version> |
37 | - <poi.version>3.6</poi.version> | 37 | + <poi.version>3.9</poi.version> |
38 | <velocity.version>1.7</velocity.version> | 38 | <velocity.version>1.7</velocity.version> |
39 | 39 | ||
40 | <!-- Plugin的属性定义 --> | 40 | <!-- Plugin的属性定义 --> |
@@ -368,7 +368,7 @@ | @@ -368,7 +368,7 @@ | ||
368 | <dependency> | 368 | <dependency> |
369 | <groupId>org.apache.poi</groupId> | 369 | <groupId>org.apache.poi</groupId> |
370 | <artifactId>poi-ooxml</artifactId> | 370 | <artifactId>poi-ooxml</artifactId> |
371 | - <version>3.17</version> | 371 | + <version>3.9</version> |
372 | </dependency> | 372 | </dependency> |
373 | 373 | ||
374 | <dependency> | 374 | <dependency> |
@@ -12,6 +12,7 @@ import com.agent.util.WaybillUtils; | @@ -12,6 +12,7 @@ import com.agent.util.WaybillUtils; | ||
12 | import com.agent.vo.ResponseModel; | 12 | import com.agent.vo.ResponseModel; |
13 | import com.agent.vo.agent.CommodityVo; | 13 | import com.agent.vo.agent.CommodityVo; |
14 | import com.agent.vo.agent.ManifestVo; | 14 | import com.agent.vo.agent.ManifestVo; |
15 | +import com.agent.vo.agent.SDVo; | ||
15 | import com.agent.xml.XmlBuildTask; | 16 | import com.agent.xml.XmlBuildTask; |
16 | import com.agent.xml.common.XmlHead; | 17 | import com.agent.xml.common.XmlHead; |
17 | import com.agent.xml.common.XmlUtil; | 18 | import com.agent.xml.common.XmlUtil; |
@@ -2675,6 +2676,32 @@ public class ManifestController extends BasicController { | @@ -2675,6 +2676,32 @@ public class ManifestController extends BasicController { | ||
2675 | sdCargoNameService.save(sdCargoNameEntity); | 2676 | sdCargoNameService.save(sdCargoNameEntity); |
2676 | } | 2677 | } |
2677 | securityDeclarationService.save(sd); | 2678 | securityDeclarationService.save(sd); |
2679 | + | ||
2680 | + // 生成报文并且发送 | ||
2681 | + String ndlrPath = MessageKit.getMessagePath(MessageType.NDLR); | ||
2682 | + | ||
2683 | + //存放数据Vo | ||
2684 | + SDVo sdVo = new SDVo(); | ||
2685 | + sdVo.setSd_waybill(wbm); | ||
2686 | + sdVo.setSd_cargo_agent_name(arr.get(27)); | ||
2687 | + sdVo.setSd_cargo_shipper_name(arr.get(28)); | ||
2688 | + sdVo.setSd_iata_number(arr.get(29)); | ||
2689 | + sdVo.setSd_transport_certificate(arr.get(30)); | ||
2690 | + sdVo.setSd_transportation_prove(arr.get(31)); | ||
2691 | + //品名 | ||
2692 | + sdVo.setSd_cargo_name(arr.get(33)); | ||
2693 | + //货物类型 | ||
2694 | + sdVo.setSd_cargo_type(arr.get(32)); | ||
2695 | + | ||
2696 | + //预配信息 | ||
2697 | + sdVo.setFlightno(arr.get(3).substring(2)); | ||
2698 | + sdVo.setFlightdate(parse); | ||
2699 | + sdVo.setCarrier(arr.get(3).substring(0, 2)); | ||
2700 | + sdVo.setTotalpiece(arr.get(10)); | ||
2701 | + sdVo.setTotalweight(arr.get(11)); | ||
2702 | + sdVo.setDestinationstation(arr.get(7)); | ||
2703 | + new XmlBuildTask(securityDeclarationService.sendNDLRXml(sdVo), ndlrPath).perform(); | ||
2704 | + | ||
2678 | } | 2705 | } |
2679 | manifestService.save(manifestEntity); | 2706 | manifestService.save(manifestEntity); |
2680 | }else { | 2707 | }else { |
@@ -136,7 +136,13 @@ public class SecurityDeclarationService extends BasicService<SecurityManifestEnt | @@ -136,7 +136,13 @@ public class SecurityDeclarationService extends BasicService<SecurityManifestEnt | ||
136 | SecurityDeclarationXml sdXml = new SecurityDeclarationXml(); | 136 | SecurityDeclarationXml sdXml = new SecurityDeclarationXml(); |
137 | sdXml.setCargoAgentName(sdVo.getSd_cargo_agent_name()); | 137 | sdXml.setCargoAgentName(sdVo.getSd_cargo_agent_name()); |
138 | sdXml.setCargoName(sdVo.getSd_cargo_name()); | 138 | sdXml.setCargoName(sdVo.getSd_cargo_name()); |
139 | - sdXml.setCargoType(sdVo.getSd_cargo_type()); | 139 | + if (sdVo.getSd_cargo_type().contains("C")){ |
140 | + sdXml.setCargoType("3"); | ||
141 | + sdXml.setRiskclassify(sdVo.getSd_cargo_type()); | ||
142 | + }else { | ||
143 | + sdXml.setCargoType(transform(sdVo.getSd_cargo_type())); | ||
144 | + sdXml.setRiskclassify(""); | ||
145 | + } | ||
140 | sdXml.setShipperName(sdVo.getSd_cargo_shipper_name()); | 146 | sdXml.setShipperName(sdVo.getSd_cargo_shipper_name()); |
141 | sdXml.setIataNo(sdVo.getSd_iata_number()); | 147 | sdXml.setIataNo(sdVo.getSd_iata_number()); |
142 | sdXml.setPiece(sdVo.getTotalpiece()); | 148 | sdXml.setPiece(sdVo.getTotalpiece()); |
@@ -171,4 +177,25 @@ public class SecurityDeclarationService extends BasicService<SecurityManifestEnt | @@ -171,4 +177,25 @@ public class SecurityDeclarationService extends BasicService<SecurityManifestEnt | ||
171 | 177 | ||
172 | } | 178 | } |
173 | 179 | ||
180 | + /** | ||
181 | + * 数字字母转换 | ||
182 | + */ | ||
183 | + public String transform(String number){ | ||
184 | + if (number.contains("C")){ | ||
185 | + | ||
186 | + return "3"; | ||
187 | + }else { | ||
188 | + switch (number){ | ||
189 | + case "A": | ||
190 | + return "1"; | ||
191 | + case "B": | ||
192 | + return "2"; | ||
193 | + case "D": | ||
194 | + return "4"; | ||
195 | + } | ||
196 | + return number; | ||
197 | + } | ||
198 | + } | ||
199 | + | ||
200 | + | ||
174 | } | 201 | } |
@@ -80,7 +80,7 @@ public class ExcelUtil { | @@ -80,7 +80,7 @@ public class ExcelUtil { | ||
80 | } finally { | 80 | } finally { |
81 | try { | 81 | try { |
82 | if ( wb != null) { | 82 | if ( wb != null) { |
83 | - wb.close(); | 83 | +// wb.close(); |
84 | } | 84 | } |
85 | if (input != null) { | 85 | if (input != null) { |
86 | input.close(); | 86 | input.close(); |
@@ -17,6 +17,9 @@ public class SecurityDeclarationXml { | @@ -17,6 +17,9 @@ public class SecurityDeclarationXml { | ||
17 | //航空货物性质 1普通货物 2特种货物 3危险品 4航空快件 | 17 | //航空货物性质 1普通货物 2特种货物 3危险品 4航空快件 |
18 | @XmlElement(name = "CargoType", required = false) | 18 | @XmlElement(name = "CargoType", required = false) |
19 | private String cargoType; | 19 | private String cargoType; |
20 | + //危险品分类 | ||
21 | + @XmlElement(name = "Riskclassify", required = false) | ||
22 | + private String Riskclassify; | ||
20 | //航空货物托运人名称 | 23 | //航空货物托运人名称 |
21 | @XmlElement(name = "ShipperName", required = false) | 24 | @XmlElement(name = "ShipperName", required = false) |
22 | private String shipperName; | 25 | private String shipperName; |
@@ -104,6 +107,14 @@ public class SecurityDeclarationXml { | @@ -104,6 +107,14 @@ public class SecurityDeclarationXml { | ||
104 | this.transportCertificate = transportCertificate; | 107 | this.transportCertificate = transportCertificate; |
105 | } | 108 | } |
106 | 109 | ||
110 | + public String getRiskclassify() { | ||
111 | + return Riskclassify; | ||
112 | + } | ||
113 | + | ||
114 | + public void setRiskclassify(String riskclassify) { | ||
115 | + Riskclassify = riskclassify; | ||
116 | + } | ||
117 | + | ||
107 | public String getTransportationProve() { | 118 | public String getTransportationProve() { |
108 | return transportationProve; | 119 | return transportationProve; |
109 | } | 120 | } |
@@ -64,6 +64,7 @@ | @@ -64,6 +64,7 @@ | ||
64 | <%--<a href="javascript:doDelete()" class="easyui-linkbutton" style="background:red;color:#FFF;border: 1px solid red" iconCls="icon-no"><spring:message code="opt.delete" /></a> --%> | 64 | <%--<a href="javascript:doDelete()" class="easyui-linkbutton" style="background:red;color:#FFF;border: 1px solid red" iconCls="icon-no"><spring:message code="opt.delete" /></a> --%> |
65 | <a href="javascript:excelUpload()" class="easyui-linkbutton" style="background:#0EA14E;color:#FFF;border: 1px solid #18A197;"><spring:message code="manifest.excel"/></a> | 65 | <a href="javascript:excelUpload()" class="easyui-linkbutton" style="background:#0EA14E;color:#FFF;border: 1px solid #18A197;"><spring:message code="manifest.excel"/></a> |
66 | <a href="<%=basePath %>resource/excel/excel.xls" class="easyui-linkbutton" style="background:#0EA14E;color:#FFF;border: 1px solid #18A197;">模板下载</a> | 66 | <a href="<%=basePath %>resource/excel/excel.xls" class="easyui-linkbutton" style="background:#0EA14E;color:#FFF;border: 1px solid #18A197;">模板下载</a> |
67 | + <a href="<%=basePath %>resource/excel/word.doc" class="easyui-linkbutton" style="background:#0EA14E;color:#FFF;border: 1px solid #18A197;">航空货物详情下载</a> | ||
67 | </table> | 68 | </table> |
68 | </form> | 69 | </form> |
69 | </div> | 70 | </div> |
src/main/webapp/resource/excel/excel.xls
100755 → 100644
不能预览此文件类型
src/main/webapp/resource/excel/word.doc
0 → 100644
不能预览此文件类型
-
请 注册 或 登录 后发表评论