...
|
...
|
@@ -1268,7 +1268,7 @@ public class ManifestController extends BasicController { |
|
|
|| StringUtils.isBlank(manifest.getDestinationstation()) || StringUtils.isBlank(manifest.getTotalpiece())
|
|
|
|| StringUtils.isBlank(manifest.getTotalweight()) || StringUtils.isBlank(manifest.getPaymode())
|
|
|
|| StringUtils.isBlank(manifest.getCustomsstatus()) || StringUtils.isBlank(manifest.getCustomscode())
|
|
|
|| StringUtils.isBlank(manifest.getName_ofgoods()) || StringUtils.isBlank(manifest.getCo_company())
|
|
|
|| StringUtils.isBlank(manifest.getProductname()) || StringUtils.isBlank(manifest.getCo_company())
|
|
|
|| StringUtils.isBlank(manifest.getCo_address()) || StringUtils.isBlank(manifest.getShpcusid())
|
|
|
|| StringUtils.isBlank(manifest.getCo_country()) || StringUtils.isBlank(manifest.getSh_company())
|
|
|
|| StringUtils.isBlank(manifest.getSh_address()) || StringUtils.isBlank(manifest.getCnecusid())
|
...
|
...
|
@@ -1304,6 +1304,95 @@ public class ManifestController extends BasicController { |
|
|
manifest.setCarrier(carrier);
|
|
|
manifest.setFlightno(flightno);
|
|
|
|
|
|
// 发货人 简称 跟类型 用,隔开
|
|
|
String de_trstation = manifest.getDe_trstation();
|
|
|
// 订舱代理 。。。。。。。。。
|
|
|
String de_packing = manifest.getDe_packing();
|
|
|
// 操作代理 。。。。。。。。。
|
|
|
String de_remarks = manifest.getDe_remarks();
|
|
|
// 货主信息
|
|
|
if(StringUtils.isBlank(de_trstation) && StringUtils.isBlank(de_packing) && StringUtils.isBlank(de_remarks)){
|
|
|
|
|
|
model.setStatus(205);
|
|
|
model.setMsg("货主信息三选一,不能为空");
|
|
|
|
|
|
return model;
|
|
|
|
|
|
}else {
|
|
|
if (StringUtils.isNotBlank(de_trstation)){
|
|
|
String s = de_trstation.replace(",", ",");
|
|
|
String[] split = s.split(",");
|
|
|
Long id = hzInfoService.selectForShortType(split[0], split[1]);
|
|
|
if (id != null){
|
|
|
HZWAYBLLINFOEntity hzwaybllinfoEntity = new HZWAYBLLINFOEntity();
|
|
|
hzwaybllinfoEntity.setHzinfor_id(String.valueOf(id));
|
|
|
hzwaybllinfoEntity.setWaybill_id(manifest.getWaybillnomaster());
|
|
|
if (hzWaybillService.awbHzid(hzwaybllinfoEntity) != 0){
|
|
|
model.setStatus(209);
|
|
|
model.setMsg("发货人不能重复录入");
|
|
|
return model;
|
|
|
}else {
|
|
|
hzWaybillService.save(hzwaybllinfoEntity);
|
|
|
}
|
|
|
}else {
|
|
|
model.setStatus(206);
|
|
|
model.setMsg("发货人,简称和类型有误!");
|
|
|
hzWaybillService.deleteAlls(manifest.getWaybillnomaster());
|
|
|
return model;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(de_packing)){
|
|
|
String s = de_packing.replace(",", ",");
|
|
|
String[] split = s.split(",");
|
|
|
Long id = hzInfoService.selectForShortType(split[0], split[1]);
|
|
|
if (id != null){
|
|
|
HZWAYBLLINFOEntity hzwaybllinfoEntity = new HZWAYBLLINFOEntity();
|
|
|
hzwaybllinfoEntity.setHzinfor_id(String.valueOf(id));
|
|
|
hzwaybllinfoEntity.setWaybill_id(manifest.getWaybillnomaster());
|
|
|
|
|
|
if (hzWaybillService.awbHzid(hzwaybllinfoEntity) != 0 ){
|
|
|
model.setStatus(210);
|
|
|
model.setMsg("订舱代理不能重复录入");
|
|
|
hzWaybillService.deleteAlls(manifest.getWaybillnomaster());
|
|
|
|
|
|
return model;
|
|
|
}else {
|
|
|
hzWaybillService.save(hzwaybllinfoEntity);
|
|
|
}
|
|
|
}else {
|
|
|
model.setStatus(207);
|
|
|
model.setMsg("订舱代理,简称和类型有误!");
|
|
|
hzWaybillService.deleteAlls(manifest.getWaybillnomaster());
|
|
|
return model;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(de_remarks)){
|
|
|
String s = de_remarks.replace(",", ",");
|
|
|
String[] split = s.split(",");
|
|
|
Long id = hzInfoService.selectForShortType(split[0], split[1]);
|
|
|
if (id != null){
|
|
|
HZWAYBLLINFOEntity hzwaybllinfoEntity = new HZWAYBLLINFOEntity();
|
|
|
hzwaybllinfoEntity.setHzinfor_id(String.valueOf(id));
|
|
|
hzwaybllinfoEntity.setWaybill_id(manifest.getWaybillnomaster());
|
|
|
if (hzWaybillService.awbHzid(hzwaybllinfoEntity) != 0){
|
|
|
model.setStatus(211);
|
|
|
model.setMsg("操作代理不能重复录入");
|
|
|
return model;
|
|
|
}else {
|
|
|
hzWaybillService.save(hzwaybllinfoEntity);
|
|
|
}
|
|
|
|
|
|
}else {
|
|
|
model.setStatus(208);
|
|
|
model.setMsg("操作代理,简称和类型有误!");
|
|
|
return model;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
// 判断主单是否存在
|
|
|
ManifestEntity wbm = manifestService.findWbm(manifest.getWaybillnomaster());
|
...
|
...
|
@@ -1321,6 +1410,9 @@ public class ManifestController extends BasicController { |
|
|
manifest.setResponse_text(type.getName());
|
|
|
manifest.setSave_time(System.currentTimeMillis());
|
|
|
|
|
|
manifest.setDe_trstation("");
|
|
|
manifest.setDe_packing("");
|
|
|
manifest.setDe_remarks("");
|
|
|
manifestService.save(manifest);
|
|
|
|
|
|
model.setData(manifest);
|
...
|
...
|
@@ -1363,7 +1455,7 @@ public class ManifestController extends BasicController { |
|
|
pe.setPaymode(manifest.getPaymode());
|
|
|
pe.setCustomsstatus(manifest.getCustomsstatus());
|
|
|
pe.setCustomscode(manifest.getCustomscode());
|
|
|
pe.setName_ofgoods(manifest.getName_ofgoods());
|
|
|
pe.setProductname(manifest.getProductname());
|
|
|
pe.setCo_company(manifest.getCo_company());
|
|
|
pe.setCo_address(manifest.getCo_address());
|
|
|
pe.setShpcusid(manifest.getShpcusid());
|
...
|
...
|
|