Browse Source

2024年1月31日17:41:10

纪新园 1 year ago
parent
commit
d95bc01a1c
30 changed files with 2816 additions and 46 deletions
  1. 12 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/aea/entity/AeaBills.java
  2. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/dto/CustomsDeclarationDTO.java
  3. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/dto/CustomsDeclarationGoodsDTO.java
  4. 675 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/entity/CustomsDeclaration.java
  5. 226 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/entity/CustomsDeclarationGoods.java
  6. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/vo/CustomsDeclarationGoodsVO.java
  7. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/vo/CustomsDeclarationVO.java
  8. 6 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java
  9. 12 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/entity/FinAccBills.java
  10. 17 16
      blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsDescController.java
  11. 6 7
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/DeliveryController.java
  12. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/Util/MagicValues.java
  13. 3 2
      blade-service/blade-los/src/main/java/org/springblade/los/business/aea/controller/AeaBillsController.java
  14. 198 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/controller/CustomsDeclarationController.java
  15. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/controller/CustomsDeclarationGoodsController.java
  16. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationGoodsMapper.java
  17. 49 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationGoodsMapper.xml
  18. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationMapper.java
  19. 124 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationMapper.xml
  20. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/ICustomsDeclarationGoodsService.java
  21. 105 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/ICustomsDeclarationService.java
  22. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationGoodsServiceImpl.java
  23. 663 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationServiceImpl.java
  24. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BillsController.java
  25. 1 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  26. 28 15
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/PreContainersServiceImpl.java
  27. 3 1
      blade-service/blade-los/src/main/java/org/springblade/los/check/controller/AuditProecessController.java
  28. 2 0
      blade-service/blade-los/src/main/java/org/springblade/los/check/service/IAuditProecessService.java
  29. 248 1
      blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java
  30. 4 2
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FinAccBillsServiceImpl.java

+ 12 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/aea/entity/AeaBills.java

@@ -1171,6 +1171,18 @@ public class AeaBills implements Serializable {
 	@ApiModelProperty(value = "默认团队名")
 	private String teamName;
 
+	/**
+	 * 入库日期
+	 */
+	@ApiModelProperty(value = "入库日期")
+	private Date warehousingDate;
+
+	/**
+	 * 出库日期
+	 */
+	@ApiModelProperty(value = "出库日期")
+	private Date outboundDate;
+
 	@TableField(exist = false)
 	private String FM;
 

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/dto/CustomsDeclarationDTO.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.business.customsDeclaration.dto;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 业务-报关数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CustomsDeclarationDTO extends CustomsDeclaration {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/dto/CustomsDeclarationGoodsDTO.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.business.customsDeclaration.dto;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 业务-报关货物明细数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CustomsDeclarationGoodsDTO extends CustomsDeclarationGoods {
+	private static final long serialVersionUID = 1L;
+
+}

+ 675 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/entity/CustomsDeclaration.java

@@ -0,0 +1,675 @@
+/*
+ *      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.business.customsDeclaration.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springblade.los.business.files.entity.FilesCenter;
+import org.springblade.los.finance.fee.entity.FeeCenter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 业务-报关实体类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Data
+@TableName("los_customs_declaration")
+@ApiModel(value = "CustomsDeclaration对象", description = "业务-报关")
+public class CustomsDeclaration implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 分公司 Id
+	 */
+	@ApiModelProperty(value = "分公司 Id")
+	private String branchId;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建部门 Id
+	 */
+	@ApiModelProperty(value = "创建部门 Id")
+	private String createDept;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private String createDeptName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 业务类型, SE=海运报关 SI=海运报关 AE=空运报关 AI=空运报关
+	 */
+	@ApiModelProperty(value = "业务类型, SE=海运报关 SI=海运报关 AE=空运报关 AI=空运报关")
+	private String businessType;
+	/**
+	 * 进出口, E=出口 I=进口
+	 */
+	@ApiModelProperty(value = "进出口, E=出口 I=进口")
+	private String seaType;
+	/**
+	 * 单据编号
+	 */
+	@ApiModelProperty(value = "单据编号")
+	private String billNo;
+	/**
+	 * 订舱号
+	 */
+	@ApiModelProperty(value = "订舱号")
+	private String bookingNo;
+	/**
+	 * 提单号
+	 */
+	@ApiModelProperty(value = "提单号")
+	private String mblno;
+	/**
+	 * 三检单号
+	 */
+	@ApiModelProperty(value = "三检单号")
+	private String tripleInspectionNumber;
+	/**
+	 * 报关单号
+	 */
+	@ApiModelProperty(value = "报关单号")
+	private String customsDeclarationNumber;
+	/**
+	 * 备案号
+	 */
+	@ApiModelProperty(value = "备案号")
+	private String recordNumber;
+	/**
+	 * 提运单号
+	 */
+	@ApiModelProperty(value = "提运单号")
+	private String contractAgreementNumber;
+	/**
+	 * 合同协议号
+	 */
+	@ApiModelProperty(value = "合同协议号")
+	private String deliveryNumbers;
+	/**
+	 * 对帐约号
+	 */
+	@ApiModelProperty(value = "对帐约号")
+	private String reconciliationAgreementNumber;
+	/**
+	 * 核注清单号
+	 */
+	@ApiModelProperty(value = "核注清单号")
+	private String approvalListNumber;
+	/**
+	 * Reference NO
+	 */
+	@ApiModelProperty(value = "Reference NO")
+	private String refno;
+	/**
+	 * 发票号
+	 */
+	@ApiModelProperty(value = "发票号")
+	private String invoiceNumber;
+	/**
+	 * 接单日期
+	 */
+	@ApiModelProperty(value = "接单日期")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	@TableField(updateStrategy = FieldStrategy.IGNORED)
+	private Date billDate;
+	/**
+	 * etd
+	 */
+	@ApiModelProperty(value = "etd")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	@TableField(updateStrategy = FieldStrategy.IGNORED)
+	private Date etdDate;
+	/**
+	 * 报检日期
+	 */
+	@ApiModelProperty(value = "报检日期")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	@TableField(updateStrategy = FieldStrategy.IGNORED)
+	private Date inspectionDeclarationDate;
+	/**
+	 * 申报日期
+	 */
+	@ApiModelProperty(value = "申报日期")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	@TableField(updateStrategy = FieldStrategy.IGNORED)
+	private Date declareDate;
+	/**
+	 * 预录日期
+	 */
+	@ApiModelProperty(value = "预录日期")
+	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	@TableField(updateStrategy = FieldStrategy.IGNORED)
+	private Date preRrecordingDate;
+	/**
+	 * 业务来源
+	 */
+	@ApiModelProperty(value = "业务来源")
+	private String srcType;
+	/**
+	 * 来源 id
+	 */
+	@ApiModelProperty(value = "来源 id")
+	private Long srcId;
+	/**
+	 * 来源中文
+	 */
+	@ApiModelProperty(value = "来源中文")
+	private String srcCnName;
+	/**
+	 * 来源英文
+	 */
+	@ApiModelProperty(value = "来源英文")
+	private String srcEnName;
+	/**
+	 * 代理公司 id
+	 */
+	@ApiModelProperty(value = "代理公司 id")
+	private Long agencyCompanytId;
+	/**
+	 * 代理公司代码
+	 */
+	@ApiModelProperty(value = "代理公司代码")
+	private String agencyCompanytCode;
+	/**
+	 * 代理公司中文名称
+	 */
+	@ApiModelProperty(value = "代理公司中文名称")
+	private String agencyCompanytCnName;
+	/**
+	 * 代理公司英文名称
+	 */
+	@ApiModelProperty(value = "代理公司英文名称")
+	private String agencyCompanytEnName;
+	/**
+	 * 经营单位 id
+	 */
+	@ApiModelProperty(value = "经营单位 id")
+	private Long corpId;
+	/**
+	 * 经营单位中文名称
+	 */
+	@ApiModelProperty(value = "经营单位中文名称")
+	private String corpCnName;
+	/**
+	 * 经营单位英文名称
+	 */
+	@ApiModelProperty(value = "经营单位英文名称")
+	private String corpEnName;
+	/**
+	 * 发货单位 id
+	 */
+	@ApiModelProperty(value = "发货单位 id")
+	private Long deliveryId;
+	/**
+	 * 发货单位中文名称
+	 */
+	@ApiModelProperty(value = "发货单位中文名称")
+	private String deliveryCnName;
+	/**
+	 * 发货单位英文名称
+	 */
+	@ApiModelProperty(value = "发货单位英文名称")
+	private String deliveryEnName;
+	/**
+	 * 企业 id
+	 */
+	@ApiModelProperty(value = "企业 id")
+	private Long enterpriseId;
+	/**
+	 * 企业中文名称
+	 */
+	@ApiModelProperty(value = "企业中文名称")
+	private String enterpriseCnName;
+	/**
+	 * 企业英文名称
+	 */
+	@ApiModelProperty(value = "企业英文名称")
+	private String enterpriseEnName;
+	/**
+	 * 企业海关编号
+	 */
+	@ApiModelProperty(value = "企业海关编号")
+	private String enterpriseCode;
+	/**
+	 * 船名 id
+	 */
+	@ApiModelProperty(value = "船名 id")
+	private Long vesselId;
+	/**
+	 * 中文船名
+	 */
+	@ApiModelProperty(value = "中文船名")
+	private String vesselCnName;
+	/**
+	 * 英文船名
+	 */
+	@ApiModelProperty(value = "英文船名")
+	private String vesselEnName;
+	/**
+	 * 申报方式编码
+	 */
+	@ApiModelProperty(value = "申报方式编码")
+	private String declarationMethodCode;
+	/**
+	 * 申报方式
+	 */
+	@ApiModelProperty(value = "申报方式")
+	private String declarationMethodName;
+	/**
+	 * 贸易方式id
+	 */
+	@ApiModelProperty(value = "贸易方式id")
+	private String tradeMethodId;
+	/**
+	 * 贸易方式编码
+	 */
+	@ApiModelProperty(value = "贸易方式编码")
+	private String tradeMethodCode;
+	/**
+	 * 贸易方式
+	 */
+	@ApiModelProperty(value = "贸易方式")
+	private String tradeMethodName;
+	/**
+	 * 运输方式
+	 */
+	@ApiModelProperty(value = "运输方式")
+	private String transportMethod;
+	/**
+	 * 运输工具
+	 */
+	@ApiModelProperty(value = "运输工具")
+	private String transportTool;
+	/**
+	 * 结汇方式
+	 */
+	@ApiModelProperty(value = "结汇方式")
+	private String exchangeSettlementMethod;
+	/**
+	 * 成交方式
+	 */
+	@ApiModelProperty(value = "成交方式")
+	private String dealMethod;
+	/**
+	 * 出口口岸 id
+	 */
+	@ApiModelProperty(value = "出口口岸 id")
+	private Long exportPortId;
+	/**
+	 * 出口口岸中文名称
+	 */
+	@ApiModelProperty(value = "出口口岸中文名称")
+	private String exportPortCnName;
+	/**
+	 * 出口口岸英文名称
+	 */
+	@ApiModelProperty(value = "出口口岸英文名称")
+	private String exportPortEnName;
+	/**
+	 * 运抵国 id
+	 */
+	@ApiModelProperty(value = "运抵国 id")
+	private Long destinationCountryId;
+	/**
+	 * 运抵国中文名称
+	 */
+	@ApiModelProperty(value = "运抵国中文名称")
+	private String destinationCountryCnName;
+	/**
+	 * 运抵国英文名称
+	 */
+	@ApiModelProperty(value = "运抵国英文名称")
+	private String destinationCountryEnName;
+	/**
+	 * 指运港 id
+	 */
+	@ApiModelProperty(value = "指运港 id")
+	private Long portOfDestinationId;
+	/**
+	 * 指运港中文名称
+	 */
+	@ApiModelProperty(value = "指运港中文名称")
+	private String portOfDestinationCnName;
+	/**
+	 * 指运港英文名称
+	 */
+	@ApiModelProperty(value = "指运港英文名称")
+	private String portOfDestinationEnName;
+	/**
+	 * 运费
+	 */
+	@ApiModelProperty(value = "运费")
+	private BigDecimal amountFreight;
+	/**
+	 * 杂费
+	 */
+	@ApiModelProperty(value = "杂费")
+	private BigDecimal amountMiscellaneousExpenses;
+	/**
+	 * 保费
+	 */
+	@ApiModelProperty(value = "保费")
+	private BigDecimal amountPremium;
+	/**
+	 * 货物金额
+	 */
+	@ApiModelProperty(value = "货物金额")
+	private BigDecimal amountGoods;
+	/**
+	 * 境内货源地
+	 */
+	@ApiModelProperty(value = "境内货源地")
+	private String domesticSourceOfGoods;
+	/**
+	 * 随附单据
+	 */
+	@ApiModelProperty(value = "随附单据")
+	private String documentsAttached;
+	/**
+	 * 其他单据
+	 */
+	@ApiModelProperty(value = "其他单据")
+	private String documentsAttachedOther;
+	/**
+	 * 源操作
+	 */
+	@ApiModelProperty(value = "源操作")
+	private String srcOperation;
+	/**
+	 * 唛头
+	 */
+	@ApiModelProperty(value = "唛头")
+	private String marks;
+	/**
+	 * 包装单位 Id
+	 */
+	@ApiModelProperty(value = "包装单位 Id")
+	private Long packingUnitId;
+	/**
+	 * 包装单位
+	 */
+	@ApiModelProperty(value = "包装单位")
+	private String packingUnit;
+	/**
+	 * 件数
+	 */
+	@ApiModelProperty(value = "件数")
+	private BigDecimal quantity;
+	/**
+	 * 毛重 (KGM)
+	 */
+	@ApiModelProperty(value = "毛重 (KGM)")
+	private BigDecimal grossWeight;
+	/**
+	 * 净重 (KGM)
+	 */
+	@ApiModelProperty(value = "净重 (KGM)")
+	private BigDecimal netWeight;
+	/**
+	 * 本位币应收(CNY)
+	 */
+	@ApiModelProperty(value = "本位币应收(CNY)")
+	private BigDecimal amountDr;
+	/**
+	 * 本位币应付(CNY)
+	 */
+	@ApiModelProperty(value = "本位币应付(CNY)")
+	private BigDecimal amountCr;
+	/**
+	 * 本位币利润(CNY)
+	 */
+	@ApiModelProperty(value = "本位币利润(CNY)")
+	private BigDecimal amountProfit;
+	/**
+	 * 综合 USD 应收(USD) - 非 USD 外币转换为 USD
+	 */
+	@ApiModelProperty(value = "综合 USD 应收(USD) - 非 USD 外币转换为 USD")
+	private BigDecimal amountDrUsd;
+	/**
+	 * 综合 USD 应付(USD) - 非 USD 外币转换为 USD
+	 */
+	@ApiModelProperty(value = "综合 USD 应付(USD) - 非 USD 外币转换为 USD")
+	private BigDecimal amountCrUsd;
+	/**
+	 * 综合 USD 利润(USD) - 非 USD 外币转换为 USD
+	 */
+	@ApiModelProperty(value = "综合 USD 利润(USD) - 非 USD 外币转换为 USD")
+	private BigDecimal amountProfitUsd;
+	/**
+	 * 合计本位币应收(CNY )
+	 */
+	@ApiModelProperty(value = "合计本位币应收(CNY )")
+	private BigDecimal amountDrLoc;
+	/**
+	 * 合计本位币应付(CNY)
+	 */
+	@ApiModelProperty(value = "合计本位币应付(CNY)")
+	private BigDecimal amountCrLoc;
+	/**
+	 * 合计本位币利润(CNY)
+	 */
+	@ApiModelProperty(value = "合计本位币利润(CNY)")
+	private BigDecimal amountProfitLoc;
+	/**
+	 * 应收对账状态 Id(0  未对账 3 部分对账 9 已对账)
+	 */
+	@ApiModelProperty(value = "应收对账状态 Id(0  未对账 3 部分对账 9 已对账)")
+	private Integer checkDrStatus;
+	/**
+	 * 应收对账状态描述(0  未对账 3 部分对账 9 已对账)
+	 */
+	@ApiModelProperty(value = "应收对账状态描述(0  未对账 3 部分对账 9 已对账)")
+	private String checkDrStatusDescr;
+	/**
+	 * 应收付账状态 Id(0  未对账 3 部分对账 9 已对账)
+	 */
+	@ApiModelProperty(value = "应收付账状态 Id(0  未对账 3 部分对账 9 已对账)")
+	private Integer checkCrStatus;
+	/**
+	 * 应付对账状态描述(0  未对账 3 部分对账 9 已对账)
+	 */
+	@ApiModelProperty(value = "应付对账状态描述(0  未对账 3 部分对账 9 已对账)")
+	private String checkCrStatusDescr;
+	/**
+	 * 应收结算状态 Id(0  未结 3 部分 9 结清)
+	 */
+	@ApiModelProperty(value = "应收结算状态 Id(0  未结 3 部分 9 结清)")
+	private Integer stlDrStatus;
+	/**
+	 * 应收结算状态描述(0  未结 3 部分 9 结清)
+	 */
+	@ApiModelProperty(value = "应收结算状态描述(0  未结 3 部分 9 结清)")
+	private String stlDrStatusDescr;
+	/**
+	 * 应付结算状态 Id(0  未结 3 部分 9 结清)
+	 */
+	@ApiModelProperty(value = "应付结算状态 Id(0  未结 3 部分 9 结清)")
+	private Integer stlCrStatus;
+	/**
+	 * 应付结算状态描述(0  未结 3 部分 9 结清)
+	 */
+	@ApiModelProperty(value = "应付结算状态描述(0  未结 3 部分 9 结清)")
+	private String stlCrStatusDescr;
+	/**
+	 * 销项发票开具状态 Id(0  未开 3 部分 9 全开)
+	 */
+	@ApiModelProperty(value = "销项发票开具状态 Id(0  未开 3 部分 9 全开)")
+	private Integer invoiceDrStatus;
+	/**
+	 * 销项发票开具状态描述(0  未开 3 部分 9 全开)
+	 */
+	@ApiModelProperty(value = "销项发票开具状态描述(0  未开 3 部分 9 全开)")
+	private String invoiceDrStatusDescr;
+	/**
+	 * 进项发票开具状态 Id(0  未开 3 部分 9 全开)
+	 */
+	@ApiModelProperty(value = "进项发票开具状态 Id(0  未开 3 部分 9 全开)")
+	private Integer invoiceCrStatus;
+	/**
+	 * 进项发票开具状态描述(0  未开 3 部分 9 全开)
+	 */
+	@ApiModelProperty(value = "进项发票开具状态描述(0  未开 3 部分 9 全开)")
+	private String invoiceCrStatusDescr;
+	/**
+	 * 状态(业务参数配置)
+	 */
+	@ApiModelProperty(value = "状态(业务参数配置)")
+	private Integer billStatus;
+	/**
+	 * 财务状态(业务参数配置)
+	 */
+	@ApiModelProperty(value = "财务状态(业务参数配置)")
+	private Integer accountStatus;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 默认团队id
+	 */
+	@ApiModelProperty(value = "默认团队id")
+	private Long teamId;
+	/**
+	 * 默认团队名
+	 */
+	@ApiModelProperty(value = "默认团队名")
+	private String teamName;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+	/**
+	 * 物流-费用中心(付)
+	 */
+	@TableField(exist = false)
+	private List<FeeCenter> feeCenterListC;
+
+	/**
+	 * 物流-费用中心(收)
+	 */
+	@TableField(exist = false)
+	private List<FeeCenter> feeCenterListD;
+
+	//跳转对应页面的路由
+	@TableField(exist = false)
+	private String url;
+	//页面枚举
+	@TableField(exist = false)
+	private String pageStatus;
+	//页面名字
+	@TableField(exist = false)
+	private String pageLabel;
+
+	/**
+	 * 编码生成code
+	 */
+	@TableField(exist = false)
+	private String billNoFormat;
+
+	/**
+	 * 业务类型表 code
+	 */
+	@TableField(exist = false)
+	private String businessTypeCode;
+
+	/**
+	 * 文件
+	 */
+	@TableField(exist = false)
+	private List<FilesCenter> filesList;
+
+	/**
+	 * 报关货物明细实体类
+	 */
+	@TableField(exist = false)
+	private List<CustomsDeclarationGoods> customsDeclarationGoodsList;
+
+
+}

+ 226 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/entity/CustomsDeclarationGoods.java

@@ -0,0 +1,226 @@
+/*
+ *      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.business.customsDeclaration.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-01-31
+ */
+@Data
+@TableName("los_customs_declaration_goods")
+@ApiModel(value = "CustomsDeclarationGoods对象", description = "业务-报关货物明细")
+public class CustomsDeclarationGoods implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 主表id
+	 */
+	@ApiModelProperty(value = "主表id")
+	private Long pid;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建部门 Id
+	 */
+	@ApiModelProperty(value = "创建部门 Id")
+	private String createDept;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private String createDeptName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 序号
+	 */
+	@ApiModelProperty(value = "序号")
+	private Integer sort;
+	/**
+	 * 备案序号
+	 */
+	@ApiModelProperty(value = "备案序号")
+	private String recordNo;
+	/**
+	 * 分单号
+	 */
+	@ApiModelProperty(value = "分单号")
+	private String hblno;
+	/**
+	 * 商品编码
+	 */
+	@ApiModelProperty(value = "商品编码")
+	private String commodityCode;
+	/**
+	 * 商品名称
+	 */
+	@ApiModelProperty(value = "商品名称")
+	private String commodityName;
+	/**
+	 * 规格型号
+	 */
+	@ApiModelProperty(value = "规格型号")
+	private String specificationModel;
+	/**
+	 * 目的国
+	 */
+	@ApiModelProperty(value = "目的国")
+	private Long destinationCountryId;
+	/**
+	 * 目的国中文
+	 */
+	@ApiModelProperty(value = "目的国中文")
+	private String destinationCountryCnName;
+	/**
+	 * 目的国英文
+	 */
+	@ApiModelProperty(value = "目的国英文")
+	private String destinationCountryEnName;
+	/**
+	 * 成交单位
+	 */
+	@ApiModelProperty(value = "成交单位")
+	private String transactionUnit;
+	/**
+	 * 成交数量
+	 */
+	@ApiModelProperty(value = "成交数量")
+	private BigDecimal transactionVolume;
+	/**
+	 * 成交单价
+	 */
+	@ApiModelProperty(value = "成交单价")
+	private BigDecimal transactionPrice;
+	/**
+	 * 总价
+	 */
+	@ApiModelProperty(value = "总价")
+	private BigDecimal totalPrice;
+	/**
+	 * 币种
+	 */
+	@ApiModelProperty(value = "币种")
+	private String currency;
+	/**
+	 * 法定单位
+	 */
+	@ApiModelProperty(value = "法定单位")
+	private String legalUnit;
+	/**
+	 * 法定数量
+	 */
+	@ApiModelProperty(value = "法定数量")
+	private BigDecimal legalQuantity;
+	/**
+	 * 征免
+	 */
+	@ApiModelProperty(value = "征免")
+	private String levyExemption;
+	/**
+	 * 件数
+	 */
+	@ApiModelProperty(value = "件数")
+	private BigDecimal quantity;
+	/**
+	 * 毛重
+	 */
+	@ApiModelProperty(value = "毛重")
+	private BigDecimal grossWeight;
+	/**
+	 * 净重
+	 */
+	@ApiModelProperty(value = "净重")
+	private BigDecimal netWeight;
+	/**
+	 * pcs数量
+	 */
+	@ApiModelProperty(value = "pcs数量")
+	private BigDecimal pcsQuantity;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/vo/CustomsDeclarationGoodsVO.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.business.customsDeclaration.vo;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 业务-报关货物明细视图实体类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "CustomsDeclarationGoodsVO对象", description = "业务-报关货物明细")
+public class CustomsDeclarationGoodsVO extends CustomsDeclarationGoods {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/customsDeclaration/vo/CustomsDeclarationVO.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.business.customsDeclaration.vo;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 业务-报关视图实体类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "CustomsDeclarationVO对象", description = "业务-报关")
+public class CustomsDeclarationVO extends CustomsDeclaration {
+	private static final long serialVersionUID = 1L;
+
+}

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

