系统问题修复
This commit is contained in:
parent
4d129332cf
commit
346918ab95
|
@ -7,5 +7,4 @@
|
||||||
/nuzar-customer-repository/target/
|
/nuzar-customer-repository/target/
|
||||||
/.idea/
|
/.idea/
|
||||||
/logs/
|
/logs/
|
||||||
*.iml
|
|
||||||
/nuzar-customer-repository/nuzar-customer-repository.iml
|
/nuzar-customer-repository/nuzar-customer-repository.iml
|
||||||
|
|
|
@ -17,6 +17,9 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "提离港区",description = "")
|
@ApiModel(value = "提离港区",description = "")
|
||||||
public class DepartureVo implements Serializable {
|
public class DepartureVo implements Serializable {
|
||||||
|
@ApiModelProperty(value = "是否直接提交审核")
|
||||||
|
private Boolean flag = false;
|
||||||
|
|
||||||
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时请进场ID不能为空")
|
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时请进场ID不能为空")
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -25,6 +25,10 @@ import java.util.List;
|
||||||
@ApiModel(value = "出口进场基本表", description = "")
|
@ApiModel(value = "出口进场基本表", description = "")
|
||||||
@MoreThan(groups = {ValidationGroup.insert.class, ValidationGroup.update.class}, field1 = "quantity", field2 = "eachQuantity", message = "数量不得超过单票件数")
|
@MoreThan(groups = {ValidationGroup.insert.class, ValidationGroup.update.class}, field1 = "quantity", field2 = "eachQuantity", message = "数量不得超过单票件数")
|
||||||
public class ExportInVo implements Serializable {
|
public class ExportInVo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否直接提交审核")
|
||||||
|
private Boolean flag = false;
|
||||||
|
|
||||||
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时请进场ID不能为空")
|
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时请进场ID不能为空")
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -18,6 +18,9 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "出口查验表")
|
@ApiModel(value = "出口查验表")
|
||||||
public class ExportInspectVo implements Serializable {
|
public class ExportInspectVo implements Serializable {
|
||||||
|
@ApiModelProperty(value = "是否直接提交审核")
|
||||||
|
private Boolean flag = false;
|
||||||
|
|
||||||
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时ID不能为空")
|
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时ID不能为空")
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -17,6 +17,9 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "出口装船表",description = "")
|
@ApiModel(value = "出口装船表",description = "")
|
||||||
public class ExportLoadVo implements Serializable {
|
public class ExportLoadVo implements Serializable {
|
||||||
|
@ApiModelProperty(value = "是否直接提交审核")
|
||||||
|
private Boolean flag = false;
|
||||||
|
|
||||||
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时请ID不能为空")
|
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时请ID不能为空")
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -14,6 +14,9 @@ import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "特保区基本信息表")
|
@ApiModel(value = "特保区基本信息表")
|
||||||
public class FreeTradeVo implements Serializable {
|
public class FreeTradeVo implements Serializable {
|
||||||
|
@ApiModelProperty(value = "是否直接提交审核")
|
||||||
|
private Boolean flag = false;
|
||||||
|
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时ID不能为空")
|
@NotNull(groups = {ValidationGroup.update.class}, message = "编辑时ID不能为空")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -20,6 +20,9 @@ public class ExportInCheckQuery extends BaseQuery {
|
||||||
@DbQuery(field = "shipId")
|
@DbQuery(field = "shipId")
|
||||||
private String shipName;
|
private String shipName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "船Id")
|
||||||
|
private String shipId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "航次ID")
|
@ApiModelProperty(value = "航次ID")
|
||||||
private String voyageId;
|
private String voyageId;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,9 @@ public class ExportLoadCheckQuery extends BaseQuery {
|
||||||
@ApiModelProperty(value = "受理号")
|
@ApiModelProperty(value = "受理号")
|
||||||
private String batchNo;
|
private String batchNo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "船ID")
|
||||||
|
private String shipId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "船名")
|
@ApiModelProperty(value = "船名")
|
||||||
@DbQuery(field = "shipId")
|
@DbQuery(field = "shipId")
|
||||||
private String shipName;
|
private String shipName;
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.haitonggauto.rtosc.api;
|
||||||
|
|
||||||
import com.haitonggauto.rtosc.api.dto.CheckVinReq;
|
import com.haitonggauto.rtosc.api.dto.CheckVinReq;
|
||||||
import com.haitonggauto.rtosc.api.dto.VoyageDTO;
|
import com.haitonggauto.rtosc.api.dto.VoyageDTO;
|
||||||
|
import com.haitonggauto.rtosc.api.dto.VoyageReq;
|
||||||
|
import com.haitonggauto.rtosc.api.dto.VoyageResp;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -19,4 +21,7 @@ public interface NuzarShpApi {
|
||||||
|
|
||||||
@PostMapping("/checkDup/checkDupVincode")
|
@PostMapping("/checkDup/checkDupVincode")
|
||||||
List<CheckVinReq> checkVinRepeat(@RequestBody List<CheckVinReq> req);
|
List<CheckVinReq> checkVinRepeat(@RequestBody List<CheckVinReq> req);
|
||||||
|
|
||||||
|
@PostMapping("/vesselVoyages/queryVvyListByVvNameAndSpmName")
|
||||||
|
List<VoyageResp> queryVvyListByVvNameAndSpmName(@RequestBody List<VoyageReq> req);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.haitonggauto.rtosc.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("通过般名和航次查询航次信息请求体")
|
||||||
|
public class VoyageReq implements Serializable {
|
||||||
|
@ApiModelProperty("船名")
|
||||||
|
private String spmName;
|
||||||
|
|
||||||
|
@ApiModelProperty("航次名")
|
||||||
|
private String vvyName;
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.haitonggauto.rtosc.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("通过般名和航次查询航次信息返回体")
|
||||||
|
public class VoyageResp {
|
||||||
|
@ApiModelProperty("航次ID")
|
||||||
|
private String vvyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("航次名")
|
||||||
|
private String vvyName;
|
||||||
|
|
||||||
|
@ApiModelProperty("船舶id")
|
||||||
|
private String spmId;
|
||||||
|
|
||||||
|
@ApiModelProperty("内贸/外贸/内外贸")
|
||||||
|
private String tradeType;
|
||||||
|
|
||||||
|
private String tradeTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("进出口标志")
|
||||||
|
private String importExportFlag;
|
||||||
|
|
||||||
|
private String importExportFlagName;
|
||||||
|
|
||||||
|
@ApiModelProperty("实际离泊时间")
|
||||||
|
private String actualAnchoringTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("实际靠泊时间")
|
||||||
|
private String actualBerthingTime;
|
||||||
|
}
|
|
@ -177,7 +177,7 @@ public class DepartureHandler implements BaseHandler {
|
||||||
CustomerDeparture departure = PoMapper.instance.departureVo2Entity(form);
|
CustomerDeparture departure = PoMapper.instance.departureVo2Entity(form);
|
||||||
departure.setBatchNo(batchNo);
|
departure.setBatchNo(batchNo);
|
||||||
departure.setApplicantId(UserContext.getUser().getUserId());
|
departure.setApplicantId(UserContext.getUser().getUserId());
|
||||||
departure.setCheckStatus(AuditEnum.SUBMIT);
|
departure.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
departure.setApplyTime(new Date());
|
departure.setApplyTime(new Date());
|
||||||
departure.setTermcd(departure.getPortAreaId());
|
departure.setTermcd(departure.getPortAreaId());
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ public class DepartureHandler implements BaseHandler {
|
||||||
CustomerDeparture departure = PoMapper.instance.departureVo2Entity(form);
|
CustomerDeparture departure = PoMapper.instance.departureVo2Entity(form);
|
||||||
departure.setBatchNo(batchNo);
|
departure.setBatchNo(batchNo);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
departure.setCheckStatus(AuditEnum.SUBMIT);
|
departure.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
} else {
|
} else {
|
||||||
departure.setCheckStatus(AuditEnum.AUDIT);
|
departure.setCheckStatus(AuditEnum.AUDIT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,7 +383,7 @@ public class ExportInHandler implements BaseHandler {
|
||||||
// 表单验证以及格式转换
|
// 表单验证以及格式转换
|
||||||
CustomerExportIn exportIn = PoMapper.instance.exportInVo2Entity(form);
|
CustomerExportIn exportIn = PoMapper.instance.exportInVo2Entity(form);
|
||||||
exportIn.setBatchNo(batchNo);
|
exportIn.setBatchNo(batchNo);
|
||||||
exportIn.setCheckStatus(AuditEnum.SUBMIT); // 待提交, 待审核, 审核通守,审核拒绝
|
exportIn.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT); // 待提交, 待审核, 审核通守,审核拒绝
|
||||||
exportIn.setApplyTime(new Date());
|
exportIn.setApplyTime(new Date());
|
||||||
exportIn.setApplicantId(UserContext.getUser().getUserId());
|
exportIn.setApplicantId(UserContext.getUser().getUserId());
|
||||||
exportIn.setTermcd(exportIn.getPortAreaId());
|
exportIn.setTermcd(exportIn.getPortAreaId());
|
||||||
|
@ -667,7 +667,7 @@ public class ExportInHandler implements BaseHandler {
|
||||||
exportIn.setBatchNo(batchNo);
|
exportIn.setBatchNo(batchNo);
|
||||||
exportIn.setTermcd(exportIn.getPortAreaId());
|
exportIn.setTermcd(exportIn.getPortAreaId());
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
exportIn.setCheckStatus(AuditEnum.SUBMIT);
|
exportIn.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
} else {
|
} else {
|
||||||
exportIn.setCheckStatus(AuditEnum.AUDIT);
|
exportIn.setCheckStatus(AuditEnum.AUDIT);
|
||||||
}
|
}
|
||||||
|
@ -755,6 +755,8 @@ public class ExportInHandler implements BaseHandler {
|
||||||
// 验证同一提单下,所有进场的数量,体积,重量和提单号的每票的数量进行
|
// 验证同一提单下,所有进场的数量,体积,重量和提单号的每票的数量进行
|
||||||
QueryWrapper<CustomerExportIn> nQuery = new QueryWrapper<>();
|
QueryWrapper<CustomerExportIn> nQuery = new QueryWrapper<>();
|
||||||
nQuery.select("sum(quantity) as quantity, sum(volume) as volume, sum(weight) as weight")
|
nQuery.select("sum(quantity) as quantity, sum(volume) as volume, sum(weight) as weight")
|
||||||
|
.eq("ship_id", exportIn.getShipId())
|
||||||
|
.eq("voyage_id", exportIn.getVoyageId())
|
||||||
.eq("bill_num", exportIn.getBillNum()).ne("id", exportIn.getId());
|
.eq("bill_num", exportIn.getBillNum()).ne("id", exportIn.getId());
|
||||||
Map<String, Object> vmap = customerExportInService.getMap(nQuery);
|
Map<String, Object> vmap = customerExportInService.getMap(nQuery);
|
||||||
if (MapUtils.isEmpty(vmap)) {
|
if (MapUtils.isEmpty(vmap)) {
|
||||||
|
@ -974,34 +976,39 @@ public class ExportInHandler implements BaseHandler {
|
||||||
// 验证哪些车架号已经存在了
|
// 验证哪些车架号已经存在了
|
||||||
// 移除oExists已经存在的
|
// 移除oExists已经存在的
|
||||||
List<String> vins = form.getVins().stream().filter(item -> !oExists.contains(item)).collect(Collectors.toList());
|
List<String> vins = form.getVins().stream().filter(item -> !oExists.contains(item)).collect(Collectors.toList());
|
||||||
List<CustomerExportInCargo> exists = customerExportInCargoService.list(new LambdaQueryWrapper<CustomerExportInCargo>().in(CustomerExportInCargo::getVin, vins));
|
if (CollectionUtils.isNotEmpty(vins)) {
|
||||||
List<String> existVins = exists.stream().map(p -> p.getVin()).collect(Collectors.toList());
|
List<CustomerExportInCargo> exists = customerExportInCargoService.list(new LambdaQueryWrapper<CustomerExportInCargo>().in(CustomerExportInCargo::getVin, vins));
|
||||||
|
List<String> existVins = exists.stream().map(p -> p.getVin()).collect(Collectors.toList());
|
||||||
|
|
||||||
// 查询出对应的港区
|
// 查询出对应的港区
|
||||||
if (CollectionUtils.isNotEmpty(exists)) {
|
if (CollectionUtils.isNotEmpty(exists)) {
|
||||||
List<CustomerExportIn> list = customerExportInService.lambdaQuery().in(CustomerExportIn::getId, exists.stream().map(item -> item.getExportInId()).collect(Collectors.toList())).list();
|
List<CustomerExportIn> list = customerExportInService.lambdaQuery().in(CustomerExportIn::getId, exists.stream().map(item -> item.getExportInId()).collect(Collectors.toList())).list();
|
||||||
Map<Long, String> portAreaMap = list.stream().collect(Collectors.toMap(CustomerExportIn::getId, CustomerExportIn::getPortAreaId));
|
Map<Long, String> portAreaMap = list.stream().collect(Collectors.toMap(CustomerExportIn::getId, CustomerExportIn::getPortAreaId));
|
||||||
// 通过接口再次验证
|
// 通过接口再次验证
|
||||||
List<CheckVinReq> req = exists.stream().map(item -> {
|
List<CheckVinReq> req = exists.stream().map(item -> {
|
||||||
CheckVinReq v = new CheckVinReq();
|
CheckVinReq v = new CheckVinReq();
|
||||||
v.setIsRepetition(true);
|
v.setIsRepetition(true);
|
||||||
v.setPamId(portAreaMap.get(item.getExportInId()));
|
v.setPamId(portAreaMap.get(item.getExportInId()));
|
||||||
v.setVinCode(item.getVin());
|
v.setVinCode(item.getVin());
|
||||||
return v;
|
return v;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
List<CheckVinReq> rst = shpApi.checkVinRepeat(req);
|
List<CheckVinReq> rst = shpApi.checkVinRepeat(req);
|
||||||
if (CollectionUtils.isNotEmpty(rst)) {
|
if (CollectionUtils.isNotEmpty(rst)) {
|
||||||
// 再次过滤出重复的
|
// 再次过滤出重复的
|
||||||
List<CheckVinReq> collect = rst.stream().filter(item -> item.getIsRepetition()).collect(Collectors.toList());
|
List<CheckVinReq> collect = rst.stream().filter(item -> item.getIsRepetition()).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(collect)) {
|
if (CollectionUtils.isNotEmpty(collect)) {
|
||||||
return ResultUtil.success(collect.stream().map(item -> item.getVinCode()).collect(Collectors.toList()));
|
return ResultUtil.success(collect.stream().map(item -> item.getVinCode()).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return ResultUtil.success(existVins);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return ResultUtil.success(existVins);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ResultUtil.success(existVins);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultUtil.success(existVins);
|
return ResultUtil.success(Collections.emptyList());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("车架号导入(数组形式)")
|
@ApiOperation("车架号导入(数组形式)")
|
||||||
|
|
|
@ -242,7 +242,7 @@ public class ExportInspectHandler implements BaseHandler {
|
||||||
exportInspect.setBatchNo(batchNo);
|
exportInspect.setBatchNo(batchNo);
|
||||||
exportInspect.setApplicantId(UserContext.getUser().getUserId());
|
exportInspect.setApplicantId(UserContext.getUser().getUserId());
|
||||||
exportInspect.setTradType("E");
|
exportInspect.setTradType("E");
|
||||||
exportInspect.setCheckStatus(AuditEnum.SUBMIT);
|
exportInspect.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
||||||
exportInspect.setApplyTime(new Date());
|
exportInspect.setApplyTime(new Date());
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ public class ExportInspectHandler implements BaseHandler {
|
||||||
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
||||||
exportInspect.setTradType("E");
|
exportInspect.setTradType("E");
|
||||||
if (!flag) { // 后台编辑
|
if (!flag) { // 后台编辑
|
||||||
exportInspect.setCheckStatus(AuditEnum.SUBMIT);
|
exportInspect.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
} else {
|
} else {
|
||||||
exportInspect.setCheckStatus(AuditEnum.AUDIT);
|
exportInspect.setCheckStatus(AuditEnum.AUDIT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,7 @@ public class ExportLoadHandler implements BaseHandler {
|
||||||
// 表单验证以及格式转换
|
// 表单验证以及格式转换
|
||||||
CustomerExportLoad exportLoad = PoMapper.instance.exportLoadVo2Entity(form);
|
CustomerExportLoad exportLoad = PoMapper.instance.exportLoadVo2Entity(form);
|
||||||
exportLoad.setBatchNo(batchNo);
|
exportLoad.setBatchNo(batchNo);
|
||||||
exportLoad.setCheckStatus(AuditEnum.SUBMIT);
|
exportLoad.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
exportLoad.setApplyTime(new Date());
|
exportLoad.setApplyTime(new Date());
|
||||||
exportLoad.setApplicantId(UserContext.getUser().getUserId());
|
exportLoad.setApplicantId(UserContext.getUser().getUserId());
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ public class ExportLoadHandler implements BaseHandler {
|
||||||
CustomerExportLoad exportLoad = PoMapper.instance.exportLoadVo2Entity(form);
|
CustomerExportLoad exportLoad = PoMapper.instance.exportLoadVo2Entity(form);
|
||||||
exportLoad.setBatchNo(batchNo);
|
exportLoad.setBatchNo(batchNo);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
exportLoad.setCheckStatus(AuditEnum.SUBMIT);
|
exportLoad.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
} else {
|
} else {
|
||||||
exportLoad.setCheckStatus(AuditEnum.AUDIT);
|
exportLoad.setCheckStatus(AuditEnum.AUDIT);
|
||||||
}
|
}
|
||||||
|
@ -1272,15 +1272,19 @@ public class ExportLoadHandler implements BaseHandler {
|
||||||
errorDataList.add(o);
|
errorDataList.add(o);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!voyageMap.containsKey(item.getVoyage())) {
|
if (!voyageMap.containsKey(StringUtils.join(item.getShipName(),item.getVoyage()))) {
|
||||||
VoyageDTO v = shpApi.getVoyageNameByVvyName(item.getVoyage());
|
VoyageReq req = new VoyageReq();
|
||||||
if (v == null || StringUtils.isEmpty(v.getVvyId())) {
|
req.setSpmName(item.getShipName());
|
||||||
voyageMap.put(item.getVoyage(), "");
|
req.setVvyName(item.getVoyage());
|
||||||
|
List<VoyageResp> resp = shpApi.queryVvyListByVvNameAndSpmName(Arrays.asList(req));
|
||||||
|
// VoyageDTO v = shpApi.getVoyageNameByVvyName(item.getVoyage());
|
||||||
|
if (CollectionUtils.isEmpty(resp)) {
|
||||||
|
voyageMap.put(StringUtils.join(item.getShipName(),item.getVoyage()), "");
|
||||||
} else {
|
} else {
|
||||||
voyageMap.put(item.getVoyage(),StringUtils.trim(v.getVvyId()));
|
voyageMap.put(StringUtils.join(item.getShipName(),item.getVoyage()),StringUtils.trim(resp.get(0).getVvyId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(voyageMap.get(item.getVoyage()))) {
|
if (StringUtils.isEmpty(voyageMap.get(StringUtils.join(item.getShipName(),item.getVoyage())))) {
|
||||||
JSONObject o = JSONObject.from(item);
|
JSONObject o = JSONObject.from(item);
|
||||||
o.put("status", "航次不存在");
|
o.put("status", "航次不存在");
|
||||||
errorDataList.add(o);
|
errorDataList.add(o);
|
||||||
|
@ -1407,7 +1411,7 @@ public class ExportLoadHandler implements BaseHandler {
|
||||||
exportLoad.setShipId(shipList.stream().filter(s -> StringUtils.equalsIgnoreCase(s.getText(), keys[0])).findFirst().get().getId());
|
exportLoad.setShipId(shipList.stream().filter(s -> StringUtils.equalsIgnoreCase(s.getText(), keys[0])).findFirst().get().getId());
|
||||||
exportLoad.setShipName(keys[0]);
|
exportLoad.setShipName(keys[0]);
|
||||||
exportLoad.setShipEnName(shipList.stream().filter(p -> StringUtils.equalsIgnoreCase(p.getText(), keys[0])).findFirst().get().getExtra1());
|
exportLoad.setShipEnName(shipList.stream().filter(p -> StringUtils.equalsIgnoreCase(p.getText(), keys[0])).findFirst().get().getExtra1());
|
||||||
exportLoad.setVoyageId(voyageMap.get(keys[1]));
|
exportLoad.setVoyageId(voyageMap.get(StringUtils.join(keys[0],keys[1])));
|
||||||
exportLoad.setVoyage(keys[1]);
|
exportLoad.setVoyage(keys[1]);
|
||||||
exportLoad.setBillNo(keys[2]);
|
exportLoad.setBillNo(keys[2]);
|
||||||
exportLoad.setBrandId(brandList.stream().filter(s -> StringUtils.equalsIgnoreCase(s.getText(), keys[3])).findFirst().get().getId());
|
exportLoad.setBrandId(brandList.stream().filter(s -> StringUtils.equalsIgnoreCase(s.getText(), keys[3])).findFirst().get().getId());
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class FreeTradeHandler implements BaseHandler {
|
||||||
// 表单验证以及格式转换
|
// 表单验证以及格式转换
|
||||||
CustomerFreeTrade freeTrade = PoMapper.instance.freeTradeVo2Entity(form);
|
CustomerFreeTrade freeTrade = PoMapper.instance.freeTradeVo2Entity(form);
|
||||||
freeTrade.setBatchNo(batchNo);
|
freeTrade.setBatchNo(batchNo);
|
||||||
freeTrade.setCheckStatus(AuditEnum.SUBMIT);
|
freeTrade.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
|
|
||||||
customerFreeTradeService.save(freeTrade);
|
customerFreeTradeService.save(freeTrade);
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ public class FreeTradeHandler implements BaseHandler {
|
||||||
CustomerFreeTrade freeTrade = PoMapper.instance.freeTradeVo2Entity(form);
|
CustomerFreeTrade freeTrade = PoMapper.instance.freeTradeVo2Entity(form);
|
||||||
freeTrade.setBatchNo(batchNo);
|
freeTrade.setBatchNo(batchNo);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
freeTrade.setCheckStatus(AuditEnum.SUBMIT);
|
freeTrade.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
} else {
|
} else {
|
||||||
freeTrade.setCheckStatus(AuditEnum.AUDIT);
|
freeTrade.setCheckStatus(AuditEnum.AUDIT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ public class ImportInspectHandler implements BaseHandler {
|
||||||
exportInspect.setBatchNo(batchNo);
|
exportInspect.setBatchNo(batchNo);
|
||||||
exportInspect.setApplicantId(UserContext.getUser().getUserId());
|
exportInspect.setApplicantId(UserContext.getUser().getUserId());
|
||||||
exportInspect.setTradType("I");
|
exportInspect.setTradType("I");
|
||||||
exportInspect.setCheckStatus(AuditEnum.SUBMIT);
|
exportInspect.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
||||||
exportInspect.setApplyTime(new Date());
|
exportInspect.setApplyTime(new Date());
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ public class ImportInspectHandler implements BaseHandler {
|
||||||
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
exportInspect.setTermcd(exportInspect.getPortAreaId());
|
||||||
exportInspect.setTradType("I");
|
exportInspect.setTradType("I");
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
exportInspect.setCheckStatus(AuditEnum.SUBMIT);
|
exportInspect.setCheckStatus(form.getFlag() ? AuditEnum.AUDIT : AuditEnum.SUBMIT);
|
||||||
} else {
|
} else {
|
||||||
exportInspect.setCheckStatus(AuditEnum.AUDIT);
|
exportInspect.setCheckStatus(AuditEnum.AUDIT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue