Browse Source

1.客户托书模块相关接口编写及调试
2.RT&FD统计模块列表,导出接口编写及调试
3.用箱计划模块相关接口编写及调试

纪新园 9 months ago
parent
commit
36fc7cbc9f
33 changed files with 2160 additions and 135 deletions
  1. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/dto/UseBoxPlanDTO.java
  2. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/dto/UseBoxPlanItemDTO.java
  3. 138 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/UseBoxPlan.java
  4. 168 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/UseBoxPlanItem.java
  5. 119 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/excel/UseBoxPlanItemExcel.java
  6. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/vo/UseBoxPlanItemVO.java
  7. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/vo/UseBoxPlanVO.java
  8. 27 2
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java
  9. 17 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/PreContainers.java
  10. 10 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/BoxPoolController.java
  11. 21 2
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/RouteCostProfitController.java
  12. 145 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/UseBoxPlanController.java
  13. 142 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/controller/UseBoxPlanItemController.java
  14. 45 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanItemMapper.java
  15. 102 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanItemMapper.xml
  16. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanMapper.java
  17. 30 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanMapper.xml
  18. 3 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/IPutBoxService.java
  19. 3 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/IRouteCostService.java
  20. 45 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/IUseBoxPlanItemService.java
  21. 48 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/IUseBoxPlanService.java
  22. 60 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java
  23. 109 5
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/RouteCostServiceImpl.java
  24. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/TradingBoxServiceImpl.java
  25. 49 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/UseBoxPlanItemServiceImpl.java
  26. 199 0
      blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/UseBoxPlanServiceImpl.java
  27. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/business/mktSlot/controller/MktSlotController.java
  28. 3 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BookingCabinController.java
  29. 329 98
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  30. 9 8
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/PreContainersServiceImpl.java
  31. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/check/controller/AuditProecessController.java
  32. 43 16
      blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java
  33. 110 0
      blade-service/blade-los/src/main/java/org/springblade/los/excel/RTFDProfitExcel.java

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/dto/UseBoxPlanDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.dto;
+
+import org.springblade.los.box.entity.UseBoxPlan;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 用箱计划表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UseBoxPlanDTO extends UseBoxPlan {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/dto/UseBoxPlanItemDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.dto;
+
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 用箱计划明细表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class UseBoxPlanItemDTO extends UseBoxPlanItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 138 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/UseBoxPlan.java

@@ -0,0 +1,138 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 用箱计划表实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@TableName("container_use_box_plan")
+@ApiModel(value = "UseBoxPlan对象", description = "用箱计划表")
+public class UseBoxPlan implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 分公司
+	 */
+	@ApiModelProperty(value = "分公司")
+	private String branchName;
+	/**
+	 * 分公司 Id
+	 */
+	@ApiModelProperty(value = "分公司 Id")
+	private String branchId;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 年
+	 */
+	@ApiModelProperty(value = "年")
+	private String year;
+	/**
+	 * 周
+	 */
+	@ApiModelProperty(value = "周")
+	private String week;
+	/**
+	 * 开始日期
+	 */
+	@ApiModelProperty(value = "开始日期")
+	private Date startDate;
+	/**
+	 * 结束日期
+	 */
+	@ApiModelProperty(value = "结束日期")
+	private Date endDate;
+
+	/**
+	 * 租户号
+	 */
+	@ApiModelProperty(value = "租户号")
+	private String tenantId;
+
+	/**
+	 * 系统号
+	 */
+	@ApiModelProperty(value = "系统号")
+	private String sysNo;
+
+	/**
+	 * 明细
+	 */
+	@TableField(exist = false)
+	private List<UseBoxPlanItem> useBoxPlanItemList;
+
+
+}

+ 168 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/entity/UseBoxPlanItem.java

@@ -0,0 +1,168 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 用箱计划明细表实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@TableName("container_use_box_plan_item")
+@ApiModel(value = "UseBoxPlanItem对象", description = "用箱计划明细表")
+public class UseBoxPlanItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+
+	/**
+	 * 主表id
+	 */
+	@ApiModelProperty(value = "主表id")
+	private Long pid;
+	/**
+	 * 分公司
+	 */
+	@ApiModelProperty(value = "分公司")
+	private String branchName;
+	/**
+	 * 分公司 Id
+	 */
+	@ApiModelProperty(value = "分公司 Id")
+	private String branchId;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 目的港
+	 */
+	@ApiModelProperty(value = "目的港")
+	private Long podId;
+	/**
+	 * 目的港中文
+	 */
+	@ApiModelProperty(value = "目的港中文")
+	private String podCname;
+	/**
+	 * 目的港英文
+	 */
+	@ApiModelProperty(value = "目的港英文")
+	private String podEname;
+	/**
+	 * 目的港代码
+	 */
+	@ApiModelProperty(value = "目的港代码")
+	private String podCode;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price20gp;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price40gp;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price40hc;
+
+	/**
+	 * 租户号
+	 */
+	@ApiModelProperty(value = "租户号")
+	private String tenantId;
+
+	/**
+	 * 年
+	 */
+	@TableField(exist = false)
+	private String year;
+	/**
+	 * 周
+	 */
+	@TableField(exist = false)
+	private String week;
+	/**
+	 * 开始日期
+	 */
+	@TableField(exist = false)
+	private Date startDate;
+	/**
+	 * 结束日期
+	 */
+	@TableField(exist = false)
+	private Date endDate;
+
+
+}

+ 119 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/excel/UseBoxPlanItemExcel.java

@@ -0,0 +1,119 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.excel;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 用箱计划明细表实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class UseBoxPlanItemExcel implements Serializable {
+
+	/**
+	 * 所属公司
+	 */
+	@ExcelProperty(value = "所属公司")
+	private String branchName;
+
+	/**
+	 * 周
+	 */
+	@ExcelProperty(value = "WEEK")
+	private String week;
+
+	/**
+	 * 目的港
+	 */
+	@ExcelProperty(value = "目的港")
+	private String podCname;
+
+	/**
+	 * 20GP单价
+	 */
+	@ExcelProperty(value = "20GP")
+	private BigDecimal price20gp;
+	/**
+	 * 40GP单价
+	 */
+	@ExcelProperty(value = "40GP")
+	private BigDecimal price40gp;
+	/**
+	 * 40HC单价
+	 */
+	@ExcelProperty(value = "40HC")
+	private BigDecimal price40hc;
+	/**
+	 * 创建人
+	 */
+	@ExcelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建时间
+	 */
+	@ExcelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ExcelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ExcelProperty(value = "修改时间")
+	private Date updateTime;
+
+	/**
+	 * 租户号
+	 */
+	@ExcelIgnore
+	private String tenantId;
+
+	/**
+	 * 年
+	 */
+	@ExcelIgnore
+	private String year;
+	/**
+	 * 开始日期
+	 */
+	@ExcelIgnore
+	private Date startDate;
+	/**
+	 * 结束日期
+	 */
+	@ExcelIgnore
+	private Date endDate;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/vo/UseBoxPlanItemVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.vo;
+
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 用箱计划明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "UseBoxPlanItemVO对象", description = "用箱计划明细表")
+public class UseBoxPlanItemVO extends UseBoxPlanItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/box/vo/UseBoxPlanVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.vo;
+
+import org.springblade.los.box.entity.UseBoxPlan;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 用箱计划表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "UseBoxPlanVO对象", description = "用箱计划表")
+public class UseBoxPlanVO extends UseBoxPlan {
+	private static final long serialVersionUID = 1L;
+
+}

+ 27 - 2
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java

@@ -114,9 +114,9 @@ public class Bills implements Serializable {
 	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date updateTime;
 	/**
-	 * 业务类型, SE=海运出口 SI=海运进口
+	 * 业务类型, SE=海运出口 SI=海运进口 YDC = 预定舱  KHTS = 客户托书
 	 */
-	@ApiModelProperty(value = "业务类型, SE=海运出口 SI=海运进口")
+	@ApiModelProperty(value = "业务类型")
 	private String businessType;
 	/**
 	 * 业务类型
@@ -2431,5 +2431,30 @@ public class Bills implements Serializable {
 	@TableField(exist = false)
 	private String type;
 
+	/**
+	 * 返空pod场站
+	 */
+	@TableField(exist = false)
+	private Long podStationId;
+	/**
+	 * 返空pod场站编码
+	 */
+	@TableField(exist = false)
+	private String podStationCode;
+	/**
+	 * 返空pod场站中文
+	 */
+	@TableField(exist = false)
+	private String podStationCname;
+	/**
+	 * 返空pod场站英文
+	 */
+	@TableField(exist = false)
+	private String podStationEname;
 
+	/**
+	 * pod场站返空时间
+	 */
+	@TableField(exist = false)
+	private Date returnEmptyTime;
 }

+ 17 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/PreContainers.java

@@ -334,5 +334,22 @@ public class PreContainers implements Serializable {
 	@ApiModelProperty(value = "放箱号状态")
 	private String containerNumberStatus;
 
+	/**
+	 * 销售价
+	 */
+	@ApiModelProperty(value = "销售价")
+	private BigDecimal salesPrice;
+	/**
+	 * 成本价
+	 */
+	@ApiModelProperty(value = "成本价")
+	private BigDecimal costPrice;
+
+	/**
+	 * 海运费
+	 */
+	@ApiModelProperty(value = "海运费")
+	private BigDecimal oceanFreight;
+
 
 }

+ 10 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/BoxPoolController.java

@@ -33,6 +33,7 @@ import org.springblade.los.box.excel.EmptyContainerAppearanceAnalysis;
 import org.springblade.los.box.excel.EmptyContainerEntry;
 import org.springblade.los.box.excel.GiveAnEncore;
 import org.springblade.los.box.service.IPutBoxService;
+import org.springblade.los.business.sea.entity.Bills;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -178,4 +179,13 @@ public class BoxPoolController extends BladeController {
 	}
 
 
+	/**
+	 * 海运进口 POD返空
+	 */
+	@PostMapping("/returnEmptyPOD")
+	@RepeatSubmit
+	public R returnEmptyPOD(@RequestBody Bills bills) {
+		return putBoxService.returnEmptyPOD(bills);
+	}
+
 }

+ 21 - 2
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/RouteCostProfitController.java

@@ -30,6 +30,7 @@ import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.los.box.service.IPutBoxService;
 import org.springblade.los.box.service.IRouteCostService;
