Browse Source

Merge remote-tracking branch 'origin/dev' into dev

lazhaoqian 4 years ago
parent
commit
78cb0074e2
32 changed files with 1667 additions and 10 deletions
  1. 1 0
      blade-service-api/pom.xml
  2. 24 0
      blade-service-api/trade-finance-api/pom.xml
  3. 116 0
      blade-service-api/trade-finance-api/src/main/java/com/trade/finance/entity/Files.java
  4. 171 0
      blade-service-api/trade-finance-api/src/main/java/com/trade/finance/entity/Items.java
  5. 188 0
      blade-service-api/trade-finance-api/src/main/java/com/trade/finance/entity/Settlement.java
  6. 36 0
      blade-service-api/trade-finance-api/src/main/java/com/trade/finance/vo/FilesVO.java
  7. 37 0
      blade-service-api/trade-finance-api/src/main/java/com/trade/finance/vo/ItemsVO.java
  8. 37 0
      blade-service-api/trade-finance-api/src/main/java/com/trade/finance/vo/SettlementVO.java
  9. 3 0
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/Order.java
  10. 1 0
      blade-service/pom.xml
  11. 78 0
      blade-service/trade-finance/pom.xml
  12. 126 0
      blade-service/trade-finance/src/main/java/com/trade/finance/controller/FilesController.java
  13. 126 0
      blade-service/trade-finance/src/main/java/com/trade/finance/controller/ItemsController.java
  14. 126 0
      blade-service/trade-finance/src/main/java/com/trade/finance/controller/SettlementController.java
  15. 44 0
      blade-service/trade-finance/src/main/java/com/trade/finance/mapper/FilesMapper.java
  16. 28 0
      blade-service/trade-finance/src/main/java/com/trade/finance/mapper/FilesMapper.xml
  17. 44 0
      blade-service/trade-finance/src/main/java/com/trade/finance/mapper/ItemsMapper.java
  18. 39 0
      blade-service/trade-finance/src/main/java/com/trade/finance/mapper/ItemsMapper.xml
  19. 44 0
      blade-service/trade-finance/src/main/java/com/trade/finance/mapper/SettlementMapper.java
  20. 41 0
      blade-service/trade-finance/src/main/java/com/trade/finance/mapper/SettlementMapper.xml
  21. 42 0
      blade-service/trade-finance/src/main/java/com/trade/finance/service/IFilesService.java
  22. 42 0
      blade-service/trade-finance/src/main/java/com/trade/finance/service/IItemsService.java
  23. 42 0
      blade-service/trade-finance/src/main/java/com/trade/finance/service/ISettlementService.java
  24. 42 0
      blade-service/trade-finance/src/main/java/com/trade/finance/service/impl/FilesServiceImpl.java
  25. 42 0
      blade-service/trade-finance/src/main/java/com/trade/finance/service/impl/ItemsServiceImpl.java
  26. 42 0
      blade-service/trade-finance/src/main/java/com/trade/finance/service/impl/SettlementServiceImpl.java
  27. 14 0
      blade-service/trade-finance/src/main/resources/application-dev.yml
  28. 7 0
      blade-service/trade-finance/src/main/resources/application-prod.yml
  29. 6 0
      blade-service/trade-finance/src/main/resources/application-test.yml
  30. 13 0
      blade-service/trade-finance/src/main/resources/application.yml
  31. 1 1
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/component/impl/DefaultOrderSaveImpl.java
  32. 64 9
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/controller/ImportOrderController.java

+ 1 - 0
blade-service-api/pom.xml

@@ -28,6 +28,7 @@
         <module>blade-mocha-item-api</module>
         <module>trade-purchase-api</module>
         <module>blade-project-api</module>
+        <module>trade-finance-api</module>
     </modules>
 
     <dependencies>

+ 24 - 0
blade-service-api/trade-finance-api/pom.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>blade-service-api</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.8.2.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>trade-finance-api</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${bladex.project.version}</version>
+    <packaging>jar</packaging>
+
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+
+</project>

+ 116 - 0
blade-service-api/trade-finance-api/src/main/java/com/trade/finance/entity/Files.java

@@ -0,0 +1,116 @@
+/*
+ *      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 com.trade.finance.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 结算文件实体类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Data
+@TableName("finance_files")
+@ApiModel(value = "Files对象", description = "结算文件")
+public class Files implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		@TableId
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 排序
+	*/
+		@ApiModelProperty(value = "排序")
+		private Integer sort;
+	/**
+	* 文件名
+	*/
+		@ApiModelProperty(value = "文件名")
+		private String fileName;
+	/**
+	* 文件地址
+	*/
+		@ApiModelProperty(value = "文件地址")
+		private String url;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+
+}

+ 171 - 0
blade-service-api/trade-finance-api/src/main/java/com/trade/finance/entity/Items.java

@@ -0,0 +1,171 @@
+/*
+ *      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 com.trade.finance.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 结算明细实体类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Data
+@TableName("finance_items")
+@ApiModel(value = "Items对象", description = "结算明细")
+public class Items implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+    @TableId
+	private Long id;
+	/**
+	* 主表主键
+	*/
+		@ApiModelProperty(value = "主表主键")
+		private Long pid;
+	/**
+	* 排序
+	*/
+		@ApiModelProperty(value = "排序")
+		private Integer sort;
+	/**
+	* 费用id
+	*/
+		@ApiModelProperty(value = "费用id")
+		private Long itemId;
+	/**
+	* 客户id
+	*/
+		@ApiModelProperty(value = "客户id")
+		private Long corpId;
+	/**
+	* 数量
+	*/
+		@ApiModelProperty(value = "数量")
+		private BigDecimal quantity;
+	/**
+	* 计费单位
+	*/
+		@ApiModelProperty(value = "计费单位")
+		private String unit;
+	/**
+	* 单价
+	*/
+		@ApiModelProperty(value = "单价")
+		private BigDecimal price;
+	/**
+	* 来源订单号
+	*/
+		@ApiModelProperty(value = "来源订单号")
+		@TableField("src_orderNo")
+	private String srcOrderno;
+	/**
+	* 金额
+	*/
+		@ApiModelProperty(value = "金额")
+		@TableField("Amount")
+	private BigDecimal amount;
+	/**
+	* 币别
+	*/
+		@ApiModelProperty(value = "币别")
+		private String currency;
+	/**
+	* 汇率
+	*/
+		@ApiModelProperty(value = "汇率")
+		private BigDecimal exchangeRate;
+	/**
+	* 税率
+	*/
+		@ApiModelProperty(value = "税率")
+		private BigDecimal taxRate;
+	/**
+	* 核销金额
+	*/
+		@ApiModelProperty(value = "核销金额")
+		private BigDecimal settlmentAmount;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+	/**
+	* 创建人姓名
+	*/
+		@ApiModelProperty(value = "创建人姓名")
+		private String createUserName;
+	/**
+	* 修改人姓名
+	*/
+		@ApiModelProperty(value = "修改人姓名")
+		private String updateUserName;
+
+
+}

+ 188 - 0
blade-service-api/trade-finance-api/src/main/java/com/trade/finance/entity/Settlement.java

@@ -0,0 +1,188 @@
+/*
+ *      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 com.trade.finance.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 结算表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Data
+@TableName("finance_settlement")
+@ApiModel(value = "Settlement对象", description = "结算表")
+public class Settlement implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+    @TableId
+	private Long id;
+	/**
+	* 系统编号
+	*/
+		@ApiModelProperty(value = "系统编号")
+		@TableField("Sys_No")
+	private String sysNo;
+	/**
+	* 来源订单号
+	*/
+		@ApiModelProperty(value = "来源订单号")
+		@TableField("Src_OrderNo")
+	private String srcOrderno;
+	/**
+	* 收费 、付费
+	*/
+		@ApiModelProperty(value = "收费 、付费")
+		@TableField("Bill_type")
+	private String billType;
+	/**
+	* 客户id
+	*/
+		@ApiModelProperty(value = "客户id")
+		@TableField("Corp_id")
+	private Long corpId;
+	/**
+	* 客户名称
+	*/
+		@ApiModelProperty(value = "客户名称")
+		@TableField("Corp_name")
+	private String corpName;
+	/**
+	* 预计结算日期
+	*/
+		@ApiModelProperty(value = "预计结算日期")
+		@TableField("Plan_settlement_date")
+	private LocalDateTime planSettlementDate;
+	/**
+	* 结算日期
+	*/
+		@ApiModelProperty(value = "结算日期")
+		private LocalDateTime settlementDate;
+	/**
+	* 币别
+	*/
+		@ApiModelProperty(value = "币别")
+		private String currency;
+	/**
+	* 汇率
+	*/
+		@ApiModelProperty(value = "汇率")
+		private BigDecimal exchangeRate;
+	/**
+	* 金额
+	*/
+		@ApiModelProperty(value = "金额")
+		private BigDecimal amount;
+	/**
+	* 手续费
+	*/
+		@ApiModelProperty(value = "手续费")
+		private BigDecimal serviceCharge;
+	/**
+	* 账户名称
+	*/
+		@ApiModelProperty(value = "账户名称")
+		@TableField("ACCOUNT_NAME")
+	private String accountName;
+	/**
+	* 开户银行
+	*/
+		@ApiModelProperty(value = "开户银行")
+		@TableField("ACCOUNT_bank")
+	private String accountBank;
+	/**
+	* 银行账号
+	*/
+		@ApiModelProperty(value = "银行账号")
+		@TableField("ACCOUNT_no")
+	private String accountNo;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remark;
+	/**
+	* 特别提醒
+	*/
+		@ApiModelProperty(value = "特别提醒")
+		private String specialRemarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+	/**
+	* 创建人姓名
+	*/
+		@ApiModelProperty(value = "创建人姓名")
+		private String createUserName;
+	/**
+	* 修改人姓名
+	*/
+		@ApiModelProperty(value = "修改人姓名")
+		private String updateUserName;
+
+
+}

+ 36 - 0
blade-service-api/trade-finance-api/src/main/java/com/trade/finance/vo/FilesVO.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 com.trade.finance.vo;
+
+import com.trade.finance.entity.Files;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 结算文件视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "FilesVO对象", description = "结算文件")
+public class FilesVO extends Files {
+	private static final long serialVersionUID = 1L;
+
+}

+ 37 - 0
blade-service-api/trade-finance-api/src/main/java/com/trade/finance/vo/ItemsVO.java

@@ -0,0 +1,37 @@
+/*
+ *      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 com.trade.finance.vo;
+
+
+import com.trade.finance.entity.Items;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 结算明细视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ItemsVO对象", description = "结算明细")
+public class ItemsVO extends Items {
+	private static final long serialVersionUID = 1L;
+
+}

+ 37 - 0
blade-service-api/trade-finance-api/src/main/java/com/trade/finance/vo/SettlementVO.java

@@ -0,0 +1,37 @@
+/*
+ *      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 com.trade.finance.vo;
+
+
+import com.trade.finance.entity.Settlement;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 结算表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SettlementVO对象", description = "结算表")
+public class SettlementVO extends Settlement {
+	private static final long serialVersionUID = 1L;
+
+}

+ 3 - 0
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/Order.java

@@ -1,5 +1,6 @@
 package com.trade.purchase.order.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.trade.purchase.order.common.entity.OrderBase;
@@ -495,5 +496,7 @@ public class Order extends OrderBase {
 	 */
 	@ApiModelProperty(value = "销售核价备注")
 	private String sellPricingRemarks;
+    @TableField(exist = false)
+	private Boolean hasItem=false;
 
 }

+ 1 - 0
blade-service/pom.xml

@@ -28,6 +28,7 @@
         <module>blade-mocha-item</module>
         <module>trade-purchase</module>
         <module>blade-project</module>
+        <module>trade-finance</module>
     </modules>
 
     <dependencies>

+ 78 - 0
blade-service/trade-finance/pom.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>blade-service</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.8.2.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>trade-finance</artifactId>
+    <name>${project.artifactId}</name>
+    <version>2.8.2.RELEASE</version>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct-processor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok-mapstruct-binding</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-swagger</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>trade-finance-api</artifactId>
+            <version>${bladex.project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-boot</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-swagger</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-client-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.10.10</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+
+
+</project>

+ 126 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/controller/FilesController.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 com.trade.finance.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Files;
+import com.trade.finance.service.IFilesService;
+import com.trade.finance.vo.FilesVO;
+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 org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 结算文件 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/files")
+@Api(value = "结算文件", tags = "结算文件接口")
+public class FilesController extends BladeController {
+
+	private final IFilesService filesService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入files")
+	public R<Files> detail(Files files) {
+		Files detail = filesService.getOne(Condition.getQueryWrapper(files));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 结算文件
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入files")
+	public R<IPage<Files>> list(Files files, Query query) {
+		IPage<Files> pages = filesService.page(Condition.getPage(query), Condition.getQueryWrapper(files));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 结算文件
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入files")
+	public R<IPage<FilesVO>> page(FilesVO files, Query query) {
+		IPage<FilesVO> pages = filesService.selectFilesPage(Condition.getPage(query), files);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 结算文件
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入files")
+	public R save(@Valid @RequestBody Files files) {
+		return R.status(filesService.save(files));
+	}
+
+	/**
+	 * 修改 结算文件
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入files")
+	public R update(@Valid @RequestBody Files files) {
+		return R.status(filesService.updateById(files));
+	}
+
+	/**
+	 * 新增或修改 结算文件
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入files")
+	public R submit(@Valid @RequestBody Files files) {
+		return R.status(filesService.saveOrUpdate(files));
+	}
+
+
+	/**
+	 * 删除 结算文件
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(filesService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 126 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/controller/ItemsController.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 com.trade.finance.controller;
+
+import com.trade.finance.entity.Items;
+import com.trade.finance.service.IItemsService;
+import com.trade.finance.vo.ItemsVO;
+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.core.boot.ctrl.BladeController;
+
+/**
+ * 结算明细 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/items")
+@Api(value = "结算明细", tags = "结算明细接口")
+public class ItemsController extends BladeController {
+
+	private final IItemsService itemsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入items")
+	public R<Items> detail(Items items) {
+		Items detail = itemsService.getOne(Condition.getQueryWrapper(items));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 结算明细
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入items")
+	public R<IPage<Items>> list(Items items, Query query) {
+		IPage<Items> pages = itemsService.page(Condition.getPage(query), Condition.getQueryWrapper(items));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 结算明细
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入items")
+	public R<IPage<ItemsVO>> page(ItemsVO items, Query query) {
+		IPage<ItemsVO> pages = itemsService.selectItemsPage(Condition.getPage(query), items);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 结算明细
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入items")
+	public R save(@Valid @RequestBody Items items) {
+		return R.status(itemsService.save(items));
+	}
+
+	/**
+	 * 修改 结算明细
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入items")
+	public R update(@Valid @RequestBody Items items) {
+		return R.status(itemsService.updateById(items));
+	}
+
+	/**
+	 * 新增或修改 结算明细
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入items")
+	public R submit(@Valid @RequestBody Items items) {
+		return R.status(itemsService.saveOrUpdate(items));
+	}
+
+
+	/**
+	 * 删除 结算明细
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(itemsService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 126 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/controller/SettlementController.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 com.trade.finance.controller;
+
+import com.trade.finance.entity.Settlement;
+import com.trade.finance.service.ISettlementService;
+import com.trade.finance.vo.SettlementVO;
+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.core.boot.ctrl.BladeController;
+
+/**
+ * 结算表 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/settlement")
+@Api(value = "结算表", tags = "结算表接口")
+public class SettlementController extends BladeController {
+
+	private final ISettlementService settlementService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入settlement")
+	public R<Settlement> detail(Settlement settlement) {
+		Settlement detail = settlementService.getOne(Condition.getQueryWrapper(settlement));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 结算表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入settlement")
+	public R<IPage<Settlement>> list(Settlement settlement, Query query) {
+		IPage<Settlement> pages = settlementService.page(Condition.getPage(query), Condition.getQueryWrapper(settlement));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 结算表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入settlement")
+	public R<IPage<SettlementVO>> page(SettlementVO settlement, Query query) {
+		IPage<SettlementVO> pages = settlementService.selectSettlementPage(Condition.getPage(query), settlement);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 结算表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入settlement")
+	public R save(@Valid @RequestBody Settlement settlement) {
+		return R.status(settlementService.save(settlement));
+	}
+
+	/**
+	 * 修改 结算表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入settlement")
+	public R update(@Valid @RequestBody Settlement settlement) {
+		return R.status(settlementService.updateById(settlement));
+	}
+
+	/**
+	 * 新增或修改 结算表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入settlement")
+	public R submit(@Valid @RequestBody Settlement settlement) {
+		return R.status(settlementService.saveOrUpdate(settlement));
+	}
+
+
+	/**
+	 * 删除 结算表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(settlementService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 44 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/mapper/FilesMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      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 com.trade.finance.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Files;
+import com.trade.finance.vo.FilesVO;
+
+import java.util.List;
+
+/**
+ * 结算文件 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+public interface FilesMapper extends BaseMapper<Files> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param files
+	 * @return
+	 */
+	List<FilesVO> selectFilesPage(IPage page, FilesVO files);
+
+}

+ 28 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/mapper/FilesMapper.xml

@@ -0,0 +1,28 @@
+<?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="com.trade.finance.mapper.FilesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="filesResultMap" type="com.trade.finance.entity.Files">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="sort" property="sort"/>
+        <result column="file_name" property="fileName"/>
+        <result column="url" property="url"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectFilesPage" resultMap="filesResultMap">
+        select * from finance_files where is_deleted = 0
+    </select>
+
+</mapper>

+ 44 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/mapper/ItemsMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      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 com.trade.finance.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Items;
+import com.trade.finance.vo.ItemsVO;
+
+import java.util.List;
+
+/**
+ * 结算明细 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+public interface ItemsMapper extends BaseMapper<Items> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param items
+	 * @return
+	 */
+	List<ItemsVO> selectItemsPage(IPage page, ItemsVO items);
+
+}

+ 39 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/mapper/ItemsMapper.xml

@@ -0,0 +1,39 @@
+<?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.finance.mapper.ItemsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="itemsResultMap" type="com.trade.finance.entity.Items">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="sort" property="sort"/>
+        <result column="item_id" property="itemId"/>
+        <result column="corp_id" property="corpId"/>
+        <result column="quantity" property="quantity"/>
+        <result column="unit" property="unit"/>
+        <result column="price" property="price"/>
+        <result column="src_orderNo" property="srcOrderno"/>
+        <result column="Amount" property="amount"/>
+        <result column="currency" property="currency"/>
+        <result column="exchange_rate" property="exchangeRate"/>
+        <result column="tax_rate" property="taxRate"/>
+        <result column="settlment_amount" property="settlmentAmount"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="update_user_name" property="updateUserName"/>
+    </resultMap>
+
+
+    <select id="selectItemsPage" resultMap="itemsResultMap">
+        select * from finance_items where is_deleted = 0
+    </select>
+
+</mapper>

+ 44 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/mapper/SettlementMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      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 com.trade.finance.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Settlement;
+import com.trade.finance.vo.SettlementVO;
+
+import java.util.List;
+
+/**
+ * 结算表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+public interface SettlementMapper extends BaseMapper<Settlement> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param settlement
+	 * @return
+	 */
+	List<SettlementVO> selectSettlementPage(IPage page, SettlementVO settlement);
+
+}

+ 41 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/mapper/SettlementMapper.xml

@@ -0,0 +1,41 @@
+<?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.finance.mapper.SettlementMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="settlementResultMap" type="com.trade.finance.entity.Settlement">
+        <id column="id" property="id"/>
+        <result column="Sys_No" property="sysNo"/>
+        <result column="Src_OrderNo" property="srcOrderno"/>
+        <result column="Bill_type" property="billType"/>
+        <result column="Corp_id" property="corpId"/>
+        <result column="Corp_name" property="corpName"/>
+        <result column="Plan_settlement_date" property="planSettlementDate"/>
+        <result column="settlement_date" property="settlementDate"/>
+        <result column="currency" property="currency"/>
+        <result column="exchange_rate" property="exchangeRate"/>
+        <result column="amount" property="amount"/>
+        <result column="service_charge" property="serviceCharge"/>
+        <result column="ACCOUNT_NAME" property="accountName"/>
+        <result column="ACCOUNT_bank" property="accountBank"/>
+        <result column="ACCOUNT_no" property="accountNo"/>
+        <result column="remark" property="remark"/>
+        <result column="special_remarks" property="specialRemarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="update_user_name" property="updateUserName"/>
+    </resultMap>
+
+
+    <select id="selectSettlementPage" resultMap="settlementResultMap">
+        select * from finance_settlement where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/service/IFilesService.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 com.trade.finance.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Files;
+import com.trade.finance.vo.FilesVO;
+
+/**
+ * 结算文件 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+public interface IFilesService extends IService<Files> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param files
+	 * @return
+	 */
+	IPage<FilesVO> selectFilesPage(IPage<FilesVO> page, FilesVO files);
+
+}

+ 42 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/service/IItemsService.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 com.trade.finance.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Items;
+import com.trade.finance.vo.ItemsVO;
+
+/**
+ * 结算明细 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+public interface IItemsService extends IService<Items> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param items
+	 * @return
+	 */
+	IPage<ItemsVO> selectItemsPage(IPage<ItemsVO> page, ItemsVO items);
+
+}

+ 42 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/service/ISettlementService.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 com.trade.finance.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.finance.entity.Settlement;
+import com.trade.finance.vo.SettlementVO;
+
+/**
+ * 结算表 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+public interface ISettlementService extends IService<Settlement> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param settlement
+	 * @return
+	 */
+	IPage<SettlementVO> selectSettlementPage(IPage<SettlementVO> page, SettlementVO settlement);
+
+}

+ 42 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/service/impl/FilesServiceImpl.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 com.trade.finance.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.trade.finance.entity.Files;
+import com.trade.finance.mapper.FilesMapper;
+import com.trade.finance.service.IFilesService;
+import com.trade.finance.vo.FilesVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 结算文件 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Service
+public class FilesServiceImpl extends ServiceImpl<FilesMapper, Files> implements IFilesService {
+
+	@Override
+	public IPage<FilesVO> selectFilesPage(IPage<FilesVO> page, FilesVO files) {
+		return page.setRecords(baseMapper.selectFilesPage(page, files));
+	}
+
+}

+ 42 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/service/impl/ItemsServiceImpl.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 com.trade.finance.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.trade.finance.entity.Items;
+import com.trade.finance.mapper.ItemsMapper;
+import com.trade.finance.service.IItemsService;
+import com.trade.finance.vo.ItemsVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 结算明细 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Service
+public class ItemsServiceImpl extends ServiceImpl<ItemsMapper, Items> implements IItemsService {
+
+	@Override
+	public IPage<ItemsVO> selectItemsPage(IPage<ItemsVO> page, ItemsVO items) {
+		return page.setRecords(baseMapper.selectItemsPage(page, items));
+	}
+
+}

+ 42 - 0
blade-service/trade-finance/src/main/java/com/trade/finance/service/impl/SettlementServiceImpl.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 com.trade.finance.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.trade.finance.entity.Settlement;
+import com.trade.finance.mapper.SettlementMapper;
+import com.trade.finance.service.ISettlementService;
+import com.trade.finance.vo.SettlementVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 结算表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-03
+ */
+@Service
+public class SettlementServiceImpl extends ServiceImpl<SettlementMapper, Settlement> implements ISettlementService {
+
+	@Override
+	public IPage<SettlementVO> selectSettlementPage(IPage<SettlementVO> page, SettlementVO settlement) {
+		return page.setRecords(baseMapper.selectSettlementPage(page, settlement));
+	}
+
+}

+ 14 - 0
blade-service/trade-finance/src/main/resources/application-dev.yml

@@ -0,0 +1,14 @@
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.dev.url}
+    username: ${blade.datasource.dev.username}
+    password: ${blade.datasource.dev.password}
+
+#mybatis-plus:
+#  mapper-locations: classpath:com/yh/project/mapper/*Mapper.xml
+#  type-aliases-package: com.yh.project.*.entity
+#swagger文档
+swagger:
+  base-packages:
+    - com.trade.purchase

+ 7 - 0
blade-service/trade-finance/src/main/resources/application-prod.yml

