Просмотр исходного кода

1.退舱判断日期修改为atd
2.OW拿列表排序修改
3.放箱号列表排序修改
4.增加同步费用结算单位提示接口
5.增加同步费用结算单位接口

纪新园 2 недель назад
Родитель
Сommit
254b95b356
12 измененных файлов с 423 добавлено и 10 удалено
  1. 95 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/reports/vo/ReportDataStatisticsVO.java
  2. 16 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/dto/FeeCenterReports.java
  3. 12 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/controller/ReportsController.java
  4. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/IReportsBoxService.java
  5. 6 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsBoxServiceImpl.java
  6. 6 2
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java
  7. 5 2
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/PutBoxController.java
  8. 3 1
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/TradingBoxController.java
  9. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  10. 18 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/controller/FeeCenterController.java
  11. 4 0
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/IFeeCenterService.java
  12. 255 4
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterServiceImpl.java

+ 95 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/reports/vo/ReportDataStatisticsVO.java

@@ -0,0 +1,95 @@
+package org.springblade.los.basic.reports.vo;
+
+import lombok.Data;
+
+/**
+ * @author :jixinyuan
+ * @date : 2026/1/26
+ */
+@Data
+public class ReportDataStatisticsVO {
+
+	private String reportCode;
+
+	private String groupCode;
+
+	private String reportType;
+
+	/**
+	 * 应收/应付
+	 */
+	private String dc;
+	/**
+	 * 查询方式  1=结算单位 2 委托人  3 业务来源
+	 */
+	private String type;
+	/**
+	 * 业务类型
+	 */
+	private String businessType;
+	/**
+	 * 委托人
+	 */
+	private Long clientId;
+	/**
+	 * 结算单位
+	 */
+	private Long corpId;
+	/**
+	 * 业务来源
+	 */
+	private String srcType;
+	/**
+	 * 业务员
+	 */
+	private Long srcId;
+	/**
+	 * 查询时间开始
+	 */
+	private String etdStart;
+	/**
+	 * 查询时间结束
+	 */
+	private String etdEnd;
+	/**
+	 * 是否按业务日期 0否1是
+	 */
+	private String isBusinessDate;
+	/**
+	 * 是否按审核日期 0否1是
+	 */
+	private String isToExamineDate;
+
+	/**
+	 * 租户
+	 */
+	private String tenantId;
+	/**
+	 * 分公司 Id
+	 */
+	private String branchId;
+	/**
+	 * 单据所属公司
+	 */
+	private String billBranchId;
+
+	private String billNo;
+
+	private String mblNo;
+	/**
+	 * 分单号
+	 */
+	private String hblNo;
+	/**
+	 * 船名 id
+	 */
+	private Long vesselId;
+	/**
+	 * 航次
+	 */
+	private String voyageNo;
+	/**
+	 * 单据类型
+	 */
+	private String billType;
+}

+ 16 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/dto/FeeCenterReports.java

@@ -38,12 +38,28 @@ public class FeeCenterReports implements Serializable {
 	 * 客户中文名称
 	 */
 	private String corpCnName;
+	/**
+	 * 客户英文名称
+	 */
+	private String corpEnName;
+	/**
+	 * 客户简称
+	 */
+	private String shortName;
 
 	/**
 	 * 主表客户中文名称
 	 */
 	private String billCorpCnName;
 	/**
+	 * 主表客户英文名称
+	 */
+	private String billCorpEnName;
+	/**
+	 * 主表客户简称
+	 */
+	private String billShortName;
+	/**
 	 * 费用中文名称
 	 */
 	private String feeCnName;

+ 12 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/controller/ReportsController.java

@@ -35,6 +35,7 @@ import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.reports.entity.Reports;
 import org.springblade.los.basic.reports.service.IReportsBoxService;
 import org.springblade.los.basic.reports.service.IReportsService;
+import org.springblade.los.basic.reports.vo.ReportDataStatisticsVO;
 import org.springblade.los.basic.reports.vo.ReportsVO;
 import org.springblade.los.business.sea.vo.GenerateMailVo;
 import org.springframework.web.bind.annotation.*;
@@ -211,4 +212,15 @@ public class ReportsController extends BladeController {
 	}
 
 
+	/**
+	 * 获取模本数据加信息
+	 */
+	@GetMapping("/getReportDataStatistics")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入reports")
+	public R getReportDataStatistics(ReportDataStatisticsVO reportDataStatisticsVO) throws ParseException {
+		return reportsBoxService.getReportDataStatistics(reportDataStatisticsVO);
+	}
+
+
 }

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/IReportsBoxService.java

