Browse Source

贸易代理 2024年7月23日17:30:19

纪新园 1 year ago
parent
commit
a480b0e61a
34 changed files with 1712 additions and 2 deletions
  1. 21 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java
  2. 6 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/PreContainers.java
  3. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/dto/StorageDTO.java
  4. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/dto/StorageFeeDTO.java
  5. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/dto/StorageFeeItemsDTO.java
  6. 6 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/DispatchVehicles.java
  7. 11 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/InOutStorage.java
  8. 97 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/Storage.java
  9. 127 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/StorageFee.java
  10. 124 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/StorageFeeItems.java
  11. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/vo/StorageFeeItemsVO.java
  12. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/vo/StorageFeeVO.java
  13. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/vo/StorageVO.java
  14. 39 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  15. 1 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/PreContainersServiceImpl.java
  16. 146 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/controller/StorageController.java
  17. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/controller/StorageFeeController.java
  18. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/controller/StorageFeeItemsController.java
  19. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeItemsMapper.java
  20. 31 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeItemsMapper.xml
  21. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeMapper.java
  22. 30 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeMapper.xml
  23. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageMapper.java
  24. 25 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageMapper.xml
  25. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/IStorageFeeItemsService.java
  26. 45 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/IStorageFeeService.java
  27. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/IStorageService.java
  28. 1 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/AgentServiceImpl.java
  29. 1 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/DispatchVehiclesServiceImpl.java
  30. 125 1
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/InOutStorageServiceImpl.java
  31. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/StorageFeeItemsServiceImpl.java
  32. 114 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/StorageFeeServiceImpl.java
  33. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/StorageServiceImpl.java
  34. 10 1
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/settlement/controller/SettlementController.java

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

@@ -29,6 +29,8 @@ import org.springblade.los.business.sea.dto.ContainersReports;
 import org.springblade.los.business.sea.dto.WaitingBox;
 import org.springblade.los.finance.fee.dto.FeeCenterReports;
 import org.springblade.los.finance.fee.entity.FeeCenter;
+import org.springblade.los.trade.entity.DispatchVehicles;
+import org.springblade.los.trade.entity.InOutStorage;
 import org.springblade.los.utils.LosSpecialHandle;
 import org.springblade.system.entity.Dept;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -289,6 +291,7 @@ public class Bills implements Serializable {
 	@DateTimeFormat(pattern = "yyyy-MM-dd")
 	@TableField(updateStrategy = FieldStrategy.IGNORED)
 	private Date bookingDate;
+	@TableField(exist = false)
 	private List<String> bookingDateList;
 	/**
 	 * 退舱时间 yyyy-MM-dd hh:nn
@@ -1808,4 +1811,22 @@ public class Bills implements Serializable {
 	@ApiModelProperty(value = "是否付汇")
 	private String whetherReceivedBalancePayment;
 
+	/**
+	 * 入库
+	 */
+	@TableField(exist = false)
+	private List<InOutStorage> inStorageList;
+
+	/**
+	 * 出库
+	 */
+	@TableField(exist = false)
+	private List<InOutStorage> outStorageList;
+
+	/**
+	 * 派车
+	 */
+	@TableField(exist = false)
+	private List<DispatchVehicles> dispatchVehiclesList;
+
 }

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

