切换导航条
此项目
正在载入...
登录
朱兆平
/
agent
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
shenhailong
4 years ago
提交
9eff6dec2642a062eb05720066d1a3b6c8633502
1 个父辈
d9d4fc0f
忘了
显示空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
70 行增加
和
4 行删除
pom.xml
src/main/java/com/agent/controller/agent/ManifestController.java
src/main/java/com/agent/service/system/SecurityDeclarationService.java
src/main/java/com/agent/util/ExcelUtil.java
src/main/java/com/agent/xml/secuity/SecurityDeclarationXml.java
src/main/webapp/WEB-INF/views/manifest/list.jsp
src/main/webapp/resource/excel/excel.xls
src/main/webapp/resource/excel/word.doc
pom.xml
查看文件 @
9eff6de
...
...
@@ -34,7 +34,7 @@
<cxf.version>
2.7.5
</cxf.version>
<patchca.version>
0.5.0
</patchca.version>
<jxl.version>
2.6.12
</jxl.version>
<poi.version>
3.
6
</poi.version>
<poi.version>
3.
9
</poi.version>
<velocity.version>
1.7
</velocity.version>
<!-- Plugin的属性定义 -->
...
...
@@ -368,7 +368,7 @@
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
3.
17
</version>
<version>
3.
9
</version>
</dependency>
<dependency>
...
...
src/main/java/com/agent/controller/agent/ManifestController.java
查看文件 @
9eff6de
...
...
@@ -12,6 +12,7 @@ import com.agent.util.WaybillUtils;
import
com.agent.vo.ResponseModel
;
import
com.agent.vo.agent.CommodityVo
;
import
com.agent.vo.agent.ManifestVo
;
import
com.agent.vo.agent.SDVo
;
import
com.agent.xml.XmlBuildTask
;
import
com.agent.xml.common.XmlHead
;
import
com.agent.xml.common.XmlUtil
;
...
...
@@ -2675,6 +2676,32 @@ public class ManifestController extends BasicController {
sdCargoNameService
.
save
(
sdCargoNameEntity
);
}
securityDeclarationService
.
save
(
sd
);
// 生成报文并且发送
String
ndlrPath
=
MessageKit
.
getMessagePath
(
MessageType
.
NDLR
);
//存放数据Vo
SDVo
sdVo
=
new
SDVo
();
sdVo
.
setSd_waybill
(
wbm
);
sdVo
.
setSd_cargo_agent_name
(
arr
.
get
(
27
));
sdVo
.
setSd_cargo_shipper_name
(
arr
.
get
(
28
));
sdVo
.
setSd_iata_number
(
arr
.
get
(
29
));
sdVo
.
setSd_transport_certificate
(
arr
.
get
(
30
));
sdVo
.
setSd_transportation_prove
(
arr
.
get
(
31
));
//品名
sdVo
.
setSd_cargo_name
(
arr
.
get
(
33
));
//货物类型
sdVo
.
setSd_cargo_type
(
arr
.
get
(
32
));
//预配信息
sdVo
.
setFlightno
(
arr
.
get
(
3
).
substring
(
2
));
sdVo
.
setFlightdate
(
parse
);
sdVo
.
setCarrier
(
arr
.
get
(
3
).
substring
(
0
,
2
));
sdVo
.
setTotalpiece
(
arr
.
get
(
10
));
sdVo
.
setTotalweight
(
arr
.
get
(
11
));
sdVo
.
setDestinationstation
(
arr
.
get
(
7
));
new
XmlBuildTask
(
securityDeclarationService
.
sendNDLRXml
(
sdVo
),
ndlrPath
).
perform
();
}
manifestService
.
save
(
manifestEntity
);
}
else
{
...
...
src/main/java/com/agent/service/system/SecurityDeclarationService.java
查看文件 @
9eff6de
...
...
@@ -136,7 +136,13 @@ public class SecurityDeclarationService extends BasicService<SecurityManifestEnt
SecurityDeclarationXml
sdXml
=
new
SecurityDeclarationXml
();
sdXml
.
setCargoAgentName
(
sdVo
.
getSd_cargo_agent_name
());
sdXml
.
setCargoName
(
sdVo
.
getSd_cargo_name
());
sdXml
.
setCargoType
(
sdVo
.
getSd_cargo_type
());
if
(
sdVo
.
getSd_cargo_type
().
contains
(
"C"
)){
sdXml
.
setCargoType
(
"3"
);
sdXml
.
setRiskclassify
(
sdVo
.
getSd_cargo_type
());
}
else
{
sdXml
.
setCargoType
(
transform
(
sdVo
.
getSd_cargo_type
()));
sdXml
.
setRiskclassify
(
""
);
}
sdXml
.
setShipperName
(
sdVo
.
getSd_cargo_shipper_name
());
sdXml
.
setIataNo
(
sdVo
.
getSd_iata_number
());
sdXml
.
setPiece
(
sdVo
.
getTotalpiece
());
...
...
@@ -171,4 +177,25 @@ public class SecurityDeclarationService extends BasicService<SecurityManifestEnt
}
/**
* 数字字母转换
*/
public
String
transform
(
String
number
){
if
(
number
.
contains
(
"C"
)){
return
"3"
;
}
else
{
switch
(
number
){
case
"A"
:
return
"1"
;
case
"B"
:
return
"2"
;
case
"D"
:
return
"4"
;
}
return
number
;
}
}
}
...
...
src/main/java/com/agent/util/ExcelUtil.java
查看文件 @
9eff6de
...
...
@@ -80,7 +80,7 @@ public class ExcelUtil {
}
finally
{
try
{
if
(
wb
!=
null
)
{
wb
.
close
();
//
wb.close();
}
if
(
input
!=
null
)
{
input
.
close
();
...
...
src/main/java/com/agent/xml/secuity/SecurityDeclarationXml.java
查看文件 @
9eff6de
...
...
@@ -17,6 +17,9 @@ public class SecurityDeclarationXml {
//航空货物性质 1普通货物 2特种货物 3危险品 4航空快件
@XmlElement
(
name
=
"CargoType"
,
required
=
false
)
private
String
cargoType
;
//危险品分类
@XmlElement
(
name
=
"Riskclassify"
,
required
=
false
)
private
String
Riskclassify
;
//航空货物托运人名称
@XmlElement
(
name
=
"ShipperName"
,
required
=
false
)
private
String
shipperName
;
...
...
@@ -104,6 +107,14 @@ public class SecurityDeclarationXml {
this
.
transportCertificate
=
transportCertificate
;
}
public
String
getRiskclassify
()
{
return
Riskclassify
;
}
public
void
setRiskclassify
(
String
riskclassify
)
{
Riskclassify
=
riskclassify
;
}
public
String
getTransportationProve
()
{
return
transportationProve
;
}
...
...
src/main/webapp/WEB-INF/views/manifest/list.jsp
查看文件 @
9eff6de
...
...
@@ -64,6 +64,7 @@
<
%--
<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>
--%>
<a
href=
"javascript:excelUpload()"
class=
"easyui-linkbutton"
style=
"background:#0EA14E;color:#FFF;border: 1px solid #18A197;"
><spring:message
code=
"manifest.excel"
/></a>
<a
href=
"<%=basePath %>resource/excel/excel.xls"
class=
"easyui-linkbutton"
style=
"background:#0EA14E;color:#FFF;border: 1px solid #18A197;"
>
模板下载
</a>
<a
href=
"<%=basePath %>resource/excel/word.doc"
class=
"easyui-linkbutton"
style=
"background:#0EA14E;color:#FFF;border: 1px solid #18A197;"
>
航空货物详情下载
</a>
</table>
</form>
</div>
...
...
src/main/webapp/resource/excel/excel.xls
100755 → 100644
查看文件 @
9eff6de
不能预览此文件类型
src/main/webapp/resource/excel/word.doc
0 → 100644
查看文件 @
9eff6de
不能预览此文件类型
请
注册
或
登录
后发表评论