作者 shenhailong

修改 excel导入 航班号承运人 一起 安检bug 预配列表 航班号展示完善

... ... @@ -530,7 +530,7 @@ public class ManifestController extends BasicController {
manifestVo.setShpcusid(mani.getShpcusid());
manifestVo.setShpaeo(mani.getShpaeo());
manifestVo.setCneaeo(mani.getCneaeo());
manifestVo.setFlightno(mani.getFlightno());
manifestVo.setFlightno(mani.getCarrier()+mani.getFlightno());
manifestVo.setFlightdate(mani.getFlightdate());
manifestVo.setOriginatingstation(mani.getOriginatingstation());
manifestVo.setDestinationstation(mani.getDestinationstation());
... ... @@ -2301,119 +2301,129 @@ public class ManifestController extends BasicController {
// 主单号
manifestEntity.setWaybillnomaster(wbm);
// 航班号
manifestEntity.setFlightno(arr.get(3));
manifestEntity.setFlightno(arr.get(3).substring(2));
// 航班日期
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
String s = arr.get(4);
Date parse = simpleDateFormat.parse(s);
manifestEntity.setFlightdate(parse);
// 承运人代码
manifestEntity.setCarrier(arr.get(5));
manifestEntity.setCarrier(arr.get(3).substring(0, 2));
// 运费支付方式
manifestEntity.setPaymode(arr.get(6));
manifestEntity.setPaymode(arr.get(5));
// 装货地代码
manifestEntity.setOriginatingstation(arr.get(7));
manifestEntity.setOriginatingstation(arr.get(6));
// 卸货地代码
manifestEntity.setDestinationstation(arr.get(8));
manifestEntity.setDestinationstation(arr.get(7));
// 货物装载运输时间
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
manifestEntity.setStowagedate(simpleDateFormat1.parse(arr.get(9)));
manifestEntity.setStowagedate(simpleDateFormat1.parse(arr.get(8)));
// 海关关区代码
manifestEntity.setCustomscode(arr.get(10));
manifestEntity.setCustomscode(arr.get(9));
// 货物件数
// String s3 = arr.get(11);
manifestEntity.setTotalpiece(arr.get(11));
manifestEntity.setTotalpiece(arr.get(10));
// 货物毛重
// String s1 = arr.get(12);
manifestEntity.setTotalweight(arr.get(12));
manifestEntity.setTotalweight(arr.get(11));
// 货物简要描述
manifestEntity.setProductname(arr.get(13));
manifestEntity.setProductname(arr.get(12));
// 发货人代码
manifestEntity.setShpcusid(arr.get(14));
// 发货人名称
manifestEntity.setCo_name(arr.get(15));
manifestEntity.setShpcusid(arr.get(13));
// 发货人公司
manifestEntity.setCo_company(arr.get(14));
// 发货人地址
manifestEntity.setCo_address(arr.get(16));
manifestEntity.setCo_address(arr.get(15));
// 发货人国家代码
manifestEntity.setSh_country(arr.get(17));
manifestEntity.setSh_country(arr.get(16));
// 发货人传真
manifestEntity.setSh_fax(arr.get(18));
manifestEntity.setSh_fax(arr.get(17));
// 发货人联系号码
manifestEntity.setCo_telephone(arr.get(19));
manifestEntity.setCo_telephone(arr.get(18));
// 收货人代码
manifestEntity.setCnecusid(arr.get(20));
// 收货人名称
manifestEntity.setSh_name(arr.get(21));
manifestEntity.setCnecusid(arr.get(19));
// 收货人公司
manifestEntity.setSh_company(arr.get(20));
// 收货人地址
manifestEntity.setSh_address(arr.get(22));
manifestEntity.setSh_address(arr.get(21));
// 收货人城市
manifestEntity.setSh_city(arr.get(23));
manifestEntity.setSh_city(arr.get(22));
// 收货人国家代码
manifestEntity.setSh_country(arr.get(24));
manifestEntity.setSh_country(arr.get(23));
// 收货人传真
manifestEntity.setSh_fax(arr.get(25));
manifestEntity.setSh_fax(arr.get(24));
// 收货人联系号码
manifestEntity.setSh_telephone(arr.get(26));
manifestEntity.setSh_telephone(arr.get(25));
// 货物海关状态代码
manifestEntity.setCustomsstatus(arr.get(27));
manifestEntity.setCustomsstatus(arr.get(26));
// 安检申报
SecurityDeclarationEntity sd = new SecurityDeclarationEntity();
sd.setSd_waybill(wbm);
// 航空货物托运人名称
sd.setSd_cargo_shipper_name(arr.get(28));
// 航空货物销售代理人名称
sd.setSd_cargo_agent_name(arr.get(29));
// 航协资质编号
if (!StringUtils.isBlank(arr.get(30))) {
sd.setSd_iata_number(arr.get(30));
}
sd.setSd_static("1");
// 发布时间
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = simpleDateFormat2.format(new Date());
sd.setOperation_time(format);
// 运输条件鉴定书
if (!StringUtils.isBlank(arr.get(31))) {
String certificate = arr.get(31);
if (certificate != null) {
String s2 = certificate.replaceAll(",", ",");
sd.setSd_transportation_prove(s2);
}
}
// 航空公司同意运输证明
if (!StringUtils.isBlank(arr.get(32))) {
if (StringUtils.isNotBlank(arr.get(27)) && StringUtils.isNotBlank(arr.get(28)) && StringUtils.isNotBlank(arr.get(29))
&& StringUtils.isNotBlank(arr.get(32)) && StringUtils.isNotBlank(arr.get(33))){
SecurityDeclarationEntity sd = new SecurityDeclarationEntity();
sd.setSd_waybill(wbm);
// 航空货物托运人名称
sd.setSd_cargo_shipper_name(arr.get(27));
// 航空货物销售代理人名称
sd.setSd_cargo_agent_name(arr.get(28));
// 航协资质编号
if (!StringUtils.isBlank(arr.get(29))) {
sd.setSd_iata_number(arr.get(29));
}
sd.setSd_static("1");
// 发布时间
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = simpleDateFormat2.format(new Date());
sd.setOperation_time(format);
// 运输条件鉴定书
if (!StringUtils.isBlank(arr.get(30))) {
String certificate = arr.get(30);
if (certificate != null) {
String s2 = certificate.replaceAll(",", ",");
sd.setSd_transport_certificate(s2);
}
}
// 航空公司同意运输证明
if (!StringUtils.isBlank(arr.get(31))) {
String prove = arr.get(31);
if (prove != null) {
String s2 = prove.replaceAll(",", ",");
sd.setSd_transportation_prove(s2);
}
}
// 用户ID
sd.setUSER_ID(userId);
// 航空货物性质
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
sdCargoTypeEntity.setSd_waybill(wbm);
sdCargoTypeEntity.setSd_cargo_type(arr.get(32));
sdCargoTypeService.save(sdCargoTypeEntity);
// 航空货物品名
String replace = arr.get(33).replace(",", ",");
String[] cargoName = replace.split(",");
for (int i = 0; i < cargoName.length; i++) {
SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity();
sdCargoNameEntity.setSd_waybill(wbm);
sdCargoNameEntity.setSd_cargo_name(cargoName[i]);
sdCargoNameService.save(sdCargoNameEntity);
}
securityDeclarationService.save(sd);
}
String prove = arr.get(32);
if (prove != null) {
String s2 = prove.replaceAll(",", ",");
sd.setSd_transportation_prove(s2);
}
}
// 用户ID
sd.setUSER_ID(userId);
// 航空货物性质
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
sdCargoTypeEntity.setSd_waybill(wbm);
sdCargoTypeEntity.setSd_cargo_type(arr.get(33));
sdCargoTypeService.save(sdCargoTypeEntity);
// 航空货物品名
String replace = arr.get(34).replace(",", ",");
String[] cargoName = replace.split(",");
for (int i = 0; i < cargoName.length; i++) {
SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity();
sdCargoNameEntity.setSd_waybill(wbm);
sdCargoNameEntity.setSd_cargo_name(cargoName[i]);
sdCargoNameService.save(sdCargoNameEntity);
}
securityDeclarationService.save(sd);
manifestService.save(manifestEntity);
... ... @@ -2440,65 +2450,65 @@ public class ManifestController extends BasicController {
PreparesecondaryEntity seconday = new PreparesecondaryEntity();
seconday.setPreparemasterid(wbm1.getId());
// 主单
// 主单
seconday.setWaybillnomaster(wbm);
// 分单
seconday.setWaybillnosecondary(arr.get(2));
// 航班号
seconday.setFlightno(arr.get(3));
seconday.setFlightno(arr.get(3).substring(2));
// 航班日期
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
String s = arr.get(4);
Date parse = simpleDateFormat.parse(s);
seconday.setFlightdate(parse);
// 承运人代码
seconday.setCarrier(arr.get(5));
seconday.setCarrier(arr.get(3).substring(0, 2));
// 运费支付方式
seconday.setPaymode(arr.get(6));
seconday.setPaymode(arr.get(5));
// 装货地代码
seconday.setOriginatingstation(arr.get(7));
seconday.setOriginatingstation(arr.get(6));
// 卸货地代码
seconday.setDestinationstation(arr.get(8));
seconday.setDestinationstation(arr.get(7));
// 货物装载运输时间
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
seconday.setStowagedate(simpleDateFormat1.parse(arr.get(9)));
seconday.setStowagedate(simpleDateFormat1.parse(arr.get(8)));
// 海关关区代码
seconday.setCustomscode(arr.get(10));
seconday.setCustomscode(arr.get(9));
// 货物件数
seconday.setTotalpiece(arr.get(11));
// String s3 = arr.get(11);
seconday.setTotalpiece(arr.get(10));
// 货物毛重
seconday.setTotalweight(arr.get(12));
// String s1 = arr.get(12);
seconday.setTotalweight(arr.get(11));
// 货物简要描述
seconday.setProductname(arr.get(13));
seconday.setProductname(arr.get(12));
// 发货人代码
seconday.setShpcusid(arr.get(14));
// 发货人名称
seconday.setCo_name(arr.get(15));
seconday.setShpcusid(arr.get(13));
// 发货人公司
seconday.setCo_company(arr.get(14));
// 发货人地址
seconday.setCo_address(arr.get(16));
seconday.setCo_address(arr.get(15));
// 发货人国家代码
seconday.setSh_country(arr.get(17));
seconday.setSh_country(arr.get(16));
// 发货人传真
seconday.setSh_fax(arr.get(18));
seconday.setSh_fax(arr.get(17));
// 发货人联系号码
seconday.setCo_telephone(arr.get(19));
seconday.setCo_telephone(arr.get(18));
// 收货人代码
seconday.setCnecusid(arr.get(20));
// 收货人名称
seconday.setSh_name(arr.get(21));
seconday.setCnecusid(arr.get(19));
// 收货人公司
seconday.setSh_company(arr.get(20));
// 收货人地址
seconday.setSh_address(arr.get(22));
seconday.setSh_address(arr.get(21));
// 收货人城市
seconday.setSh_city(arr.get(23));
seconday.setSh_city(arr.get(22));
// 收货人国家代码
seconday.setSh_country(arr.get(24));
seconday.setSh_country(arr.get(23));
// 收货人传真
seconday.setSh_fax(arr.get(25));
seconday.setSh_fax(arr.get(24));
// 收货人联系号码
seconday.setSh_telephone(arr.get(26));
seconday.setSh_telephone(arr.get(25));
// 货物海关状态代码
seconday.setCustomsstatus(arr.get(27));
seconday.setCustomsstatus(arr.get(26));
seconday.setCreateDate(new Date());
preparesecondaryServer.save(seconday);
model.setStatus(200);
... ...
... ... @@ -12,7 +12,7 @@
# 69
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
#jdbc.url=jdbc:oracle:thin:@10.50.3.70:1521:CGODB
#jdbc.url=jdbc:oracle:thin:@10.50.3.69:1521:CGODB
jdbc.url=jdbc:oracle:thin:@218.28.199.134:8004:CGODB
jdbc.username=CGOASM
jdbc.password=vmvnv1v2
... ...
#远程登录 开关
openRemoteLogin = true
\ No newline at end of file
#远程登录 true开启远程登录 false关闭远程登录
openRemoteLogin = false
\ No newline at end of file
... ...