@@ -202,6 +202,12 @@ public class PreContainers implements Serializable {
 	private String goodsName;
 
 	/**
+	 * 商品类别
+	 */
+	@ApiModelProperty(value = "商品类别")
+	private String goodsType;
+
+	/**
 	 * 包装
 	 */
 	@ApiModelProperty(value = "包装")

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/dto/StorageDTO.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.trade.dto;
+
+import org.springblade.los.trade.entity.Storage;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 贸易代理-仓库表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class StorageDTO extends Storage {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/dto/StorageFeeDTO.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.trade.dto;
+
+import org.springblade.los.trade.entity.StorageFee;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 贸易代理-仓储费数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class StorageFeeDTO extends StorageFee {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/dto/StorageFeeItemsDTO.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.trade.dto;
+
+import org.springblade.los.trade.entity.StorageFeeItems;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 贸易代理-仓储费明细数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class StorageFeeItemsDTO extends StorageFeeItems {
+	private static final long serialVersionUID = 1L;
+
+}

+ 6 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/DispatchVehicles.java

@@ -244,5 +244,11 @@ public class DispatchVehicles implements Serializable {
 	@ApiModelProperty(value = "品名")
 	private String goodsName;
 
+	/**
+	 * 商品类别
+	 */
+	@ApiModelProperty(value = "商品类别")
+	private String goodsType;
+
 
 }

+ 11 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/InOutStorage.java

@@ -124,6 +124,11 @@ public class InOutStorage implements Serializable {
 	@ApiModelProperty(value = "品名")
 	private String goodsName;
 	/**
+	 * 商品类别
+	 */
+	@ApiModelProperty(value = "商品类别")
+	private String goodsType;
+	/**
 	 * 箱号
 	 */
 	@ApiModelProperty(value = "箱号")
@@ -245,5 +250,11 @@ public class InOutStorage implements Serializable {
 	@ApiModelProperty(value = "是否已入出库")
 	private String confirmDispatchVehicles;
 
+	/**
+	 * 是否已生成入出库
+	 */
+	@ApiModelProperty(value = "是否已生成入出库")
+	private String whetherInOutStorage;
+
 
 }

+ 97 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/Storage.java

@@ -0,0 +1,97 @@
+/*
+ *      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.trade.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+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;
+
+/**
+ * 贸易代理-仓库表实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@TableName("trade_storage")
+@ApiModel(value = "Storage对象", description = "贸易代理-仓库表")
+public class Storage implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private Long createDept;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@TableLogic(value = "0", delval = "1")
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 订单状态
+	 */
+	@ApiModelProperty(value = "订单状态")
+	private String status;
+	/**
+	 * 仓库编码
+	 */
+	@ApiModelProperty(value = "仓库编码")
+	private String code;
+	/**
+	 * 仓库名称
+	 */
+	@ApiModelProperty(value = "仓库名称")
+	private String cname;
+
+
+}

+ 127 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/StorageFee.java

@@ -0,0 +1,127 @@
+/*
+ *      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.trade.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+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 2024-07-23
+ */
+@Data
+@TableName("trade_storage_fee")
+@ApiModel(value = "StorageFee对象", description = "贸易代理-仓储费")
+public class StorageFee implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 客户
+	 */
+	@ApiModelProperty(value = "客户")
+	private Long corpId;
+	/**
+	 * 客户名称
+	 */
+	@ApiModelProperty(value = "客户名称")
+	private String corpName;
+	/**
+	 * 仓库
+	 */
+	@ApiModelProperty(value = "仓库")
+	private Long warehouseId;
+	/**
+	 * 仓库名称
+	 */
+	@ApiModelProperty(value = "仓库名称")
+	private String warehouseName;
+	/**
+	 * 商品类别
+	 */
+	@ApiModelProperty(value = "商品类别")
+	private String goodsType;
+	/**
+	 * 有效期起
+	 */
+	@ApiModelProperty(value = "有效期起")
+	private Date beginDate;
+	/**
+	 * 有效期至
+	 */
+	@ApiModelProperty(value = "有效期至")
+	private Date endDate;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private Long createDept;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@TableLogic(value = "0", delval = "1")
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 订单状态
+	 */
+	@ApiModelProperty(value = "订单状态")
+	private String status;
+
+	@TableField(exist = false)
+	private List<StorageFeeItems> storageFeeItemsList;
+
+
+}

+ 124 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/entity/StorageFeeItems.java

@@ -0,0 +1,124 @@
+/*
+ *      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.trade.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+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 2024-07-23
+ */
+@Data
+@TableName("trade_storage_fee_items")
+@ApiModel(value = "StorageFeeItems对象", description = "贸易代理-仓储费明细")
+public class StorageFeeItems implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	private Long pid;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private Long createDept;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@TableLogic(value = "0", delval = "1")
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 订单状态
+	 */
+	@ApiModelProperty(value = "订单状态")
+	private String status;
+	/**
+	 * 排序
+	 */
+	@ApiModelProperty(value = "排序")
+	private Integer sort;
+	/**
+	 * 计价单位
+	 */
+	@ApiModelProperty(value = "计价单位")
+	private String feeUnit;
+	/**
+	 * 开始天数
+	 */
+	@ApiModelProperty(value = "开始天数")
+	private Integer fromDays;
+	/**
+	 * 结束天数
+	 */
+	@ApiModelProperty(value = "结束天数")
+	private Integer enDays;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price;
+	/**
+	 * 费用名称
+	 */
+	@ApiModelProperty(value = "费用名称")
+	private Long feeId;
+	/**
+	 * 费用名称
+	 */
+	@ApiModelProperty(value = "费用名称")
+	private String feeName;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/vo/StorageFeeItemsVO.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.trade.vo;
+
+import org.springblade.los.trade.entity.StorageFeeItems;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 贸易代理-仓储费明细视图实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "StorageFeeItemsVO对象", description = "贸易代理-仓储费明细")
+public class StorageFeeItemsVO extends StorageFeeItems {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/vo/StorageFeeVO.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.trade.vo;
+
+import org.springblade.los.trade.entity.StorageFee;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 贸易代理-仓储费视图实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "StorageFeeVO对象", description = "贸易代理-仓储费")
+public class StorageFeeVO extends StorageFee {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/trade/vo/StorageVO.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.trade.vo;
+
+import org.springblade.los.trade.entity.Storage;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 贸易代理-仓库表视图实体类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "StorageVO对象", description = "贸易代理-仓库表")
+public class StorageVO extends Storage {
+	private static final long serialVersionUID = 1L;
+
+}

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

@@ -59,7 +59,11 @@ import org.springblade.los.finance.fee.service.IFinAccBillsService;
 import org.springblade.los.finance.genleg.entity.FinPeriod;
 import org.springblade.los.finance.genleg.mapper.FinPeriodMapper;
 import org.springblade.los.trade.entity.AgentItems;
+import org.springblade.los.trade.entity.DispatchVehicles;
+import org.springblade.los.trade.entity.InOutStorage;
 import org.springblade.los.trade.mapper.AgentItemsMapper;
+import org.springblade.los.trade.mapper.DispatchVehiclesMapper;
+import org.springblade.los.trade.mapper.InOutStorageMapper;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
 import org.springframework.stereotype.Service;
@@ -128,6 +132,10 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 
 	private final AgentItemsMapper agentItemsMapper;
 
+	private final DispatchVehiclesMapper dispatchVehiclesMapper;
+
+	private final InOutStorageMapper inOutStorageMapper;
+
 	@Override
 	public IPage<BillsVO> selectBillsPage(IPage<BillsVO> page, BillsVO bills) {
 		return page.setRecords(baseMapper.selectBillsPage(page, bills));
@@ -2160,6 +2168,37 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			.eq(FeeCenter::getDc, "D")
 			.eq(FeeCenter::getBillNo, detail.getBillNo())
 		));