@@ -17,6 +17,7 @@
 package org.springblade.los.basic.reports.service;
 
 import org.springblade.core.tool.api.R;
+import org.springblade.los.basic.reports.vo.ReportDataStatisticsVO;
 
 import java.text.ParseException;
 
@@ -34,4 +35,5 @@ public interface IReportsBoxService {
 	R getReportData(String billId, String reportCode, String groupCode, String corpIds,
 					String itemIds, String type, String curCode,String date) throws ParseException;
 
+	R getReportDataStatistics(ReportDataStatisticsVO reportDataStatisticsVO);
 }

+ 6 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsBoxServiceImpl.java

@@ -30,6 +30,7 @@ import org.springblade.los.basic.corps.service.IBCorpsBankService;
 import org.springblade.los.basic.corps.service.IBCorpsService;
 import org.springblade.los.basic.cur.entity.BCurExrate;
 import org.springblade.los.basic.reports.service.IReportsBoxService;
+import org.springblade.los.basic.reports.vo.ReportDataStatisticsVO;
 import org.springblade.los.box.entity.ExpenseApplication;
 import org.springblade.los.box.entity.TradingBox;
 import org.springblade.los.box.service.IExpenseApplicationService;
@@ -593,6 +594,11 @@ public class ReportsBoxServiceImpl implements IReportsBoxService {
 		return R.data(map);
 	}
 