+import org.springblade.los.excel.RTFDProfitExcel;
 import org.springblade.los.excel.RouteCostProfitExcel;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -59,8 +60,6 @@ public class RouteCostProfitController extends BladeController {
 	 * 分页 航线利润
 	 */
 	@GetMapping("/listRouteCostProfit")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入routeCost")
 	public R<IPage<RouteCostProfitExcel>> listRouteCostProfit(RouteCostProfitExcel routeCost, Query query) {
 		routeCost.setTenantId(AuthUtil.getTenantId());
 		IPage<RouteCostProfitExcel> pages = routeCostService.listRouteCostProfit(Condition.getPage(query), routeCost);
@@ -105,5 +104,25 @@ public class RouteCostProfitController extends BladeController {
 		ExcelUtil.export(response, "航线利润", "航线利润", excelList, RouteCostProfitExcel.class);
 	}
 
+	/**
+	 * 分页 航线利润
+	 */
+	@GetMapping("/listRTFDProfit")
+	public R<List<RTFDProfitExcel>> listRTFDProfit(RTFDProfitExcel profitExcel) {
+		profitExcel.setTenantId(AuthUtil.getTenantId());
+		List<RTFDProfitExcel> list = routeCostService.RTFDProfitAll(profitExcel);
+		return R.data(list);
+	}
+
+
+	/**
+	 * 导出 航线利润
+	 */
+	@GetMapping("/exportRTFDProfit")
+	public void exportRTFDProfit(RTFDProfitExcel profitExcel, HttpServletResponse response) {
+		List<RTFDProfitExcel> excelList = routeCostService.RTFDProfitAll(profitExcel);
+		ExcelUtil.export(response, "航线利润", "航线利润", excelList, RTFDProfitExcel.class);
+	}
+
 
 }

+ 145 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/UseBoxPlanController.java

@@ -0,0 +1,145 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.los.box.entity.UseBoxPlan;
+import org.springblade.los.box.service.IUseBoxPlanService;
+import org.springblade.los.box.vo.UseBoxPlanVO;
+import org.springblade.los.business.sea.entity.Bills;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 用箱计划表 控制器
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/useboxplan")
+@Api(value = "用箱计划表", tags = "用箱计划表接口")
+public class UseBoxPlanController extends BladeController {
+
+	private final IUseBoxPlanService useBoxPlanService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入useBoxPlan")
+	public R<UseBoxPlan> detail(UseBoxPlan useBoxPlan) {
+		UseBoxPlan detail = useBoxPlanService.detail(useBoxPlan);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 用箱计划表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入useBoxPlan")
+	public R<IPage<UseBoxPlan>> list(UseBoxPlan useBoxPlan, Query query) {
+		LambdaQueryWrapper<UseBoxPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(UseBoxPlan::getIsDeleted, 0)
+			.eq(UseBoxPlan::getTenantId, AuthUtil.getTenantId())
+			.like(ObjectUtils.isNotNull(useBoxPlan.getSysNo()), UseBoxPlan::getSysNo, useBoxPlan.getSysNo())
+			.eq(ObjectUtils.isNotNull(useBoxPlan.getYear()), UseBoxPlan::getYear, useBoxPlan.getYear())
+			.eq(ObjectUtils.isNotNull(useBoxPlan.getWeek()), UseBoxPlan::getWeek, useBoxPlan.getWeek())
+			.ge(ObjectUtils.isNotNull(useBoxPlan.getStartDate()),UseBoxPlan::getStartDate, useBoxPlan.getStartDate())
+			.le(ObjectUtils.isNotNull(useBoxPlan.getEndDate()),UseBoxPlan::getEndDate, useBoxPlan.getEndDate())
+			.orderByDesc(UseBoxPlan::getCreateTime);
+		IPage<UseBoxPlan> pages = useBoxPlanService.page(Condition.getPage(query), lambdaQueryWrapper);
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 用箱计划表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入useBoxPlan")
+	public R<IPage<UseBoxPlanVO>> page(UseBoxPlanVO useBoxPlan, Query query) {
+		IPage<UseBoxPlanVO> pages = useBoxPlanService.selectUseBoxPlanPage(Condition.getPage(query), useBoxPlan);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 用箱计划表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入useBoxPlan")
+	public R save(@Valid @RequestBody UseBoxPlan useBoxPlan) {
+		return R.status(useBoxPlanService.save(useBoxPlan));
+	}
+
+	/**
+	 * 修改 用箱计划表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入useBoxPlan")
+	public R update(@Valid @RequestBody UseBoxPlan useBoxPlan) {
+		return R.status(useBoxPlanService.updateById(useBoxPlan));
+	}
+
+	/**
+	 * 新增或修改 用箱计划表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入useBoxPlan")
+	public R submit(@Valid @RequestBody UseBoxPlan useBoxPlan) {
+		return useBoxPlanService.submit(useBoxPlan);
+	}
+
+
+	/**
+	 * 删除 用箱计划表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(useBoxPlanService.removeByIds(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 提交用箱计划
+	 */
+	@PostMapping("/submitUseBoxPlan")
+	public R submitUseBoxPlan(@Valid @RequestBody UseBoxPlan useBoxPlan) {
+		return useBoxPlanService.submitUseBoxPlan(useBoxPlan);
+	}
+}

+ 142 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/controller/UseBoxPlanItemController.java

@@ -0,0 +1,142 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+import org.springblade.core.excel.util.ExcelUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.los.box.excel.UseBoxPlanItemExcel;
+import org.springblade.los.excel.RTFDProfitExcel;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import org.springblade.los.box.vo.UseBoxPlanItemVO;
+import org.springblade.los.box.service.IUseBoxPlanItemService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 用箱计划明细表 控制器
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/useboxplanitem")
+@Api(value = "用箱计划明细表", tags = "用箱计划明细表接口")
+public class UseBoxPlanItemController extends BladeController {
+
+	private final IUseBoxPlanItemService useBoxPlanItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入useBoxPlanItem")
+	public R<UseBoxPlanItem> detail(UseBoxPlanItem useBoxPlanItem) {
+		UseBoxPlanItem detail = useBoxPlanItemService.getOne(Condition.getQueryWrapper(useBoxPlanItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 用箱计划明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入useBoxPlanItem")
+	public R<IPage<UseBoxPlanItem>> list(UseBoxPlanItem useBoxPlanItem, Query query) {
+		IPage<UseBoxPlanItem> pages = useBoxPlanItemService.page(Condition.getPage(query), Condition.getQueryWrapper(useBoxPlanItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 用箱计划明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入useBoxPlanItem")
+	public R<IPage<UseBoxPlanItemExcel>> page(UseBoxPlanItemExcel useBoxPlanItem, Query query) {
+		IPage<UseBoxPlanItemExcel> pages = useBoxPlanItemService.selectUseBoxPlanItemPage(Condition.getPage(query), useBoxPlanItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 导出 航线利润
+	 */
+	@GetMapping("/exportUseBoxPlanItem")
+	public void exportUseBoxPlanItem(UseBoxPlanItemExcel useBoxPlanItem, HttpServletResponse response) {
+		List<UseBoxPlanItemExcel> excelList = useBoxPlanItemService.exportUseBoxPlanItem(useBoxPlanItem);
+		ExcelUtil.export(response, "航线利润", "航线利润", excelList, UseBoxPlanItemExcel.class);
+	}
+
+	/**
+	 * 新增 用箱计划明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入useBoxPlanItem")
+	public R save(@Valid @RequestBody UseBoxPlanItem useBoxPlanItem) {
+		return R.status(useBoxPlanItemService.save(useBoxPlanItem));
+	}
+
+	/**
+	 * 修改 用箱计划明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入useBoxPlanItem")
+	public R update(@Valid @RequestBody UseBoxPlanItem useBoxPlanItem) {
+		return R.status(useBoxPlanItemService.updateById(useBoxPlanItem));
+	}
+
+	/**
+	 * 新增或修改 用箱计划明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入useBoxPlanItem")
+	public R submit(@Valid @RequestBody UseBoxPlanItem useBoxPlanItem) {
+		return R.status(useBoxPlanItemService.saveOrUpdate(useBoxPlanItem));
+	}
+
+
+	/**
+	 * 删除 用箱计划明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(useBoxPlanItemService.removeByIds(Func.toLongList(ids)));
+	}
+
+}

+ 45 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanItemMapper.java

@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import org.springblade.los.box.excel.UseBoxPlanItemExcel;
+import org.springblade.los.box.vo.UseBoxPlanItemVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 用箱计划明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+public interface UseBoxPlanItemMapper extends BaseMapper<UseBoxPlanItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param useBoxPlanItem
+	 * @return
+	 */
+	List<UseBoxPlanItemExcel> selectUseBoxPlanItemPage(IPage page, @Param("data") UseBoxPlanItemExcel useBoxPlanItem);
+
+	List<UseBoxPlanItemExcel> exportUseBoxPlanItem(@Param("data")UseBoxPlanItemExcel useBoxPlanItem);
+}

+ 102 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanItemMapper.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.los.box.mapper.UseBoxPlanItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="useBoxPlanItemResultMap" type="org.springblade.los.box.entity.UseBoxPlanItem">
+        <id column="id" property="id"/>
+        <result column="branch_name" property="branchName"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_user_name" property="updateUserName"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="pod_id" property="podId"/>
+        <result column="pod_cname" property="podCname"/>
+        <result column="pod_ename" property="podEname"/>
+        <result column="pod_code" property="podCode"/>
+        <result column="price20gp" property="price20gp"/>
+        <result column="price40gp" property="price40gp"/>
+        <result column="price40hc" property="price40hc"/>
+    </resultMap>
+
+
+    <select id="selectUseBoxPlanItemPage" resultType="org.springblade.los.box.excel.UseBoxPlanItemExcel">
+        SELECT
+        plan.branch_name AS branchName,
+        plan.week AS week,
+        item.branch_name AS podCname,
+        item.price20gp AS price20gp,
+        item.price40gp AS price40gp,
+        item.price40hc AS price40hc,
+        item.create_user_name AS createUserName,
+        item.createTime AS createTime,
+        item.update_user_name AS updateUserName,
+        item.update_time AS updateTime,
+        FROM
+        container_use_box_plan_item item
+        LEFT JOIN container_use_box_plan plan ON item.pid = plan.id
+        WHERE
+        item.tenant_id = #{data.tenantId}
+        and plan.tenant_id = #{data.tenantId}
+        and item.is_deleted = '0'
+        and plan.is_deleted = '0'
+        <if test="data.branchId !=null and data.branchId != '' ">
+            AND plan.branch_id = #{data.branchId}
+        </if>
+        <if test="data.year !=null and data.year != '' ">
+            AND plan.`year` = #{data.year}
+        </if>
+        <if test="data.week !=null and data.week != '' ">
+            AND plan.`week` = #{data.week}
+        </if>
+        <if test="data.startDate !=null and data.startDate != ''">
+            AND plan.start_date &gt;= #{data.startDate}
+        </if>
+        <if test="data.endDate !=null and data.endDate != ''">
+            AND plan.end_date &lt;= #{data.endDate}
+        </if>
+    </select>
+    <select id="exportUseBoxPlanItem" resultType="org.springblade.los.box.excel.UseBoxPlanItemExcel">
+        SELECT
+        plan.branch_name AS branchName,
+        plan.week AS week,
+        item.branch_name AS podCname,
+        item.price20gp AS price20gp,
+        item.price40gp AS price40gp,
+        item.price40hc AS price40hc,
+        item.create_user_name AS createUserName,
+        item.createTime AS createTime,
+        item.update_user_name AS updateUserName,
+        item.update_time AS updateTime,
+        FROM
+        container_use_box_plan_item item
+        LEFT JOIN container_use_box_plan plan ON item.pid = plan.id
+        WHERE
+        item.tenant_id = #{data.tenantId}
+        and plan.tenant_id = #{data.tenantId}
+        and item.is_deleted = '0'
+        and plan.is_deleted = '0'
+        <if test="data.branchId !=null and data.branchId != '' ">
+            AND plan.branch_id = #{data.branchId}
+        </if>
+        <if test="data.year !=null and data.year != '' ">
+            AND plan.`year` = #{data.year}
+        </if>
+        <if test="data.week !=null and data.week != '' ">
+            AND plan.`week` = #{data.week}
+        </if>
+        <if test="data.startDate !=null and data.startDate != ''">
+            AND plan.start_date &gt;= #{data.startDate}
+        </if>
+        <if test="data.endDate !=null and data.endDate != ''">
+            AND plan.end_date &lt;= #{data.endDate}
+        </if>
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.mapper;
+
+import org.springblade.los.box.entity.UseBoxPlan;
+import org.springblade.los.box.vo.UseBoxPlanVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 用箱计划表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+public interface UseBoxPlanMapper extends BaseMapper<UseBoxPlan> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param useBoxPlan
+	 * @return
+	 */
+	List<UseBoxPlanVO> selectUseBoxPlanPage(IPage page, UseBoxPlanVO useBoxPlan);
+
+}

+ 30 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/mapper/UseBoxPlanMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.los.box.mapper.UseBoxPlanMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="useBoxPlanResultMap" type="org.springblade.los.box.entity.UseBoxPlan">
+        <id column="id" property="id"/>
+        <result column="branch_name" property="branchName"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_user_name" property="updateUserName"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="year" property="year"/>
+        <result column="week" property="week"/>
+        <result column="start_date" property="startDate"/>
+        <result column="end_date" property="endDate"/>
+    </resultMap>
+
+
+    <select id="selectUseBoxPlanPage" resultMap="useBoxPlanResultMap">
+        select * from container_use_box_plan where is_deleted = 0
+    </select>
+
+</mapper>

+ 3 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/IPutBoxService.java

@@ -30,6 +30,7 @@ import org.springblade.los.box.entity.TradingBox;
 import org.springblade.los.box.excel.EmptyContainerAppearance;
 import org.springblade.los.box.excel.EmptyContainerAppearanceAnalysis;
 import org.springblade.los.box.vo.PutBoxVO;
+import org.springblade.los.business.sea.entity.Bills;
 import org.springblade.los.excel.RouteCostProfitExcel;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -88,4 +89,6 @@ public interface IPutBoxService extends IService<PutBox> {
 	R giveAnEncoreAnalysis(MultipartFile file)throws IOException;
 
 	R returnEmptyAnalysis(MultipartFile file)throws IOException;
+
+	R returnEmptyPOD(Bills bills);
 }

+ 3 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/IRouteCostService.java

@@ -17,6 +17,7 @@
 package org.springblade.los.box.service;
 
 import org.springblade.core.tool.api.R;
+import org.springblade.los.excel.RTFDProfitExcel;
 import org.springblade.los.excel.RouteCostProfitExcel;
 import org.springblade.los.box.entity.RouteCost;
 import org.springblade.los.box.entity.RouteCostFee;
@@ -75,4 +76,6 @@ public interface IRouteCostService extends IService<RouteCost> {
 	R batchSubmission(String ids);
 
 	R batchRevoke(String ids);
+
+	List<RTFDProfitExcel> RTFDProfitAll(RTFDProfitExcel profitExcel);
 }

+ 45 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/IUseBoxPlanItemService.java

@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.service;
+
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import org.springblade.los.box.excel.UseBoxPlanItemExcel;
+import org.springblade.los.box.vo.UseBoxPlanItemVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 用箱计划明细表 服务类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+public interface IUseBoxPlanItemService extends IService<UseBoxPlanItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param useBoxPlanItem
+	 * @return
+	 */
+	IPage<UseBoxPlanItemExcel> selectUseBoxPlanItemPage(IPage<UseBoxPlanItemExcel> page, UseBoxPlanItemExcel useBoxPlanItem);
+
+	List<UseBoxPlanItemExcel> exportUseBoxPlanItem(UseBoxPlanItemExcel useBoxPlanItem);
+}

+ 48 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/IUseBoxPlanService.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.los.box.entity.UseBoxPlan;
+import org.springblade.los.box.vo.UseBoxPlanVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.business.sea.entity.Bills;
+
+/**
+ * 用箱计划表 服务类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+public interface IUseBoxPlanService extends IService<UseBoxPlan> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param useBoxPlan
+	 * @return
+	 */
+	IPage<UseBoxPlanVO> selectUseBoxPlanPage(IPage<UseBoxPlanVO> page, UseBoxPlanVO useBoxPlan);
+
+	UseBoxPlan detail(UseBoxPlan useBoxPlan);
+
+	R submit(UseBoxPlan useBoxPlan);
+
+	R submitUseBoxPlan(UseBoxPlan useBoxPlan);
+}

+ 60 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/PutBoxServiceImpl.java

@@ -3972,4 +3972,64 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
 		archivesFilesService.save(archivesFiles);
 		return R.data(analysisList);
 	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R returnEmptyPOD(Bills bills) {
+		if (bills.getId() == null || bills.getPodStationId() == null ||
+			bills.getReturnEmptyTime() == null || ObjectUtils.isNull(bills.getContainersList())) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		List<Containers> containersHYJKList = bills.getContainersList();
+		List<String> boxNum = containersHYJKList.stream().map(Containers::getCntrNo).filter(Objects::nonNull)
+			.collect(Collectors.toList());
+		if (boxNum.isEmpty()) {
+			throw new RuntimeException("所选配箱信息箱号不能为空");
+		}
+		Bills billsHYJK = billsMapper.selectById(bills.getId());
+		if (billsHYJK == null) {
+			throw new RuntimeException("未查到海运进口单据");
+		}
+		List<Long> idHYCKList = new ArrayList<>();
+		Bills billsHYCK = billsMapper.selectById(billsHYJK.getSrcBusId());
+		if (billsHYCK == null) {
+			throw new RuntimeException("未查到来源海运出口单据");
+		}
+		idHYCKList.add(billsHYCK.getId());
+		List<Bills> billsHYCKListFD = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
+			.eq(Bills::getTenantId, AuthUtil.getTenantId())
+			.eq(Bills::getIsDeleted, 0)
+			.eq(Bills::getMasterId, billsHYCK.getId()));
+		if (!billsHYCKListFD.isEmpty()) {
+			idHYCKList.addAll(billsHYCKListFD.stream().map(Bills::getId).collect(Collectors.toList()));
+		}
+		List<Containers> containersHYCKList = containersService.list(new LambdaQueryWrapper<Containers>()
+			.eq(Containers::getTenantId, AuthUtil.getTenantId())
+			.eq(Containers::getIsDeleted, 0)
+			.in(Containers::getPid, idHYCKList)
+			.in(Containers::getCntrNo, boxNum));
+		List<Containers> containersListNew = new ArrayList<>();
+		for (Containers item : containersHYJKList) {
+			item.setPodStationId(bills.getPodStationId());
+			item.setPodStationCname(bills.getPodStationCname());
+			item.setPodStationEname(bills.getPodStationEname());
+			item.setPodStationCode(bills.getPodStationCode());
+			item.setUpdateTime(new Date());
+			item.setUpdateUser(AuthUtil.getUserId());
+			item.setUpdateUserName(AuthUtil.getUserName());
+			containersListNew.add(item);
+		}
+		for (Containers item : containersHYCKList) {
+			item.setPodStationId(bills.getPodStationId());
+			item.setPodStationCname(bills.getPodStationCname());
+			item.setPodStationEname(bills.getPodStationEname());
+			item.setPodStationCode(bills.getPodStationCode());
+			item.setUpdateTime(new Date());
+			item.setUpdateUser(AuthUtil.getUserId());
+			item.setUpdateUserName(AuthUtil.getUserName());
+			containersListNew.add(item);
+		}
+
+		return null;
+	}
 }

+ 109 - 5
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/RouteCostServiceImpl.java

@@ -30,7 +30,10 @@ import org.springblade.los.basic.business.entity.BusinessType;
 import org.springblade.los.basic.business.service.IBusinessTypeService;
 import org.springblade.los.billno.entity.BusinessBillNo;
 import org.springblade.los.billno.service.IBusinessBillNoService;
-import org.springblade.los.box.entity.*;
+import org.springblade.los.box.entity.QuotationItem;
+import org.springblade.los.box.entity.RouteCost;
+import org.springblade.los.box.entity.RouteCostFee;
+import org.springblade.los.box.entity.RouteCostItem;
 import org.springblade.los.box.mapper.RouteCostMapper;
 import org.springblade.los.box.service.IQuotationItemService;
 import org.springblade.los.box.service.IRouteCostFeeService;
@@ -43,6 +46,7 @@ import org.springblade.los.check.entity.LosAuditPathsLevels;
 import org.springblade.los.check.service.IAuditPathsActsService;
 import org.springblade.los.check.service.IAuditPathsLevelsService;
 import org.springblade.los.check.service.IAuditProecessService;
+import org.springblade.los.excel.RTFDProfitExcel;
 import org.springblade.los.excel.RouteCostProfitExcel;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
@@ -52,10 +56,8 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -792,6 +794,108 @@ public class RouteCostServiceImpl extends ServiceImpl<RouteCostMapper, RouteCost
 		return R.data("操作成功");
 	}
 
+	@Override
+	public List<RTFDProfitExcel> RTFDProfitAll(RTFDProfitExcel profitExcel) {
+		if (ObjectUtils.isNull(profitExcel.getPolId()) || ObjectUtils.isNull(profitExcel.getPodLId())
+			|| ObjectUtils.isNull(profitExcel.getPodId())) {
+			throw new RuntimeException("请选择必要条件");
+		}
+		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+		List<RTFDProfitExcel> list = new ArrayList<>();
+		//POL-POD&L单据
+		String effectiveStartDate = "";
+		String effectiveEndDate = "";
+		if (ObjectUtils.isNotNull(profitExcel.getEffectiveStartDate())){
+			effectiveStartDate = formatter.format(profitExcel.getEffectiveStartDate());
+		}
+		if (ObjectUtils.isNotNull(profitExcel.getEffectiveEndDate())){
+			effectiveEndDate = formatter.format(profitExcel.getEffectiveEndDate());
+		}
+		List<RouteCost> routeCostList = baseMapper.selectList(new LambdaQueryWrapper<RouteCost>()
+			.eq(RouteCost::getTenantId, AuthUtil.getTenantId())
+			.eq(RouteCost::getIsDeleted, 0)
+			.eq(RouteCost::getBusinessType, "SOC")
+			.eq(RouteCost::getStatus, "审核通过")
+			.eq(RouteCost::getPodId, profitExcel.getPolId())
+			.eq(RouteCost::getDestinationId, profitExcel.getPodLId())
+			.apply(ObjectUtils.isNotNull(effectiveStartDate),
+				"DATE_FORMAT(effective_start_date,'%Y-%m-%d') >= '" + effectiveStartDate + "'")
+			.apply(ObjectUtils.isNotNull(effectiveEndDate),
+				"DATE_FORMAT(effective_end_date,'%Y-%m-%d') <= '" + effectiveEndDate + "'"));
+		//POD&L-POD单据
+		List<RouteCost> routeCostListPod = baseMapper.selectList(new LambdaQueryWrapper<RouteCost>()
+			.eq(RouteCost::getTenantId, AuthUtil.getTenantId())
+			.eq(RouteCost::getIsDeleted, 0)
+			.eq(RouteCost::getBusinessType, "SOC")
+			.eq(RouteCost::getStatus, "审核通过")
+			.eq(RouteCost::getPodId, profitExcel.getPodLId())
+			.apply("find_in_set(destination_id,'" + profitExcel.getPodId() + "')")
+			.apply(ObjectUtils.isNotNull(effectiveStartDate),
+				"DATE_FORMAT(effective_start_date,'%Y-%m-%d') >= '" + effectiveStartDate + "'")
+			.apply(ObjectUtils.isNotNull(effectiveEndDate),
+				"DATE_FORMAT(effective_end_date,'%Y-%m-%d') <= '" + effectiveEndDate + "'"));
+		if (routeCostList.isEmpty() || routeCostListPod.isEmpty()) {
+			return list;
+		}
+		List<Long> idList = new ArrayList<>();
+		idList.addAll(routeCostList.stream().map(RouteCost::getId).collect(Collectors.toList()));
+		idList.addAll(routeCostListPod.stream().map(RouteCost::getId).collect(Collectors.toList()));
+		//所有单据明细
+		List<RouteCostItem> routeCostItemList = routeCostItemService.list(new LambdaQueryWrapper<RouteCostItem>()
+			.eq(RouteCostItem::getTenantId, AuthUtil.getTenantId())
+			.eq(RouteCostItem::getIsDeleted, 0)
+			.in(RouteCostItem::getPid, idList));
+		//循环POL-POD&L单据
+		for (RouteCost itemPol : routeCostList) {
+			//POL-POD&L单据明细
+			List<RouteCostItem> costItemListPol = routeCostItemList.stream().filter(e -> e.getPid().equals(itemPol.getId()))
+				.collect(Collectors.toList());
+			//获取POL-POD&L单据明细箱型数组
+			List<String> boxType;
+			if (!costItemListPol.isEmpty()) {
+				boxType = costItemListPol.stream().map(RouteCostItem::getBoxType).filter(Objects::nonNull)
+					.distinct().collect(Collectors.toList());
+			} else {
+				boxType = new ArrayList<>();
+			}
+			//获取POL-POD&L单据中目的港为起运港的对应数据
+			List<RouteCost> podList = routeCostListPod.stream().filter(e -> e.getPodId().equals(itemPol.getDestinationId()))
+				.collect(Collectors.toList());
+			//获取POL-POD&L单据中目的港为起运港的对应数据明细
+			List<RouteCostItem> costItemListPod = new ArrayList<>();
+			if (!podList.isEmpty()) {
+				List<Long> idListPod = podList.stream().map(RouteCost::getId).collect(Collectors.toList());
+				costItemListPod = routeCostItemList.stream().filter(e -> idListPod.contains(e.getPid()))
+					.collect(Collectors.toList());
+				//添加不在箱型数组中的箱型
+				boxType.addAll(costItemListPod.stream().map(RouteCostItem::getBoxType).filter(Objects::nonNull)
+					.distinct().filter(e -> !boxType.contains(e)).collect(Collectors.toList()));
+			}
+
+			for (RouteCost itemPod : podList) {
+				for (String itemType : boxType) {
+					RTFDProfitExcel excel = new RTFDProfitExcel();
+					excel.setBoxType(itemType);
+					excel.setPolCname(itemPol.getPodCname());
+					excel.setPodLCname(itemPol.getDestinationCname());
+					excel.setPodCname(itemPod.getDestinationCname());
+					//获取POL-POD&L单据明细中对应箱型利润
+					BigDecimal profitPol = costItemListPol.stream().filter(e -> e.getBoxType().equals(itemType)).map(RouteCostItem::getProfit)
+						.reduce(BigDecimal.ZERO, BigDecimal::add);
+					//获取POD&L-POD单据明细中对应箱型利润
+					BigDecimal profitPod = costItemListPod.stream().filter(e -> e.getBoxType().equals(itemType) &&
+							e.getPid().equals(itemPod.getId())).map(RouteCostItem::getProfit)
+						.reduce(BigDecimal.ZERO, BigDecimal::add);
+					excel.setProfit(profitPol.add(profitPod));
+					excel.setRemarks(itemPod.getRemarks());
+					list.add(excel);
+				}
+			}
+		}
+		return list.stream().sorted(Comparator.comparing(RTFDProfitExcel::getProfit).reversed())
+			.collect(Collectors.toList());
+	}
+
 
 	/**
 	 * 合计费用成本

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/TradingBoxServiceImpl.java

@@ -1094,6 +1094,8 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
 		details.setBoxNumber(0);
 		details.setActualBoxNumber(0);
 		details.setRemainingBoxNumber(0);
+		details.setSuitcaseNum(0);
+		details.setNotSuitcaseNum(0);
 		details.setRentEndDate(null);
 		details.setPurchaseDate(null);
 		details.setAmountD(new BigDecimal("0.00"));

+ 49 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/UseBoxPlanItemServiceImpl.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.service.impl;
+
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import org.springblade.los.box.excel.UseBoxPlanItemExcel;
+import org.springblade.los.box.vo.UseBoxPlanItemVO;
+import org.springblade.los.box.mapper.UseBoxPlanItemMapper;
+import org.springblade.los.box.service.IUseBoxPlanItemService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 用箱计划明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Service
+public class UseBoxPlanItemServiceImpl extends ServiceImpl<UseBoxPlanItemMapper, UseBoxPlanItem> implements IUseBoxPlanItemService {
+
+	@Override
+	public IPage<UseBoxPlanItemExcel> selectUseBoxPlanItemPage(IPage<UseBoxPlanItemExcel> page, UseBoxPlanItemExcel useBoxPlanItem) {
+		return page.setRecords(baseMapper.selectUseBoxPlanItemPage(page, useBoxPlanItem));
+	}
+
+	@Override
+	public List<UseBoxPlanItemExcel> exportUseBoxPlanItem(UseBoxPlanItemExcel useBoxPlanItem) {
+		return baseMapper.exportUseBoxPlanItem(useBoxPlanItem);
+	}
+
+}

+ 199 - 0
blade-service/blade-los/src/main/java/org/springblade/los/box/service/impl/UseBoxPlanServiceImpl.java

@@ -0,0 +1,199 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.box.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+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.los.basic.business.entity.BusinessType;
+import org.springblade.los.basic.business.service.IBusinessTypeService;
+import org.springblade.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.service.IBusinessBillNoService;
+import org.springblade.los.box.entity.UseBoxPlan;
+import org.springblade.los.box.entity.UseBoxPlanItem;
+import org.springblade.los.box.mapper.UseBoxPlanMapper;
+import org.springblade.los.box.service.IUseBoxPlanItemService;
+import org.springblade.los.box.service.IUseBoxPlanService;
+import org.springblade.los.box.vo.UseBoxPlanVO;
+import org.springblade.system.feign.ISysClient;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 用箱计划表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-07-05
+ */
+@Service
+@AllArgsConstructor
+public class UseBoxPlanServiceImpl extends ServiceImpl<UseBoxPlanMapper, UseBoxPlan> implements IUseBoxPlanService {
+
+
+	private final IUseBoxPlanItemService useBoxPlanItemService;
+
+	private final IMessageClient messageClient;
+
+	private final IUserClient userClient;
+
+	private final IBusinessBillNoService businessBillNoService;
+
+	private final IBusinessTypeService bBusinessTypeService;
+
+	private final ISysClient sysClient;
+
+	@Override
+	public IPage<UseBoxPlanVO> selectUseBoxPlanPage(IPage<UseBoxPlanVO> page, UseBoxPlanVO useBoxPlan) {
+		return page.setRecords(baseMapper.selectUseBoxPlanPage(page, useBoxPlan));
+	}
+
+	@Override
+	public UseBoxPlan detail(UseBoxPlan useBoxPlan) {
+		if (useBoxPlan.getId() == null) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		UseBoxPlan detail = baseMapper.selectById(useBoxPlan.getId());
+		List<UseBoxPlanItem> useBoxPlanItemList = useBoxPlanItemService.list(new LambdaQueryWrapper<UseBoxPlanItem>()
+			.eq(UseBoxPlanItem::getTenantId, AuthUtil.getTenantId())
+			.eq(UseBoxPlanItem::getIsDeleted, 0)
+			.eq(UseBoxPlanItem::getPid, useBoxPlan.getId()));
+		detail.setUseBoxPlanItemList(useBoxPlanItemList.isEmpty() ? new ArrayList<>() : useBoxPlanItemList);
+		return detail;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R submit(UseBoxPlan useBoxPlan) {
+		String branchId;
+		String deptName = "";
+		if (ObjectUtils.isNull(useBoxPlan.getBranchId())) {
+			branchId = AuthUtil.getDeptId();
+		} else {
+			branchId = useBoxPlan.getBranchId();
+		}
+		//获取部门ids对应中文名
+		R<String> res = sysClient.getDeptName(Long.parseLong(branchId));
+		if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
+			deptName = res.getData();
+		}
+		if (useBoxPlan.getId() == null) {
+			BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
+				.select(BusinessType::getId)
+				.eq(BusinessType::getTenantId, AuthUtil.getTenantId())
+				.eq(BusinessType::getIsDeleted, 0)
+				.eq(BusinessType::getStatus, 0)
+				.eq(BusinessType::getCode, "YXJH"));
+			if (businessType == null) {
+				throw new RuntimeException("未找到可用业务类型");
+			}
+			BusinessBillNo businessBillNo = new BusinessBillNo();
+			businessBillNo.setBusinessTypeId(businessType.getId());
+			businessBillNo.setCode("YXJH");
+			businessBillNo.setBranchId(useBoxPlan.getBranchId());
+			R clientBillNo = businessBillNoService.getBillNoLos(businessBillNo);
+			if (!clientBillNo.isSuccess()) {
+				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+				return R.fail(500, "生成订单编号失败");
+			}
+			useBoxPlan.setSysNo((String) clientBillNo.getData());
+			useBoxPlan.setCreateTime(new Date());
+			useBoxPlan.setCreateUser(AuthUtil.getUserId());
+			useBoxPlan.setCreateUserName(AuthUtil.getUserName());
+			useBoxPlan.setTenantId(AuthUtil.getTenantId());
+			useBoxPlan.setBranchId(branchId);
+			useBoxPlan.setBranchName(deptName);
+			this.save(useBoxPlan);
+		} else {
+			useBoxPlan.setUpdateUser(AuthUtil.getUserId());
+			useBoxPlan.setUpdateTime(new Date());
+			useBoxPlan.setUpdateUserName(AuthUtil.getUserName());
+			this.updateById(useBoxPlan);
+		}
+		if (ObjectUtils.isNotNull(useBoxPlan.getUseBoxPlanItemList()) && !useBoxPlan.getUseBoxPlanItemList().isEmpty()) {
+			for (UseBoxPlanItem item : useBoxPlan.getUseBoxPlanItemList()) {
+				item.setPid(useBoxPlan.getId());
+				item.setBranchId(branchId);
+				item.setBranchName(deptName);
+				if (item.getId() == null) {
+					item.setCreateTime(new Date());
+					item.setCreateUser(AuthUtil.getUserId());
+					item.setCreateUserName(AuthUtil.getUserName());
+				} else {
+					item.setUpdateUser(AuthUtil.getUserId());
+					item.setUpdateTime(new Date());
+					item.setUpdateUserName(AuthUtil.getUserName());
+				}
+			}
+			useBoxPlanItemService.saveOrUpdateBatch(useBoxPlan.getUseBoxPlanItemList());
+		}
+		return R.data(useBoxPlan);
+	}
+
+	@Override
+	public R submitUseBoxPlan(UseBoxPlan useBoxPlan) {
+		if (useBoxPlan.getId() == null) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		UseBoxPlan detail = baseMapper.selectById(useBoxPlan.getId());
+		detail.setStatus(1);
+		R<String> res = sysClient.getRoleIds(AuthUtil.getTenantId(), "OW,箱管");
+		if (res.isSuccess() && ObjectUtils.isNotNull()) {
+			LocalDateTime now = LocalDateTime.now();
+			DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+			String formatted = now.format(formatter);
+			List<User> userList = userClient.userListGetByIds(Func.toLongList(res.getData()));
+			for (User item : userList){
+				Message sendMessage = new Message();
+				sendMessage.setParameter(detail.getId() + "");
+				sendMessage.setUserName(AuthUtil.getUserName());
+				sendMessage.setUserId(null);
+				sendMessage.setToUserId(item.getId());
+				sendMessage.setToUserName(item.getName());
+				sendMessage.setMessageType(1);
+				sendMessage.setTenantId(AuthUtil.getTenantId());
+				sendMessage.setCreateUser(null);
+				sendMessage.setCreateTime(new Date());
+				// todo sendMessage.setUrl("");
+				sendMessage.setPageLabel("用箱计划");
+				sendMessage.setPageStatus("this.$store.getters.domSaleStatus");
+				sendMessage.setMessageBody("您有新的用箱计划,请及时待处理!单号:" + detail.getSysNo() + "时间:" + formatted);
+				R save = messageClient.save(sendMessage);
+				if (!save.isSuccess()) {
+					throw new SecurityException("发送消息失败");
+				}
+			}
+		}
+		return R.data(detail);
+	}
+
+}

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/business/mktSlot/controller/MktSlotController.java

@@ -205,7 +205,7 @@ public class MktSlotController extends BladeController {
 				.eq(MktSlotQuotation::getIsDeleted, 0)
 				.eq(ObjectUtils.isNotNull(mktSlot.getPolId()), MktSlotQuotation::getPolId, mktSlot.getPolId())
 				.eq(ObjectUtils.isNotNull(mktSlot.getPodId()), MktSlotQuotation::getPodId, mktSlot.getPodId())
-				.eq(MktSlotQuotation::getActualShippingCompanyId, mktSlot.getActualShippingCompanyId())
+				.eq(ObjectUtils.isNotNull(mktSlot.getActualShippingCompanyId()),MktSlotQuotation::getActualShippingCompanyId, mktSlot.getActualShippingCompanyId())
 				.eq(MktSlotQuotation::getEtd, mktSlot.getEtd())
 				.in(MktSlotQuotation::getPid, pid)
 			);

+ 3 - 2
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BookingCabinController.java

@@ -70,7 +70,7 @@ public class BookingCabinController extends BladeController {
 		LambdaQueryWrapper<Bills> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(Bills::getIsDeleted, 0)
 			.eq(Bills::getTenantId, AuthUtil.getTenantId())
-			.eq(Bills::getBusinessType, "YDC")
+			.eq(Bills::getBusinessType, bills.getBusinessType())
 			.like(ObjectUtils.isNotNull(bills.getBillNo()), Bills::getBillNo, bills.getBillNo())
 			.like(ObjectUtils.isNotNull(bills.getBookingNo()), Bills::getBookingNo, bills.getBookingNo())
 			.and(ObjectUtils.isNotNull(bills.getCorpCnName()), i -> i.like(Bills::getCorpCnName, bills.getCorpCnName()).or()
@@ -112,7 +112,8 @@ public class BookingCabinController extends BladeController {
 			.eq(ObjectUtils.isNotNull(bills.getBillType()), Bills::getBillType, bills.getBillType())
 			.eq(ObjectUtils.isNotNull(bills.getBusinessType()), Bills::getBusinessType, bills.getBusinessType())
 			.eq(ObjectUtils.isNotNull(bills.getSeaType()), Bills::getSeaType, bills.getSeaType())
-			.eq(ObjectUtils.isNotNull(bills.getStatus()), Bills::getStatus, bills.getStatus());
+			.eq(ObjectUtils.isNotNull(bills.getStatus()), Bills::getStatus, bills.getStatus())
+			.orderByDesc(Bills::getCreateTime);
 		lambdaQueryWrapper.eq(ObjectUtils.isNotNull(bills.getBillStatus()), Bills::getBillStatus, bills.getBillStatus());
 		IPage<Bills> pages = billsService.page(Condition.getPage(query), lambdaQueryWrapper);
 		return R.data(pages);

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

@@ -40,13 +40,17 @@ import org.springblade.los.basic.corps.entity.BCorps;
 import org.springblade.los.basic.corps.entity.BCorpsAttn;
 import org.springblade.los.basic.corps.mapper.CorpsAttnMapper;
 import org.springblade.los.basic.corps.mapper.CorpsMapper;
+import org.springblade.los.basic.corps.service.IBCorpsService;
 import org.springblade.los.basic.cur.entity.BCurExrate;
+import org.springblade.los.basic.fees.entity.BFees;
+import org.springblade.los.basic.fees.service.IBFeesService;
 import org.springblade.los.basic.vessels.entity.BVessels;
 import org.springblade.los.basic.vessels.mapper.VesselsMapper;
 import org.springblade.los.billno.entity.BusinessBillNo;
 import org.springblade.los.billno.service.IBusinessBillNoService;
 import org.springblade.los.business.files.entity.FilesCenter;
 import org.springblade.los.business.files.service.IFilesCenterService;
+import org.springblade.los.business.mktSlot.entity.MktSlotQuotation;
 import org.springblade.los.business.release.entity.SeaReleaseBillItems;
 import org.springblade.los.business.sea.dto.WaitingBox;
 import org.springblade.los.business.sea.entity.*;
@@ -145,6 +149,10 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 
 	private final CurrencyUtils currencyUtils;
 
+	private final IBFeesService bFeesService;
+
+	private final IBCorpsService bCorpsService;
+
 	@Override
 	public IPage<BillsVO> selectBillsPage(IPage<BillsVO> page, BillsVO bills) {
 		return page.setRecords(baseMapper.selectBillsPage(page, bills));
@@ -750,6 +758,13 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		if (ObjectUtils.isNotNull(bills.getContainersList())) {
 			for (Containers item : bills.getContainersList()) {
 				item.setPid(bills.getId());
+				if ("MH".equals(bills.getBillType())) {
+					item.setHblno(bills.getHblno());
+				} else {
+					if (ObjectUtils.isNull(item.getHblno())) {
+						item.setHblno(bills.getBookingNo());
+					}
+				}
 				if (item.getId() == null) {
 					item.setCreateTime(new Date());
 					item.setCreateUser(AuthUtil.getUserId());
@@ -1201,6 +1216,18 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			if (ObjectUtils.isNull(bills.getPolId())) {
 				throw new RuntimeException("装货港不能为空,操作失败");
 			}
+			BigDecimal grossWeight = new BigDecimal("0.00");
+			BigDecimal quantity = new BigDecimal("0.00");
+			BigDecimal measurement = new BigDecimal("0.00");
+			List<Bills> billsListF = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+				.eq(Bills::getTenantId, AuthUtil.getTenantId())
+				.eq(Bills::getIsDeleted, 0)
+				.eq(Bills::getMasterId, id));
+			if (!billsListF.isEmpty()) {
+				grossWeight = grossWeight.add(billsListF.stream().map(Bills::getGrossWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+				quantity = quantity.add(billsListF.stream().map(Bills::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+				measurement = measurement.add(billsListF.stream().map(Bills::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			}
 			List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
 				.eq(Bills::getTenantId, AuthUtil.getTenantId())
 				.eq(Bills::getIsDeleted, 0)
@@ -1288,9 +1315,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			BigDecimal amountDrLoc = bills.getAmountDrLoc();
 			BigDecimal amountCrLoc = bills.getAmountCrLoc();
 			BigDecimal amountProfitLoc = bills.getAmountProfitLoc();*/
-			BigDecimal grossWeight = new BigDecimal("0.00");
-			BigDecimal quantity = new BigDecimal("0.00");
-			BigDecimal measurement = new BigDecimal("0.00");
 			Integer teuTotal = bills.getTeuTotal();
 			String marks = "";
 			String commodityDescr = "";
@@ -1322,15 +1346,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			bills.setAmountDrLoc(amountDrLoc);
 			bills.setAmountCrLoc(amountCrLoc);
 			bills.setAmountProfitLoc(amountProfitLoc);*/
-			List<Bills> billsListF = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
-				.eq(Bills::getTenantId, AuthUtil.getTenantId())
-				.eq(Bills::getIsDeleted, 0)
-				.eq(Bills::getMasterId, id));
-			if (!billsListF.isEmpty()){
-				grossWeight = grossWeight.add(billsListF.stream().map(Bills::getGrossWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-				quantity = quantity.add(billsListF.stream().map(Bills::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-				measurement = measurement.add(billsListF.stream().map(Bills::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
-			}
 			bills.setGrossWeight(grossWeight);
 			bills.setQuantity(quantity);
 			bills.setMeasurement(measurement);
@@ -1677,6 +1692,10 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			if (ObjectUtils.isNull(declare.getActualEta())) {
 				throw new RuntimeException("实际到港日期不能为空");
 			}
+		} else if ("KHTS".equals(declare.getBusinessType())) {
+			actId = 1131;
+			processType = "客户托书审核";
+			checkType = "KHTS";
 		}
 		//审批数据
 		LosAuditProecessDTO auditProecessDTO = new LosAuditProecessDTO();
@@ -1756,59 +1775,62 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		}
 		declare.setStatus(1);
 		baseMapper.updateById(declare);
-		List<Long> idList = new ArrayList<>();
-		idList.add(declare.getId());
-		if ("MM".equals(declare.getBillType())) {
-			List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
-				.eq(Bills::getTenantId, AuthUtil.getTenantId())
-				.eq(Bills::getIsDeleted, 0)
-				.eq(Bills::getMasterId, declare.getId())
-				.eq(Bills::getBillType, "MH"));
-			if (!billsList.isEmpty()) {
-				for (Bills item : billsList) {
-					item.setStatus(1);
-					item.setUpdateTime(new Date());
-					item.setUpdateUserName(AuthUtil.getUserName());
-					item.setUpdateUser(AuthUtil.getUserId());
-				}
-				this.updateBatchById(billsList);
-				List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
-					.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
-					.eq(FeeCenter::getIsDeleted, 0)
-					.in(FeeCenter::getPid, billsList.stream().map(Bills::getId).collect(Collectors.toList())));
-				if (feeCenterList.isEmpty()) {
-					throw new RuntimeException("未查到分单费用明细,先维护分单费用");
-				}
-				for (Bills item : billsList) {
-					List<FeeCenter> feeCenters = feeCenterList.stream().filter(e -> e.getPid().equals(item.getId()))
-						.collect(Collectors.toList());
-					if (feeCenters.isEmpty()) {
-						throw new RuntimeException("未查到分单编号:" + item.getBillNo() + "费用明细,先维护分单费用");
+		if ("KHTS".equals(declare.getBusinessType())) {
+			return declare;
+		} else {
+			List<Long> idList = new ArrayList<>();
+			idList.add(declare.getId());
+			if ("MM".equals(declare.getBillType())) {
+				List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+					.eq(Bills::getTenantId, AuthUtil.getTenantId())
+					.eq(Bills::getIsDeleted, 0)
+					.eq(Bills::getMasterId, declare.getId())
+					.eq(Bills::getBillType, "MH"));
+				if (!billsList.isEmpty()) {
+					for (Bills item : billsList) {
+						item.setStatus(1);
+						item.setUpdateTime(new Date());
+						item.setUpdateUserName(AuthUtil.getUserName());
+						item.setUpdateUser(AuthUtil.getUserId());
 					}
+					this.updateBatchById(billsList);
+					List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+						.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+						.eq(FeeCenter::getIsDeleted, 0)
+						.in(FeeCenter::getPid, billsList.stream().map(Bills::getId).collect(Collectors.toList())));
+					if (feeCenterList.isEmpty()) {
+						throw new RuntimeException("未查到分单费用明细,先维护分单费用");
+					}
+					for (Bills item : billsList) {
+						List<FeeCenter> feeCenters = feeCenterList.stream().filter(e -> e.getPid().equals(item.getId()))
+							.collect(Collectors.toList());
+						if (feeCenters.isEmpty()) {
+							throw new RuntimeException("未查到分单编号:" + item.getBillNo() + "费用明细,先维护分单费用");
+						}
+					}
+					idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
 				}
-				idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
 			}
-		}
-		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
-			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
-			.eq(FeeCenter::getIsDeleted, 0)
-			.in(FeeCenter::getPid, idList)
-			.eq(FeeCenter::getAccStatus, "0")
-			.eq(FeeCenter::getAuditStatus, "0"));
-		if (!feeCenterList.isEmpty()) {
-			for (FeeCenter item : feeCenterList) {
-				item.setUpdateTime(new Date());
-				item.setUpdateUser(AuthUtil.getUserId());
-				item.setUpdateUserName(AuthUtil.getUserName());
-				item.setAuditStatus("1");
-				item.setApplyId(AuthUtil.getUserId());
-				item.setApplyName(AuthUtil.getUserName());
-				item.setApplyTime(new Date());
+			List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+				.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+				.eq(FeeCenter::getIsDeleted, 0)
+				.in(FeeCenter::getPid, idList)
+				.eq(FeeCenter::getAccStatus, "0")
+				.eq(FeeCenter::getAuditStatus, "0"));
+			if (!feeCenterList.isEmpty()) {
+				for (FeeCenter item : feeCenterList) {
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(AuthUtil.getUserId());
+					item.setUpdateUserName(AuthUtil.getUserName());
+					item.setAuditStatus("1");
+					item.setApplyId(AuthUtil.getUserId());
+					item.setApplyName(AuthUtil.getUserName());
+					item.setApplyTime(new Date());
+				}
+				feeCenterService.updateBatchById(feeCenterList);
 			}
-			feeCenterService.updateBatchById(feeCenterList);
+			return declare;
 		}
-
-		return declare;
 	}
 
 	@Override
@@ -1824,44 +1846,48 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		}
 		declare.setStatus(0);
 		baseMapper.updateById(declare);
-		List<Long> idList = new ArrayList<>();
-		idList.add(declare.getId());
-		if ("MM".equals(declare.getBillType())) {
-			List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
-				.eq(Bills::getTenantId, AuthUtil.getTenantId())
-				.eq(Bills::getIsDeleted, 0)
-				.eq(Bills::getMasterId, declare.getId())
-				.eq(Bills::getBillType, "MH"));
-			if (!billsList.isEmpty()) {
-				for (Bills item : billsList) {
-					item.setStatus(0);
+		if ("KHTS".equals(declare.getBusinessType())) {
+			return declare;
+		} else {
+			List<Long> idList = new ArrayList<>();
+			idList.add(declare.getId());
+			if ("MM".equals(declare.getBillType())) {
+				List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+					.eq(Bills::getTenantId, AuthUtil.getTenantId())
+					.eq(Bills::getIsDeleted, 0)
+					.eq(Bills::getMasterId, declare.getId())
+					.eq(Bills::getBillType, "MH"));
+				if (!billsList.isEmpty()) {
+					for (Bills item : billsList) {
+						item.setStatus(0);
+						item.setUpdateTime(new Date());
+						item.setUpdateUserName(AuthUtil.getUserName());
+						item.setUpdateUser(AuthUtil.getUserId());
+					}
+					this.updateBatchById(billsList);
+					idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
+				}
+			}
+			List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+				.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+				.eq(FeeCenter::getIsDeleted, 0)
+				.in(FeeCenter::getPid, idList)
+				.eq(FeeCenter::getAccStatus, "0")
+				.eq(FeeCenter::getAuditStatus, "1"));
+			if (!feeCenterList.isEmpty()) {
+				for (FeeCenter item : feeCenterList) {
 					item.setUpdateTime(new Date());
-					item.setUpdateUserName(AuthUtil.getUserName());
 					item.setUpdateUser(AuthUtil.getUserId());
+					item.setUpdateUserName(AuthUtil.getUserName());
+					item.setAuditStatus("0");
+					item.setApplyId(AuthUtil.getUserId());
+					item.setApplyName(AuthUtil.getUserName());
+					item.setApplyTime(new Date());
 				}
-				this.updateBatchById(billsList);
-				idList.addAll(billsList.stream().map(Bills::getId).collect(Collectors.toList()));
-			}
-		}
-		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
-			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
-			.eq(FeeCenter::getIsDeleted, 0)
-			.in(FeeCenter::getPid, idList)
-			.eq(FeeCenter::getAccStatus, "0")
-			.eq(FeeCenter::getAuditStatus, "1"));
-		if (!feeCenterList.isEmpty()) {
-			for (FeeCenter item : feeCenterList) {
-				item.setUpdateTime(new Date());
-				item.setUpdateUser(AuthUtil.getUserId());
-				item.setUpdateUserName(AuthUtil.getUserName());
-				item.setAuditStatus("0");
-				item.setApplyId(AuthUtil.getUserId());
-				item.setApplyName(AuthUtil.getUserName());
-				item.setApplyTime(new Date());
+				feeCenterService.updateBatchById(feeCenterList);
 			}
-			feeCenterService.updateBatchById(feeCenterList);
+			return declare;
 		}
-		return declare;
 	}
 
 	@Override
@@ -4121,6 +4147,13 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			.eq(FilesCenter::getIsDeleted, 0)
 			.eq(FilesCenter::getTenantId, AuthUtil.getTenantId())
 			.eq(FilesCenter::getPid, detail.getId())));
+		detail.setFeeCenterListC(new ArrayList<>());
+		detail.setFeeCenterListD(new ArrayList<>());
+		detail.setFeeCenterList(new ArrayList<>());
+		detail.setContainersList(new ArrayList<>());
+		detail.setContainersReportsList(new ArrayList<>());
+		detail.setWaitingBoxList(new ArrayList<>());
+		detail.setFeeCenterAmendList(new ArrayList<>());
 		return detail;
 	}
 
@@ -4136,13 +4169,40 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		}
 		detail.setIssueStatus("1");
 		baseMapper.updateById(detail);
+		boolean type = false;
+		String billType = "";
+		if ("YDC".equals(detail.getBusinessType())) {
+			billType = "MM";
+		} else if ("KHTS".equals(detail.getBusinessType())) {
+			billType = "MH";
+			type = true;
+		} else {
+			throw new RuntimeException("业务类型错误,请联系管理员");
+		}
 		SeaBillsDetail seaBillsDetail = seaBillsDetailService.getOne(new LambdaQueryWrapper<SeaBillsDetail>()
 			.eq(SeaBillsDetail::getTenantId, AuthUtil.getTenantId())
 			.eq(SeaBillsDetail::getPid, detail.getId()));
-		List<PreContainers> preContainers = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
+		List<PreContainers> preContainersList = preContainersService.list(new LambdaQueryWrapper<PreContainers>()
 			.eq(PreContainers::getTenantId, AuthUtil.getTenantId())
 			.eq(PreContainers::getIsDeleted, 0)
 			.eq(PreContainers::getPid, detail.getId()));
+		List<Containers> containersList = new ArrayList<>();
+		List<FeeCenter> feeCenterList = new ArrayList<>();
+		List<FilesCenter> filesCenterList = new ArrayList<>();
+		if (type) {
+			containersList = containersService.list(new LambdaQueryWrapper<Containers>()
+				.eq(Containers::getTenantId, AuthUtil.getTenantId())
+				.eq(Containers::getIsDeleted, 0)
+				.eq(Containers::getPid, detail.getId()));
+			feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+				.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+				.eq(FeeCenter::getIsDeleted, 0)
+				.eq(FeeCenter::getPid, detail.getId()));
+			filesCenterList = filesCenterService.list(new LambdaQueryWrapper<FilesCenter>()
+				.eq(FilesCenter::getTenantId, AuthUtil.getTenantId())
+				.eq(FilesCenter::getIsDeleted, 0)
+				.eq(FilesCenter::getPid, detail.getId()));
+		}
 		BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
 			.select(BusinessType::getId)
 			.eq(BusinessType::getTenantId, AuthUtil.getTenantId())
@@ -4169,6 +4229,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		copyBills.setBusinessType("SE");
 		copyBills.setBusinessTypes("HYCK");
 		copyBills.setSeaType("E");
+		copyBills.setBillType(billType);
 		copyBills.setBillNo((String) clientBillNo.getData());
 		copyBills.setCarrierId(detail.getActualShippingCompanyId());
 		copyBills.setCarrierCnName(detail.getActualShippingCompanyCname());
@@ -4224,7 +4285,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		copyBills.setCfsQuantity(new BigDecimal("0.00"));
 		copyBills.setCfsGrossWeight(new BigDecimal("0.00"));
 		copyBills.setCfsMeasurement(new BigDecimal("0.00"));
-		copyBills.setBillType("MM");
+		copyBills.setBoxBelongsTo("SOC");
 		this.save(copyBills);
 		if (seaBillsDetail != null) {
 			seaBillsDetail.setId(null);
@@ -4236,8 +4297,8 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			seaBillsDetail.setCreateTime(new Date());
 			seaBillsDetailService.save(seaBillsDetail);
 		}
-		if (!preContainers.isEmpty()) {
-			for (PreContainers containers : preContainers) {
+		if (!preContainersList.isEmpty()) {
+			for (PreContainers containers : preContainersList) {
 				containers.setId(null);
 				containers.setPid(copyBills.getId());
 				containers.setCreateUser(AuthUtil.getUserId());
@@ -4247,7 +4308,91 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				containers.setCreateTime(new Date());
 				containers.setContainerNumberStatus("录入");
 			}
-			preContainersService.saveBatch(preContainers);
+			preContainersService.saveBatch(preContainersList);
+			if (type) {
+				BFees fees = bFeesService.getOne(new LambdaQueryWrapper<BFees>()
+					.eq(BFees::getTenantId, AuthUtil.getTenantId())
+					.eq(BFees::getIsDeleted, 0)
+					.eq(BFees::getCode, "HYF"));
+				if (fees == null) {
+					throw new RuntimeException("未查到海运费信息,请先维护基础资料");
+				}
+				BFees feesD = bFeesService.getOne(new LambdaQueryWrapper<BFees>()
+					.eq(BFees::getTenantId, AuthUtil.getTenantId())
+					.eq(BFees::getIsDeleted, 0)
+					.eq(BFees::getCode, "XSJ"));
+				if (feesD == null) {
+					throw new RuntimeException("未查到销售价信息,请先维护基础资料");
+				}
+				String deptName = copyBills.getBranchName();
+				String branchId = copyBills.getBranchId();
+				List<FeeCenter> feeCenters = new ArrayList<>();
+				Date date = bills.getEtd();
+				String exrateType = currencyUtils.standardCurrency(branchId);
+				List<BCurExrate> curExrateList = currencyUtils.obtainRate(date, "1", branchId);
+				int count = 1;
+				for (PreContainers item : preContainersList) {
+					FeeCenter feeCenter = this.addFeeCenterQuotation(bills, "D", count, fees,  item,
+						curExrateList, exrateType, "1");
+					if (feeCenter != null) {
+						feeCenter.setUnitNo(item.getCntrTypeCode());
+						feeCenter.setBranchId(branchId);
+						feeCenter.setBranchName(deptName);
+						feeCenters.add(feeCenter);
+						count++;
+					}
+					FeeCenter feeCenterD = this.addFeeCenterQuotation(bills, "C", count, feesD,  item,
+						curExrateList, exrateType, "2");
+					if (feeCenterD != null) {
+						feeCenterD.setUnitNo(item.getCntrTypeCode());
+						feeCenterD.setBranchId(branchId);
+						feeCenterD.setBranchName(deptName);
+						feeCenters.add(feeCenterD);
+						count++;
+					}
+				}
+				if (!feeCenters.isEmpty()) {
+					feeCenterService.saveBatch(feeCenters);
+				}
+			}
+		}
+		if (type) {
+			if (!containersList.isEmpty()) {
+				for (Containers containers : containersList) {
+					containers.setId(null);
+					containers.setPid(copyBills.getId());
+					containers.setCreateUser(AuthUtil.getUserId());
+					containers.setCreateUserName(AuthUtil.getUserName());
+					containers.setCreateDept(copyBills.getCreateDept());
+					containers.setCreateDeptName(copyBills.getCreateDeptName());
+					containers.setCreateTime(new Date());
+				}
+				containersService.saveBatch(containersList);
+			}
+			if (!feeCenterList.isEmpty()) {
+				for (FeeCenter containers : feeCenterList) {
+					containers.setId(null);
+					containers.setPid(copyBills.getId());
+					containers.setCreateUser(AuthUtil.getUserId());
+					containers.setCreateUserName(AuthUtil.getUserName());
+					containers.setCreateDept(copyBills.getCreateDept());
+					containers.setCreateDeptName(copyBills.getCreateDeptName());
+					containers.setCreateTime(new Date());
+				}
+				feeCenterService.saveBatch(feeCenterList);
+			}
+			if (!filesCenterList.isEmpty()) {
+				for (FilesCenter containers : filesCenterList) {
+					containers.setId(null);
+					containers.setPid(copyBills.getId());
+					containers.setCreateUser(AuthUtil.getUserId());
+					containers.setCreateUserName(AuthUtil.getUserName());
+					containers.setCreateDept(copyBills.getCreateDept());
+					containers.setCreateDeptName(copyBills.getCreateDeptName());
+					containers.setCreateTime(new Date());
+				}
+				filesCenterService.saveBatch(filesCenterList);
+			}
 		}
 		R<User> res = userClient.userInfoById(copyBills.getOperatorId());
 		if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
@@ -4732,4 +4877,90 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		}
 	}
 
+	private FeeCenter addFeeCenterQuotation(Bills bills, String dc, int count, BFees fees,
+											PreContainers items, List<BCurExrate> curExrateList, String exrateType, String type) {
+		FeeCenter feeCenter = new FeeCenter();
+		feeCenter.setBranchId(bills.getBranchId());
+		feeCenter.setBranchName(bills.getBranchName());
+		feeCenter.setPid(bills.getId());
+		feeCenter.setCntrNo(bills.getQuantityCntrTypesDescr());
+		feeCenter.setBillNo(bills.getBillNo());
+		feeCenter.setBusinessType(bills.getBusinessType());
+		feeCenter.setBillType(bills.getBillType());
+		feeCenter.setBillDate(bills.getBillDate());
+		feeCenter.setBillCorpId(bills.getCorpId());
+		feeCenter.setBillCorpCnName(bills.getCorpCnName());
+		feeCenter.setBillCorpEnName(bills.getCorpEnName());
+		feeCenter.setBillShortName(bills.getCorpCnName());
+		feeCenter.setLineId(bills.getLineId());
+		feeCenter.setLineCnName(bills.getLineCnName());
+		feeCenter.setLineEnName(bills.getLineEnName());
+		feeCenter.setVesselId(bills.getVesselId());
+		feeCenter.setVesselCnName(bills.getVesselCnName());
+		feeCenter.setVesselEnName(bills.getVesselEnName());
+		feeCenter.setVoyageNo(bills.getVoyageNo());
+		feeCenter.setMblno(bills.getMblno());
+		feeCenter.setHblno(bills.getHblno());
+		feeCenter.setEtd(bills.getEtd());
+		feeCenter.setEta(bills.getEta());
+		feeCenter.setPolId(bills.getPolId());
+		feeCenter.setPolCode(bills.getPolCode());
+		feeCenter.setPolCnName(bills.getPolCnName());
+		feeCenter.setPolEnName(bills.getPolEnName());
+		feeCenter.setPodId(bills.getPodId());
+		feeCenter.setPodCode(bills.getPodCode());
+		feeCenter.setPodCnName(bills.getPodCnName());
+		feeCenter.setPodEnName(bills.getPodEnName());
+		feeCenter.setDc(dc);
+		feeCenter.setPaymode(bills.getMpaymode());
+		feeCenter.setSort(count);
+		feeCenter.setFeeId(fees.getId());
+		feeCenter.setCorpType("国内直接客户");
+		feeCenter.setFeeCode(fees.getCode());
+		feeCenter.setFeeCnName(fees.getCnName());
+		feeCenter.setFeeEnName(fees.getEnName());
+		feeCenter.setUnitNo(fees.getUnitNo());
+		feeCenter.setCurCode("USD");
+		feeCenter.setExrate(currencyUtils.obtainExrate(feeCenter.getDc(), curExrateList, feeCenter.getCurCode(), "1"));
+		feeCenter.setQuantity(new BigDecimal(items.getQuantity() + ""));
+		if ("1".equals(type)) {
+			feeCenter.setCorpId(bills.getCorpId());
+			feeCenter.setCorpCnName(bills.getCorpCnName());
+			feeCenter.setCorpEnName(bills.getCorpEnName());
+			feeCenter.setShortName(bills.getShortName());
+			feeCenter.setPrice(items.getSalesPrice());
+		} else if ("2".equals(type)) {
+			BCorps bCorps = bCorpsService.getOne(new LambdaQueryWrapper<BCorps>()
+				.eq(BCorps::getTenantId, AuthUtil.getTenantId())
+				.eq(BCorps::getIsDeleted, 0)
+				.eq(BCorps::getCode, "ZBYF"));
+			if (bCorps == null) {
+				throw new RuntimeException("基础资料未查到编码为‘ZBYF’往来单位");
+			}
+			feeCenter.setCorpId(bCorps.getId());
+			feeCenter.setCorpCnName(bCorps.getCnName());
+			feeCenter.setCorpEnName(bCorps.getEnName());
+			feeCenter.setShortName(bCorps.getShortName());
+			feeCenter.setPrice(items.getCostPrice());
+		}
+		feeCenter.setAmount(feeCenter.getPrice().multiply(feeCenter.getQuantity()));
+		if (ObjectUtils.isNull(feeCenter.getAmount())) {
+			feeCenter.setAmount(new BigDecimal("0"));
+		}
+		if (exrateType.equals(feeCenter.getCurCode())) {
+			feeCenter.setAmountLoc(feeCenter.getAmount());
+		} else {
+			if (new BigDecimal("0").compareTo(feeCenter.getAmount()) != 0) {
+				feeCenter.setAmountLoc(feeCenter.getAmount().multiply(feeCenter.getExrate()));
+			} else {
+				feeCenter.setAmountLoc(new BigDecimal("0"));
+			}
+		}
+		if (new BigDecimal("0").compareTo(feeCenter.getAmount()) == 0) {
+			return null;
+		} else {
+			return feeCenter;
+		}
+	}
+
 }

+ 9 - 8
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/PreContainersServiceImpl.java

@@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
-import org.springblade.los.Util.BoxNumUtils;
 import org.springblade.los.Util.RegularUtils;
 import org.springblade.los.basic.cntr.entity.BCntrTypes;
 import org.springblade.los.basic.cntr.service.IBCntrTypesService;
@@ -103,9 +102,9 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			preContainers.setCreateTime(new Date());
 			preContainers.setCreateUser(AuthUtil.getUserId());
 			preContainers.setCreateUserName(AuthUtil.getUserName());
-				preContainers.setBranchId(branchId);
-				preContainers.setCreateDept(deptId);
-				preContainers.setCreateDeptName(deptName);
+			preContainers.setBranchId(branchId);
+			preContainers.setCreateDept(deptId);
+			preContainers.setCreateDeptName(deptName);
 			teu += preContainers.getTeu().intValue();
 			if (measurementSum.add(preContainers.getMeasurement()).compareTo(new BigDecimal("0")) != 0) {
 				bills.setMeasurement(measurementSum.add(preContainers.getMeasurement()));
@@ -266,10 +265,12 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			BigDecimal measurementSum = preContainersList.stream().map(PreContainers::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 			BigDecimal grossWeightSum = preContainersList.stream().map(PreContainers::getGrossWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 			BigDecimal quantitySum = preContainersList.stream().map(PreContainers::getNumber).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
+			StringBuilder boxTypeSum = new StringBuilder();
 			for (PreContainers preContainers : preContainersList) {
 				if (ObjectUtils.isNotNull(preContainers.getQuantity()) && ObjectUtils.isNotNull(preContainers.getTeu())) {
 					teu = teu.add(new BigDecimal(preContainers.getQuantity()).multiply(preContainers.getTeu()));
 				}
+				boxTypeSum.append(preContainers.getCntrTypeCode()).append("*").append(preContainers.getQuantity()).append(",");
 			}
 			if (measurementSum.compareTo(new BigDecimal("0")) != 0) {
 				bills.setMeasurement(measurementSum);
@@ -281,12 +282,12 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 				bills.setQuantity(quantitySum);
 			}
 			bills.setTeu(teu.intValue());
-			if ("263057".equals(AuthUtil.getTenantId())) {
-				bills.setCommodityDescr(preContainersList.stream().map(PreContainers::getGoodsName)
-					.distinct().filter(Objects::nonNull).collect(Collectors.joining(",")));
+			if (boxTypeSum.length() > 0) {
+				boxTypeSum = new StringBuilder(boxTypeSum.substring(0, boxTypeSum.length() - 1));
+				bills.setQuantityCntrDescr(boxTypeSum.toString());
 			}
 			billsMapper.updateById(bills);
-		}else{
+		} else {
 			branchId = AuthUtil.getDeptId();
 			deptId = AuthUtil.getDeptId();
 			//获取部门ids对应中文名

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/check/controller/AuditProecessController.java

@@ -232,7 +232,7 @@ public class AuditProecessController extends BladeController {
 		if (StringUtils.isBlank(proecess.getCheckType())) {
 			throw new SecurityException("审核失败,未填写审批类型");
 		}
-		if ("HYCK-DJ".equals(proecess.getCheckType()) || "HYJK-DJ".equals(proecess.getCheckType())) {
+		if ("HYCK-DJ".equals(proecess.getCheckType()) || "HYJK-DJ".equals(proecess.getCheckType())|| "KHTS".equals(proecess.getCheckType())) {
 			auditProecessService.losBillsCheck(auditProecess);
 		} else if ("HYCK-FFSQ".equals(proecess.getCheckType())) {
 			auditProecessService.losStlBillsCheck(auditProecess);

+ 43 - 16
blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java

@@ -372,7 +372,12 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 					if (bills == null) {
 						throw new SecurityException("审批通过失败");
 					}
-					this.updateBills(bills, 2);
+					if ("KHTS".equals(bills.getBusinessType())) {
+						bills.setStatus(2);
+						billsMapper.updateById(bills);
+					} else {
+						this.updateBills(bills, 2);
+					}
 				}
 
 				auditProecess.setAuditStatus("A");
@@ -422,12 +427,16 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 						+ "单据日期:" + billsDate + ",请审核。"
 						+ "提交人:" + proecessTemp.getSendName() + "  " + "提交时间" + simpleDateFormat.format(proecessTemp.getSendTime())
 					);
-				}
-				if ("海运进口审核".equals(auditProecess.getProcessType())) {
+				} else if ("海运进口审核".equals(auditProecess.getProcessType())) {
 					message.setMessageBody("您有新的海运进口审核,业务单号:" + proecessTemp.getBillNo() + ","
 						+ "单据日期:" + billsDate + ",请审核。"
 						+ "提交人:" + proecessTemp.getSendName() + "  " + "提交时间" + simpleDateFormat.format(proecessTemp.getSendTime())
 					);
+				} else if ("客户托书审核".equals(auditProecess.getProcessType())) {
+					message.setMessageBody("您有新的客户托书审核,业务单号:" + proecessTemp.getBillNo() + ","
+						+ "单据日期:" + billsDate + ",请审核。"
+						+ "提交人:" + proecessTemp.getSendName() + "  " + "提交时间" + simpleDateFormat.format(proecessTemp.getSendTime())
+					);
 				}
 				message.setCreateUser(AuthUtil.getUserId());
 				message.setCreateTime(new Date());
@@ -441,12 +450,18 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 				if (bills == null) {
 					throw new SecurityException("审批通过失败");
 				}
-				this.updateBills(bills, 4);
+				if ("KHTS".equals(bills.getBusinessType())) {
+					bills.setStatus(4);
+					billsMapper.updateById(bills);
+				} else {
+					this.updateBills(bills, 4);
+				}
 				if ("海运出口审核".equals(auditProecess.getProcessType())) {
 					sendMessage.setMessageBody("您的海运出口审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
-				}
-				if ("海运进口审核".equals(auditProecess.getProcessType())) {
+				} else if ("海运进口审核".equals(auditProecess.getProcessType())) {
 					sendMessage.setMessageBody("您的海运进口审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
+				} else if ("客户托书审核".equals(auditProecess.getProcessType())) {
+					sendMessage.setMessageBody("您的客户托书审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
 				}
 
 				R save = messageClient.save(sendMessage);
@@ -464,12 +479,18 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 				if (bills == null) {
 					throw new SecurityException("审批通过失败");
 				}
-				this.updateBills(bills, 3);
+				if ("KHTS".equals(bills.getBusinessType())) {
+					bills.setStatus(3);
+					billsMapper.updateById(bills);
+				} else {
+					this.updateBills(bills, 3);
+				}
 				if ("海运出口审核".equals(auditProecess.getProcessType())) {
 					sendMessage.setMessageBody("您的海运出口审核已通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
-				}
-				if ("海运进口审核".equals(auditProecess.getProcessType())) {
+				} else if ("海运进口审核".equals(auditProecess.getProcessType())) {
 					sendMessage.setMessageBody("您的海运进口审核已通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
+				} else if ("客户托书审核".equals(auditProecess.getProcessType())) {
+					sendMessage.setMessageBody("您的客户托书审核已通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
 				}
 				R save = messageClient.save(sendMessage);
 				if (!save.isSuccess()) {
@@ -483,12 +504,18 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 				if (bills == null) {
 					throw new SecurityException("审批通过失败");
 				}
-				this.updateBills(bills, 4);
+				if ("KHTS".equals(bills.getBusinessType())) {
+					bills.setStatus(4);
+					billsMapper.updateById(bills);
+				} else {
+					this.updateBills(bills, 4);
+				}
 				if ("海运出口审核".equals(auditProecess.getProcessType())) {
 					sendMessage.setMessageBody("您的海运出口审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
-				}
-				if ("海运进口审核".equals(auditProecess.getProcessType())) {
+				} else if ("海运进口审核".equals(auditProecess.getProcessType())) {
 					sendMessage.setMessageBody("您的海运进口审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
+				} else if ("客户托书审核".equals(auditProecess.getProcessType())) {
+					sendMessage.setMessageBody("您的客户托书审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
 				}
 				R save = messageClient.save(sendMessage);
 				if (!save.isSuccess()) {
@@ -1570,8 +1597,8 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 				throw new RuntimeException("未找到可用业务类型");
 			}
 			Bills bills = new Bills();
-			if ("HYJK,HYCK".contains(expenseApplication.getSrcType())){
-				 bills = billsMapper.selectById(expenseApplication.getSrcId());
+			if ("HYJK,HYCK".contains(expenseApplication.getSrcType())) {
+				bills = billsMapper.selectById(expenseApplication.getSrcId());
 			}
 			for (FeeCenter item : feeCenterList) {
 				if (1 == item.getAccStatus()) {
@@ -1610,10 +1637,10 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 				data.setSrcCnName(item.getSrcCnName());
 				data.setSrcEnName(item.getSrcEnName());
 				data.setSrcType(item.getSrcType());
-				if (bills != null){
+				if (bills != null) {
 					data.setOperatorId(bills.getOperatorId());
 					data.setOperatorName(bills.getOperatorName());
-				}else{
+				} else {
 					data.setOperatorId(expenseApplication.getCreateUser());
 					data.setOperatorName(expenseApplication.getCreateUserName());
 				}

+ 110 - 0
blade-service/blade-los/src/main/java/org/springblade/los/excel/RTFDProfitExcel.java

@@ -0,0 +1,110 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.excel;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 航线利润
+ *
+ * @author BladeX
+ * @since 2025-03-31
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class RTFDProfitExcel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 箱型
+	 */
+	@ExcelProperty(value = "箱型")
+	private String boxType;
+	/**
+	 * POL
+	 */
+	@ExcelIgnore
+	private String polId;
+	/**
+	 * POL
+	 */
+	@ExcelProperty(value = "POL")
+	private String polCname;
+	/**
+	 * POD&L
+	 */
+	@ExcelIgnore
+	private String podLId;
+	/**
+	 * POD&L
+	 */
+	@ExcelProperty(value = "POD&L")
+	private String podLCname;
+	/**
+	 * POD
+	 */
+	@ExcelIgnore
+	private String podId;
+	/**
+	 * POD
+	 */
+	@ExcelProperty(value = "POD")
+	private String podCname;
+
+	/**
+	 * 利润
+	 */
+	@ExcelProperty(value = "利润")
+	private BigDecimal profit;
+
+	/**
+	 * 备注
+	 */
+	@ExcelProperty(value = "备注")
+	private String remarks;
+
+	/**
+	 * 有效期启
+	 */
+	@ExcelIgnore
+	private Date effectiveStartDate;
+	/**
+	 * 有效期止
+	 */
+	@ExcelIgnore
+	private Date effectiveEndDate;
+
+	/**
+	 * 租户
+	 */
+	@ExcelIgnore
+	private String tenantId;
+
+
+}