+		List<DispatchVehicles> dispatchVehiclesList = dispatchVehiclesMapper.selectList(new LambdaQueryWrapper<DispatchVehicles>()
+			.eq(DispatchVehicles::getTenantId,AuthUtil.getTenantId())
+			.eq(DispatchVehicles::getIsDeleted,0)
+			.eq(DispatchVehicles::getPid,detail.getId()));
+		if (!dispatchVehiclesList.isEmpty()){
+			detail.setDispatchVehiclesList(dispatchVehiclesList);
+		}else{
+			detail.setDispatchVehiclesList(new ArrayList<>());
+		}
+		List<InOutStorage> inOutStorageList = inOutStorageMapper.selectList(new LambdaQueryWrapper<InOutStorage>()
+			.eq(InOutStorage::getTenantId,AuthUtil.getTenantId())
+			.eq(InOutStorage::getIsDeleted,0)
+			.eq(InOutStorage::getPid,detail.getId()));
+		if (!inOutStorageList.isEmpty()){
+			List<InOutStorage> inStorageList = inOutStorageList.stream().filter(e-> "RK".equals(e.getBillType())).collect(Collectors.toList());
+			if (!inStorageList.isEmpty()){
+				detail.setInStorageList(inStorageList);
+			}else{
+				detail.setInStorageList(new ArrayList<>());
+			}
+			List<InOutStorage> outStorageList =inOutStorageList.stream().filter(e-> "CK".equals(e.getBillType())).collect(Collectors.toList());
+			if (!inStorageList.isEmpty()){
+				detail.setOutStorageList(outStorageList);
+			}else{
+				detail.setOutStorageList(new ArrayList<>());
+			}
+		}else{
+			detail.setInStorageList(new ArrayList<>());
+			detail.setOutStorageList(new ArrayList<>());
+		}
+
 		return detail;
 	}
 

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

@@ -395,6 +395,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			}
 		}
 		DispatchVehicles dispatchVehicles = new DispatchVehicles();
+		dispatchVehicles.setGoodsType(preContainers.getGoodsType());
 		dispatchVehicles.setPid(preContainers.getPid());
 		dispatchVehicles.setBoxItemsId(preContainers.getId());
 		dispatchVehicles.setBoxNo(preContainers.getBoxNo());

+ 146 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/controller/StorageController.java

@@ -0,0 +1,146 @@
+/*
+ *      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.trade.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.trade.entity.Storage;
+import org.springblade.los.trade.service.IStorageService;
+import org.springblade.los.trade.vo.StorageVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 贸易代理-仓库表 控制器
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/storage")
+@Api(value = "贸易代理-仓库表", tags = "贸易代理-仓库表接口")
+public class StorageController extends BladeController {
+
+	private final IStorageService storageService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入storage")
+	public R<Storage> detail(Storage storage) {
+		Storage detail = storageService.getOne(Condition.getQueryWrapper(storage));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 贸易代理-仓库表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入storage")
+	public R<IPage<Storage>> list(Storage storage, Query query) {
+		IPage<Storage> pages = storageService.page(Condition.getPage(query), Condition.getQueryWrapper(storage));
+		return R.data(pages);
+	}
+
+	/**
+	 * 分页 贸易代理-仓库表
+	 */
+	@GetMapping("/selectList")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入storage")
+	public R<List<Storage>> selectList(Storage storage) {
+		LambdaQueryWrapper<Storage> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(Storage::getIsDeleted,0)
+			.eq(Storage::getTenantId, AuthUtil.getTenantId())
+			.like(ObjectUtils.isNotNull(storage.getCode()),Storage::getCode,storage.getCode())
+			.like(ObjectUtils.isNotNull(storage.getCname()),Storage::getCname,storage.getCname());
+		List<Storage> pages = storageService.list( lambdaQueryWrapper);
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 贸易代理-仓库表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入storage")
+	public R<IPage<StorageVO>> page(StorageVO storage, Query query) {
+		IPage<StorageVO> pages = storageService.selectStoragePage(Condition.getPage(query), storage);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 贸易代理-仓库表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入storage")
+	public R save(@Valid @RequestBody Storage storage) {
+		return R.status(storageService.save(storage));
+	}
+
+	/**
+	 * 修改 贸易代理-仓库表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入storage")
+	public R update(@Valid @RequestBody Storage storage) {
+		return R.status(storageService.updateById(storage));
+	}
+
+	/**
+	 * 新增或修改 贸易代理-仓库表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入storage")
+	public R submit(@Valid @RequestBody Storage storage) {
+		return R.status(storageService.saveOrUpdate(storage));
+	}
+
+
+	/**
+	 * 删除 贸易代理-仓库表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(storageService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/controller/StorageFeeController.java

@@ -0,0 +1,126 @@
+/*
+ *      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.trade.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.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.trade.entity.StorageFee;
+import org.springblade.los.trade.vo.StorageFeeVO;
+import org.springblade.los.trade.service.IStorageFeeService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 贸易代理-仓储费 控制器
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/storagefee")
+@Api(value = "贸易代理-仓储费", tags = "贸易代理-仓储费接口")
+public class StorageFeeController extends BladeController {
+
+	private final IStorageFeeService storageFeeService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入storageFee")
+	public R<StorageFee> detail(StorageFee storageFee) {
+		StorageFee detail = storageFeeService.detail(storageFee);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 贸易代理-仓储费
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入storageFee")
+	public R<IPage<StorageFee>> list(StorageFee storageFee, Query query) {
+		IPage<StorageFee> pages = storageFeeService.page(Condition.getPage(query), Condition.getQueryWrapper(storageFee));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 贸易代理-仓储费
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入storageFee")
+	public R<IPage<StorageFeeVO>> page(StorageFeeVO storageFee, Query query) {
+		IPage<StorageFeeVO> pages = storageFeeService.selectStorageFeePage(Condition.getPage(query), storageFee);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 贸易代理-仓储费
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入storageFee")
+	public R save(@Valid @RequestBody StorageFee storageFee) {
+		return R.status(storageFeeService.save(storageFee));
+	}
+
+	/**
+	 * 修改 贸易代理-仓储费
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入storageFee")
+	public R update(@Valid @RequestBody StorageFee storageFee) {
+		return R.status(storageFeeService.updateById(storageFee));
+	}
+
+	/**
+	 * 新增或修改 贸易代理-仓储费
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入storageFee")
+	public R submit(@Valid @RequestBody StorageFee storageFee) {
+		return storageFeeService.submit(storageFee);
+	}
+
+
+	/**
+	 * 删除 贸易代理-仓储费
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(storageFeeService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/controller/StorageFeeItemsController.java

@@ -0,0 +1,126 @@
+/*
+ *      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.trade.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.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.trade.entity.StorageFeeItems;
+import org.springblade.los.trade.vo.StorageFeeItemsVO;
+import org.springblade.los.trade.service.IStorageFeeItemsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 贸易代理-仓储费明细 控制器
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/storagefeeitems")
+@Api(value = "贸易代理-仓储费明细", tags = "贸易代理-仓储费明细接口")
+public class StorageFeeItemsController extends BladeController {
+
+	private final IStorageFeeItemsService storageFeeItemsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入storageFeeItems")
+	public R<StorageFeeItems> detail(StorageFeeItems storageFeeItems) {
+		StorageFeeItems detail = storageFeeItemsService.getOne(Condition.getQueryWrapper(storageFeeItems));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 贸易代理-仓储费明细
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入storageFeeItems")
+	public R<IPage<StorageFeeItems>> list(StorageFeeItems storageFeeItems, Query query) {
+		IPage<StorageFeeItems> pages = storageFeeItemsService.page(Condition.getPage(query), Condition.getQueryWrapper(storageFeeItems));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 贸易代理-仓储费明细
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入storageFeeItems")
+	public R<IPage<StorageFeeItemsVO>> page(StorageFeeItemsVO storageFeeItems, Query query) {
+		IPage<StorageFeeItemsVO> pages = storageFeeItemsService.selectStorageFeeItemsPage(Condition.getPage(query), storageFeeItems);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 贸易代理-仓储费明细
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入storageFeeItems")
+	public R save(@Valid @RequestBody StorageFeeItems storageFeeItems) {
+		return R.status(storageFeeItemsService.save(storageFeeItems));
+	}
+
+	/**
+	 * 修改 贸易代理-仓储费明细
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入storageFeeItems")
+	public R update(@Valid @RequestBody StorageFeeItems storageFeeItems) {
+		return R.status(storageFeeItemsService.updateById(storageFeeItems));
+	}
+
+	/**
+	 * 新增或修改 贸易代理-仓储费明细
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入storageFeeItems")
+	public R submit(@Valid @RequestBody StorageFeeItems storageFeeItems) {
+		return R.status(storageFeeItemsService.saveOrUpdate(storageFeeItems));
+	}
+
+	
+	/**
+	 * 删除 贸易代理-仓储费明细
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(storageFeeItemsService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeItemsMapper.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.trade.mapper;
+
+import org.springblade.los.trade.entity.StorageFeeItems;
+import org.springblade.los.trade.vo.StorageFeeItemsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 贸易代理-仓储费明细 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+public interface StorageFeeItemsMapper extends BaseMapper<StorageFeeItems> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param storageFeeItems
+	 * @return
+	 */
+	List<StorageFeeItemsVO> selectStorageFeeItemsPage(IPage page, StorageFeeItemsVO storageFeeItems);
+
+}

+ 31 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeItemsMapper.xml

@@ -0,0 +1,31 @@
+<?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.trade.mapper.StorageFeeItemsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="storageFeeItemsResultMap" type="org.springblade.los.trade.entity.StorageFeeItems">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="status" property="status"/>
+        <result column="sort" property="sort"/>
+        <result column="fee_unit" property="feeUnit"/>
+        <result column="from_days" property="fromDays"/>
+        <result column="en_days" property="enDays"/>
+        <result column="price" property="price"/>
+        <result column="fee_id" property="feeId"/>
+        <result column="fee_name" property="feeName"/>
+    </resultMap>
+
+
+    <select id="selectStorageFeeItemsPage" resultMap="storageFeeItemsResultMap">
+        select * from trade_storage_fee_items where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeMapper.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.trade.mapper;
+
+import org.springblade.los.trade.entity.StorageFee;
+import org.springblade.los.trade.vo.StorageFeeVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 贸易代理-仓储费 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+public interface StorageFeeMapper extends BaseMapper<StorageFee> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param storageFee
+	 * @return
+	 */
+	List<StorageFeeVO> selectStorageFeePage(IPage page, StorageFeeVO storageFee);
+
+}

+ 30 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageFeeMapper.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.trade.mapper.StorageFeeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="storageFeeResultMap" type="org.springblade.los.trade.entity.StorageFee">
+        <id column="id" property="id"/>
+        <result column="corp_id" property="corpId"/>
+        <result column="corp_name" property="corpName"/>
+        <result column="warehouse_id" property="warehouseId"/>
+        <result column="warehouse_name" property="warehouseName"/>
+        <result column="goods_type" property="goodsType"/>
+        <result column="begin_date" property="beginDate"/>
+        <result column="end_date" property="endDate"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="status" property="status"/>
+    </resultMap>
+
+
+    <select id="selectStorageFeePage" resultMap="storageFeeResultMap">
+        select * from trade_storage_fee where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageMapper.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.trade.mapper;
+
+import org.springblade.los.trade.entity.Storage;
+import org.springblade.los.trade.vo.StorageVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 贸易代理-仓库表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+public interface StorageMapper extends BaseMapper<Storage> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param storage
+	 * @return
+	 */
+	List<StorageVO> selectStoragePage(IPage page, StorageVO storage);
+
+}

+ 25 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/mapper/StorageMapper.xml

@@ -0,0 +1,25 @@
+<?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.trade.mapper.StorageMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="storageResultMap" type="org.springblade.los.trade.entity.Storage">
+        <id column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="status" property="status"/>
+        <result column="code" property="code"/>
+        <result column="cname" property="cname"/>
+    </resultMap>
+
+
+    <select id="selectStoragePage" resultMap="storageResultMap">
+        select * from trade_storage where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/IStorageFeeItemsService.java

@@ -0,0 +1,41 @@
+/*
+ *      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.trade.service;
+
+import org.springblade.los.trade.entity.StorageFeeItems;
+import org.springblade.los.trade.vo.StorageFeeItemsVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 贸易代理-仓储费明细 服务类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+public interface IStorageFeeItemsService extends IService<StorageFeeItems> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param storageFeeItems
+	 * @return
+	 */
+	IPage<StorageFeeItemsVO> selectStorageFeeItemsPage(IPage<StorageFeeItemsVO> page, StorageFeeItemsVO storageFeeItems);
+
+}

+ 45 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/IStorageFeeService.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.trade.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.los.trade.entity.StorageFee;
+import org.springblade.los.trade.vo.StorageFeeVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 贸易代理-仓储费 服务类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+public interface IStorageFeeService extends IService<StorageFee> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param storageFee
+	 * @return
+	 */
+	IPage<StorageFeeVO> selectStorageFeePage(IPage<StorageFeeVO> page, StorageFeeVO storageFee);
+
+	R submit(StorageFee storageFee);
+
+	StorageFee detail(StorageFee storageFee);
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/IStorageService.java

@@ -0,0 +1,41 @@
+/*
+ *      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.trade.service;
+
+import org.springblade.los.trade.entity.Storage;
+import org.springblade.los.trade.vo.StorageVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 贸易代理-仓库表 服务类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+public interface IStorageService extends IService<Storage> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param storage
+	 * @return
+	 */
+	IPage<StorageVO> selectStoragePage(IPage<StorageVO> page, StorageVO storage);
+
+}

+ 1 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/AgentServiceImpl.java

@@ -1913,6 +1913,7 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 				for (AgentItems items : itemsList) {
 					PreContainers preContainers = new PreContainers();
 					preContainers.setPid(item.getId());
+					preContainers.setGoodsType(items.getGoodsType());
 					preContainers.setCreateTime(new Date());
 					preContainers.setCreateUser(AuthUtil.getUserId());
 					preContainers.setCreateUserName(AuthUtil.getUserName());

+ 1 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/DispatchVehiclesServiceImpl.java

@@ -120,6 +120,7 @@ public class DispatchVehiclesServiceImpl extends ServiceImpl<DispatchVehiclesMap
 		}
 		InOutStorage inOutStorage = new InOutStorage();
 		inOutStorage.setPid(dispatchVehicles.getPid());