+	@Override
+	public R getReportDataStatistics(ReportDataStatisticsVO reportDataStatisticsVO) {
+		return null;
+	}
+
 	private TradingBox assignmentDc(TradingBox bills, List<FeeCenter> feeCenterList, String curCode, String exrateType, List<BCurExrate> curExrateList) {
 		BigDecimal amountDr = new BigDecimal(MagicValues.ZERO);
 		BigDecimal amountCr = new BigDecimal(MagicValues.ZERO);

+ 6 - 2
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -2404,7 +2404,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 		BigDecimal amountProfitLoc;
 		List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
 		for (FeeCenter item : feeCenterList) {
-			if (ObjectUtils.isNotNull(item.getShortName())) {
+			/*if (ObjectUtils.isNotNull(item.getShortName())) {
 				item.setCorpCnName(item.getShortName());
 			} else {
 				item.setCorpCnName("无");
@@ -2413,7 +2413,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 				item.setBillCorpCnName(item.getBillShortName());
 			} else {
 				item.setBillCorpCnName("无");
-			}
+			}*/
 			if (MagicValues.D.equals(item.getDc())) {
 				if (!exrateType.equals(item.getCurCode())) {
 					amountDrUsd = amountDrUsd.add(item.getAmount());
@@ -2437,7 +2437,11 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 			feeCenterReports.setRemarks(item.getRemarks());
 			feeCenterReports.setPid(item.getPid());
 			feeCenterReports.setCorpCnName(item.getCorpCnName());
+			feeCenterReports.setCorpEnName(item.getCorpEnName());
+			feeCenterReports.setShortName(item.getShortName());
 			feeCenterReports.setBillCorpCnName(item.getBillCorpCnName());
+			feeCenterReports.setBillCorpEnName(item.getBillCorpEnName());
+			feeCenterReports.setBillShortName(item.getBillShortName());
 			feeCenterReports.setFeeCnName(item.getFeeCnName());
 			feeCenterReports.setFeeEnName(item.getFeeEnName());
 			if (MagicValues.D.equals(item.getDc())) {

+ 5 - 2
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/PutBoxController.java

@@ -32,6 +32,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.los.box.entity.PutBox;
 import org.springblade.los.box.entity.PutBoxItems;
+import org.springblade.los.box.entity.TradingBox;
 import org.springblade.los.box.service.IPutBoxItemsService;
 import org.springblade.los.box.service.IPutBoxService;
 import org.springblade.los.business.sea.entity.SeaContainerNumberItem;
@@ -97,8 +98,10 @@ public class PutBoxController extends BladeController {
 			.like(ObjectUtils.isNotNull(putBox.getSrcContainerNumber()), PutBox::getSrcContainerNumber, putBox.getSrcContainerNumber())
 			.like(ObjectUtils.isNotNull(putBox.getSrcNo()), PutBox::getSrcNo, putBox.getSrcNo())
 			.like(ObjectUtils.isNotNull(putBox.getCode()), PutBox::getCode, putBox.getCode())
-			.eq(ObjectUtils.isNotNull(putBox.getPriorityLevel()), PutBox::getPriorityLevel, putBox.getPriorityLevel())
-			.orderByAsc(PutBox::getPriorityLevel);
+			.eq(ObjectUtils.isNotNull(putBox.getPriorityLevel()), PutBox::getPriorityLevel, putBox.getPriorityLevel());
+		lambdaQueryWrapper.orderByDesc(PutBox::getPolCname);
+		lambdaQueryWrapper.orderByDesc(PutBox::getPodCname);
+		lambdaQueryWrapper.orderByDesc(PutBox::getPriorityLevel);
 		if (ObjectUtils.isNotNull(putBox.getEffectiveStartDate()) && ObjectUtils.isNotNull(putBox.getEffectiveEndDate())) {
 			SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
 			lambdaQueryWrapper.apply(ObjectUtils.isNotNull(putBox.getEffectiveStartDate()), "DATE_FORMAT(effective_start_date,'%Y-%m-%d') >= '" + formatter.format(putBox.getEffectiveStartDate()) + "'")

+ 3 - 1
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/TradingBoxController.java

@@ -121,7 +121,9 @@ public class TradingBoxController extends BladeController {
 			lambdaQueryWrapper.ge(TradingBox::getPurchaseDate, tradingBox.getPurchaseDateList().get(0));
 			lambdaQueryWrapper.le(TradingBox::getPurchaseDate, tradingBox.getPurchaseDateList().get(1));
 		}
-		lambdaQueryWrapper.orderByDesc(TradingBox::getCreateTime);
+		lambdaQueryWrapper.orderByDesc(TradingBox::getPolCname);
+		lambdaQueryWrapper.orderByDesc(TradingBox::getPodCname);
+		lambdaQueryWrapper.orderByDesc(TradingBox::getPriorityLevel);
 		IPage<TradingBox> pages = tradingBoxService.page(Condition.getPage(query), lambdaQueryWrapper);
 		if (!pages.getRecords().isEmpty()) {
 			List<Long> ids = pages.getRecords().stream().map(TradingBox::getId).collect(Collectors.toList());

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -5937,7 +5937,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public R refundCabin(Bills bills) {
-		if (new Date().compareTo(bills.getEtd()) > 0) {
+		if (new Date().compareTo(bills.getActualEtd()) > 0) {
 			throw new RuntimeException("该订单已开船,退舱失败");
 		}
 		bills.setUpdateUserName(AuthUtil.getUserName());

+ 18 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/controller/FeeCenterController.java

@@ -282,5 +282,23 @@ public class FeeCenterController extends BladeController {
 		return R.data(feeCenterService.getFeeCenterCorpIds(billId, dc, type));
 	}
 
+	/**
+	 * 同步费用结算单位提示
+	 */
+	@GetMapping("/synchronizationPrompt")
+	@ApiOperationSupport(order = 2)
+	public R synchronizationPrompt(@RequestParam("billId") Long billId, @RequestParam("dc") String dc) {
+		return feeCenterService.synchronizationPrompt(billId, dc);
+	}
+
+	/**
+	 * 同步费用结算单位
+	 */
+	@GetMapping("/synchronizationSettlementObject")
+	@ApiOperationSupport(order = 2)
+	public R synchronizationSettlementObject(@RequestParam("billId") Long billId, @RequestParam("dc") String dc) {
+		return feeCenterService.synchronizationSettlementObject(billId, dc);
+	}
+
 
 }

+ 4 - 0
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/IFeeCenterService.java

@@ -92,4 +92,8 @@ public interface IFeeCenterService extends IService<FeeCenter> {
 	R quotationImportBatch(String billsIds, String quotationId);
 
     R delete(List<Long> longList);
+
+	R synchronizationPrompt(Long billId, String dc);
+
+	R synchronizationSettlementObject(Long billId, String dc);
 }

+ 255 - 4
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterServiceImpl.java

@@ -63,10 +63,7 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.time.LocalDate;
 import java.time.ZoneId;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -2517,6 +2514,260 @@ public class FeeCenterServiceImpl extends ServiceImpl<FeeCenterMapper, FeeCenter
 		return R.data(this.removeByIds(longList));
 	}
 
+	@Override
+	public R synchronizationPrompt(Long billId, String dc) {
+		if (ObjectUtils.isNull(billId) || ObjectUtils.isNull(dc)) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		List<Map<String, String>> mapList = new ArrayList<>();
+		Bills bills = billsMapper.selectById(billId);
+		if (bills == null) {
+			throw new RuntimeException("未查到单据明细");
+		}
+		List<Long> idList = new ArrayList<>();
+		idList.add(bills.getCorpId());
+		idList.add(bills.getCyId());
+		idList.add(bills.getCarrierId());
+		idList.add(bills.getBookingAgentId());
+		idList.add(bills.getMconsigneeId());
+		idList.add(bills.getMnotifyId());
+		idList.add(bills.getForeignAgencyId());
+		idList.add(bills.getShippingAgencyId());
+		List<BCorps> corpsList = corpsMapper.selectList(new LambdaQueryWrapper<BCorps>()
+			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
+			.eq(BCorps::getIsDeleted, 0)
+			.in(BCorps::getId, idList));
+		List<FeeCenter> feeCenterList = baseMapper.selectList(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getPid, billId)
+			.eq(FeeCenter::getDc, dc)
+			.isNotNull(FeeCenter::getCorpType));
+		if (feeCenterList.isEmpty()) {
+			throw new RuntimeException("未查到可同步数据");
+		}
+		for (FeeCenter feeCenter : feeCenterList) {
+			if (1 == feeCenter.getAccStatus()) {
+				throw new RuntimeException("费用:" + feeCenter.getFeeCnName() + "已生成账单");
+			}
+			Map<String, String> map = new HashMap<>();
+			map.put("feeCnName", feeCenter.getFeeCnName());
+			map.put("corpCnName", feeCenter.getCorpCnName());
+			if ("国内直接客户,国外直接客户,国内同行及代理".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCorpId())) {
+					feeCenter.setCorpId(bills.getCorpId());
+					feeCenter.setCorpCnName(bills.getCorpCnName());
+					feeCenter.setCorpEnName(bills.getCorpEnName());
+					feeCenter.setShortName(bills.getShortName());
+					BCorps bCorps = null;
+					if (!corpsList.isEmpty()) {
+						bCorps = corpsList.stream().filter(e -> e.getId().equals(bills.getCorpId())).findFirst().orElse(null);
+					}
+					if (bCorps != null) {
+						feeCenter.setGenerationCorpId(bCorps.getBookingAgentId());
+						feeCenter.setGenerationCorpCnName(bCorps.getBookingAgentCnName());
+						feeCenter.setGenerationCorpEnName(bCorps.getBookingAgentEnName());
+					}
+					map.put("corpCnNameNew", feeCenter.getCorpCnName());
+					mapList.add(map);
+				}
+			} else if ("国外同行及代理".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getForeignAgencyId())) {
+					feeCenter.setCorpId(bills.getForeignAgencyId());
+					feeCenter.setCorpCnName(bills.getForeignAgencyCnName());
+					feeCenter.setCorpEnName(bills.getForeignAgencyEnName());
+					feeCenter.setShortName(bills.getForeignAgencyCnName());
+					if (!corpsList.isEmpty()) {
+						BCorps foreignAgency = corpsList.stream().filter(e -> e.getId().equals(bills.getForeignAgencyId())).findFirst().orElse(null);
+						if (foreignAgency != null) {
+							feeCenter.setGenerationCorpId(foreignAgency.getBookingAgentId());
+							feeCenter.setGenerationCorpCnName(foreignAgency.getBookingAgentCnName());
+							feeCenter.setGenerationCorpEnName(foreignAgency.getBookingAgentEnName());
+						}
+					}
+					map.put("corpCnNameNew", feeCenter.getCorpCnName());
+					mapList.add(map);
+				}
+			} else if ("船公司".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCarrierId())) {
+					feeCenter.setCorpId(bills.getCarrierId());
+					feeCenter.setCorpCnName(bills.getCarrierCnName());
+					feeCenter.setCorpEnName(bills.getCarrierEnName());
+					feeCenter.setShortName(bills.getCarrierShortName());
+					if (!corpsList.isEmpty()) {
+						BCorps carrier = corpsList.stream().filter(e -> e.getId().equals(bills.getCarrierId())).findFirst().orElse(null);
+						if (carrier != null) {
+							feeCenter.setGenerationCorpId(carrier.getBookingAgentId());
+							feeCenter.setGenerationCorpCnName(carrier.getBookingAgentCnName());
+							feeCenter.setGenerationCorpEnName(carrier.getBookingAgentEnName());
+						}
+					}
+					map.put("corpCnNameNew", feeCenter.getCorpCnName());
+					mapList.add(map);
+				}
+			} else if ("场站".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCyId())) {
+					feeCenter.setCorpId(bills.getCyId());
+					feeCenter.setCorpCnName(bills.getCyCnName());
+					feeCenter.setCorpEnName(bills.getCyEnName());
+					feeCenter.setShortName(bills.getCyCnName());
+					BCorps bCorps = null;
+					if (!corpsList.isEmpty()) {
+						bCorps = corpsList.stream().filter(e -> e.getId().equals(bills.getCyId())).findFirst().orElse(null);
+					}
+					if (bCorps != null) {
+						feeCenter.setGenerationCorpId(bCorps.getBookingAgentId());
+						feeCenter.setGenerationCorpCnName(bCorps.getBookingAgentCnName());
+						feeCenter.setGenerationCorpEnName(bCorps.getBookingAgentEnName());
+					}
+					map.put("corpCnNameNew", feeCenter.getCorpCnName());
+					mapList.add(map);
+				}
+			} else if ("船代".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCyId())) {
+					feeCenter.setCorpId(bills.getShippingAgencyId());
+					feeCenter.setCorpCnName(bills.getShippingAgencyCname());
+					feeCenter.setCorpEnName(bills.getShippingAgencyEname());
+					feeCenter.setShortName(bills.getShippingAgencyCname());
+					if (!corpsList.isEmpty()) {
+						BCorps shippingAgency = corpsList.stream().filter(e -> e.getId().equals(bills.getShippingAgencyId())).findFirst().orElse(null);
+						if (shippingAgency != null) {
+							feeCenter.setGenerationCorpId(shippingAgency.getBookingAgentId());
+							feeCenter.setGenerationCorpCnName(shippingAgency.getBookingAgentCnName());
+							feeCenter.setGenerationCorpEnName(shippingAgency.getBookingAgentEnName());
+						}
+					}
+					map.put("corpCnNameNew", feeCenter.getCorpCnName());
+					mapList.add(map);
+				}
+			}
+		}
+		return R.data(mapList);
+	}
+
+	@Override
+	public R synchronizationSettlementObject(Long billId, String dc) {
+		if (ObjectUtils.isNull(billId) || ObjectUtils.isNull(dc)) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		List<FeeCenter> feeCenters = new ArrayList<>();
+		Bills bills = billsMapper.selectById(billId);
+		if (bills == null) {
+			throw new RuntimeException("未查到单据明细");
+		}
+		List<Long> idList = new ArrayList<>();
+		idList.add(bills.getCorpId());
+		idList.add(bills.getCyId());
+		idList.add(bills.getCarrierId());
+		idList.add(bills.getBookingAgentId());
+		idList.add(bills.getMconsigneeId());
+		idList.add(bills.getMnotifyId());
+		idList.add(bills.getForeignAgencyId());
+		idList.add(bills.getShippingAgencyId());
+		List<BCorps> corpsList = corpsMapper.selectList(new LambdaQueryWrapper<BCorps>()
+			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
+			.eq(BCorps::getIsDeleted, 0)
+			.in(BCorps::getId, idList));
+		List<FeeCenter> feeCenterList = baseMapper.selectList(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getPid, billId)
+			.eq(FeeCenter::getDc, dc)
+			.isNotNull(FeeCenter::getCorpType));
+		if (feeCenterList.isEmpty()) {
+			throw new RuntimeException("未查到可同步数据");
+		}
+		for (FeeCenter feeCenter : feeCenterList) {
+			if ("国内直接客户,国外直接客户,国内同行及代理".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCorpId())) {
+					feeCenter.setCorpId(bills.getCorpId());
+					feeCenter.setCorpCnName(bills.getCorpCnName());
+					feeCenter.setCorpEnName(bills.getCorpEnName());
+					feeCenter.setShortName(bills.getShortName());
+					BCorps bCorps = null;
+					if (!corpsList.isEmpty()) {
+						bCorps = corpsList.stream().filter(e -> e.getId().equals(bills.getCorpId())).findFirst().orElse(null);
+					}
+					if (bCorps != null) {
+						feeCenter.setGenerationCorpId(bCorps.getBookingAgentId());
+						feeCenter.setGenerationCorpCnName(bCorps.getBookingAgentCnName());
+						feeCenter.setGenerationCorpEnName(bCorps.getBookingAgentEnName());
+					}
+					feeCenters.add(feeCenter);
+				}
+			} else if ("国外同行及代理".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getForeignAgencyId())) {
+					feeCenter.setCorpId(bills.getForeignAgencyId());
+					feeCenter.setCorpCnName(bills.getForeignAgencyCnName());
+					feeCenter.setCorpEnName(bills.getForeignAgencyEnName());
+					feeCenter.setShortName(bills.getForeignAgencyCnName());
+					if (!corpsList.isEmpty()) {
+						BCorps foreignAgency = corpsList.stream().filter(e -> e.getId().equals(bills.getForeignAgencyId())).findFirst().orElse(null);
+						if (foreignAgency != null) {
+							feeCenter.setGenerationCorpId(foreignAgency.getBookingAgentId());
+							feeCenter.setGenerationCorpCnName(foreignAgency.getBookingAgentCnName());
+							feeCenter.setGenerationCorpEnName(foreignAgency.getBookingAgentEnName());
+						}
+					}
+					feeCenters.add(feeCenter);
+				}
+			} else if ("船公司".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCarrierId())) {
+					feeCenter.setCorpId(bills.getCarrierId());
+					feeCenter.setCorpCnName(bills.getCarrierCnName());
+					feeCenter.setCorpEnName(bills.getCarrierEnName());
+					feeCenter.setShortName(bills.getCarrierShortName());
+					if (!corpsList.isEmpty()) {
+						BCorps carrier = corpsList.stream().filter(e -> e.getId().equals(bills.getCarrierId())).findFirst().orElse(null);
+						if (carrier != null) {
+							feeCenter.setGenerationCorpId(carrier.getBookingAgentId());
+							feeCenter.setGenerationCorpCnName(carrier.getBookingAgentCnName());
+							feeCenter.setGenerationCorpEnName(carrier.getBookingAgentEnName());
+						}
+					}
+					feeCenters.add(feeCenter);
+				}
+			} else if ("场站".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCyId())) {
+					feeCenter.setCorpId(bills.getCyId());
+					feeCenter.setCorpCnName(bills.getCyCnName());
+					feeCenter.setCorpEnName(bills.getCyEnName());
+					feeCenter.setShortName(bills.getCyCnName());
+					BCorps bCorps = null;
+					if (!corpsList.isEmpty()) {
+						bCorps = corpsList.stream().filter(e -> e.getId().equals(bills.getCyId())).findFirst().orElse(null);
+					}
+					if (bCorps != null) {
+						feeCenter.setGenerationCorpId(bCorps.getBookingAgentId());
+						feeCenter.setGenerationCorpCnName(bCorps.getBookingAgentCnName());
+						feeCenter.setGenerationCorpEnName(bCorps.getBookingAgentEnName());
+					}
+					feeCenters.add(feeCenter);
+				}
+			} else if ("船代".contains(feeCenter.getCorpType())) {
+				if (!feeCenter.getCorpId().equals(bills.getCyId())) {
+					feeCenter.setCorpId(bills.getShippingAgencyId());
+					feeCenter.setCorpCnName(bills.getShippingAgencyCname());
+					feeCenter.setCorpEnName(bills.getShippingAgencyEname());
+					feeCenter.setShortName(bills.getShippingAgencyCname());
+					if (!corpsList.isEmpty()) {
+						BCorps shippingAgency = corpsList.stream().filter(e -> e.getId().equals(bills.getShippingAgencyId())).findFirst().orElse(null);
+						if (shippingAgency != null) {
+							feeCenter.setGenerationCorpId(shippingAgency.getBookingAgentId());
+							feeCenter.setGenerationCorpCnName(shippingAgency.getBookingAgentCnName());
+							feeCenter.setGenerationCorpEnName(shippingAgency.getBookingAgentEnName());
+						}
+					}
+					feeCenters.add(feeCenter);
+				}
+			}
+		}
+		if (!feeCenters.isEmpty()) {
+			this.updateBatchById(feeCenters);
+		}
+		return R.data(feeCenters);
+	}
+
 	private FeeCenter addFeeCenterQuotation(Bills bills, String dc, int count, BFees fees, String corpType,
 											PreContainers items, List<BCurExrate> curExrateList,
 											MktSlotQuotation mktSlotQuotations, String exrateType, String type) {