@@ -1655,4 +1655,10 @@ public class Bills implements Serializable {
 	@ApiModelProperty(value = "默认团队名")
 	private String teamName;
 
+	/**
+	 * teu箱数
+	 */
+	@ApiModelProperty(value = "teu箱数")
+	private Integer teu;
+
 }

+ 12 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/fee/entity/FinAccBills.java

@@ -692,5 +692,17 @@ public class FinAccBills implements Serializable {
 	@ApiModelProperty(value = "默认团队名")
 	private String teamName;
 
+	/**
+	 * 入库日期
+	 */
+	@ApiModelProperty(value = "入库日期")
+	private Date warehousingDate;
+
+	/**
+	 * 出库日期
+	 */
+	@ApiModelProperty(value = "出库日期")
+	private Date outboundDate;
+
 
 }

+ 17 - 16
blade-service/blade-client/src/main/java/org/springblade/client/goods/controller/GoodsDescController.java

@@ -248,7 +248,7 @@ public class GoodsDescController extends BladeController {
 					List<String> typeStr = list.stream().map(GoodsType::getCname).collect(Collectors.toList());
 					e.setGoodsTypeName(typeStr.toString().replace("[", "").replace("]", ""));
 				}
-				if ("681169".equals(AuthUtil.getTenantId()) || "941197".equals(AuthUtil.getTenantId())){
+				if ("681169".equals(AuthUtil.getTenantId()) || "941197".equals(AuthUtil.getTenantId())) {
 					e.setPolicyName(salesPolicyClient.getPolicyName(e.getId()));
 				}
 				e.setShoppingMall(finalShoppingMall);
@@ -591,18 +591,19 @@ public class GoodsDescController extends BladeController {
 		}
 
 		List<PriceBank> list = priceBankClient.selectList();
-
+		List<CorpsDesc> corpsDescList = corpsDescService.list(new LambdaQueryWrapper<CorpsDesc>()
+			.eq(CorpsDesc::getTenantId, AuthUtil.getTenantId())
+			.eq(CorpsDesc::getIsDeleted, 0));
+		LambdaQueryWrapper<GoodsSpecification> specificationWrapper = new LambdaQueryWrapper<>();
+		specificationWrapper.eq(GoodsSpecification::getIsDeleted, 0);
+		specificationWrapper.eq(GoodsSpecification::getTenantId, SecureUtil.getTenantId());
+		List<GoodsSpecification> goodsSpecificationList = goodsSpecificationService.list(specificationWrapper);
 		IPage<GoodsDescVO> goodsDescVOIPage = goodsDescService.selectGoods(Condition.getPage(query), goodsDesc);
 		if (CollectionUtils.isNotEmpty(goodsDescVOIPage.getRecords())) {
 			goodsDescVOIPage.getRecords().forEach(e -> {
-				LambdaQueryWrapper<GoodsSpecification> specificationWrapper = new LambdaQueryWrapper<>();
-				specificationWrapper.eq(GoodsSpecification::getPid, e.getId());
-				specificationWrapper.eq(GoodsSpecification::getIsDeleted, 0);
-				specificationWrapper.eq(GoodsSpecification::getTenantId, SecureUtil.getTenantId());
-				List<GoodsSpecification> goodsSpecificationList = goodsSpecificationService.list(specificationWrapper);
-				e.setGoodsSpecificationList(goodsSpecificationList);
+				e.setGoodsSpecificationList(goodsSpecificationList.stream().filter(g -> g.getPid().equals(e.getId())).collect(Collectors.toList()));
 				if (e.getCorpId() != null) {
-					CorpsDesc desc = corpsDescService.getById(e.getCorpId());
+					CorpsDesc desc = corpsDescList.stream().filter(c -> e.getId().equals(e.getCorpId())).findFirst().orElse(null);
 					if (desc != null) {
 						e.setCorpCode(desc.getCode());
 					}
@@ -643,14 +644,14 @@ public class GoodsDescController extends BladeController {
 			goodsDesc.setGoodsTypeIdList(goodsIdList);
 		}
 		List<GoodsDescVO> list = goodsDescService.selectGoodsAll(goodsDesc);
+		LambdaQueryWrapper<GoodsSpecification> specificationWrapper = new LambdaQueryWrapper<>();
+		specificationWrapper.eq(GoodsSpecification::getIsDeleted, 0);
+		specificationWrapper.eq(GoodsSpecification::getTenantId, SecureUtil.getTenantId());
+		List<GoodsSpecification> goodsSpecificationList = goodsSpecificationService.list(specificationWrapper);
 		if (CollectionUtils.isNotEmpty(list)) {
 			list.forEach(e -> {
-				LambdaQueryWrapper<GoodsSpecification> specificationWrapper = new LambdaQueryWrapper<>();
-				specificationWrapper.eq(GoodsSpecification::getPid, e.getId());
-				specificationWrapper.eq(GoodsSpecification::getIsDeleted, 0);
-				specificationWrapper.eq(GoodsSpecification::getTenantId, SecureUtil.getTenantId());
-				List<GoodsSpecification> goodsSpecificationList = goodsSpecificationService.list(specificationWrapper);
-				e.setGoodsSpecificationList(goodsSpecificationList);
+
+				e.setGoodsSpecificationList(goodsSpecificationList.stream().filter(g -> g.getPid().equals(e.getId())).collect(Collectors.toList()));
 			});
 		}
 		return R.data(list);
@@ -706,7 +707,7 @@ public class GoodsDescController extends BladeController {
 						   @RequestParam(name = "code", required = false) String code,
 						   @RequestParam(name = "cname", required = false) String cname,
 						   @RequestParam(name = "ename", required = false) String ename
-						   ) {
+	) {
 
 
 		LambdaQueryWrapper<GoodsDesc> goodsDescLambdaQueryWrapper = new LambdaQueryWrapper<>();

+ 6 - 7
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/controller/DeliveryController.java

@@ -157,14 +157,13 @@ public class DeliveryController extends BladeController {
 		List<CorpsDesc> corpsDescList = corpsDescClient.getCorp(corpsDesc);
 		List<User> userList = iUserClient.selectUserAll();
 		List<StorageType> storageDescList = iStorageClient.selectStorageTypeAll();
-		List<Long> ids = pages.getRecords().stream().map(Delivery::getId).collect(Collectors.toList());
-		LambdaQueryWrapper<DeliveryItems> itemsLambdaQueryWrapper = new LambdaQueryWrapper<>();
-		itemsLambdaQueryWrapper.eq(DeliveryItems::getTenantId, AuthUtil.getTenantId())
-			.eq(DeliveryItems::getIsDeleted, 0)
-			.in(DeliveryItems::getPid, ids);
-
-		List<DeliveryItems> itemsList = deliveryItemsService.list(itemsLambdaQueryWrapper);
 		if (CollectionUtils.isNotEmpty(pages.getRecords())) {
+			List<Long> ids = pages.getRecords().stream().map(Delivery::getId).collect(Collectors.toList());
+			LambdaQueryWrapper<DeliveryItems> itemsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+			itemsLambdaQueryWrapper.eq(DeliveryItems::getTenantId, AuthUtil.getTenantId())
+				.eq(DeliveryItems::getIsDeleted, 0)
+				.in(DeliveryItems::getPid, ids);
+			List<DeliveryItems> itemsList = deliveryItemsService.list(itemsLambdaQueryWrapper);
 			pages.getRecords().forEach(item -> {
 				if (item.getCorpId() != null) {
 					CorpsDesc corpMessage = corpsDescList.stream().filter(corps -> corps.getId().equals(item.getCorpId())).findFirst().orElse(null);

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/Util/MagicValues.java

@@ -22,7 +22,7 @@ public class MagicValues {
 	public static final String MEET = "应付";
 	public static final String RECEIVABLE = "应收";
 	public static final String DISPATCH_NOTICE = "派车通知单";
-	public static final String INCOMING_NOTIFICATION = "派车通知单";
+	public static final String INCOMING_NOTIFICATION = "入货通知";
 	public static final String SALES_REPORT = "销售报告";
 	public static final String MASTER_BILLS = "MASTER 提单";
 	public static final String HYCK = "HYCK";

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

@@ -88,7 +88,8 @@ public class AeaBillsController extends BladeController {
 			AeaBills::getAmountDrLoc, AeaBills::getAmountCrLoc, AeaBills::getAmountProfitLoc, AeaBills::getCheckCrStatusDescr, AeaBills::getCheckDrStatusDescr,
 			AeaBills::getStlCrStatusDescr, AeaBills::getStlDrStatusDescr, AeaBills::getInvoiceCrStatusDescr, AeaBills::getInvoiceDrStatusDescr, AeaBills::getCreateUserName,
 			AeaBills::getCreateTime, AeaBills::getUpdateUserName, AeaBills::getUpdateTime, AeaBills::getStatus, AeaBills::getBillStatus,
-			AeaBills::getAccountStatus, AeaBills::getRemarks, AeaBills::getPackingUnit, AeaBills::getBillDate,AeaBills::getTeamName,AeaBills::getCreateUser);
+			AeaBills::getAccountStatus, AeaBills::getRemarks, AeaBills::getPackingUnit, AeaBills::getBillDate, AeaBills::getTeamName, AeaBills::getCreateUser,
+			AeaBills::getWarehousingDate, AeaBills::getOutboundDate);
 		lambdaQueryWrapper.eq(AeaBills::getIsDeleted, 0)
 			.eq(AeaBills::getTenantId, AuthUtil.getTenantId())
 			.and(i -> i.isNull(AeaBills::getMasterId).or()
@@ -151,7 +152,7 @@ public class AeaBillsController extends BladeController {
 			AeaBills::getAmountDrLoc, AeaBills::getAmountCrLoc, AeaBills::getAmountProfitLoc, AeaBills::getCheckCrStatusDescr, AeaBills::getCheckDrStatusDescr,
 			AeaBills::getStlCrStatusDescr, AeaBills::getStlDrStatusDescr, AeaBills::getInvoiceCrStatusDescr, AeaBills::getInvoiceDrStatusDescr, AeaBills::getCreateUserName,
 			AeaBills::getCreateTime, AeaBills::getUpdateUserName, AeaBills::getUpdateTime, AeaBills::getStatus, AeaBills::getBillStatus,
-			AeaBills::getAccountStatus, AeaBills::getRemarks, AeaBills::getPackingUnit, AeaBills::getBillDate);
+			AeaBills::getAccountStatus, AeaBills::getRemarks, AeaBills::getPackingUnit, AeaBills::getBillDate,AeaBills::getWarehousingDate, AeaBills::getOutboundDate);
 		lambdaQueryWrapper.eq(AeaBills::getIsDeleted, 0)
 			.eq(AeaBills::getTenantId, AuthUtil.getTenantId())
 			.and(i -> i.isNull(AeaBills::getMasterId).or()

+ 198 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/controller/CustomsDeclarationController.java

@@ -0,0 +1,198 @@
+/*
+ *      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.business.customsDeclaration.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.common.annotation.RepeatSubmit;
+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.business.customsDeclaration.entity.CustomsDeclaration;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationVO;
+import org.springblade.los.business.customsDeclaration.service.ICustomsDeclarationService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 业务-报关 控制器
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/customsdeclaration")
+@Api(value = "业务-报关", tags = "业务-报关接口")
+public class CustomsDeclarationController extends BladeController {
+
+	private final ICustomsDeclarationService customsDeclarationService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入customsDeclaration")
+	public R<CustomsDeclaration> detail(CustomsDeclaration customsDeclaration) {
+		CustomsDeclaration detail = customsDeclarationService.detail(customsDeclaration);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 业务-报关
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入customsDeclaration")
+	public R<IPage<CustomsDeclaration>> list(CustomsDeclaration customsDeclaration, Query query) {
+		IPage<CustomsDeclaration> pages = customsDeclarationService.page(Condition.getPage(query), Condition.getQueryWrapper(customsDeclaration));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 业务-报关
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入customsDeclaration")
+	public R<IPage<CustomsDeclarationVO>> page(CustomsDeclarationVO customsDeclaration, Query query) {
+		IPage<CustomsDeclarationVO> pages = customsDeclarationService.selectCustomsDeclarationPage(Condition.getPage(query), customsDeclaration);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 业务-报关
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入customsDeclaration")
+	public R save(@Valid @RequestBody CustomsDeclaration customsDeclaration) {
+		return R.status(customsDeclarationService.save(customsDeclaration));
+	}
+
+	/**
+	 * 修改 业务-报关
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入customsDeclaration")
+	public R update(@Valid @RequestBody CustomsDeclaration customsDeclaration) {
+		return R.status(customsDeclarationService.updateById(customsDeclaration));
+	}
+
+	/**
+	 * 新增或修改 业务-报关
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入customsDeclaration")
+	public R submit(@Valid @RequestBody CustomsDeclaration customsDeclaration) {
+		return customsDeclarationService.submit(customsDeclaration);
+	}
+
+
+	/**
+	 * 删除 业务-报关
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(customsDeclarationService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+	/**
+	 * 单据请核
+	 */
+	@PostMapping("/checkCustomsDeclaration")
+	@ApiOperationSupport(order = 13)
+	@ApiOperation(value = "请核", notes = "传入customsDeclaration")
+	@RepeatSubmit
+	public R checkCustomsDeclaration(@RequestBody CustomsDeclaration customsDeclaration) {
+		CustomsDeclaration declare = customsDeclarationService.checkCustomsDeclaration(customsDeclaration);
+		return R.data(declare);
+	}
+
+	/**
+	 * 撤销单据请核
+	 */
+	@PostMapping("/revokeCheckCustomsDeclaration")
+	@ApiOperationSupport(order = 13)
+	@ApiOperation(value = "撤销请核", notes = "传入customsDeclaration")
+	@RepeatSubmit
+	public R revokeCheckCustomsDeclaration(@RequestBody CustomsDeclaration customsDeclaration) {
+		CustomsDeclaration declare = customsDeclarationService.revokeCheckCustomsDeclaration(customsDeclaration);
+		return R.data(declare);
+	}
+
+	/**
+	 * 审核通过
+	 */
+	@PostMapping("/passCheck")
+	@ApiOperationSupport(order = 14)
+	@ApiOperation(value = "审核通过", notes = "传入id")
+	@RepeatSubmit
+	public R passCheck(@ApiParam(value = "主表id", required = true) @RequestParam Long id) {
+		return customsDeclarationService.passCheck(id);
+	}
+
+	/**
+	 * 审核中
+	 */
+	@PostMapping("/underReview")
+	@ApiOperationSupport(order = 15)
+	@ApiOperation(value = "审核中", notes = "传入id")
+	@RepeatSubmit
+	public R underReview(@ApiParam(value = "主表id", required = true) @RequestParam Long id) {
+		return customsDeclarationService.underReview(id);
+	}
+
+	/**
+	 * 审核不通过
+	 */
+	@PostMapping("/passCancel")
+	@ApiOperationSupport(order = 16)
+	@ApiOperation(value = "Feign-审核不通过", notes = "传入财务id")
+	@RepeatSubmit
+	public R passCancel(@ApiParam(value = "财务主表id", required = true) @RequestParam Long id) {
+		return customsDeclarationService.passCancel(id);
+	}
+
+	/**
+	 * 复制单据
+	 */
+	@PostMapping("/copyCustomsDeclaration")
+	@ApiOperationSupport(order = 13)
+	@ApiOperation(value = "复制单据", notes = "传入CustomsDeclaration")
+	@RepeatSubmit
+	public R copyCustomsDeclaration(@RequestBody CustomsDeclaration customsDeclaration) {
+		CustomsDeclaration declare = customsDeclarationService.copyCustomsDeclaration(customsDeclaration);
+		return R.data(declare);
+	}
+
+
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/controller/CustomsDeclarationGoodsController.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.business.customsDeclaration.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.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationGoodsVO;
+import org.springblade.los.business.customsDeclaration.service.ICustomsDeclarationGoodsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 业务-报关货物明细 控制器
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/customsdeclarationgoods")
+@Api(value = "业务-报关货物明细", tags = "业务-报关货物明细接口")
+public class CustomsDeclarationGoodsController extends BladeController {
+
+	private final ICustomsDeclarationGoodsService customsDeclarationGoodsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入customsDeclarationGoods")
+	public R<CustomsDeclarationGoods> detail(CustomsDeclarationGoods customsDeclarationGoods) {
+		CustomsDeclarationGoods detail = customsDeclarationGoodsService.getOne(Condition.getQueryWrapper(customsDeclarationGoods));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 业务-报关货物明细
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入customsDeclarationGoods")
+	public R<IPage<CustomsDeclarationGoods>> list(CustomsDeclarationGoods customsDeclarationGoods, Query query) {
+		IPage<CustomsDeclarationGoods> pages = customsDeclarationGoodsService.page(Condition.getPage(query), Condition.getQueryWrapper(customsDeclarationGoods));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 业务-报关货物明细
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入customsDeclarationGoods")
+	public R<IPage<CustomsDeclarationGoodsVO>> page(CustomsDeclarationGoodsVO customsDeclarationGoods, Query query) {
+		IPage<CustomsDeclarationGoodsVO> pages = customsDeclarationGoodsService.selectCustomsDeclarationGoodsPage(Condition.getPage(query), customsDeclarationGoods);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 业务-报关货物明细
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入customsDeclarationGoods")
+	public R save(@Valid @RequestBody CustomsDeclarationGoods customsDeclarationGoods) {
+		return R.status(customsDeclarationGoodsService.save(customsDeclarationGoods));
+	}
+
+	/**
+	 * 修改 业务-报关货物明细
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入customsDeclarationGoods")
+	public R update(@Valid @RequestBody CustomsDeclarationGoods customsDeclarationGoods) {
+		return R.status(customsDeclarationGoodsService.updateById(customsDeclarationGoods));
+	}
+
+	/**
+	 * 新增或修改 业务-报关货物明细
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入customsDeclarationGoods")
+	public R submit(@Valid @RequestBody CustomsDeclarationGoods customsDeclarationGoods) {
+		return R.status(customsDeclarationGoodsService.saveOrUpdate(customsDeclarationGoods));
+	}
+
+	
+	/**
+	 * 删除 业务-报关货物明细
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(customsDeclarationGoodsService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationGoodsMapper.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.business.customsDeclaration.mapper;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationGoodsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 业务-报关货物明细 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+public interface CustomsDeclarationGoodsMapper extends BaseMapper<CustomsDeclarationGoods> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param customsDeclarationGoods
+	 * @return
+	 */
+	List<CustomsDeclarationGoodsVO> selectCustomsDeclarationGoodsPage(IPage page, CustomsDeclarationGoodsVO customsDeclarationGoods);
+
+}

+ 49 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationGoodsMapper.xml

@@ -0,0 +1,49 @@
+<?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.business.customsDeclaration.mapper.CustomsDeclarationGoodsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="customsDeclarationGoodsResultMap" type="org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_dept_name" property="createDeptName"/>
+        <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="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="sort" property="sort"/>
+        <result column="record_no" property="recordNo"/>
+        <result column="hblno" property="hblno"/>
+        <result column="commodity_code" property="commodityCode"/>
+        <result column="commodity_name" property="commodityName"/>
+        <result column="specification_model" property="specificationModel"/>
+        <result column="destination_country_id" property="destinationCountryId"/>
+        <result column="destination_country_cn_name" property="destinationCountryCnName"/>
+        <result column="destination_country_en_name" property="destinationCountryEnName"/>
+        <result column="transaction_unit" property="transactionUnit"/>
+        <result column="transaction_volume" property="transactionVolume"/>
+        <result column="transaction_price" property="transactionPrice"/>
+        <result column="total_price" property="totalPrice"/>
+        <result column="currency" property="currency"/>
+        <result column="legal_unit" property="legalUnit"/>
+        <result column="legal_quantity" property="legalQuantity"/>
+        <result column="levy_exemption" property="levyExemption"/>
+        <result column="quantity" property="quantity"/>
+        <result column="gross_weight" property="grossWeight"/>
+        <result column="net_weight" property="netWeight"/>
+        <result column="pcs_quantity" property="pcsQuantity"/>
+    </resultMap>
+
+
+    <select id="selectCustomsDeclarationGoodsPage" resultMap="customsDeclarationGoodsResultMap">
+        select * from los_customs_declaration_goods where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationMapper.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.business.customsDeclaration.mapper;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 业务-报关 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+public interface CustomsDeclarationMapper extends BaseMapper<CustomsDeclaration> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param customsDeclaration
+	 * @return
+	 */
+	List<CustomsDeclarationVO> selectCustomsDeclarationPage(IPage page, CustomsDeclarationVO customsDeclaration);
+
+}

+ 124 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/mapper/CustomsDeclarationMapper.xml

@@ -0,0 +1,124 @@
+<?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.business.customsDeclaration.mapper.CustomsDeclarationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="customsDeclarationResultMap" type="org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration">
+        <id column="id" property="id"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_dept_name" property="createDeptName"/>
+        <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="business_type" property="businessType"/>
+        <result column="sea_type" property="seaType"/>
+        <result column="bill_no" property="billNo"/>
+        <result column="booking_no" property="bookingNo"/>
+        <result column="mblno" property="mblno"/>
+        <result column="triple_inspection_number" property="tripleInspectionNumber"/>
+        <result column="customs_declaration_number" property="customsDeclarationNumber"/>
+        <result column="record_number" property="recordNumber"/>
+        <result column="contract_agreement_number" property="contractAgreementNumber"/>
+        <result column="delivery_numbers" property="deliveryNumbers"/>
+        <result column="reconciliation_agreement_number" property="reconciliationAgreementNumber"/>
+        <result column="approval_list_number" property="approvalListNumber"/>
+        <result column="refno" property="refno"/>
+        <result column="invoice_number" property="invoiceNumber"/>
+        <result column="bill_date" property="billDate"/>
+        <result column="etd_date" property="etdDate"/>
+        <result column="inspection_declaration_date" property="inspectionDeclarationDate"/>
+        <result column="declare_date" property="declareDate"/>
+        <result column="pre_rrecording_date" property="preRrecordingDate"/>
+        <result column="src_type" property="srcType"/>
+        <result column="src_id" property="srcId"/>
+        <result column="src_cn_name" property="srcCnName"/>
+        <result column="src_en_name" property="srcEnName"/>
+        <result column="agency_companyt_id" property="agencyCompanytId"/>
+        <result column="agency_companyt_code" property="agencyCompanytCode"/>
+        <result column="agency_companyt_cn_name" property="agencyCompanytCnName"/>
+        <result column="agency_companyt_en_name" property="agencyCompanytEnName"/>
+        <result column="corp_id" property="corpId"/>
+        <result column="corp_cn_name" property="corpCnName"/>
+        <result column="corp_en_name" property="corpEnName"/>
+        <result column="delivery_id" property="deliveryId"/>
+        <result column="delivery_cn_name" property="deliveryCnName"/>
+        <result column="delivery_en_name" property="deliveryEnName"/>
+        <result column="enterprise_id" property="enterpriseId"/>
+        <result column="enterprise_cn_name" property="enterpriseCnName"/>
+        <result column="enterprise_en_name" property="enterpriseEnName"/>
+        <result column="enterprise_code" property="enterpriseCode"/>
+        <result column="vessel_id" property="vesselId"/>
+        <result column="vessel_cn_name" property="vesselCnName"/>
+        <result column="vessel_en_name" property="vesselEnName"/>
+        <result column="declaration_method_code" property="declarationMethodCode"/>
+        <result column="declaration_method_name" property="declarationMethodName"/>
+        <result column="trade_method_code" property="tradeMethodCode"/>
+        <result column="trade_method_name" property="tradeMethodName"/>
+        <result column="transport_method" property="transportMethod"/>
+        <result column="transport_tool" property="transportTool"/>
+        <result column="exchange_settlement_method" property="exchangeSettlementMethod"/>
+        <result column="deal_method" property="dealMethod"/>
+        <result column="export_port_id" property="exportPortId"/>
+        <result column="export_port_cn_name" property="exportPortCnName"/>
+        <result column="export_port_en_name" property="exportPortEnName"/>
+        <result column="destination_country_id" property="destinationCountryId"/>
+        <result column="destination_country_cn_name" property="destinationCountryCnName"/>
+        <result column="destination_country_en_name" property="destinationCountryEnName"/>
+        <result column="port_of_destination_id" property="portOfDestinationId"/>
+        <result column="port_of_destination_cn_name" property="portOfDestinationCnName"/>
+        <result column="port_of_destination_en_name" property="portOfDestinationEnName"/>
+        <result column="amount_freight" property="amountFreight"/>
+        <result column="amount_miscellaneous_expenses" property="amountMiscellaneousExpenses"/>
+        <result column="amount_premium" property="amountPremium"/>
+        <result column="amount_goods" property="amountGoods"/>
+        <result column="domestic_source_of_goods" property="domesticSourceOfGoods"/>
+        <result column="documents_attached" property="documentsAttached"/>
+        <result column="documents_attached_other" property="documentsAttachedOther"/>
+        <result column="src_operation" property="srcOperation"/>
+        <result column="marks" property="marks"/>
+        <result column="packing_unit_id" property="packingUnitId"/>
+        <result column="packing_unit" property="packingUnit"/>
+        <result column="quantity" property="quantity"/>
+        <result column="gross_weight" property="grossWeight"/>
+        <result column="net_weight" property="netWeight"/>
+        <result column="amount_dr" property="amountDr"/>
+        <result column="amount_cr" property="amountCr"/>
+        <result column="amount_profit" property="amountProfit"/>
+        <result column="amount_dr_usd" property="amountDrUsd"/>
+        <result column="amount_cr_usd" property="amountCrUsd"/>
+        <result column="amount_profit_usd" property="amountProfitUsd"/>
+        <result column="amount_dr_loc" property="amountDrLoc"/>
+        <result column="amount_cr_loc" property="amountCrLoc"/>
+        <result column="amount_profit_loc" property="amountProfitLoc"/>
+        <result column="check_dr_status" property="checkDrStatus"/>
+        <result column="check_dr_status_descr" property="checkDrStatusDescr"/>
+        <result column="check_cr_status" property="checkCrStatus"/>
+        <result column="check_cr_status_descr" property="checkCrStatusDescr"/>
+        <result column="stl_dr_status" property="stlDrStatus"/>
+        <result column="stl_dr_status_descr" property="stlDrStatusDescr"/>
+        <result column="stl_cr_status" property="stlCrStatus"/>
+        <result column="stl_cr_status_descr" property="stlCrStatusDescr"/>
+        <result column="invoice_dr_status" property="invoiceDrStatus"/>
+        <result column="invoice_dr_status_descr" property="invoiceDrStatusDescr"/>
+        <result column="invoice_cr_status" property="invoiceCrStatus"/>
+        <result column="invoice_cr_status_descr" property="invoiceCrStatusDescr"/>
+        <result column="bill_status" property="billStatus"/>
+        <result column="account_status" property="accountStatus"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="team_id" property="teamId"/>
+        <result column="team_name" property="teamName"/>
+    </resultMap>
+
+
+    <select id="selectCustomsDeclarationPage" resultMap="customsDeclarationResultMap">
+        select * from los_customs_declaration where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/ICustomsDeclarationGoodsService.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.business.customsDeclaration.service;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationGoodsVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 业务-报关货物明细 服务类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+public interface ICustomsDeclarationGoodsService extends IService<CustomsDeclarationGoods> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param customsDeclarationGoods
+	 * @return
+	 */
+	IPage<CustomsDeclarationGoodsVO> selectCustomsDeclarationGoodsPage(IPage<CustomsDeclarationGoodsVO> page, CustomsDeclarationGoodsVO customsDeclarationGoods);
+
+}

+ 105 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/ICustomsDeclarationService.java

@@ -0,0 +1,105 @@
+/*
+ *      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.business.customsDeclaration.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.core.tool.api.R;
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationVO;
+
+/**
+ * 业务-报关 服务类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+public interface ICustomsDeclarationService extends IService<CustomsDeclaration> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param customsDeclaration
+	 * @return
+	 */
+	IPage<CustomsDeclarationVO> selectCustomsDeclarationPage(IPage<CustomsDeclarationVO> page, CustomsDeclarationVO customsDeclaration);
+
+	/**
+	 * 详情
+	 *
+	 * @param customsDeclaration
+	 * @return
+	 */
+	CustomsDeclaration detail(CustomsDeclaration customsDeclaration);
+
+	/**
+	 * 新增或修改 业务-报关
+	 *
+	 * @param customsDeclaration
+	 * @return
+	 */
+	R submit(CustomsDeclaration customsDeclaration);
+
+	/**
+	 * 单据请核
+	 *
+	 * @param customsDeclaration
+	 * @return
+	 */
+	CustomsDeclaration checkCustomsDeclaration(CustomsDeclaration customsDeclaration);
+
+	/**
+	 * 撤销单据请核
+	 *
+	 * @param customsDeclaration
+	 * @return
+	 */
+	CustomsDeclaration revokeCheckCustomsDeclaration(CustomsDeclaration customsDeclaration);
+
+	/**
+	 * 审核通过
+	 *
+	 * @param id
+	 * @return
+	 */
+	R passCheck(Long id);
+
+	/**
+	 * 审核中
+	 *
+	 * @param id
+	 * @return
+	 */
+	R underReview(Long id);
+
+	/**
+	 * 审核不通过
+	 *
+	 * @param id
+	 * @return
+	 */
+	R passCancel(Long id);
+
+	/**
+	 * 复制单据
+	 *
+	 * @param customsDeclaration
+	 * @return
+	 */
+	CustomsDeclaration copyCustomsDeclaration(CustomsDeclaration customsDeclaration);
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationGoodsServiceImpl.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.business.customsDeclaration.service.impl;
+
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationGoodsVO;
+import org.springblade.los.business.customsDeclaration.mapper.CustomsDeclarationGoodsMapper;
+import org.springblade.los.business.customsDeclaration.service.ICustomsDeclarationGoodsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 业务-报关货物明细 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Service
+public class CustomsDeclarationGoodsServiceImpl extends ServiceImpl<CustomsDeclarationGoodsMapper, CustomsDeclarationGoods> implements ICustomsDeclarationGoodsService {
+
+	@Override
+	public IPage<CustomsDeclarationGoodsVO> selectCustomsDeclarationGoodsPage(IPage<CustomsDeclarationGoodsVO> page, CustomsDeclarationGoodsVO customsDeclarationGoods) {
+		return page.setRecords(baseMapper.selectCustomsDeclarationGoodsPage(page, customsDeclarationGoods));
+	}
+
+}

+ 663 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationServiceImpl.java

@@ -0,0 +1,663 @@
+/*
+ *      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.business.customsDeclaration.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+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.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
+import org.springblade.los.basic.business.entity.BusinessType;
+import org.springblade.los.basic.business.service.IBusinessTypeService;
+import org.springblade.los.basic.cur.service.IBCurrencyService;
+import org.springblade.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.service.IBusinessBillNoService;
+import org.springblade.los.business.aea.entity.AeaBills;
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclarationGoods;
+import org.springblade.los.business.customsDeclaration.mapper.CustomsDeclarationMapper;
+import org.springblade.los.business.customsDeclaration.service.ICustomsDeclarationGoodsService;
+import org.springblade.los.business.customsDeclaration.service.ICustomsDeclarationService;
+import org.springblade.los.business.customsDeclaration.vo.CustomsDeclarationVO;
+import org.springblade.los.business.files.entity.FilesCenter;
+import org.springblade.los.business.files.service.IFilesCenterService;
+import org.springblade.los.check.dto.LosAuditProecessDTO;
+import org.springblade.los.check.entity.LosAuditPathsActs;
+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.finance.fee.entity.FeeCenter;
+import org.springblade.los.finance.fee.entity.FinAccBills;
+import org.springblade.los.finance.fee.service.IFeeCenterService;
+import org.springblade.los.finance.fee.service.IFinAccBillsService;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * 业务-报关 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-01-31
+ */
+@Service
+@AllArgsConstructor
+public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclarationMapper, CustomsDeclaration> implements ICustomsDeclarationService {
+
+	private final ISysClient sysClient;
+
+	private final IDeptUtils deptUtils;
+
+	private final IFeeCenterService feeCenterService;
+
+	private final IBusinessTypeService bBusinessTypeService;
+
+	private final IBusinessBillNoService businessBillNoService;
+
+	private final IFinAccBillsService finAccBillsService;
+
+	private final IBCurrencyService bCurrencyService;
+
+	private final IFilesCenterService filesCenterService;
+
+	private final IAuditPathsActsService auditPathsActsService;
+
+	private final IAuditPathsLevelsService auditPathsLevelsService;
+
+	private final IAuditProecessService auditProecessService;
+
+	private final ICustomsDeclarationGoodsService customsDeclarationGoodsService;
+
+	@Override
+	public IPage<CustomsDeclarationVO> selectCustomsDeclarationPage(IPage<CustomsDeclarationVO> page, CustomsDeclarationVO customsDeclaration) {
+		return page.setRecords(baseMapper.selectCustomsDeclarationPage(page, customsDeclaration));
+	}
+
+	@Override
+	public CustomsDeclaration detail(CustomsDeclaration customsDeclaration) {
+		if (customsDeclaration.getId() == null) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		CustomsDeclaration detail = baseMapper.selectById(customsDeclaration.getId());
+		detail.setFilesList(filesCenterService.list(new LambdaQueryWrapper<FilesCenter>()
+			.eq(FilesCenter::getIsDeleted, 0)
+			.eq(FilesCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FilesCenter::getPid, detail.getId())));
+		detail.setFeeCenterListC(feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getPid, detail.getId())
+			.eq(FeeCenter::getDc, "C")
+		));
+		detail.setFeeCenterListD(feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getPid, detail.getId())
+			.eq(FeeCenter::getDc, "D")
+		));
+		detail.setCustomsDeclarationGoodsList(customsDeclarationGoodsService.list(new LambdaQueryWrapper<CustomsDeclarationGoods>()
+			.eq(CustomsDeclarationGoods::getIsDeleted, 0)
+			.eq(CustomsDeclarationGoods::getTenantId, AuthUtil.getTenantId())
+			.eq(CustomsDeclarationGoods::getPid, detail.getId())
+		));
+		return detail;
+	}
+
+	@Override
+	public R submit(CustomsDeclaration customsDeclaration) {
+		String deptId = "";
+		String deptName = "";
+		String branchId = deptUtils.getDeptPid() + "";
+		//获取部门ids对应中文名
+		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			deptId = AuthUtil.getDeptId();
+			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
+				deptName = String.join(",", res.getData());
+			}
+		}
+		if (ObjectUtils.isNotNull(customsDeclaration.getMblno())) {
+			customsDeclaration.setMblno(customsDeclaration.getMblno().replaceAll(" ", ""));
+		}
+		List<CustomsDeclaration> count = baseMapper.selectList(new LambdaQueryWrapper<CustomsDeclaration>()
+			.eq(CustomsDeclaration::getCreateDept, AuthUtil.getDeptId())
+			.eq(CustomsDeclaration::getTenantId, AuthUtil.getTenantId())
+			.eq(CustomsDeclaration::getIsDeleted, 0)
+			.eq(CustomsDeclaration::getMblno, customsDeclaration.getMblno()
+			));
+		if (customsDeclaration.getId() == null) {
+			if (count.size() > 0) {
+				throw new RuntimeException("提单号不允许重复");
+			}
+			BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
+				.eq(BusinessType::getTenantId, AuthUtil.getTenantId())
+				.eq(BusinessType::getIsDeleted, 0)
+				.eq(BusinessType::getStatus, 0)
+				.eq(BusinessType::getCode, customsDeclaration.getBusinessTypeCode()));
+			if (businessType == null) {
+				throw new RuntimeException("未找到可用业务类型");
+			}
+			BusinessBillNo businessBillNo = new BusinessBillNo();
+			businessBillNo.setBusinessTypeId(businessType.getId());
+			businessBillNo.setCode(customsDeclaration.getBillNoFormat());
+			R clientBillNo = businessBillNoService.getBillNoLos(businessBillNo);
+			if (!clientBillNo.isSuccess()) {
+				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+				return R.fail(500, "生成订单编号失败");
+			}
+			customsDeclaration.setBillNo((String) clientBillNo.getData());
+			customsDeclaration.setCreateTime(new Date());
+			customsDeclaration.setCreateUser(AuthUtil.getUserId());
+			customsDeclaration.setCreateUserName(AuthUtil.getUserName());
+			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+				customsDeclaration.setBranchId(branchId);
+				customsDeclaration.setCreateDept(deptId);
+				customsDeclaration.setCreateDeptName(deptName);
+			}
+		} else {
+			List<Long> ids = count.stream().map(CustomsDeclaration::getId).distinct().collect(Collectors.toList());
+			if (count.size() > 0 && !ids.contains(customsDeclaration.getId())) {
+				throw new RuntimeException("提单号不允许重复");
+			}
+			customsDeclaration.setUpdateUser(AuthUtil.getUserId());
+			customsDeclaration.setUpdateTime(new Date());
+			customsDeclaration.setUpdateUserName(AuthUtil.getUserName());
+		}
+		this.saveOrUpdate(customsDeclaration);
+		/**-------------费用计算---------*/
+		BigDecimal amountDr = new BigDecimal("0.00");
+		BigDecimal amountCr = new BigDecimal("0.00");
+		BigDecimal amountProfit = new BigDecimal("0.00");
+		BigDecimal amountDrUsd = new BigDecimal("0.00");
+		BigDecimal amountCrUsd = new BigDecimal("0.00");
+		BigDecimal amountProfitUsd = new BigDecimal("0.00");
+		BigDecimal amountDrLoc = new BigDecimal("0.00");
+		BigDecimal amountCrLoc = new BigDecimal("0.00");
+		BigDecimal amountProfitLoc = new BigDecimal("0.00");
+		//应付
+		if (ObjectUtils.isNotNull(customsDeclaration.getFeeCenterListC())) {
+			for (FeeCenter item : customsDeclaration.getFeeCenterListC()) {
+				item.setPid(customsDeclaration.getId());
+				item.setBillNo(customsDeclaration.getBillNo());
+				item.setBusinessType(customsDeclaration.getBusinessType());
+				item.setBillDate(customsDeclaration.getBillDate());
+				item.setSrcType(customsDeclaration.getSrcType());
+				item.setSrcId(customsDeclaration.getSrcId());
+				item.setSrcCnName(customsDeclaration.getSrcCnName());
+				item.setSrcEnName(customsDeclaration.getSrcEnName());
+				item.setBillCorpId(customsDeclaration.getCorpId());
+				item.setBillCorpCnName(customsDeclaration.getCorpCnName());
+				item.setBillCorpEnName(customsDeclaration.getCorpEnName());
+				item.setMblno(customsDeclaration.getMblno());
+				item.setHblno(item.getHblno());
+				item.setEtd(customsDeclaration.getEtdDate());
+				item.setRefno(customsDeclaration.getRefno());
+				if ("USD".equals(item.getCurCode())) {
+					amountCrUsd = amountCrUsd.add(item.getAmount());
+				} else if ("CNY".equals(item.getCurCode())) {
+					amountCr = amountCr.add(item.getAmount());
+				} else {
+					BigDecimal usd = bCurrencyService.converter(item.getCurCode(), item.getAmount(), item.getDc());
+					amountCrUsd = amountCrUsd.add(usd);
+				}
+			}
+			feeCenterService.submitList(customsDeclaration.getFeeCenterListC());
+		}
+		//应收
+		if (ObjectUtils.isNotNull(customsDeclaration.getFeeCenterListD())) {
+			for (FeeCenter item : customsDeclaration.getFeeCenterListD()) {
+				item.setPid(customsDeclaration.getId());
+				item.setBillNo(customsDeclaration.getBillNo());
+				item.setBusinessType(customsDeclaration.getBusinessType());
+				item.setBillDate(customsDeclaration.getBillDate());
+				item.setSrcType(customsDeclaration.getSrcType());
+				item.setSrcId(customsDeclaration.getSrcId());
+				item.setSrcCnName(customsDeclaration.getSrcCnName());
+				item.setSrcEnName(customsDeclaration.getSrcEnName());
+				item.setBillCorpId(customsDeclaration.getCorpId());
+				item.setBillCorpCnName(customsDeclaration.getCorpCnName());
+				item.setBillCorpEnName(customsDeclaration.getCorpEnName());
+				item.setMblno(customsDeclaration.getMblno());
+				item.setHblno(item.getHblno());
+				item.setEtd(customsDeclaration.getEtdDate());
+				item.setRefno(customsDeclaration.getRefno());
+				if ("USD".equals(item.getCurCode())) {
+					amountDrUsd = amountDrUsd.add(item.getAmount());
+				} else if ("CNY".equals(item.getCurCode())) {
+					amountDr = amountDr.add(item.getAmount());
+				} else {
+					BigDecimal usd = bCurrencyService.converter(item.getCurCode(), item.getAmount(), item.getDc());
+					amountDrUsd = amountDrUsd.add(usd);
+				}
+			}
+			feeCenterService.submitList(customsDeclaration.getFeeCenterListD());
+		}
+		//利润 = 收 - 付
+		amountProfit = amountDr.subtract(amountCr);
+		amountProfitUsd = amountDrUsd.subtract(amountCrUsd);
+		amountDrLoc = amountDrLoc.add(bCurrencyService.converterCny("USD", amountDrUsd, "D")).add(amountDr);
+		amountCrLoc = amountCrLoc.add(bCurrencyService.converterCny("USD", amountCrUsd, "C")).add(amountCr);
+		amountProfitLoc = amountDrLoc.subtract(amountCrLoc);
+		customsDeclaration.setAmountDr(amountDr);
+		customsDeclaration.setAmountCr(amountCr);
+		customsDeclaration.setAmountProfit(amountProfit);
+		customsDeclaration.setAmountDrUsd(amountDrUsd);
+		customsDeclaration.setAmountCrUsd(amountCrUsd);
+		customsDeclaration.setAmountProfitUsd(amountProfitUsd);
+		customsDeclaration.setAmountDrLoc(amountDrLoc);
+		customsDeclaration.setAmountCrLoc(amountCrLoc);
+		customsDeclaration.setAmountProfitLoc(amountProfitLoc);
+		this.saveOrUpdate(customsDeclaration);
+		/**-------------费用计算---------*/
+		return R.data(customsDeclaration);
+	}
+
+	@Override
+	public CustomsDeclaration checkCustomsDeclaration(CustomsDeclaration customsDeclaration) {
+		CustomsDeclaration declare = baseMapper.selectById(customsDeclaration.getId());
+		Integer actId = 1118;
+		String processType = "报关审核";
+		String checkType = "BGDJ";
+		//审批数据
+		LosAuditProecessDTO auditProecessDTO = new LosAuditProecessDTO();
+		//获取审批级次
+		List<LosAuditPathsLevels> auditPathsLevels = null;
+		// 判断是否有审批流,如果审批流已开启就进入审批流,否则直接走申请通过
+		LosAuditPathsActs pathsActs = null;
+		//是否开启流程
+		LambdaQueryWrapper<LosAuditPathsActs> auditPathsActsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+		auditPathsActsLambdaQueryWrapper
+			.eq(LosAuditPathsActs::getIsEnable, 1)
+			.eq(LosAuditPathsActs::getFidStatus, "status")
+			.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId())
+			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid())
+			.eq(LosAuditPathsActs::getActId, actId);
+		pathsActs = auditPathsActsService.getOne(auditPathsActsLambdaQueryWrapper);
+		//获取审批信息
+		LosAuditPathsActs losAuditPathsActs = auditPathsActsService.getOne(new LambdaQueryWrapper<LosAuditPathsActs>()
+			.eq(LosAuditPathsActs::getActId, actId)
+			.eq(LosAuditPathsActs::getFidStatus, "status")
+			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid())
+			.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId()));
+		Long pathId = losAuditPathsActs.getPathId();
+		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
+			.eq(LosAuditPathsLevels::getTenantId, AuthUtil.getTenantId()).eq(LosAuditPathsLevels::getPathId, pathId));
+		auditProecessDTO.setTimes(1);
+		auditProecessDTO.setProcessType(processType);
+
+		// 没开启审批流直接走 通过流程
+		if (pathsActs == null || pathsActs.getIsEnable() == 2) {
+			throw new SecurityException("当前租户未查询到审批流配置");
+		} else {
+
+			if (CollectionUtils.isEmpty(auditPathsLevels)) {
+				throw new SecurityException("开启审批失败:未查询到审批信息");
+			}
+			// 绑定审核类型
+			auditProecessDTO.setCheckType(checkType);
+			// 追加跳转路由url
+			auditProecessDTO.setUrl(customsDeclaration.getUrl());
+			auditProecessDTO.setPageStatus(customsDeclaration.getPageStatus());
+			auditProecessDTO.setPageLabel(customsDeclaration.getPageLabel());
+			auditProecessDTO.setOrderRemark(declare.getRemarks());
+			auditProecessDTO.setPathsLevelsList(auditPathsLevels);
+			auditProecessDTO.setActId(1);
+			auditProecessDTO.setSrcBillId(declare.getId());
+			auditProecessDTO.setBillId(declare.getId());
+			auditProecessDTO.setBillNo(declare.getBillNo());
+			auditProecessDTO.setSendUserId(AuthUtil.getUserId());
+			auditProecessDTO.setSendName(AuthUtil.getUserName());
+			auditProecessDTO.setSendTime(new Date());
+			auditProecessDTO.setBillTime(declare.getCreateTime());
+			auditProecessDTO.setTenantId(AuthUtil.getTenantId());
+			auditProecessDTO.setCorpId(declare.getCorpId());
+			auditProecessDTO.setSalesCompanyId(Long.parseLong(declare.getCreateDept()));
+			auditProecessDTO.setSalesCompanyName(declare.getCreateDeptName());
+			auditProecessDTO.setPayAmount(declare.getAmountCrLoc());
+			auditProecessDTO.setReceivableAmount(declare.getAmountDrLoc());
+			auditProecessDTO.setGrossProfit(declare.getAmountProfitLoc());
+			auditProecessDTO.setSalesCompanyName(declare.getCreateDeptName());
+			R financeProcess = auditProecessService.createFinanceProcess(auditProecessDTO);
+			if (!financeProcess.isSuccess()) {
+				throw new SecurityException("操作失败,请联系管理员");
+			}
+		}
+		declare.setStatus(1);
+		baseMapper.updateById(declare);
+		return declare;
+	}
+
+	@Override
+	public CustomsDeclaration revokeCheckCustomsDeclaration(CustomsDeclaration customsDeclaration) {
+		CustomsDeclaration declare = baseMapper.selectById(customsDeclaration.getId());
+		if (3 == declare.getStatus()) {
+			throw new SecurityException("审核已通过,撤销失败");
+		}
+		R financeProcess = auditProecessService.deteleByBillId(customsDeclaration.getId());
+		if (!financeProcess.isSuccess()) {
+			throw new SecurityException("操作失败,请联系管理员");
+		}
+		declare.setStatus(0);
+		baseMapper.updateById(declare);
+		return declare;
+	}
+
+	@Override
+	public R passCheck(Long id) {
+		CustomsDeclaration customsDeclaration = baseMapper.selectById(id);
+		if (customsDeclaration == null) {
+			throw new SecurityException("审批通过失败");
+		}
+		customsDeclaration.setStatus(3);
+		customsDeclaration.setBillStatus(2);
+		baseMapper.updateById(customsDeclaration);
+		List<FeeCenter> feeCenterList  = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getAccStatus, 0)
+			.eq(FeeCenter::getPid, customsDeclaration.getId()));
+		for (FeeCenter item : feeCenterList) {
+			item.setApproverId(AuthUtil.getUserId());
+			item.setApproverName(AuthUtil.getUserName());
+			item.setApproveTime(new Date());
+		}
+		feeCenterService.saveOrUpdateBatch(feeCenterList);
+		if (feeCenterList.size() != 0) {
+			FinAccBills finAccBills = new FinAccBills();
+			finAccBills.setFeeCenterList(feeCenterList);
+			finAccBills.setBusinessTypeCode("HYZD");
+			finAccBills.setBillNoFormat("HYZD");
+			finAccBills.setAccountType("");
+			finAccBills.setRefno(customsDeclaration.getRefno());
+			finAccBillsService.generateBill(finAccBills);
+		}
+		return R.success("操作成功");
+	}
+
+	@Override
+	public R underReview(Long id) {
+		CustomsDeclaration customsDeclaration = baseMapper.selectById(id);
+		if (customsDeclaration == null) {
+			throw new SecurityException("审批通过失败");
+		}
+		customsDeclaration.setStatus(2);
+		baseMapper.updateById(customsDeclaration);
+		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getPid, customsDeclaration.getId()));
+		for (FeeCenter item : feeCenterList) {
+			item.setApproverId(AuthUtil.getUserId());
+			item.setApproverName(AuthUtil.getUserName());
+			item.setApproveTime(new Date());
+		}
+		feeCenterService.saveOrUpdateBatch(feeCenterList);
+		return R.success("操作成功");
+	}
+
+	@Override
+	public R passCancel(Long id) {
+		CustomsDeclaration customsDeclaration = baseMapper.selectById(id);
+		if (customsDeclaration == null) {
+			throw new SecurityException("审批通过失败");
+		}
+
+		customsDeclaration.setStatus(4);
+		baseMapper.updateById(customsDeclaration);
+		List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getPid, customsDeclaration.getId()));
+		for (FeeCenter item : feeCenterList) {
+			item.setApproverId(AuthUtil.getUserId());
+			item.setApproverName(AuthUtil.getUserName());
+			item.setApproveTime(new Date());
+		}
+		feeCenterService.saveOrUpdateBatch(feeCenterList);
+		return R.success("操作成功");
+	}
+
+	@Override
+	public CustomsDeclaration copyCustomsDeclaration(CustomsDeclaration customsDeclaration) {
+		if (customsDeclaration.getId() == null) {
+			throw new SecurityException("缺少必要参数");
+		}
+		CustomsDeclaration detail = baseMapper.selectById(customsDeclaration.getId());
+		List<FilesCenter> filesList = filesCenterService.list(new LambdaQueryWrapper<FilesCenter>()
+			.eq(FilesCenter::getIsDeleted, 0)
+			.eq(FilesCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FilesCenter::getPid, detail.getId()));
+		for (FilesCenter item : filesList) {
+			item.setPid(null);
+			item.setId(null);
+			item.setItemId(null);
+			item.setBillNo("");
+			item.setBusinessType(null);
+			item.setHblno("");
+			item.setMblno("");
+		}
+		List<FeeCenter> feeCenterListC = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getPid, detail.getId())
+			.eq(FeeCenter::getDc, "C")
+			.eq(FeeCenter::getBillNo, detail.getBillNo())
+		);
+		for (FeeCenter item : feeCenterListC) {
+			item.setPid(null);
+			item.setId(null);
+			item.setBusinessType(null);
+			item.setBillType(null);
+			item.setBillNo("");
+			item.setBillDate(null);
+			item.setAccountDate(null);
+			item.setMblno("");
+			item.setHblno("");
+			item.setAccountDate(null);
+			item.setAccBillId(null);
+			item.setAccBillNo("");
+			item.setAccDate(null);
+			item.setAccStatus(0);
+			item.setAccById(0L);
+			item.setAccByName("");
+			item.setCheckBillId(0L);
+			item.setCheckBillNo("");
+			item.setCheckDate(null);
+			item.setCheckAmount(new BigDecimal("0.00"));
+			item.setCheckStatus(0);
+			item.setCheckById(0L);
+			item.setCheckByName("");
+			item.setStlBillId(0L);
+			item.setStlBillNo("");
+			item.setStlDate(null);
+			item.setStlOrgAmount(new BigDecimal("0.00"));
+			item.setStlCurCode("");
+			item.setStlExrate(new BigDecimal("0.00"));
+			item.setStlExrateLoc(new BigDecimal("0.00"));
+			item.setStlAmount(new BigDecimal("0.00"));
+			item.setStlAmountLoc(new BigDecimal("0.00"));
+			item.setStlStatus(0);
+			item.setStlById(0L);
+			item.setStlByName("");
+			item.setStlTtlAmount(new BigDecimal("0.00"));
+			item.setUnsettledAmount(item.getAmount());
+			item.setVoucherBillId(0L);
+			item.setVoucherBillNo("");
+			item.setVoucherNo("");
+			item.setVoucherDate(null);
+			item.setVoucherStatus(0);
+			item.setVoucherById(0L);
+			item.setVoucherByName("");
+			item.setInvoiceBillId("");
+			item.setInvoiceBillNo("");
+			item.setInvoiceNo("");
+			item.setInvoiceDate(null);
+			item.setInvoiceStatus(0);
+			item.setInvoiceCurCode("");
+			item.setInvoiceExrate(new BigDecimal("0.00"));
+			item.setInvoiceAmount(new BigDecimal("0.00"));
+			item.setInvoiceAmountLoc(new BigDecimal("0.00"));
+			item.setUninvoicedAmount(new BigDecimal("0.00"));
+			item.setAppliedAmount(new BigDecimal("0.00"));
+			item.setAppliedInvoiceAmount(new BigDecimal("0.00"));
+			item.setReconciliationAmount(new BigDecimal("0.00"));
+			item.setInvoiceById(0L);
+			item.setInvoiceByName("");
+			item.setIsSignfor(0);
+			item.setSignforId(0);
+			item.setSignforName("");
+			item.setSignforDate(null);
+			item.setApplyId(0L);
+			item.setApplyName("");
+			item.setApplyTime(null);
+			item.setApproverId(0L);
+			item.setApproverName("");
+			item.setApproveTime(null);
+			item.setAuditStatus("0");
+		}
+		List<FeeCenter> feeCenterListD = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+			.eq(FeeCenter::getIsDeleted, 0)
+			.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(FeeCenter::getPid, detail.getId())
+			.eq(FeeCenter::getDc, "D")
+			.eq(FeeCenter::getBillNo, detail.getBillNo())
+		);
+		for (FeeCenter item : feeCenterListD) {
+			item.setPid(null);
+			item.setId(null);
+			item.setBusinessType(null);
+			item.setBillType(null);
+			item.setBillNo("");
+			item.setBillDate(null);
+			item.setAccountDate(null);
+			item.setMblno("");
+			item.setHblno("");
+			item.setAccountDate(null);
+			item.setAccBillId(null);
+			item.setAccBillNo("");
+			item.setAccDate(null);
+			item.setAccStatus(0);
+			item.setAccById(0L);
+			item.setAccByName("");
+			item.setCheckBillId(0L);
+			item.setCheckBillNo("");
+			item.setCheckDate(null);
+			item.setCheckAmount(new BigDecimal("0.00"));
+			item.setCheckStatus(0);
+			item.setCheckById(0L);
+			item.setCheckByName("");
+			item.setStlBillId(0L);
+			item.setStlBillNo("");
+			item.setStlDate(null);
+			item.setStlOrgAmount(new BigDecimal("0.00"));
+			item.setStlCurCode("");
+			item.setStlExrate(new BigDecimal("0.00"));
+			item.setStlExrateLoc(new BigDecimal("0.00"));
+			item.setStlAmount(new BigDecimal("0.00"));
+			item.setStlAmountLoc(new BigDecimal("0.00"));
+			item.setStlStatus(0);
+			item.setStlById(0L);
+			item.setStlByName("");
+			item.setStlTtlAmount(new BigDecimal("0.00"));
+			item.setUnsettledAmount(item.getAmount());
+			item.setVoucherBillId(0L);
+			item.setVoucherBillNo("");
+			item.setVoucherNo("");
+			item.setVoucherDate(null);
+			item.setVoucherStatus(0);
+			item.setVoucherById(0L);
+			item.setVoucherByName("");
+			item.setInvoiceBillId("");
+			item.setInvoiceBillNo("");
+			item.setInvoiceNo("");
+			item.setInvoiceDate(null);
+			item.setInvoiceStatus(0);
+			item.setInvoiceCurCode("");
+			item.setInvoiceExrate(new BigDecimal("0.00"));
+			item.setInvoiceAmount(new BigDecimal("0.00"));
+			item.setInvoiceAmountLoc(new BigDecimal("0.00"));
+			item.setUninvoicedAmount(new BigDecimal("0.00"));
+			item.setAppliedAmount(new BigDecimal("0.00"));
+			item.setAppliedInvoiceAmount(new BigDecimal("0.00"));
+			item.setReconciliationAmount(new BigDecimal("0.00"));
+			item.setInvoiceById(0L);
+			item.setInvoiceByName("");
+			item.setIsSignfor(0);
+			item.setSignforId(0);
+			item.setSignforName("");
+			item.setSignforDate(null);
+			item.setApplyId(0L);
+			item.setApplyName("");
+			item.setApplyTime(null);
+			item.setApproverId(0L);
+			item.setApproverName("");
+			item.setApproveTime(null);
+			item.setAuditStatus("0");
+		}
+		CustomsDeclaration copyBills = new CustomsDeclaration();
+		BeanUtil.copyProperties(detail, copyBills);
+		copyBills.setId(null);
+		copyBills.setBillNo("");
+		copyBills.setMblno("");
+		copyBills.setRefno("");
+		copyBills.setStatus(0);
+		copyBills.setBillStatus(0);
+		copyBills.setAmountDr(new BigDecimal("0.00"));
+		copyBills.setAmountCr(new BigDecimal("0.00"));
+		copyBills.setAmountProfit(new BigDecimal("0.00"));
+		copyBills.setAmountDrUsd(new BigDecimal("0.00"));
+		copyBills.setAmountCrUsd(new BigDecimal("0.00"));
+		copyBills.setAmountProfitUsd(new BigDecimal("0.00"));
+		copyBills.setAmountDrLoc(new BigDecimal("0.00"));
+		copyBills.setAmountCrLoc(new BigDecimal("0.00"));
+		copyBills.setAmountProfitLoc(new BigDecimal("0.00"));
+		copyBills.setCheckDrStatus(0);
+		copyBills.setCheckDrStatusDescr("未对账");
+		copyBills.setCheckCrStatus(0);
+		copyBills.setCheckCrStatusDescr("未对账");
+		copyBills.setStlDrStatus(0);
+		copyBills.setStlDrStatusDescr("未结");
+		copyBills.setStlCrStatus(0);
+		copyBills.setStlCrStatusDescr("未结");
+		copyBills.setInvoiceDrStatus(0);
+		copyBills.setInvoiceDrStatusDescr("未开");
+		copyBills.setInvoiceCrStatus(0);
+		copyBills.setInvoiceCrStatusDescr("未开");
+		copyBills.setBillStatus(0);
+		copyBills.setAccountStatus(0);
+		copyBills.setFeeCenterListC(feeCenterListC);
+		copyBills.setFeeCenterListD(feeCenterListD);
+		copyBills.setQuantity(new BigDecimal("0.00"));
+		copyBills.setGrossWeight(new BigDecimal("0.00"));
+		copyBills.setFilesList(filesList);
+		return copyBills;
+	}
+
+}

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BillsController.java