+		inOutStorage.setGoodsType(dispatchVehicles.getGoodsType());
 		inOutStorage.setDispatchVehiclesId(dispatchVehicles.getId());
 		inOutStorage.setBoxNo(dispatchVehicles.getBoxNo());
 		inOutStorage.setPrice(dispatchVehicles.getPrice());

+ 125 - 1
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/InOutStorageServiceImpl.java

@@ -26,14 +26,22 @@ import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.los.Util.IDeptUtils;
+import org.springblade.los.basic.fees.entity.BFees;
+import org.springblade.los.basic.fees.service.IBFeesService;
 import org.springblade.los.business.sea.entity.Bills;
 import org.springblade.los.business.sea.mapper.BillsMapper;
+import org.springblade.los.finance.fee.entity.FeeCenter;
+import org.springblade.los.finance.fee.mapper.FeeCenterMapper;
+import org.springblade.los.finance.fee.service.IFeeCenterService;
 import org.springblade.los.trade.entity.AgentItems;
-import org.springblade.los.trade.entity.DispatchVehicles;
 import org.springblade.los.trade.entity.InOutStorage;
+import org.springblade.los.trade.entity.StorageFee;
+import org.springblade.los.trade.entity.StorageFeeItems;
 import org.springblade.los.trade.mapper.AgentItemsMapper;
 import org.springblade.los.trade.mapper.InOutStorageMapper;
 import org.springblade.los.trade.service.IInOutStorageService;
+import org.springblade.los.trade.service.IStorageFeeItemsService;
+import org.springblade.los.trade.service.IStorageFeeService;
 import org.springblade.los.trade.vo.InOutStorageVO;
 import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
@@ -63,15 +71,26 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
 
 	private final AgentItemsMapper agentItemsMapper;
 
