切换导航条
此项目
正在载入...
登录
arrival_data_analysis
/
cgonms_arrival
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王勇
5 years ago
提交
9de867b78df1de13b85ad6fb52b6ec6c07cf7452
1 个父辈
163e55a2
初始化进港服务,新舱单
显示空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
109 行增加
和
90 行删除
src/main/java/com/sunyo/wlpt/cgonms/arrival/controller/NmsController.java
src/main/java/com/sunyo/wlpt/cgonms/arrival/domain/PrepareMaster.java
src/main/java/com/sunyo/wlpt/cgonms/arrival/domain/ResultArrivalData.java
src/main/java/com/sunyo/wlpt/cgonms/arrival/excle/ExitExcel.java → src/main/java/com/sunyo/wlpt/cgonms/arrival/excle/ArrivalExcel.java
src/main/java/com/sunyo/wlpt/cgonms/arrival/excle/DownExcel.java
src/main/resources/mapper/PrepareMasterMapper.xml
src/main/resources/mapper/ResultArrivalDataMapper.xml
src/main/java/com/sunyo/wlpt/cgonms/arrival/controller/NmsController.java
查看文件 @
9de867b
...
...
@@ -189,7 +189,7 @@ public class NmsController {
*
* 机场所属城市代码
*/
BasAirport
ba
=
basAirportService
.
getBasAirportInfo
(
result
.
get
Destination
Station
());
BasAirport
ba
=
basAirportService
.
getBasAirportInfo
(
result
.
get
Originating
Station
());
/**
* 4.根据 新舱单机场代码表 中的 机场所属城市代码 ,获取 天博——机场代码表 的相应数据
...
...
@@ -215,19 +215,21 @@ public class NmsController {
result
.
setAreaDescChn
(
basArea
.
getAreaDescChn
());
// 6.根据 理货信息 中的运单号,获取预配表中的相应数据
List
<
PrepareMaster
>
pm
=
prepareMasterService
.
getPrepareMasterInfo
(
result
.
getWaybillNoMaster
());
if
(
pm
!=
null
&&
pm
.
size
()
>
0
)
{
//发货人名称
result
.
setShipperName
(
pm
.
get
(
0
).
getShipperName
());
//收货人名称
result
.
setConsigneeName
(
pm
.
get
(
0
).
getConsigneeName
());
//获取目的货物目的站
result
.
setAimStation
(
pm
.
get
(
0
).
getDestinationStation
());
}
// List<PrepareMaster> pm = prepareMasterService.getPrepareMasterInfo(result.getWaybillNoMaster());
// if (pm != null && pm.size() > 0) {
// //发货人名称
// result.setShipperName(pm.get(0).getShipperName());
// //收货人名称
// result.setConsigneeName(pm.get(0).getConsigneeName());
// //获取目的货物目的站
// result.setAimStation(pm.get(0).getDestinationStation());
// //获取货物起始站
// result.setStartStation(pm.get(0).getOriginatingStation());
// }
/**
* 获取代理人的相关数据
*
/
*
ResultArrivalData asmInfo = new ResultArrivalData();
asmInfo = getCgoAsmFeign.getInfo(result.getWaybillNoMaster());
//设置结算代理人
...
...
@@ -240,6 +242,7 @@ public class NmsController {
result.setTwoTypeName(asmInfo.getTwoTypeName());
//设置一级类名称
result.setTypeName(asmInfo.getTypeName());
*/
/**
* 获取运输工具的对应数据
...
...
src/main/java/com/sunyo/wlpt/cgonms/arrival/domain/PrepareMaster.java
查看文件 @
9de867b
...
...
@@ -17,6 +17,7 @@ import java.io.Serializable;
public
class
PrepareMaster
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7073373008863847070L
;
/**
* 发货人名称
*/
...
...
@@ -31,11 +32,16 @@ public class PrepareMaster implements Serializable {
* 运单号
*/
private
String
waybillNoMaster
;
/**
* 航班目的站,货物目的站
*/
private
String
destinationStation
;
/**
* 货物起始站
*/
private
String
originatingStation
;
/**
* id
...
...
@@ -58,10 +64,7 @@ public class PrepareMaster implements Serializable {
// */
// private Date flightDate;
//
// /**
// * 航班起始站
// */
// private String originatingStation;
//
//
//
...
...
src/main/java/com/sunyo/wlpt/cgonms/arrival/domain/ResultArrivalData.java
查看文件 @
9de867b
...
...
@@ -72,6 +72,11 @@ public class ResultArrivalData implements Serializable {
private
String
carrier
;
/**
* 品名
*/
private
String
productName
;
/**
* 11.发货人名称
*/
private
String
shipperName
;
...
...
@@ -87,6 +92,10 @@ public class ResultArrivalData implements Serializable {
private
String
aimStation
;
/**
* 13.货物始发站
*/
private
String
startStation
;
/**
* 14.国家代码
*/
private
String
country
;
...
...
@@ -106,6 +115,8 @@ public class ResultArrivalData implements Serializable {
*/
private
String
countName
;
/**
* 代理人服务
* 18.品名
...
...
src/main/java/com/sunyo/wlpt/cgonms/arrival/excle/
Exit
Excel.java → src/main/java/com/sunyo/wlpt/cgonms/arrival/excle/
Arrival
Excel.java
查看文件 @
9de867b
...
...
@@ -30,7 +30,7 @@ import java.util.UUID;
@Slf4j
@RestController
@RequestMapping
(
"/arrival"
)
public
class
Exit
Excel
{
public
class
Arrival
Excel
{
@Value
(
"${path.dir}"
)
private
String
dir
;
...
...
@@ -58,16 +58,15 @@ public class ExitExcel {
HSSFCellStyle
cellStyle
=
workbook
.
createCellStyle
();
// 表头
String
[]
head
=
{
"
运
单号"
,
"
主
单号"
,
"件数"
,
"重量"
,
"计费重量"
,
"体积"
,
"重量(KG)"
,
"品名"
,
"二级品类"
,
"一级品类"
,
"货物始发站"
,
"货物目的站"
,
"货物
目的
国家/地区"
,
"货物
进口
国家/地区"
,
"所属洲"
,
"航空公司"
,
"航班号"
,
...
...
@@ -75,6 +74,7 @@ public class ExitExcel {
"航班时间"
,
"航班计划日期"
,
"航班计划时间"
,
"出港日期"
,
"航段"
,
"机号"
,
"机型"
,
...
...
@@ -94,7 +94,7 @@ public class ExitExcel {
// 设置单元格宽度
// 256*width+184
sheet
.
setColumnWidth
(
i
,
4000
);
if
(
i
==
1
4
||
i
==
16
)
{
if
(
i
==
1
3
||
i
==
15
)
{
sheet
.
setColumnWidth
(
i
,
6000
);
}
if
(
i
==
21
||
i
==
22
)
{
...
...
@@ -102,69 +102,67 @@ public class ExitExcel {
}
}
// 设置表格内容
// for (Integer i = 0; i < exitInfoList.size(); i++) {
// row = sheet.createRow(i + 1);
// ResultArrivalData resultExitData = exitInfoList.get(i);
// // 这里是内容设置,替换则自己的数据即可
// String[] excelTitle = new String[27];
//
// //取出数据,运单号
// excelTitle[0] = resultExitData.getWaybillNoMaster();
// //件数
// excelTitle[1] = resultExitData.getTallyTotalPiece();
// //重量
// excelTitle[2] = resultExitData.getTallyTotalWeight();
// //计费重量
// excelTitle[3] = String.valueOf(resultExitData.getTotalGrossWeightMeasure());
// //体积
// excelTitle[4] = String.valueOf(resultExitData.getVolumeMeasure());
// //品名
// excelTitle[5] = resultExitData.getSdCargoName();
// //二级品类
// excelTitle[6] = resultExitData.getTwoTypeName();
// //一级品类
// excelTitle[7] = resultExitData.getTypeName();
// //货物目的站
// excelTitle[8] = resultExitData.getAimStation();
// //货物目的国家/地区
// excelTitle[9] = resultExitData.getCountry();
// //所属洲
// excelTitle[10] = resultExitData.getAreaDescChn();
// //航空公司
// excelTitle[11] = resultExitData.getAirCompany();
// //航班号
// excelTitle[12] = resultExitData.getFlightNo();
// //航班日期
// excelTitle[13] = isNullShort(resultExitData.getFlightDate());
// //航班时间
// excelTitle[14] = isNullLong(resultExitData.getFlightTime());
// //航班计划日期
// excelTitle[15] = isNullShort(resultExitData.getFlightPlanDate());
// //航班计划时间
// excelTitle[16] = isNullLong(resultExitData.getFlightPlanTime());
// //航段
// excelTitle[17] = resultExitData.getSegment();
// //机号
// excelTitle[18] = resultExitData.getCfNo();
// //机型
// excelTitle[19] = resultExitData.getCfTp();
// //最大业载
// excelTitle[20] = "";
// //运单发货人
// excelTitle[21] = resultExitData.getShipperName();
// //运单收货人
// excelTitle[22] = resultExitData.getConsigneeName();
// //订舱代理人(代理人全称)
// excelTitle[23] = resultExitData.getOrderName();
// //结算代理人(代理人全程)
// excelTitle[24] = resultExitData.getCountName();
// //自定义项
// excelTitle[25] = "";
//
// for (Integer j = 0; j < excelTitle.length; j++) {
// row.createCell(j).setCellValue(excelTitle[j]);
// }
// }
for
(
Integer
i
=
0
;
i
<
exitInfoList
.
size
();
i
++)
{
row
=
sheet
.
createRow
(
i
+
1
);
ResultArrivalData
resultExitData
=
exitInfoList
.
get
(
i
);
// 这里是内容设置,替换则自己的数据即可
String
[]
excelTitle
=
new
String
[
27
];
//取出数据,运单号
excelTitle
[
0
]
=
resultExitData
.
getWaybillNoMaster
();
//件数
excelTitle
[
1
]
=
resultExitData
.
getTotalPiece
();
//重量
excelTitle
[
2
]
=
resultExitData
.
getTotalWeight
();
//品名
excelTitle
[
3
]
=
resultExitData
.
getProductName
();
//二级品类
excelTitle
[
4
]
=
""
;
//一级品类
excelTitle
[
5
]
=
""
;
//货物始发站
excelTitle
[
6
]
=
resultExitData
.
getOriginatingStation
();
//货物目的站
excelTitle
[
7
]
=
resultExitData
.
getDestinationStation
();
//货物目的国家/地区
excelTitle
[
8
]
=
resultExitData
.
getCountry
();
//所属洲
excelTitle
[
9
]
=
resultExitData
.
getAreaDescChn
();
//航空公司
excelTitle
[
10
]
=
resultExitData
.
getAirCompany
();
//航班号
excelTitle
[
11
]
=
resultExitData
.
getFlightNo
();
//航班日期
excelTitle
[
12
]
=
isNullShort
(
resultExitData
.
getFlightDate
());
//航班时间
excelTitle
[
13
]
=
isNullLong
(
resultExitData
.
getFlightTime
());
//航班计划日期
excelTitle
[
14
]
=
isNullShort
(
resultExitData
.
getFlightPlanDate
());
//航班计划时间
excelTitle
[
15
]
=
isNullLong
(
resultExitData
.
getFlightPlanTime
());
//出港日期
excelTitle
[
16
]
=
isNullShort
(
resultExitData
.
getArrivalDate
());
//航段
excelTitle
[
17
]
=
resultExitData
.
getSegment
();
//机号
excelTitle
[
18
]
=
resultExitData
.
getCfNo
();
//机型
excelTitle
[
19
]
=
resultExitData
.
getCfTp
();
//最大业载
excelTitle
[
20
]
=
""
;
//运单发货人
excelTitle
[
21
]
=
resultExitData
.
getShipperName
();
//运单收货人
excelTitle
[
22
]
=
resultExitData
.
getConsigneeName
();
//订舱代理人(代理人全称)
excelTitle
[
23
]
=
resultExitData
.
getOrderName
();
//结算代理人(代理人全程)
excelTitle
[
24
]
=
resultExitData
.
getCountName
();
//自定义项
excelTitle
[
25
]
=
""
;
for
(
Integer
j
=
0
;
j
<
excelTitle
.
length
;
j
++)
{
row
.
createCell
(
j
).
setCellValue
(
excelTitle
[
j
]);
}
}
String
file_name
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
// 设置文件名
...
...
src/main/java/com/sunyo/wlpt/cgonms/arrival/excle/DownExcel.java
查看文件 @
9de867b
...
...
@@ -28,7 +28,7 @@ public class DownExcel {
ResultJson
result
=
new
ResultJson
();
//获取当前服务器的ip地址
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
address
=
"http://"
+
ip
+
":"
+
port
+
"/
exit
/"
;
String
address
=
"http://"
+
ip
+
":"
+
port
+
"/
arrival
/"
;
result
.
setCode
(
"200"
);
result
.
setMsg
(
address
);
return
result
;
...
...
src/main/resources/mapper/PrepareMasterMapper.xml
查看文件 @
9de867b
...
...
@@ -7,11 +7,12 @@
<result
column=
"CONSIGNEENAME"
jdbcType=
"VARCHAR"
property=
"consigneeName"
/>
<result
column=
"SHIPPERNAME"
jdbcType=
"VARCHAR"
property=
"shipperName"
/>
<result
column=
"DESTINATIONSTATION"
jdbcType=
"VARCHAR"
property=
"destinationStation"
/>
<result
column=
"ORIGINATINGSTATION"
jdbcType=
"VARCHAR"
property=
"originatingStation"
/>
<result
column=
"WAYBILLNOMASTER"
jdbcType=
"VARCHAR"
property=
"waybillNoMaster"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
CONSIGNEENAME,SHIPPERNAME,DESTINATIONSTATION,WAYBILLNOMASTER
CONSIGNEENAME,SHIPPERNAME,
ORIGINATINGSTATION,
DESTINATIONSTATION,WAYBILLNOMASTER
</sql>
<select
id=
"getPrepareMasterInfo"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
...
...
src/main/resources/mapper/ResultArrivalDataMapper.xml
查看文件 @
9de867b
...
...
@@ -10,13 +10,16 @@
<result
column=
"FLIGHT_DATE"
jdbcType=
"TIMESTAMP"
property=
"flightDate"
/>
<result
column=
"ORIGINATINGSTATION"
jdbcType=
"VARCHAR"
property=
"originatingStation"
/>
<result
column=
"DESTINATIONSTATION"
jdbcType=
"VARCHAR"
property=
"destinationStation"
/>
<result
column=
"TOTALPIECE"
jdbcType=
"VARCHAR"
property=
"totalPiece"
/>
<result
column=
"TOTALWEIGHT"
jdbcType=
"VARCHAR"
property=
"totalWeight"
/>
<result
column=
"MANIFESTTOTALPIECE"
jdbcType=
"VARCHAR"
property=
"totalPiece"
/>
<result
column=
"MANIFESTTOTALWEIGHT"
jdbcType=
"VARCHAR"
property=
"totalWeight"
/>
<result
column=
"SHIPPERNAME"
jdbcType=
"VARCHAR"
property=
"shipperName"
/>
<result
column=
"CONSIGNEENAME"
jdbcType=
"VARCHAR"
property=
"consigneeName"
/>
<result
column=
"PRODUCTNAME"
jdbcType=
"VARCHAR"
property=
"productName"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
AUTOID, WAYBILLNOMASTER, FLIGHTNO, FLIGHT_DATE, ORIGINATINGSTATION, DESTINATIONSTATION,
TOTALPIECE, TOTALWEIGHT
MANIFESTTOTALPIECE, MANIFESTTOTALWEIGHT,SHIPPERNAME,CONSIGNEENAME,PRODUCTNAME
</sql>
<select
id=
"getResultArrivalDataInfo"
parameterType=
"com.sunyo.wlpt.cgonms.arrival.domain.ResultArrivalData"
resultMap=
"BaseResultMap"
>
...
...
请
注册
或
登录
后发表评论