|
|
@@ -9,7 +9,6 @@ import org.springblade.client.entity.Message;
|
|
|
import org.springblade.client.feign.IMessageClient;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
-import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
import org.springblade.los.basic.business.entity.BusinessType;
|
|
|
import org.springblade.los.basic.business.service.IBusinessTypeService;
|
|
|
@@ -136,8 +135,8 @@ public class BillUtils implements IBillUtils {
|
|
|
containersService.updateBatchById(containersList);
|
|
|
List<Containers> containersListNew = new ArrayList<>();
|
|
|
for (Containers item : containersList) {
|
|
|
- Bills bills1 = billsList.stream().filter(e-> e.getId().equals(item.getPid())).findFirst().orElse(null);
|
|
|
- if (bills1 != null){
|
|
|
+ Bills bills1 = billsList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
|
|
|
+ if (bills1 != null) {
|
|
|
item.setMarks(bills1.getMarks());
|
|
|
}
|
|
|
item.setSrcSplitOrderId(item.getPid());
|
|
|
@@ -1030,7 +1029,19 @@ public class BillUtils implements IBillUtils {
|
|
|
if (ObjectUtils.isNull(ids)) {
|
|
|
throw new RuntimeException("缺少必要参数");
|
|
|
}
|
|
|
- List<Long> idList = Func.toLongList(ids);
|
|
|
+ List<Long> idList = new ArrayList<>();
|
|
|
+ Bills bills = billsMapper.selectById(ids);
|
|
|
+ if ("MM".equals(bills.getBillType())) {
|
|
|
+ List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .eq(Bills::getMasterId, bills.getId()));
|
|
|
+ if (billsList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到海运出口单据,发送失败!");
|
|
|
+ }
|
|
|
+ idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
|
|
|
+ } else {
|
|
|
+ idList.add(bills.getId());
|
|
|
+ }
|
|
|
List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
.eq(Bills::getIsDeleted, 0)
|
|
|
.in(Bills::getId, idList));
|
|
|
@@ -1048,35 +1059,32 @@ public class BillUtils implements IBillUtils {
|
|
|
.in(SeaContainerNumberItem::getPid, idList)
|
|
|
.in(SeaContainerNumberItem::getBoxType, preContainersList.stream().map(PreContainers::getCntrTypeCode)
|
|
|
.distinct().collect(Collectors.toList())));
|
|
|
- if (containerNumberItemList.isEmpty()) {
|
|
|
- throw new RuntimeException("未选择放箱号,发送失败!");
|
|
|
+ if (!containerNumberItemList.isEmpty()) {
|
|
|
+ for (Bills item : billsList) {
|
|
|
+ if (containerNumberItemList.stream().noneMatch(e -> e.getPid().equals(item.getId()))) {
|
|
|
+ throw new RuntimeException("分单号:" + item.getHblno() + "未选择放箱号,发送失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
List<DeliveryPaperExcel> excelList = new ArrayList<>();
|
|
|
- for (Bills item : billsList) {
|
|
|
+ for (PreContainers item : preContainersList) {
|
|
|
DeliveryPaperExcel excel = new DeliveryPaperExcel();
|
|
|
- excel.setEtd(item.getEtd());
|
|
|
- excel.setPodEnName(item.getPodEnName());
|
|
|
- excel.setVesselCnName(item.getVesselEnName());
|
|
|
- excel.setVoyageNo(item.getVoyageNo());
|
|
|
- excel.setBoxOwner("WFL");
|
|
|
- excel.setInboundContainerOwner(item.getCarrierEnName());
|
|
|
- excel.setPotEnName(item.getPotEnName());
|
|
|
- excel.setMblno(item.getMblno());
|
|
|
- excel.setHblno(item.getHblno());
|
|
|
- excel.setQuantityCntrDescr(item.getQuantityCntrDescr());
|
|
|
- excel.setGrossWeight(item.getGrossWeight());
|
|
|
- String containerNumber = "";
|
|
|
- List<PreContainers> preContainers = preContainersList.stream().filter(e -> e.getPid().equals(item.getId()))
|
|
|
- .collect(Collectors.toList());
|
|
|
- for (PreContainers containers : preContainers) {
|
|
|
- List<SeaContainerNumberItem> containerNumberItems = containerNumberItemList.stream().filter(e ->
|
|
|
- containers.getCntrTypeCode().equals(e.getBoxType()) && 0 != e.getOccupyNum()).collect(Collectors.toList());
|
|
|
- for (SeaContainerNumberItem numberItem : containerNumberItems) {
|
|
|
- containerNumber = containerNumber + numberItem.getContainerNumber() + " " + numberItem.getOccupyNum() + "*" +
|
|
|
- containers.getCntrTypeCode() + "\n";
|
|
|
- }
|
|
|
+ Bills bills1 = billsList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
|
|
|
+ if (bills1 != null) {
|
|
|
+ excel.setVesselCnName(bills1.getVesselEnName() + " " + bills1.getVoyageNo());
|
|
|
+ excel.setHblno(bills1.getHblno());
|
|
|
+ excel.setQuantityCntrDescr(bills1.getQuantityCntrDescr());
|
|
|
+ excel.setPodEnName(bills1.getPodEnName());
|
|
|
+ excel.setMblno(bills1.getMblno());
|
|
|
}
|
|
|
- excel.setContainerNumber(containerNumber);
|
|
|
+ SeaContainerNumberItem containerNumberItems = containerNumberItemList.stream().filter(e ->
|
|
|
+ item.getCntrTypeCode().equals(e.getBoxType()) && 0 != e.getOccupyNum() && e.getPid().equals(item.getPid()))
|
|
|
+ .findFirst().orElse(null);
|
|
|
+ if (containerNumberItems != null) {
|
|
|
+ excel.setContainerNumber(containerNumberItems.getContainerNumber());
|
|
|
+ excel.setStationCname(containerNumberItems.getPolStationCname());
|
|
|
+ }
|
|
|
+ excel.setRemarks("");
|
|
|
excelList.add(excel);
|
|
|
}
|
|
|
return excelList;
|
|
|
@@ -1088,7 +1096,19 @@ public class BillUtils implements IBillUtils {
|
|
|
if (ObjectUtils.isNull(ids)) {
|
|
|
throw new RuntimeException("缺少必要参数");
|
|
|
}
|
|
|
- List<Long> idList = Func.toLongList(ids);
|
|
|
+ List<Long> idList = new ArrayList<>();
|
|
|
+ Bills bills = billsMapper.selectById(ids);
|
|
|
+ if ("MM".equals(bills.getBillType())) {
|
|
|
+ List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .eq(Bills::getMasterId, bills.getId()));
|
|
|
+ if (billsList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到海运出口单据,发送失败!");
|
|
|
+ }
|
|
|
+ idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
|
|
|
+ } else {
|
|
|
+ idList.add(bills.getId());
|
|
|
+ }
|
|
|
List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
.eq(Bills::getIsDeleted, 0)
|
|
|
.in(Bills::getId, idList));
|
|
|
@@ -1106,35 +1126,32 @@ public class BillUtils implements IBillUtils {
|
|
|
.in(SeaContainerNumberItem::getPid, idList)
|
|
|
.in(SeaContainerNumberItem::getBoxType, preContainersList.stream().map(PreContainers::getCntrTypeCode)
|
|
|
.distinct().collect(Collectors.toList())));
|
|
|
- if (containerNumberItemList.isEmpty()) {
|
|
|
- throw new RuntimeException("未选择放箱号,发送失败!");
|
|
|
+ if (!containerNumberItemList.isEmpty()) {
|
|
|
+ for (Bills item : billsList) {
|
|
|
+ if (containerNumberItemList.stream().noneMatch(e -> e.getPid().equals(item.getId()))) {
|
|
|
+ throw new RuntimeException("分单号:" + item.getHblno() + "未选择放箱号,发送失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
List<DeliveryPaperExcel> excelList = new ArrayList<>();
|
|
|
- for (Bills item : billsList) {
|
|
|
+ for (PreContainers item : preContainersList) {
|
|
|
DeliveryPaperExcel excel = new DeliveryPaperExcel();
|
|
|
- excel.setEtd(item.getEtd());
|
|
|
- excel.setPodEnName(item.getPodEnName());
|
|
|
- excel.setVesselCnName(item.getVesselEnName());
|
|
|
- excel.setVoyageNo(item.getVoyageNo());
|
|
|
- excel.setBoxOwner("WFL");
|
|
|
- excel.setInboundContainerOwner(item.getCarrierEnName());
|
|
|
- excel.setPotEnName(item.getPotEnName());
|
|
|
- excel.setMblno(item.getMblno());
|
|
|
- excel.setHblno(item.getHblno());
|
|
|
- excel.setQuantityCntrDescr(item.getQuantityCntrDescr());
|
|
|
- excel.setGrossWeight(item.getGrossWeight());
|
|
|
- String containerNumber = "";
|
|
|
- List<PreContainers> preContainers = preContainersList.stream().filter(e -> e.getPid().equals(item.getId()))
|
|
|
- .collect(Collectors.toList());
|
|
|
- for (PreContainers containers : preContainers) {
|
|
|
- List<SeaContainerNumberItem> containerNumberItems = containerNumberItemList.stream().filter(e ->
|
|
|
- containers.getCntrTypeCode().equals(e.getBoxType()) && 0 != e.getOccupyNum()).collect(Collectors.toList());
|
|
|
- for (SeaContainerNumberItem numberItem : containerNumberItems) {
|
|
|
- containerNumber = containerNumber + numberItem.getContainerNumber() + " " + numberItem.getOccupyNum() + "*" +
|
|
|
- containers.getCntrTypeCode() + "\n";
|
|
|
- }
|
|
|
+ Bills bills1 = billsList.stream().filter(e -> e.getId().equals(item.getPid())).findFirst().orElse(null);
|
|
|
+ if (bills1 != null) {
|
|
|
+ excel.setVesselCnName(bills1.getVesselEnName() + " " + bills1.getVoyageNo());
|
|
|
+ excel.setHblno(bills1.getHblno());
|
|
|
+ excel.setQuantityCntrDescr(bills1.getQuantityCntrDescr());
|
|
|
+ excel.setPodEnName(bills1.getPodEnName());
|
|
|
+ excel.setMblno(bills1.getMblno());
|
|
|
}
|
|
|
- excel.setContainerNumber(containerNumber);
|
|
|
+ SeaContainerNumberItem containerNumberItems = containerNumberItemList.stream().filter(e ->
|
|
|
+ item.getCntrTypeCode().equals(e.getBoxType()) && 0 != e.getOccupyNum() && e.getPid().equals(item.getPid()))
|
|
|
+ .findFirst().orElse(null);
|
|
|
+ if (containerNumberItems != null) {
|
|
|
+ excel.setContainerNumber(containerNumberItems.getContainerNumber());
|
|
|
+ excel.setStationCname(containerNumberItems.getPolStationCname());
|
|
|
+ }
|
|
|
+ excel.setRemarks("");
|
|
|
excelList.add(excel);
|
|
|
}
|
|
|
return R.data(excelList);
|
|
|
@@ -1149,6 +1166,24 @@ public class BillUtils implements IBillUtils {
|
|
|
if (bills == null) {
|
|
|
throw new RuntimeException("未查到海运出口单据,发送失败!");
|
|
|
}
|
|
|
+ List<Long> idList = new ArrayList<>();
|
|
|
+ if ("MM".equals(bills.getBillType())) {
|
|
|
+ List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .eq(Bills::getMasterId, bills.getId()));
|
|
|
+ if (billsList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到海运出口单据,发送失败!");
|
|
|
+ }
|
|
|
+ idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
|
|
|
+ } else {
|
|
|
+ idList.add(bills.getId());
|
|
|
+ }
|
|
|
+ List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .in(Bills::getId, idList));
|
|
|
+ if (billsList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到海运出口单据,发送失败!");
|
|
|
+ }
|
|
|
StringBuilder text = new StringBuilder();
|
|
|
StringBuilder messageBody = new StringBuilder();
|
|
|
if ("SOC".equals(bills.getBoxBelongsTo()) && "DD,MH".contains(bills.getBillType())) {
|
|
|
@@ -1173,23 +1208,23 @@ public class BillUtils implements IBillUtils {
|
|
|
}
|
|
|
List<PreContainers> preContainersList = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
|
|
|
.eq(PreContainers::getIsDeleted, 0)
|
|
|
- .eq(PreContainers::getPid, ids));
|
|
|
+ .in(PreContainers::getPid, idList));
|
|
|
if (preContainersList.isEmpty()) {
|
|
|
throw new RuntimeException("未查到预配箱型信息,发送失败!");
|
|
|
}
|
|
|
List<SeaContainerNumberItem> containerNumberItemList = seaContainerNumberItemService.list(new LambdaQueryWrapper<SeaContainerNumberItem>()
|
|
|
.eq(SeaContainerNumberItem::getIsDeleted, 0)
|
|
|
- .eq(SeaContainerNumberItem::getPid, ids)
|
|
|
- .in(SeaContainerNumberItem::getBoxType, preContainersList.stream().map(PreContainers::getCntrTypeCode)
|
|
|
- .distinct().collect(Collectors.toList())));
|
|
|
- if (containerNumberItemList.isEmpty()) {
|
|
|
- throw new RuntimeException("未选择放箱号,发送失败!");
|
|
|
+ .in(SeaContainerNumberItem::getPid, idList));
|
|
|
+ if (!containerNumberItemList.isEmpty()) {
|
|
|
+ if (containerNumberItemList.stream().noneMatch(e -> e.getPid().equals(bills.getId()))) {
|
|
|
+ throw new RuntimeException("未选择放箱号,发送失败!");
|
|
|
+ }
|
|
|
}
|
|
|
List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
|
|
|
.eq(FeeCenter::getIsDeleted, 0)
|
|
|
.eq(FeeCenter::getDc, "D")
|
|
|
.eq(FeeCenter::getFeeCode, "HYF")
|
|
|
- .eq(FeeCenter::getPid, ids));
|
|
|
+ .in(FeeCenter::getPid, idList));
|
|
|
if (feeCenterList.isEmpty()) {
|
|
|
throw new RuntimeException("未查到应收海运费,发送失败!");
|
|
|
}
|
|
|
@@ -1206,18 +1241,22 @@ public class BillUtils implements IBillUtils {
|
|
|
boolean status = bills.getEtd().compareTo(date) >= 0;
|
|
|
if (status) {
|
|
|
for (PreContainers containers : preContainersList) {
|
|
|
- BigDecimal price = feeCenterList.stream().filter(e -> containers.getCntrTypeCode().equals(e.getUnitNo()))
|
|
|
- .map(FeeCenter::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
- List<RouteCostItem> minCostItem = costItemList.stream().filter(e -> containers.getCntrTypeCode().equals(e.getBoxType()))
|
|
|
- .sorted(Comparator.comparing(RouteCostItem::getSalesPrice))
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (price.compareTo(minCostItem.get(0).getSalesPrice()) < 0) {
|
|
|
- text.append("提单号:").append(bills.getMblno()).append("箱型:").append(containers.getCntrTypeCode()).append("应收海运费:" + price + "小于成本中心海运费:" + minCostItem.get(0).getSalesPrice() + "!");
|
|
|
- messageBody.append("提单号:").append(bills.getMblno()).append("应收海运费:" + price + "小于成本中心海运费:" + minCostItem.get(0).getSalesPrice() + "!");
|
|
|
- }
|
|
|
- if (containerNumberItemList.stream().filter(e -> e.getBoxType().equals(containers.getCntrTypeCode()))
|
|
|
- .mapToInt(SeaContainerNumberItem::getOccupyNum).sum() != containers.getQuantity()) {
|
|
|
- text.append("提单号:").append(bills.getMblno()).append("箱型:").append(containers.getCntrTypeCode()).append("箱量与所选放箱号数量不等!");
|
|
|
+ Bills bills1 = billsList.stream().filter(e -> e.getId().equals(containers.getPid())).findFirst().orElse(null);
|
|
|
+ if (bills1 != null) {
|
|
|
+ BigDecimal price = feeCenterList.stream().filter(e -> containers.getCntrTypeCode().equals(e.getUnitNo())
|
|
|
+ && containers.getPid().equals(e.getPid())).map(FeeCenter::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ List<RouteCostItem> minCostItem = costItemList.stream().filter(e -> containers.getCntrTypeCode().equals(e.getBoxType()))
|
|
|
+ .sorted(Comparator.comparing(RouteCostItem::getSalesPrice))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ if (price.compareTo(minCostItem.get(0).getSalesPrice()) < 0) {
|
|
|
+ text.append("提单号:").append(bills1.getHblno()).append("箱型:").append(containers.getCntrTypeCode()).append("应收海运费:" + price + "小于成本中心海运费:" + minCostItem.get(0).getSalesPrice() + "!");
|
|
|
+ messageBody.append("提单号:").append(bills1.getHblno()).append("应收海运费:").append(price).append("小于成本中心海运费:").append(minCostItem.get(0).getSalesPrice()).append("!");
|
|
|
+ }
|
|
|
+ if (containerNumberItemList.stream().filter(e -> e.getBoxType().equals(containers.getCntrTypeCode())
|
|
|
+ && containers.getPid().equals(e.getPid()))
|
|
|
+ .mapToInt(SeaContainerNumberItem::getOccupyNum).sum() != containers.getQuantity()) {
|
|
|
+ text.append("提单号:").append(bills1.getHblno()).append("箱型:").append(containers.getCntrTypeCode()).append("箱量与所选放箱号数量不等!");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1234,4 +1273,90 @@ public class BillUtils implements IBillUtils {
|
|
|
return R.success("操作成功");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R billVerificationPrompt(String ids) {
|
|
|
+ if (ObjectUtils.isNull(ids)) {
|
|
|
+ throw new RuntimeException("缺少必要参数,发送失败!");
|
|
|
+ }
|
|
|
+ Bills bills = billsMapper.selectById(ids);
|
|
|
+ if (bills == null) {
|
|
|
+ throw new RuntimeException("未查到海运出口单据,发送失败!");
|
|
|
+ }
|
|
|
+ if (!"MM".equals(bills.getBillType())) {
|
|
|
+ StringBuilder text = new StringBuilder();
|
|
|
+ StringBuilder messageBody = new StringBuilder();
|
|
|
+ if ("SOC".equals(bills.getBoxBelongsTo()) && "DD,MH".contains(bills.getBillType())) {
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ List<RouteCost> costList = routeCostService.list(new LambdaQueryWrapper<RouteCost>()
|
|
|
+ .eq(RouteCost::getPodId, bills.getPolId())
|
|
|
+ .eq(RouteCost::getDestinationId, bills.getPodId())
|
|
|
+ .eq(RouteCost::getShippingCompanyId, bills.getCarrierId())
|
|
|
+ .eq(RouteCost::getBusinessType, bills.getBoxBelongsTo())
|
|
|
+ .apply("DATE_FORMAT(effective_start_date,'%Y-%m-%d') <= '" + formatter.format(bills.getEtd()) + "'")
|
|
|
+ .apply("DATE_FORMAT(effective_end_date,'%Y-%m-%d') >= '" + formatter.format(bills.getEtd()) + "'")
|
|
|
+ );
|
|
|
+ if (costList.isEmpty()) {
|
|
|
+ throw new RuntimeException("请先维护成本!");
|
|
|
+ }
|
|
|
+ List<RouteCostItem> costItemList = routeCostItemService.list(new LambdaQueryWrapper<RouteCostItem>()
|
|
|
+ .eq(RouteCostItem::getIsDeleted, 0)
|
|
|
+ .eq(RouteCostItem::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .in(RouteCostItem::getPid, costList.stream().map(RouteCost::getId).collect(Collectors.toList())));
|
|
|
+ if (costItemList.isEmpty()) {
|
|
|
+ throw new RuntimeException("请先维护成本!");
|
|
|
+ }
|
|
|
+ List<PreContainers> preContainersList = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
|
|
|
+ .eq(PreContainers::getIsDeleted, 0)
|
|
|
+ .eq(PreContainers::getPid, bills.getId()));
|
|
|
+ if (preContainersList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到预配箱型信息");
|
|
|
+ }
|
|
|
+ List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
|
|
|
+ .eq(FeeCenter::getIsDeleted, 0)
|
|
|
+ .eq(FeeCenter::getDc, "D")
|
|
|
+ .eq(FeeCenter::getFeeCode, "HYF")
|
|
|
+ .eq(FeeCenter::getPid, bills.getId()));
|
|
|
+ if (feeCenterList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到应收海运费");
|
|
|
+ }
|
|
|
+ String boxBusinessConnectionTime = sysClient.getParamService("box.business.connection.time");
|
|
|
+ Date date = null;
|
|
|
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ if (ObjectUtils.isNotNull(boxBusinessConnectionTime)) {
|
|
|
+ try {
|
|
|
+ date = dateFormat.parse(boxBusinessConnectionTime);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ boolean status = bills.getEtd().compareTo(date) >= 0;
|
|
|
+ if (status) {
|
|
|
+ for (PreContainers containers : preContainersList) {
|
|
|
+ BigDecimal price = feeCenterList.stream().filter(e -> containers.getCntrTypeCode().equals(e.getUnitNo())
|
|
|
+ && containers.getPid().equals(e.getPid())).map(FeeCenter::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ List<RouteCostItem> minCostItem = costItemList.stream().filter(e -> containers.getCntrTypeCode().equals(e.getBoxType()))
|
|
|
+ .sorted(Comparator.comparing(RouteCostItem::getSalesPrice))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ if (price.compareTo(minCostItem.get(0).getSalesPrice()) < 0) {
|
|
|
+ text.append("提单号:").append(bills.getHblno()).append("箱型:").append(containers.getCntrTypeCode()).append("应收海运费:" + price + "小于成本中心海运费:" + minCostItem.get(0).getSalesPrice() + "!");
|
|
|
+ messageBody.append("提单号:").append(bills.getHblno()).append("应收海运费:").append(price).append("小于成本中心海运费:").append(minCostItem.get(0).getSalesPrice()).append("!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (ObjectUtils.isNotNull(text.toString())) {
|
|
|
+ String url = "/iosBasicData/OceanFreightImport/bills/index";
|
|
|
+ String pageLabel = "海运出口";
|
|
|
+ String pageStatus = "this.$store.getters.domSaleStatus";
|
|
|
+ messageBody.append("发送人:").append(AuthUtil.getUserName());
|
|
|
+ this.sendMessage(bills, url, pageLabel, pageStatus, messageBody.toString(), "2", bills.getOperatorId(), "成本中心");
|
|
|
+ throw new RuntimeException(text.toString());
|
|
|
+ } else {
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|