+	private final IStorageFeeService storageFeeService;
+
+	private final IStorageFeeItemsService storageFeeItemsService;
+
+	private final IBFeesService bFeesService;
+
+	private final FeeCenterMapper feeCenterMapper;
+
 	@Override
 	public IPage<InOutStorageVO> selectInOutStoragePage(IPage<InOutStorageVO> page, InOutStorageVO inOutStorage) {
 		return page.setRecords(baseMapper.selectInOutStoragePage(page, inOutStorage));
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
 	public R confirmWarehouseEntry(InOutStorage inOutStorage) {
 		inOutStorage.setConfirmDispatchVehicles("1");
 		inOutStorage.setUpdateTime(new Date());
+		inOutStorage.setOutStorageDate(new Date());
 		inOutStorage.setUpdateUser(AuthUtil.getUserId());
 		inOutStorage.setUpdateUserName(AuthUtil.getUserName());
 		if ("RK".equals(inOutStorage.getBillType())) {
@@ -106,6 +125,106 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
 			inStorage.setUpdateTime(new Date());
 			inStorage.setUpdateUser(AuthUtil.getUserId());
 			inStorage.setUpdateUserName(AuthUtil.getUserName());
+
+			Bills bills = billsMapper.selectById(inOutStorage.getPid());
+			if (bills != null) {
+				StorageFee storageFee = storageFeeService.getOne(new LambdaQueryWrapper<StorageFee>()
+					.eq(StorageFee::getTenantId, AuthUtil.getTenantId())
+					.eq(StorageFee::getIsDeleted, 0)
+					.eq(StorageFee::getStatus, 1)
+					.eq(StorageFee::getWarehouseId, inOutStorage.getWarehouseId())
+					.eq(StorageFee::getGoodsType, inOutStorage.getGoodsType())
+					.eq(StorageFee::getCorpId, bills.getCorpId()));
+				if (storageFee == null) {
+					throw new RuntimeException("未查到可用仓储费规则,请先维护");
+				}
+				List<StorageFeeItems> storageFeeItemsList = storageFeeItemsService.list(new LambdaQueryWrapper<StorageFeeItems>()
+					.eq(StorageFeeItems::getPid, storageFee.getId())
+					.eq(StorageFeeItems::getTenantId, AuthUtil.getTenantId())
+					.eq(StorageFeeItems::getIsDeleted, 0)
+					.orderByAsc(StorageFeeItems::getSort));
+				if (storageFeeItemsList.isEmpty()) {
+					throw new RuntimeException("请先维护仓储费规则明细");
+				}
+				long nd = 1000 * 24 * 60 * 60;
+				long diff = inOutStorage.getOutStorageDate().getTime() - inStorage.getStorageDate().getTime();
+				// 计算差多少天
+				long day = diff / nd + 1L;
+				long dayLength = day;
+				StringBuilder remark = new StringBuilder("仓储费:");
+				BigDecimal amount = new BigDecimal("0.00");
+				for (StorageFeeItems item : storageFeeItemsList) {
+					int days = item.getEnDays() - item.getFromDays();
+					if (dayLength != 0) {
+						if (day >= days) {
+							dayLength = dayLength - days;
+							BigDecimal dayDecimal = new BigDecimal(days);
+							BigDecimal amountSum = dayDecimal.multiply(item.getPrice()).multiply(inOutStorage.getGrossWeight());
+							amount = amount.add(amountSum);
+							remark.append(days).append("天*").append(item.getPrice()).append("元*").append(inOutStorage.getGrossWeight()).append("=").append(amountSum).append("元 ");
+						} else {
+							BigDecimal dayDecimal = new BigDecimal(dayLength);
+							BigDecimal amountSum = dayDecimal.multiply(item.getPrice()).multiply(inOutStorage.getGrossWeight());
+							amount = amount.add(amountSum);
+							remark.append(dayLength).append("天*").append(item.getPrice()).append("元*").append(inOutStorage.getGrossWeight()).append("=").append(amountSum).append("元 ");
+							dayLength = days - dayLength;
+						}
+					}
+				}
+				FeeCenter feeCenter = new FeeCenter();
+				feeCenter.setCreateTime(new Date());
+				feeCenter.setCreateUser(AuthUtil.getUserId());
+				feeCenter.setCreateUserName(AuthUtil.getUserName());
+				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+					feeCenter.setCreateDept(bills.getCreateDept());
+					feeCenter.setBranchId(bills.getBranchId());
+					feeCenter.setCreateDeptName(bills.getCreateDeptName());
+				}
+				feeCenter.setBusinessType(bills.getBusinessType());
+				feeCenter.setPid(bills.getId());
+				feeCenter.setLineNo(1L);
+				feeCenter.setBillNo(bills.getBillNo());
+				feeCenter.setBillDate(bills.getBillDate());
+				feeCenter.setCorpId(bills.getCorpId());
+				feeCenter.setCorpCnName(bills.getCorpCnName());
+				feeCenter.setBillCorpId(bills.getCorpId());
+				feeCenter.setBillCorpCnName(bills.getCorpCnName());
+				feeCenter.setMblno(bills.getMblno());
+				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());
+				BFees fees = bFeesService.getById(storageFeeItemsList.get(0).getFeeId());
+				if (fees == null) {
+					throw new RuntimeException("请先维护" + storageFeeItemsList.get(0).getFeeName() + "费用信息");
+				}
+				feeCenter.setFeeId(fees.getId());
+				feeCenter.setFeeCode(fees.getCode());
+				feeCenter.setFeeCnName(fees.getCnName());
+				feeCenter.setFeeEnName(fees.getEnName());
+				feeCenter.setDc("D");
+				feeCenter.setCurCode(fees.getCurNo());
+				feeCenter.setSort(1);
+				feeCenter.setElementsId(fees.getAccElementId());
+				feeCenter.setElementsCode(fees.getElementsCode());
+				feeCenter.setElementsCnName(fees.getAccElementName());
+				feeCenter.setElementsEnName(fees.getElementsEnName());
+				feeCenter.setUnitNo("JOB");
+				feeCenter.setQuantity(new BigDecimal("1"));
+				feeCenter.setPrice(amount);
+				feeCenter.setAmount(amount);
+				feeCenter.setRemarks(remark.toString());
+				feeCenter.setDays(Integer.parseInt(day+""));
+				feeCenter.setStorageDate(inOutStorage.getOutStorageDate());
+				feeCenter.setOutboundDate(inStorage.getStorageDate());
+				feeCenterMapper.insert(feeCenter);
+				inStorage.setStorageDays(Integer.parseInt(day+""));
+				inStorage.setStorageFeesAmount(amount);
+			}
 			baseMapper.updateById(inStorage);
 		}
 		baseMapper.updateById(inOutStorage);
@@ -113,6 +232,8 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
 	public R generateOutbound(InOutStorage inOutStorage) {
 		Long deptId = 0L;
 		String deptName = "";
@@ -145,7 +266,10 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
 		outStorage.setSurplusQuantity(inOutStorage.getOutQuantity());
 		outStorage.setSurplusWeight(inOutStorage.getOutWeight());
 		outStorage.setSurplusGoodsAmount(inOutStorage.getOutQuantity().multiply(inOutStorage.getPrice()));
+		outStorage.setConfirmDispatchVehicles("0");
 		baseMapper.insert(outStorage);
+		inOutStorage.setWhetherInOutStorage("1");
+		baseMapper.updateById(inOutStorage);
 		return R.data(inOutStorage);
 	}
 

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/StorageFeeItemsServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      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.trade.service.impl;
+
+import org.springblade.los.trade.entity.StorageFeeItems;
+import org.springblade.los.trade.vo.StorageFeeItemsVO;
+import org.springblade.los.trade.mapper.StorageFeeItemsMapper;
+import org.springblade.los.trade.service.IStorageFeeItemsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 贸易代理-仓储费明细 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Service
+public class StorageFeeItemsServiceImpl extends ServiceImpl<StorageFeeItemsMapper, StorageFeeItems> implements IStorageFeeItemsService {
+
+	@Override
+	public IPage<StorageFeeItemsVO> selectStorageFeeItemsPage(IPage<StorageFeeItemsVO> page, StorageFeeItemsVO storageFeeItems) {
+		return page.setRecords(baseMapper.selectStorageFeeItemsPage(page, storageFeeItems));
+	}
+
+}