@@ -0,0 +1,7 @@
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.prod.url}
+    username: ${blade.datasource.prod.username}
+    password: ${blade.datasource.prod.password}
+

+ 6 - 0
blade-service/trade-finance/src/main/resources/application-test.yml

@@ -0,0 +1,6 @@
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.test.url}
+    username: ${blade.datasource.test.username}
+    password: ${blade.datasource.test.password}

+ 13 - 0
blade-service/trade-finance/src/main/resources/application.yml

@@ -0,0 +1,13 @@
+#服务器端口
+server:
+  port: 9029
+
+#默认对象存储配置
+oss:
+  enabled: true
+  name: minio
+  tenant-mode: true
+  endpoint: http://127.0.0.1:9000
+  access-key: D99KGE6ZTQXSATTJWU24
+  secret-key: QyVqGnhIQQE734UYSUFlGOZViE6+ZlDEfUG3NjhJ
+  bucket-name: bladex

+ 1 - 1
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/component/impl/DefaultOrderSaveImpl.java

@@ -69,7 +69,7 @@ public class DefaultOrderSaveImpl implements IOrderSave {
 	 */
 	private Order saveOrder(OrderSubmitDto order) {
 		order.setBillType(order.getOrderTypeEnum().getType());
-		order.setTradeType(order.getTradeTypeEnum().getType());
+		order.setTradeType(order.getTradeType());
 		if (Func.isBlank(order.getSysNo())) {
 			orderCodeMaker.generate(order);
 		}

+ 64 - 9
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/controller/ImportOrderController.java

@@ -1,11 +1,19 @@
 package com.trade.purchase.order.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.trade.purchase.order.dto.OrderSubmitDto;
 import com.trade.purchase.order.entity.Order;
 import com.trade.purchase.order.entity.OrderFees;
 import com.trade.purchase.order.entity.OrderFiles;
+import com.trade.purchase.order.entity.OrderItems;
 import com.trade.purchase.order.enums.OrderTypeEnum;
 import com.trade.purchase.order.service.IOrderFeesService;
 import com.trade.purchase.order.service.IOrderFilesService;
@@ -25,6 +33,8 @@ import org.springblade.core.tool.utils.Func;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 进口采购订单表 控制器
@@ -34,8 +44,8 @@ import javax.validation.Valid;
  */
 @RestController
 @AllArgsConstructor
-@RequestMapping("/import-order")
-@Api(value = "进口采购订单表", tags = "进口采购订单表接口")
+@RequestMapping("/purchase-order")
+@Api(value = "采购订单表", tags = "采购订单表接口")
 public class ImportOrderController extends BladeController {
 
 	private final IOrderService orderService;
@@ -65,12 +75,35 @@ public class ImportOrderController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "查询所有", notes = "传入order")
-	public R<IPage<Order>> list(Order order, Query query) {
-		order.setIsDeleted(0);
-		order.setTenantId(AuthUtil.getTenantId());
-		order.setBillType(OrderTypeEnum.PURCHASE.getType());
-		order.setTradeType(OrderTypeEnum.IMPORT.getType());
-		IPage<Order> pages = orderService.page(Condition.getPage(query), Condition.getQueryWrapper(order));
+	public R<IPage<Order>> list(@RequestParam(name = "current", defaultValue = "1") Integer current,
+								@RequestParam(name = "size", defaultValue = "10") Integer size,
+								@RequestParam(name = "businesStartDate",  required = false) String businesStartDate,
+								@RequestParam(name = "businesEndDate",  required = false) String businesEndDate,
+								@RequestParam(name = "accountsCollectionStartDate",  required = false) String accountsCollectionStartDate,
+								@RequestParam(name = "accountsCollectionEndDate",  required = false) String accountsCollectionEndDate,
+								@RequestParam(name = "dateOfStartArrival",  required = false) String dateOfStartArrival,
+								@RequestParam(name = "dateOfEndArrival",  required = false) String dateOfEndArrival,
+								@RequestParam(name = "tradeType",  required = true) String tradeType
+								)
+	{
+
+		QueryWrapper<Order> queryWrapper = new QueryWrapper<>();
+		queryWrapper.eq("tenant_id",AuthUtil.getTenantId());
+		queryWrapper.eq("bill_type",OrderTypeEnum.PURCHASE.getType());
+		queryWrapper.eq("trade_type",tradeType);
+		queryWrapper.between(StringUtils.isNotBlank(businesStartDate)&&StringUtils.isNotBlank(businesEndDate),"busines_date",businesStartDate,businesEndDate);
+		queryWrapper.between(StringUtils.isNotBlank(accountsCollectionStartDate)&&StringUtils.isNotBlank(accountsCollectionEndDate),"accounts_collection_date",accountsCollectionStartDate,accountsCollectionEndDate);
+		queryWrapper.between(StringUtils.isNotBlank(dateOfStartArrival)&&StringUtils.isNotBlank(dateOfEndArrival),"arrival_date",dateOfStartArrival,dateOfEndArrival);
+		Page<Order> page=new Page<>(current,size);
+		IPage<Order> pages = orderService.page(page,queryWrapper);
+		List<Order> records = pages.getRecords();
+		if(CollectionUtils.isNotEmpty(records))
+		{
+			records.forEach(e->{
+				Boolean flag=orderItemsService.count(new LambdaQueryWrapper<OrderItems>().eq(OrderItems::getPid,e.getId()))>0?true:false;
+				e.setHasItem(flag);
+			});
+		}
 		return R.data(pages);
 	}
 
@@ -123,7 +156,6 @@ public class ImportOrderController extends BladeController {
 	@ApiOperation(value = "新增或修改", notes = "传入order")
 	public R<String> submit(@Valid @RequestBody OrderSubmitDto submitDto) {
 		submitDto.setOrderTypeEnum(OrderTypeEnum.PURCHASE);
-		submitDto.setTradeTypeEnum(OrderTypeEnum.IMPORT);
 		return orderService.submitOrderMessage(submitDto);
 	}
 
@@ -138,6 +170,20 @@ public class ImportOrderController extends BladeController {
 	}
 
 	/**
+	 * 删除采购明细信息
+	 */
+	@PostMapping("/removeByItem")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除采购明细信息", notes = "传入order")
+	public R<String> update(@Valid @RequestBody OrderItems items) {
+		if (items.getId() == null) {
+			return R.fail(ERROR_MSG);
+		}
+		items.setIsDeleted(1);
+		return R.status(orderItemsService.updateById(items));
+	}
+
+	/**
 	 * 删除费用信息
 	 */
 	@PostMapping("/removeByFees")
@@ -168,4 +214,13 @@ public class ImportOrderController extends BladeController {
 		return R.status(orderFilesService.updateById(order));
 	}
 
+    @GetMapping("getItemByPid")
+	public R getItemByPid(@RequestParam(value = "id",required = true)Long id)
+	{
+		LambdaQueryWrapper<OrderItems> lambdaQueryWrapper=new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(OrderItems::getPid,id);
+		List<OrderItems> itemsList = orderItemsService.list(lambdaQueryWrapper);
+		return R.data(itemsList);
+	}
+
 }