...
|
...
|
@@ -158,6 +158,9 @@ public class SecurityDeclarationController { |
|
|
String two = request.getParameter("two");
|
|
|
String three = request.getParameter("three");
|
|
|
String four = request.getParameter("four");
|
|
|
|
|
|
String type = cargoType(one, two, three, four);
|
|
|
|
|
|
//航空货物托运人名称
|
|
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
|
|
//航空货运销售代理人名称
|
...
|
...
|
@@ -176,35 +179,21 @@ public class SecurityDeclarationController { |
|
|
if (request.getParameter("sd_transportation_prove") != null){
|
|
|
transportationProve = request.getParameter("sd_transportation_prove");
|
|
|
}
|
|
|
//货物性质是否多选
|
|
|
List<String> list = new ArrayList();
|
|
|
if (!StringUtils.isBlank(one)){
|
|
|
list.add(one);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(two)){
|
|
|
list.add(two);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(three)){
|
|
|
list.add(three);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(four)){
|
|
|
list.add(four);
|
|
|
}
|
|
|
|
|
|
|
|
|
//查询是否存在
|
|
|
if (securityDeclarationService.findWaybill(waybill) == 0){
|
|
|
//货物性质(类型)添加
|
|
|
for (String type: list){
|
|
|
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
}
|
|
|
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
|
|
|
if(!StringUtils.isBlank(cargoName)){
|
|
|
//货物品名
|
|
|
String cName = cargoName.replaceAll(",", ",");
|
|
|
String[] split = cName.split(",");
|
|
|
for (int i=0; i<split.length; i++){
|
|
|
for (int i = 0; i < split.length; i++){
|
|
|
if (!StringUtils.isBlank(split[i]) || !"".equals(split[i])){
|
|
|
SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity();
|
|
|
sdCargoNameEntity.setSd_waybill(waybill);
|
...
|
...
|
@@ -249,11 +238,7 @@ public class SecurityDeclarationController { |
|
|
//品名
|
|
|
sdVo.setSd_cargo_name(cargoName);
|
|
|
//货物类型
|
|
|
String cargoType = "";
|
|
|
for (String s: list){
|
|
|
cargoType+=s+",";
|
|
|
}
|
|
|
sdVo.setSd_cargo_type(cargoType);
|
|
|
sdVo.setSd_cargo_type(type);
|
|
|
|
|
|
//预配信息
|
|
|
ManifestEntity wbm = manifestService.findWbm(waybill);
|
...
|
...
|
@@ -322,6 +307,9 @@ public class SecurityDeclarationController { |
|
|
String two = request.getParameter("two");
|
|
|
String three = request.getParameter("three");
|
|
|
String four = request.getParameter("four");
|
|
|
|
|
|
String type = cargoType(one, two, three, four);
|
|
|
|
|
|
//航空货物托运人名称
|
|
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
|
|
//航空货运销售代理人名称
|
...
|
...
|
@@ -346,32 +334,15 @@ public class SecurityDeclarationController { |
|
|
}
|
|
|
|
|
|
|
|
|
//货物性质是否多选
|
|
|
List<String> list = new ArrayList();
|
|
|
if (!StringUtils.isBlank(one)){
|
|
|
list.add(one);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(two)){
|
|
|
list.add(two);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(three)){
|
|
|
list.add(three);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(four)){
|
|
|
list.add(four);
|
|
|
}
|
|
|
|
|
|
|
|
|
//查询是否存在
|
|
|
if (securityDeclarationService.findWaybill(waybill) == 0){
|
|
|
if (manifestService.findWbm(waybill) == null){
|
|
|
//货物性质(类型)添加
|
|
|
for (String type: list){
|
|
|
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
}
|
|
|
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
|
|
|
//货物品名
|
|
|
String cName = cargoName.replaceAll(",", ",");
|
...
|
...
|
@@ -423,11 +394,8 @@ public class SecurityDeclarationController { |
|
|
//品名
|
|
|
sdVo.setSd_cargo_name(cargoName);
|
|
|
//货物类型
|
|
|
String cargoType = "";
|
|
|
for (String s: list){
|
|
|
cargoType+=s+",";
|
|
|
}
|
|
|
sdVo.setSd_cargo_type(cargoType);
|
|
|
|
|
|
sdVo.setSd_cargo_type(type);
|
|
|
|
|
|
//添加预配信息
|
|
|
manifestEntity.setWaybillnomaster(waybill);
|
...
|
...
|
@@ -596,6 +564,9 @@ public class SecurityDeclarationController { |
|
|
String two = request.getParameter("two");
|
|
|
String three = request.getParameter("three");
|
|
|
String four = request.getParameter("four");
|
|
|
|
|
|
String type = cargoType(one, two, three, four);
|
|
|
|
|
|
//航空货物托运人名称
|
|
|
String cargoShipperName = request.getParameter("sd_cargo_shipper_name");
|
|
|
//航空货运销售代理人名称
|
...
|
...
|
@@ -620,29 +591,15 @@ public class SecurityDeclarationController { |
|
|
}
|
|
|
|
|
|
|
|
|
List<String> list = new ArrayList();
|
|
|
if (!StringUtils.isBlank(one)){
|
|
|
list.add(one);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(two)){
|
|
|
list.add(two);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(three)){
|
|
|
list.add(three);
|
|
|
}
|
|
|
if (!StringUtils.isBlank(four)){
|
|
|
list.add(four);
|
|
|
}
|
|
|
|
|
|
|
|
|
//先删除货物性质(类型
|
|
|
if (sdCargoTypeService.deleteAlls(waybill)>0){
|
|
|
//货物性质(类型)添加
|
|
|
for (String type: list){
|
|
|
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
}
|
|
|
SDCargoTypeEntity sdCargoTypeEntity = new SDCargoTypeEntity();
|
|
|
sdCargoTypeEntity.setSd_waybill(waybill);
|
|
|
sdCargoTypeEntity.setSd_cargo_type(type);
|
|
|
sdCargoTypeService.save(sdCargoTypeEntity);
|
|
|
}
|
|
|
|
|
|
if (sdCargoNameService.deleteAlls(waybill)>0){
|
...
|
...
|
@@ -697,16 +654,10 @@ public class SecurityDeclarationController { |
|
|
//品名
|
|
|
sdVo.setSd_cargo_name(request.getParameter("sd_cargo_name").replaceAll(",", ","));
|
|
|
//货物类型
|
|
|
String cargoType = "";
|
|
|
for (String s: list){
|
|
|
cargoType+=s+",";
|
|
|
}
|
|
|
sdVo.setSd_cargo_type(cargoType);
|
|
|
sdVo.setSd_cargo_type(type);
|
|
|
|
|
|
// ManifestEntity wbm = manifestService.findWbm(waybill);
|
|
|
ManifestEntity manifestEntity = new ManifestEntity();
|
|
|
//修改预配信息
|
|
|
// manifestEntity.setId(wbm.getId());
|
|
|
manifestEntity.setWaybillnomaster(waybill);
|
|
|
manifestEntity.setFlightdate(flightdate);
|
|
|
manifestEntity.setFlightno(flightno);
|
...
|
...
|
@@ -714,9 +665,6 @@ public class SecurityDeclarationController { |
|
|
manifestEntity.setTotalpiece(totalpiece);
|
|
|
manifestEntity.setTotalweight(totalweight);
|
|
|
manifestEntity.setDestinationstation(destinationstation);
|
|
|
// if (manifestService.deleteOne(waybill)>0){
|
|
|
// manifestService.save(manifestEntity);
|
|
|
// }
|
|
|
manifestService.update(manifestEntity);
|
|
|
|
|
|
//预配信息
|
...
|
...
|
@@ -804,4 +752,26 @@ public class SecurityDeclarationController { |
|
|
|
|
|
return "declaration/print";
|
|
|
}
|
|
|
|
|
|
|
|
|
public String cargoType(String one, String two, String three, String four){
|
|
|
|
|
|
String type = "";
|
|
|
//货物性质
|
|
|
if (!StringUtils.isBlank(one)){
|
|
|
type = one;
|
|
|
}
|
|
|
if (!StringUtils.isBlank(two)){
|
|
|
type = two;
|
|
|
}
|
|
|
if (!StringUtils.isBlank(three)){
|
|
|
type = three;
|
|
|
}
|
|
|
if (!StringUtils.isBlank(four)){
|
|
|
type = four;
|
|
|
}
|
|
|
|
|
|
return type;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|