+ 114 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/StorageFeeServiceImpl.java

@@ -0,0 +1,114 @@
+/*
+ *      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.trade.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 io.seata.spring.annotation.GlobalTransactional;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.los.Util.IDeptUtils;
+import org.springblade.los.trade.entity.StorageFee;
+import org.springblade.los.trade.entity.StorageFeeItems;
+import org.springblade.los.trade.mapper.StorageFeeMapper;
+import org.springblade.los.trade.service.IStorageFeeItemsService;
+import org.springblade.los.trade.service.IStorageFeeService;
+import org.springblade.los.trade.vo.StorageFeeVO;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+
+/**
+ * 贸易代理-仓储费 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Service
+@AllArgsConstructor
+public class StorageFeeServiceImpl extends ServiceImpl<StorageFeeMapper, StorageFee> implements IStorageFeeService {
+
+
+	private final ISysClient sysClient;
+
+	private final IDeptUtils deptUtils;
+
+	private final IStorageFeeItemsService storageFeeItemsService;
+
+	@Override
+	public IPage<StorageFeeVO> selectStorageFeePage(IPage<StorageFeeVO> page, StorageFeeVO storageFee) {
+		return page.setRecords(baseMapper.selectStorageFeePage(page, storageFee));
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
+	public R submit(StorageFee storageFee) {
+		Long deptId = 0L;
+		//获取部门ids对应中文名
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+			deptId = deptUtils.getDeptPid();
+		}
+		if (storageFee.getId() == null) {
+			storageFee.setCreateTime(new Date());
+			storageFee.setCreateUser(AuthUtil.getUserId());
+			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+				storageFee.setCreateDept(deptId);
+			}
+		} else {
+			storageFee.setUpdateUser(AuthUtil.getUserId());
+			storageFee.setUpdateTime(new Date());
+		}
+		this.saveOrUpdate(storageFee);
+		if (ObjectUtils.isNotNull(storageFee.getStorageFeeItemsList()) && !storageFee.getStorageFeeItemsList().isEmpty()) {
+			for (StorageFeeItems item : storageFee.getStorageFeeItemsList()) {
+				item.setPid(storageFee.getId());
+				if (item.getId() == null) {
+					item.setCreateTime(new Date());
+					item.setCreateUser(AuthUtil.getUserId());
+					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+						item.setCreateDept(deptId);
+					}
+				} else {
+					item.setUpdateUser(AuthUtil.getUserId());
+					item.setUpdateTime(new Date());
+				}
+			}
+			storageFeeItemsService.saveOrUpdateBatch(storageFee.getStorageFeeItemsList());
+		}
+		return R.data(storageFee);
+	}
+
+	@Override
+	public StorageFee detail(StorageFee storageFee) {
+		if (storageFee.getId() == null) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		StorageFee detail = baseMapper.selectById(storageFee.getId());
+		detail.setStorageFeeItemsList(storageFeeItemsService.list(new LambdaQueryWrapper<StorageFeeItems>()
+			.eq(StorageFeeItems::getTenantId, AuthUtil.getTenantId())
+			.eq(StorageFeeItems::getIsDeleted, 0)
+			.eq(StorageFeeItems::getPid, detail.getId())));
+		return detail;
+	}
+
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/trade/service/impl/StorageServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      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.trade.service.impl;
+
+import org.springblade.los.trade.entity.Storage;
+import org.springblade.los.trade.vo.StorageVO;
+import org.springblade.los.trade.mapper.StorageMapper;
+import org.springblade.los.trade.service.IStorageService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 贸易代理-仓库表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-07-23
+ */
+@Service
+public class StorageServiceImpl extends ServiceImpl<StorageMapper, Storage> implements IStorageService {
+
+	@Override
+	public IPage<StorageVO> selectStoragePage(IPage<StorageVO> page, StorageVO storage) {
+		return page.setRecords(baseMapper.selectStoragePage(page, storage));
+	}
+
+}

+ 10 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/settlement/controller/SettlementController.java

@@ -47,6 +47,7 @@ import org.springframework.web.bind.annotation.*;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 配件批发收付款结算表 控制器
@@ -218,7 +219,15 @@ public class SettlementController extends BladeController {
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "删除", notes = "传入ids")
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(settlementService.removeByIds(Func.toLongList(ids)));
+		List<Long> idList = Func.toLongList(ids);
+		List<PjSettlementItems> settlementList = settlementItemsService.list(new LambdaQueryWrapper<PjSettlementItems>()
+			.eq(PjSettlementItems::getIsDeleted, 0)
+			.eq(PjSettlementItems::getTenantId, AuthUtil.getTenantId())
+			.in(PjSettlementItems::getPid, idList));
+		if (!settlementList.isEmpty()) {
+			settlementItemsService.removeByIds(settlementList.stream().map(PjSettlementItems::getId).collect(Collectors.toList()));
+		}
+		return R.status(settlementService.removeByIds(idList));
 	}