@@ -86,7 +86,7 @@ public class BillsController extends BladeController {
 			Bills::getAmountDrLoc, Bills::getAmountCrLoc, Bills::getAmountProfitLoc, Bills::getCheckCrStatusDescr, Bills::getCheckDrStatusDescr,
 			Bills::getStlCrStatusDescr, Bills::getStlDrStatusDescr, Bills::getInvoiceCrStatusDescr, Bills::getInvoiceDrStatusDescr, Bills::getCreateUserName,
 			Bills::getCreateTime, Bills::getUpdateUserName, Bills::getUpdateTime, Bills::getStatus, Bills::getBillStatus,
-			Bills::getAccountStatus, Bills::getRemarks, Bills::getPackingUnit, Bills::getBillDate, Bills::getTeamName,Bills::getCreateUser);
+			Bills::getAccountStatus, Bills::getRemarks, Bills::getPackingUnit, Bills::getBillDate, Bills::getTeamName,Bills::getCreateUser,Bills::getTeu);
 		lambdaQueryWrapper.eq(Bills::getIsDeleted, 0)
 			.eq(Bills::getTenantId, AuthUtil.getTenantId())
 			.and(i -> i.isNull(Bills::getMasterId).or()

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

@@ -323,6 +323,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		Integer GP48 = 0;
 		StringBuilder boxTypeSum = new StringBuilder();
 		if (ObjectUtils.isNotNull(bills.getPreContainersList())) {
+			bills.setTeu(bills.getPreContainersList().stream().map(PreContainers::getTeu).reduce(BigDecimal.ZERO,BigDecimal::add).intValue());
 			for (PreContainers item : bills.getPreContainersList()) {
 				item.setPid(bills.getId());
 				if ("20GP".equals(item.getCntrTypeCode())) {

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

@@ -35,7 +35,6 @@ import org.springblade.los.business.sea.service.IContainersBillsService;
 import org.springblade.los.business.sea.service.IContainersService;
 import org.springblade.los.business.sea.service.IPreContainersService;
 import org.springblade.los.business.sea.vo.PreContainersVO;
-import org.springblade.system.entity.Dept;
 import org.springblade.system.feign.ISysClient;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -76,7 +75,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 	public R submit(PreContainers preContainers) {
 		String deptId = "";
 		String deptName = "";
-		String branchId = deptUtils.getDeptPid()+"";
+		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
 		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
 			deptId = AuthUtil.getDeptId();
@@ -85,6 +84,11 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 				deptName = String.join(",", res.getData());
 			}
 		}
+		Integer teu = 0;
+		Bills bills = billsMapper.selectById(preContainers.getPid());
+		if (bills != null) {
+			teu = ObjectUtils.isNotNull(bills.getTeu()) ? bills.getTeu() : 0;
+		}
 		if (preContainers.getId() == null) {
 			preContainers.setCreateTime(new Date());
 			preContainers.setCreateUser(AuthUtil.getUserId());
@@ -94,13 +98,18 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 				preContainers.setCreateDept(deptId);
 				preContainers.setCreateDeptName(deptName);
 			}
+			teu += preContainers.getTeu().intValue();
 		} else {
+			PreContainers preContainers1 = baseMapper.selectById(preContainers.getId());
+			if (preContainers1.getTeu().compareTo(preContainers.getTeu()) >= 0) {
+				teu = teu - preContainers1.getTeu().subtract(preContainers.getTeu()).intValue();
+			} else {
+				teu = teu + preContainers.getTeu().subtract(preContainers1.getTeu()).intValue();
+			}
 			preContainers.setUpdateUser(AuthUtil.getUserId());
 			preContainers.setUpdateTime(new Date());
 			preContainers.setUpdateUserName(AuthUtil.getUserName());
 		}
-		this.saveOrUpdate(preContainers);
-		Bills bills = billsMapper.selectById(preContainers.getPid());
 		if (bills != null) {
 			bills.setCfsMeasurement(new BigDecimal("0.00"));
 			bills.setCfsGrossWeight(new BigDecimal("0.00"));
@@ -108,8 +117,10 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			bills.setUpdateUser(AuthUtil.getUserId());
 			bills.setUpdateTime(new Date());
 			bills.setUpdateUserName(AuthUtil.getUserName());
+			bills.setTeu(teu);
 			billsMapper.updateById(bills);
 		}
+		this.saveOrUpdate(preContainers);
 		List<Containers> removeContainersList = containersService.list(new LambdaQueryWrapper<Containers>()
 			.eq(Containers::getTenantId, AuthUtil.getTenantId())
 			.eq(Containers::getIsDeleted, 0)
@@ -191,7 +202,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 	public R submitList(List<PreContainers> preContainersList) {
 		String deptId = "";
 		String deptName = "";
-		String branchId = deptUtils.getDeptPid()+"";
+		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
 		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
 			deptId = AuthUtil.getDeptId();
@@ -200,6 +211,17 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 				deptName = String.join(",", res.getData());
 			}
 		}
+		Bills bills = billsMapper.selectById(preContainersList.get(0).getPid());
+		if (bills != null) {
+			bills.setCfsMeasurement(new BigDecimal("0.00"));
+			bills.setCfsGrossWeight(new BigDecimal("0.00"));
+			bills.setCfsQuantity(new BigDecimal("0.00"));
+			bills.setUpdateUser(AuthUtil.getUserId());
+			bills.setUpdateTime(new Date());
+			bills.setUpdateUserName(AuthUtil.getUserName());
+			bills.setTeu(bills.getPreContainersList().stream().map(PreContainers::getTeu).reduce(BigDecimal.ZERO, BigDecimal::add).intValue());
+			billsMapper.updateById(bills);
+		}
 		List<Containers> containersList = new ArrayList<>();
 		for (PreContainers preContainers : preContainersList) {
 			if (preContainers.getId() == null) {
@@ -218,16 +240,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 				this.saveOrUpdate(preContainers);
 			}
 			this.saveOrUpdate(preContainers);
-			Bills bills = billsMapper.selectById(preContainers.getPid());
-			if (bills != null) {
-				bills.setCfsMeasurement(new BigDecimal("0.00"));
-				bills.setCfsGrossWeight(new BigDecimal("0.00"));
-				bills.setCfsQuantity(new BigDecimal("0.00"));
-				bills.setUpdateUser(AuthUtil.getUserId());
-				bills.setUpdateTime(new Date());
-				bills.setUpdateUserName(AuthUtil.getUserName());
-				billsMapper.updateById(bills);
-			}
+
 			List<Containers> removeContainersList = containersService.list(new LambdaQueryWrapper<Containers>()
 				.eq(Containers::getTenantId, AuthUtil.getTenantId())
 				.eq(Containers::getIsDeleted, 0)

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

@@ -228,7 +228,9 @@ public class AuditProecessController extends BladeController {
 			auditProecessService.losBillsCheck(auditProecess);
 		}else if ("KYCK-DJ".equals(proecess.getCheckType()) || "KYJK-DJ".equals(proecess.getCheckType())) {
 			auditProecessService.losAeBillsCheck(auditProecess);
-		}else if ("HYCK-FFSQ".equals(proecess.getCheckType())) {
+		}else if ("BGDJ".equals(proecess.getCheckType())) {
+			auditProecessService.losCustomsDeclarationCheck(auditProecess);
+		} else if ("HYCK-FFSQ".equals(proecess.getCheckType())) {
 			auditProecessService.losStlBillsCheck(auditProecess);
 		}else if ("HYCK-FPSQ".equals(proecess.getCheckType())) {
 			auditProecessService.losFinInvoicesCheck(auditProecess);

+ 2 - 0
blade-service/blade-los/src/main/java/org/springblade/los/check/service/IAuditProecessService.java

@@ -64,4 +64,6 @@ public interface IAuditProecessService extends IService<LosAuditProecess> {
     void amendsCheck(LosAuditProecess auditProecess);
 
 	void losAeBillsCheck(LosAuditProecess auditProecess);
+
+	void losCustomsDeclarationCheck(LosAuditProecess auditProecess);
 }

+ 248 - 1
blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java

@@ -33,6 +33,8 @@ import org.springblade.los.business.aea.entity.AeaBills;
 import org.springblade.los.business.aea.mapper.AeaBillsMapper;
 import org.springblade.los.business.amends.entity.Amends;
 import org.springblade.los.business.amends.mapper.AmendsMapper;
+import org.springblade.los.business.customsDeclaration.entity.CustomsDeclaration;
+import org.springblade.los.business.customsDeclaration.mapper.CustomsDeclarationMapper;
 import org.springblade.los.business.sea.entity.Bills;
 import org.springblade.los.business.sea.mapper.BillsMapper;
 import org.springblade.los.check.dto.LosAuditProecessDTO;
@@ -76,6 +78,8 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 
 	private final AeaBillsMapper aeaBillsMapper;
 
+	private final CustomsDeclarationMapper customsDeclarationMapper;
+
 	private final FinStlBillsMapper finStlBillsMapper;
 
 	private final FinInvoicesMapper finInvoicesMapper;
@@ -1153,7 +1157,7 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 
 	@Override
 	public void losAeBillsCheck(LosAuditProecess auditProecess) {
-//查看最新操作记录,防止重复提交
+		//查看最新操作记录,防止重复提交
 		LosAuditProecess proecessTemp = baseMapper.selectById(auditProecess.getId());
 		if (proecessTemp == null) {
 			throw new SecurityException("未查到此审批记录,禁止操作");
@@ -1365,6 +1369,8 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 					finAccBills.setBusinessTypeCode("HYZD");
 					finAccBills.setBillNoFormat("HYZD");
 					finAccBills.setAccountType("");
+					finAccBills.setWarehousingDate(bills.getWarehousingDate());
+					finAccBills.setOutboundDate(bills.getOutboundDate());
 					finAccBills.setRefno(bills.getRefno());
 					finAccBillsService.generateBill(finAccBills);
 				}
@@ -1427,6 +1433,247 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 	}
 
 	@Override
+	public void losCustomsDeclarationCheck(LosAuditProecess auditProecess) {
+		//查看最新操作记录,防止重复提交
+		LosAuditProecess proecessTemp = baseMapper.selectById(auditProecess.getId());
+		if (proecessTemp == null) {
+			throw new SecurityException("未查到此审批记录,禁止操作");
+		}
+		if ("A".equals(proecessTemp.getAuditStatus()) || "B".equals(proecessTemp.getAuditStatus())) {
+			throw new SecurityException("当前记录已经完成审批,禁止重复操作");
+		}
+
+		if (auditProecess.getAuditStatus() == null || !"S".equals(auditProecess.getAuditStatus())) {
+			throw new SecurityException("审批状态非待审,禁止操作");
+		}
+		//信息
+		Message sendMessage = new Message();
+		sendMessage.setParameter(String.valueOf(auditProecess.getBillId()));
+		sendMessage.setUserName(AuthUtil.getUserName());
+		sendMessage.setUserId(AuthUtil.getUserId());
+		sendMessage.setToUserId(auditProecess.getSendUserId());
+		sendMessage.setToUserName(auditProecess.getSendName());
+		sendMessage.setMessageType(1);
+		sendMessage.setTenantId(AuthUtil.getTenantId());
+		sendMessage.setCreateUser(AuthUtil.getUserId());
+		sendMessage.setCreateTime(new Date());
+		sendMessage.setUrl(auditProecess.getUrl());
+		sendMessage.setPageLabel(auditProecess.getPageLabel());
+		sendMessage.setPageStatus(auditProecess.getPageStatus());
+
+		//用户操作 1.通过  2.驳回
+		Integer operate = auditProecess.getOperate();
+		//查看当前审批是否为最后一级
+		String iffinalItem = auditProecess.getIffinalItem();
+		//审批人
+		auditProecess.setAuditUserId(String.valueOf(AuthUtil.getUserId()));
+		//审批时间
+		auditProecess.setAuditOpTime(new Date());
+
+		CustomsDeclaration customsDeclaration = customsDeclarationMapper.selectById(proecessTemp.getBillId());
+
+		//不是最后一级
+		if ("F".equals(iffinalItem)) {
+
+			//通过
+			if (operate == 1) {
+				//如果是第一级, 则修改状态为审批中
+				if (auditProecess.getLevelId() == 1) {
+					CustomsDeclaration detail = customsDeclarationMapper.selectById(auditProecess.getSrcBillId());
+					if (detail == null) {
+						throw new SecurityException("审批通过失败");
+					}
+					detail.setStatus(2);
+					int count = customsDeclarationMapper.updateById(detail);
+					if (count == 0) {
+						throw new SecurityException("审批开始修改审核状态失败");
+					}
+					List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+						.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+						.eq(FeeCenter::getIsDeleted, 0)
+						.eq(FeeCenter::getPid, customsDeclaration.getId()));
+					for (FeeCenter item : feeCenterList) {
+						item.setApproverId(AuthUtil.getUserId());
+						item.setApproverName(AuthUtil.getUserName());
+						item.setApproveTime(new Date());
+					}
+					feeCenterService.saveOrUpdateBatch(feeCenterList);
+				}
+
+				auditProecess.setAuditStatus("A");
+				//查询下一级,开启待审
+				LambdaQueryWrapper<LosAuditProecess> auditProecessLambdaQueryWrapper = new LambdaQueryWrapper<>();
+				auditProecessLambdaQueryWrapper
+					.eq(LosAuditProecess::getBatchNo, auditProecess.getBatchNo())
+					.eq(LosAuditProecess::getSrcBillId, auditProecess.getSrcBillId())
+					.eq(LosAuditProecess::getIsDelete, 0)
+					.eq(LosAuditProecess::getActId, auditProecess.getActId())
+					.eq(LosAuditProecess::getBillId, auditProecess.getBillId())
+					.eq(LosAuditProecess::getBillNo, auditProecess.getBillNo())
+					.eq(LosAuditProecess::getTenantId, AuthUtil.getTenantId())
+					.eq(LosAuditProecess::getLevelId, auditProecess.getLevelId() + 1);
+				Integer count = baseMapper.selectCount(auditProecessLambdaQueryWrapper);
+				if (count != null && count > 1) {
+					throw new SecurityException("审核失败,获取下一级信息失败");
+				}
+				LosAuditProecess proecess = baseMapper.selectOne(auditProecessLambdaQueryWrapper);
+				if (proecess == null) {
+					throw new SecurityException("审批通过=>获取下一级信息失败");
+				}
+				proecess.setAuditStatus("S");
+				baseMapper.updateById(proecess);
+
+				SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
+
+				//获得订单创建日期
+				String billsDate = null;
+				if (proecessTemp.getBillId() != null) {
+					if (customsDeclaration != null) {
+						billsDate = simpleDateFormat.format(customsDeclaration.getCreateTime());
+					}
+				}
+
+				Message message = new Message();
+				message.setUserName(AuthUtil.getUserName());
+				message.setUserId(AuthUtil.getUserId());
+				message.setParameter(String.valueOf(auditProecess.getBillId()));
+				message.setMessageType(1);
+				message.setTenantId(AuthUtil.getTenantId());
+				message.setUrl(auditProecess.getUrl());
+				message.setPageLabel(auditProecess.getPageLabel());
+				message.setPageStatus(auditProecess.getPageStatus());
+				if ("报关审核".equals(auditProecess.getProcessType())) {
+					message.setMessageBody("您有新的报关审核,业务单号:" + "" + proecessTemp.getBillNo() + ","
+						+ "单据日期:" + billsDate + ",请审核。"
+						+ "提交人:" + proecessTemp.getSendName() + "  " + "提交时间" + simpleDateFormat.format(proecessTemp.getSendTime())
+					);
+				}
+				message.setCreateUser(AuthUtil.getUserId());
+				message.setCreateTime(new Date());
+
+				// 消息批量通知下一级
+				sendMsgToGroup(message, proecess.getAuditUserId());
+			}
+			//不通过
+			else if (operate == 2) {
+				auditProecess.setAuditStatus("B");
+				CustomsDeclaration detail = customsDeclarationMapper.selectById(auditProecess.getSrcBillId());
+				if (detail == null) {
+					throw new SecurityException("审批通过失败");
+				}
+				detail.setStatus(4);
+				int count = customsDeclarationMapper.updateById(detail);
+				if (count == 0) {
+					throw new SecurityException("修改订单数据失败");
+				}
+				List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+					.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+					.eq(FeeCenter::getIsDeleted, 0)
+					.eq(FeeCenter::getPid, customsDeclaration.getId()));
+				for (FeeCenter item : feeCenterList) {
+					item.setApproverId(AuthUtil.getUserId());
+					item.setApproverName(AuthUtil.getUserName());
+					item.setApproveTime(new Date());
+				}
+				feeCenterService.saveOrUpdateBatch(feeCenterList);
+				if ("报关审核".equals(auditProecess.getProcessType())) {
+					sendMessage.setMessageBody("您的报关审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
+				}
+				R save = messageClient.save(sendMessage);
+				if (!save.isSuccess()) {
+					throw new SecurityException("发送消息失败");
+				}
+			}
+
+		}
+		//是最后一级
+		else if ("T".equals(iffinalItem)) {
+			//通过
+			if (operate == 1) {
+				auditProecess.setAuditStatus("A");
+				CustomsDeclaration detail = customsDeclarationMapper.selectById(auditProecess.getSrcBillId());
+				if (customsDeclaration == null) {
+					throw new SecurityException("审批通过失败");
+				}
+				detail.setStatus(3);
+				detail.setBillStatus(3);
+				int count = customsDeclarationMapper.updateById(detail);
+				if (count == 0) {
+					throw new SecurityException("修改订单数据失败");
+				}
+				List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+					.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+					.eq(FeeCenter::getIsDeleted, 0)
+					.eq(FeeCenter::getPid, customsDeclaration.getId()));
+				for (FeeCenter item : feeCenterList) {
+					item.setApproverId(AuthUtil.getUserId());
+					item.setApproverName(AuthUtil.getUserName());
+					item.setApproveTime(new Date());
+					item.setAuditStatus("1");
+				}
+				List<FeeCenter> feeCenters = feeCenterList.stream().filter(e -> 0 == e.getAccStatus()).collect(Collectors.toList());
+				if (feeCenters.size() != 0) {
+					FinAccBills finAccBills = new FinAccBills();
+					finAccBills.setFeeCenterList(feeCenters);
+					finAccBills.setBusinessTypeCode("HYZD");
+					finAccBills.setBillNoFormat("HYZD");
+					finAccBills.setAccountType("");
+					finAccBills.setRefno(customsDeclaration.getRefno());
+					finAccBillsService.generateBill(finAccBills);
+				}
+				feeCenterService.saveOrUpdateBatch(feeCenterList);
+				if ("报关审核".equals(auditProecess.getProcessType())) {
+					sendMessage.setMessageBody("您的报关审核已通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
+				}
+				R save = messageClient.save(sendMessage);
+				if (!save.isSuccess()) {
+					throw new SecurityException("发送消息失败");
+				}
+			}
+			//不通过
+			else if (operate == 2) {
+				//todo 调用feign取消
+				auditProecess.setAuditStatus("B");
+				CustomsDeclaration detail = customsDeclarationMapper.selectById(auditProecess.getSrcBillId());
+				if (detail == null) {
+					throw new SecurityException("审批通过失败");
+				}
+				detail.setStatus(4);
+				int count = customsDeclarationMapper.updateById(detail);
+				if (count == 0) {
+					throw new SecurityException("修改订单数据失败");
+				}
+				List<FeeCenter> feeCenterList = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
+					.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
+					.eq(FeeCenter::getIsDeleted, 0)
+					.eq(FeeCenter::getPid, customsDeclaration.getId()));
+				for (FeeCenter item : feeCenterList) {
+					item.setApproverId(AuthUtil.getUserId());
+					item.setApproverName(AuthUtil.getUserName());
+					item.setApproveTime(new Date());
+				}
+				feeCenterService.saveOrUpdateBatch(feeCenterList);
+				if ("报关审核".equals(auditProecess.getProcessType())) {
+					sendMessage.setMessageBody("您的报关审核未通过" + ",业务单号:" + proecessTemp.getBillNo() + ",驳回原因:" + auditProecess.getAuditMsg());
+				}
+				R save = messageClient.save(sendMessage);
+				if (!save.isSuccess()) {
+					throw new SecurityException("发送消息失败");
+				}
+			}
+		} else {
+			throw new SecurityException("审批异常,请联系管理员");
+		}
+
+		cleanMsg(proecessTemp.getAuditUserId(), AuthUtil.getUserId(), proecessTemp.getSrcBillId());
+
+		//保存操作记录
+		auditProecess.setAuditMsg(auditProecess.getAuditMsg());
+		auditProecess.setAuditItem(new Date());
+		baseMapper.updateById(auditProecess);
+	}
+
+	@Override
 	public R deteleByBillId(Long billId) {
 		baseMapper.deteleByBillId(billId);
 		return R.data("操作成功");

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

@@ -201,6 +201,8 @@ public class FinAccBillsServiceImpl extends ServiceImpl<FinAccBillsMapper, FinAc
 				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 				return R.fail(500, "生成订单编号失败");
 			}
+			data.setWarehousingDate(finAccBills.getWarehousingDate());
+			data.setOutboundDate(finAccBills.getOutboundDate());
 			data.setBillNo((String) clientBillNo.getData());
 			data.setBillDate(new Date());
 			data.setAccountType(finAccBills.getAccountType());
@@ -454,8 +456,8 @@ public class FinAccBillsServiceImpl extends ServiceImpl<FinAccBillsMapper, FinAc
 	}
 
 	@Override
-	public List<Map<String, Object>> listFeeCountByCorp(String dc,Long corpId) {
-		List<Map<String, Object>> mapList = baseMapper.listFeeCountByCorp(dc,AuthUtil.getTenantId(),deptUtils.getDeptPid(),AuthUtil.getPostId(),corpId);
+	public List<Map<String, Object>> listFeeCountByCorp(String dc, Long corpId) {
+		List<Map<String, Object>> mapList = baseMapper.listFeeCountByCorp(dc, AuthUtil.getTenantId(), deptUtils.getDeptPid(), AuthUtil.getPostId(), corpId);
 		return mapList;
 	}