Browse Source

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

24282 1 year ago
parent
commit
ad4495c806
60 changed files with 1749 additions and 56 deletions
  1. 2 2
      code/src/test/java/SaleDataSource.java
  2. 9 3
      hx-account/src/main/java/com/fjhx/account/entity/account/po/AccountPayment.java
  3. 1 0
      hx-account/src/main/java/com/fjhx/account/flow/AccountRequestFundsFlow.java
  4. 1 1
      hx-account/src/main/java/com/fjhx/account/mapper/account/AccountRequestFundsMapper.java
  5. 1 1
      hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRequestFundsServiceImpl.java
  6. 1 0
      hx-account/src/main/resources/mapper/account/AccountRequestFundsMapper.xml
  7. 5 0
      hx-admin/pom.xml
  8. 1 0
      hx-admin/src/main/resources/application-test.yml
  9. 1 1
      hx-admin/src/main/resources/application.yml
  10. 30 0
      hx-form/pom.xml
  11. 32 0
      hx-form/src/main/java/com/fjhx/form/controller/employee/EmployeeAnalysisController.java
  12. 30 0
      hx-form/src/main/java/com/fjhx/form/entity/dto/EmployeeAnalysisDto.java
  13. 38 0
      hx-form/src/main/java/com/fjhx/form/mapper/employee/EmployeeAnalysisMapper.java
  14. 10 0
      hx-form/src/main/java/com/fjhx/form/service/employee/EmployeeAnalysisService.java
  15. 317 0
      hx-form/src/main/java/com/fjhx/form/service/employee/impl/EmployeeAnalysisServiceImpl.java
  16. 48 0
      hx-form/src/main/resources/mapper/EmployeeAnalysisMapper.xml
  17. 1 2
      hx-oa/src/main/java/com/fjhx/oa/service/daily/impl/DailyReportDetailsServiceImpl.java
  18. 2 4
      hx-oa/src/main/java/com/fjhx/oa/service/daily/impl/DailyReportServiceImpl.java
  19. 2 1
      hx-oa/src/main/java/com/fjhx/oa/utils/Notice.java
  20. 14 2
      hx-purchase/src/main/java/com/fjhx/purchase/flow/PayFlow.java
  21. 9 2
      hx-purchase/src/main/java/com/fjhx/purchase/mapper/pay/PayMapper.java
  22. 13 5
      hx-purchase/src/main/java/com/fjhx/purchase/service/pay/PayService.java
  23. 7 0
      hx-purchase/src/main/java/com/fjhx/purchase/service/pay/impl/PayServiceImpl.java
  24. 9 2
      hx-purchase/src/main/resources/mapper/pay/PayMapper.xml
  25. 10 9
      hx-purchase/src/main/resources/mapper/purchase/PurchaseMapper.xml
  26. 35 0
      hx-sale/src/main/java/com/fjhx/sale/controller/after/AfterSalesController.java
  27. 70 0
      hx-sale/src/main/java/com/fjhx/sale/controller/after/AfterSalesDetailController.java
  28. 46 0
      hx-sale/src/main/java/com/fjhx/sale/controller/after/AfterSalesRecordsController.java
  29. 15 5
      hx-sale/src/main/java/com/fjhx/sale/controller/contract/ContractProductController.java
  30. 17 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesDetailDto.java
  31. 32 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesDetailSelectDto.java
  32. 25 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesDto.java
  33. 22 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesRecordSelectDto.java
  34. 25 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesRecordsDto.java
  35. 17 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesSelectDto.java
  36. 46 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSales.java
  37. 63 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSalesDetail.java
  38. 43 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSalesRecords.java
  39. 58 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/vo/AfterSalesDetailVo.java
  40. 22 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/vo/AfterSalesRecordsVo.java
  41. 17 0
      hx-sale/src/main/java/com/fjhx/sale/entity/after/vo/AfterSalesVo.java
  42. 5 0
      hx-sale/src/main/java/com/fjhx/sale/entity/contract/vo/ContractPdfInfoVo.java
  43. 5 0
      hx-sale/src/main/java/com/fjhx/sale/entity/contract/vo/ContractVo.java
  44. 26 0
      hx-sale/src/main/java/com/fjhx/sale/mapper/after/AfterSalesDetailMapper.java
  45. 17 0
      hx-sale/src/main/java/com/fjhx/sale/mapper/after/AfterSalesMapper.java
  46. 26 0
      hx-sale/src/main/java/com/fjhx/sale/mapper/after/AfterSalesRecordsMapper.java
  47. 46 0
      hx-sale/src/main/java/com/fjhx/sale/service/after/AfterSalesDetailService.java
  48. 31 0
      hx-sale/src/main/java/com/fjhx/sale/service/after/AfterSalesRecordsService.java
  49. 23 0
      hx-sale/src/main/java/com/fjhx/sale/service/after/AfterSalesService.java
  50. 196 0
      hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesDetailServiceImpl.java
  51. 53 0
      hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesRecordsServicesImpl.java
  52. 64 0
      hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesServiceImpl.java
  53. 9 4
      hx-sale/src/main/java/com/fjhx/sale/service/contract/ContractProductService.java
  54. 45 7
      hx-sale/src/main/java/com/fjhx/sale/service/contract/impl/ContractProductServiceImpl.java
  55. 23 0
      hx-sale/src/main/resources/mapper/after/AfterSalesDetailMapper.xml
  56. 4 0
      hx-sale/src/main/resources/mapper/after/AfterSalesMapper.xml
  57. 18 0
      hx-sale/src/main/resources/mapper/after/AfterSalesRecordsMapper.xml
  58. 0 4
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/abnormal/impl/AbnormalDetailsServiceImpl.java
  59. 4 1
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/emums/StockWaitType.java
  60. 7 0
      pom.xml

+ 2 - 2
code/src/test/java/SaleDataSource.java

@@ -4,9 +4,9 @@ public class SaleDataSource {
 
     public static void main(String[] args) {
         GeneratorApplication.builder()
-                .url("jdbc:mysql://36.134.91.96:12333/bytesailing_sale?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true")
+                .url("jdbc:mysql://121.37.194.75:30102/bytesailing_sale?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true")
                 .username("root")
-                .password("Fjhx@pwd123")
+                .password("5fWD*oa^nso@kmKa")
                 .port(9989)
                 .module("hx-sale")
                 .parent("com.fjhx.sale")

+ 9 - 3
hx-account/src/main/java/com/fjhx/account/entity/account/po/AccountPayment.java

@@ -1,12 +1,13 @@
 package com.fjhx.account.entity.account.po;
 
-import com.ruoyi.common.core.domain.BasePo;
 import com.baomidou.mybatisplus.annotation.TableName;
-import java.math.BigDecimal;
-import java.util.Date;
+import com.ruoyi.common.core.domain.BasePo;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 /**
  * <p>
  * 打款表
@@ -126,4 +127,9 @@ public class AccountPayment extends BasePo {
      * 数据所属人
      */
     private Long dataUser;
+
+    /**
+     * 申请时间
+     */
+    private Date applyForTime;
 }

+ 1 - 0
hx-account/src/main/java/com/fjhx/account/flow/AccountRequestFundsFlow.java

@@ -136,6 +136,7 @@ public class AccountRequestFundsFlow extends FlowDelegate {
         accountPayment.setAccountOpening(accountRequestFunds.getAccountOpening());
         accountPayment.setInterbankNumber(accountRequestFunds.getInterbankNumber());
         accountPayment.setDataUser(accountRequestFunds.getCreateUser());
+        accountPayment.setApplyForTime(accountRequestFunds.getCreateTime());
 
         // 如果是核销 核销数据审批通过后,根据“核销总额 - 预支总额”生成“待打款”数据
         if ("3".equals(accountRequestFunds.getType())) {

+ 1 - 1
hx-account/src/main/java/com/fjhx/account/mapper/account/AccountRequestFundsMapper.java

@@ -28,6 +28,6 @@ public interface AccountRequestFundsMapper extends BaseMapper<AccountRequestFund
     /**
      * 获取历史付款信息
      */
-    List<AccountRequestFundsVo> getPayHistoricalInfo();
+    List<AccountRequestFundsVo> getPayHistoricalInfo(@Param("userId") Long userId);
 
 }

+ 1 - 1
hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRequestFundsServiceImpl.java

@@ -216,7 +216,7 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
      */
     @Override
     public List<AccountRequestFundsVo> getPayHistoricalInfo() {
-        return baseMapper.getPayHistoricalInfo();
+        return baseMapper.getPayHistoricalInfo(SecurityUtils.getUserId());
     }
 
 }

+ 1 - 0
hx-account/src/main/resources/mapper/account/AccountRequestFundsMapper.xml

@@ -46,6 +46,7 @@
                       COALESCE(arf.opening_bank, ''),
                       COALESCE(arf.interbank_number, '')
                   ) != ''
+        and arf.create_user = #{userId}
     </select>
 
 </mapper>

+ 5 - 0
hx-admin/pom.xml

@@ -95,6 +95,11 @@
         </dependency>
 
         <dependency>
+            <groupId>com.fjhx</groupId>
+            <artifactId>hx-form</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>

+ 1 - 0
hx-admin/src/main/resources/application-test.yml

@@ -98,6 +98,7 @@ spring:
                 max-wait: -1ms
 
 server:
+    port: 20001
     servlet:
         context-path: /test-api
 

+ 1 - 1
hx-admin/src/main/resources/application.yml

@@ -18,7 +18,7 @@ ruoyi:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 20001
+  port: 9898
   tomcat:
     # tomcat的URI编码
     uri-encoding: UTF-8

+ 30 - 0
hx-form/pom.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>com.fjhx</groupId>
+        <artifactId>bytesailing</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <artifactId>hx-form</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.fjhx</groupId>
+            <artifactId>hx-base</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fjhx</groupId>
+            <artifactId>hx-customer</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fjhx</groupId>
+            <artifactId>hx-sale</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 32 - 0
hx-form/src/main/java/com/fjhx/form/controller/employee/EmployeeAnalysisController.java

@@ -0,0 +1,32 @@
+package com.fjhx.form.controller.employee;
+
+import com.fjhx.form.entity.dto.EmployeeAnalysisDto;
+import com.fjhx.form.service.employee.EmployeeAnalysisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * 员工分析 前端控制器
+ */
+@RestController
+@RequestMapping("/employeeAnalysis")
+public class EmployeeAnalysisController {
+
+    @Autowired
+    private EmployeeAnalysisService employeeAnalysisService;
+
+    /**
+     * 员工分析
+     *
+     * @return
+     */
+    @PostMapping("/info")
+    public Map<String, Object> info(@RequestBody EmployeeAnalysisDto dto) {
+        return employeeAnalysisService.info(dto);
+    }
+}

+ 30 - 0
hx-form/src/main/java/com/fjhx/form/entity/dto/EmployeeAnalysisDto.java

@@ -0,0 +1,30 @@
+package com.fjhx.form.entity.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 客户分析dto
+ */
+@Getter
+@Setter
+public class EmployeeAnalysisDto {
+
+    /**
+     * 用户id列表
+     */
+    private List<Long> userIds;
+
+    /**
+     * 开始时间
+     */
+    private String beginTime;
+
+    /**
+     * 结束时间
+     */
+    private String endTime;
+
+}

+ 38 - 0
hx-form/src/main/java/com/fjhx/form/mapper/employee/EmployeeAnalysisMapper.java

@@ -0,0 +1,38 @@
+package com.fjhx.form.mapper.employee;
+
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+@Mapper
+public interface EmployeeAnalysisMapper {
+
+    /**
+     * 获取邮件信息
+     */
+    BigDecimal getMail(@Param("ew") IWrapper<Object> wrapper);
+
+    /**
+     * 获取报价单统计
+     */
+    Map<String, Object> getQuotationStatistics(@Param("ew") IWrapper<Object> wrapper);
+
+    /**
+     * 获取销售合同统计
+     */
+    Map<String, Object> getContractStatistics(@Param("ew") IWrapper<Object> wrapper);
+
+    /**
+     * 获取到账认领统计
+     */
+    Map<String, Object> getClaimStatistics(@Param("ew") IWrapper<Object> wrapper);
+
+    /**
+     * 获取采购金额
+     */
+    BigDecimal getPurchaseAmount(@Param("ew") IWrapper<Object> wrapper);
+
+}

+ 10 - 0
hx-form/src/main/java/com/fjhx/form/service/employee/EmployeeAnalysisService.java

@@ -0,0 +1,10 @@
+package com.fjhx.form.service.employee;
+
+import com.fjhx.form.entity.dto.EmployeeAnalysisDto;
+
+import java.util.Map;
+
+public interface EmployeeAnalysisService {
+
+    Map<String, Object> info(EmployeeAnalysisDto dto);
+}

+ 317 - 0
hx-form/src/main/java/com/fjhx/form/service/employee/impl/EmployeeAnalysisServiceImpl.java

@@ -0,0 +1,317 @@
+package com.fjhx.form.service.employee.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
+import com.fjhx.common.constant.SourceConstant;
+import com.fjhx.customer.entity.customer.po.Customer;
+import com.fjhx.customer.service.customer.CustomerService;
+import com.fjhx.flow.entity.flow.po.FlowExample;
+import com.fjhx.flow.service.flow.FlowExampleService;
+import com.fjhx.form.entity.dto.EmployeeAnalysisDto;
+import com.fjhx.form.mapper.employee.EmployeeAnalysisMapper;
+import com.fjhx.form.service.employee.EmployeeAnalysisService;
+import com.fjhx.item.entity.product.po.ProductInfo;
+import com.fjhx.item.service.product.ProductInfoService;
+import com.fjhx.purchase.entity.pay.po.Pay;
+import com.fjhx.purchase.entity.purchase.po.Purchase;
+import com.fjhx.purchase.entity.subscribe.po.SubscribeDetail;
+import com.fjhx.purchase.service.pay.PayService;
+import com.fjhx.purchase.service.purchase.PurchaseService;
+import com.fjhx.purchase.service.subscribe.SubscribeDetailService;
+import com.fjhx.sale.entity.contract.po.Contract;
+import com.fjhx.sale.entity.contract.po.ContractProduct;
+import com.fjhx.sale.entity.documents.po.Documents;
+import com.fjhx.sale.entity.sale.po.SaleQuotation;
+import com.fjhx.sale.service.contract.ContractProductService;
+import com.fjhx.sale.service.contract.ContractService;
+import com.fjhx.sale.service.documents.DocumentsService;
+import com.fjhx.sale.service.sale.SaleQuotationService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class EmployeeAnalysisServiceImpl implements EmployeeAnalysisService {
+
+    @Autowired
+    private CustomerService customerService;
+    @Autowired
+    private SaleQuotationService saleQuotationService;
+    @Autowired
+    private ContractService contractService;
+    @Autowired
+    private ProductInfoService productInfoService;
+    @Autowired
+    private EmployeeAnalysisMapper employeeAnalysisMapper;
+    @Autowired
+    private FlowExampleService flowExampleService;
+    @Autowired
+    private DocumentsService documentsService;
+    @Autowired
+    private PurchaseService purchaseService;
+    @Autowired
+    private PayService payService;
+    @Autowired
+    private ContractProductService contractProductService;
+    @Autowired
+    private SubscribeDetailService subscribeDetailService;
+
+    /**
+     * 员工分析
+     *
+     * @return
+     */
+    @Override
+    public Map<String, Object> info(EmployeeAnalysisDto dto) {
+        //客户情况
+        Map<String, Object> customerSituation = getCustomerSituation(dto);
+        //产品情况
+        Map<String, Object> productSituation = getProductSituation(dto);
+        //往来邮件
+        Map<String, Object> commEmail = getCommEmail(dto);
+        //流程统计
+        Map<String, Object> flowStatistics = getFlowStatistics(dto);
+        //销售行为(存量客户)
+        Map<String, Object> saleSituation = getSaleSituation(dto);
+        //销售行为(增量客户)
+        Map<String, Object> saleAddSituation = getSaleAddSituation(dto);
+        //采购行为
+        Map<String, Object> purchaseStatistics = getPurchaseStatistics(dto);
+
+        //返回数据
+        Map<String, Object> data = new HashMap<>();
+        data.put("customerSituation", customerSituation);//客户情况
+        data.put("productSituation", productSituation);//产品情况
+        data.put("commMail", commEmail);//往来邮件
+        data.put("flowStatistics", flowStatistics);//流程统计
+        data.put("saleSituation", saleSituation);//销售行为新增统计
+        data.put("saleAddSituation", saleAddSituation);//销售行为新增统计
+        data.put("purchaseStatistics", purchaseStatistics);//采购行为统计
+        return data;
+    }
+
+    /**
+     * 客户情况
+     */
+    private Map<String, Object> getCustomerSituation(EmployeeAnalysisDto dto) {
+        Map<String, Object> customerSituation = new HashMap<>();
+        //客户存量
+        long customerCount = customerService.count(q -> q
+                .lt(ObjectUtil.isNotEmpty(dto.getBeginTime()), Customer::getCreateTime, dto.getBeginTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), Customer::getUserId, dto.getUserIds())
+        );
+        //客户新增
+        long customerAddCount = customerService.count(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), Customer::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), Customer::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), Customer::getCreateUser, dto.getUserIds())
+        );
+        //报价单(客户数量)
+        List<SaleQuotation> saleQuotationList = saleQuotationService.list(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), SaleQuotation::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), SaleQuotation::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), SaleQuotation::getCreateUser, dto.getUserIds())
+                .groupBy(SaleQuotation::getBuyCorporationId)
+        );
+        int saleQuotationCustomerCount = saleQuotationList.size();
+        //成交合同(客户数量)
+        List<Contract> contractList = contractService.list(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), Contract::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), Contract::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), Contract::getCreateUser, dto.getUserIds())
+                .groupBy(Contract::getBuyCorporationId)
+        );
+        int contractCustomerCount = contractList.size();
+        customerSituation.put("customerCount", customerCount);
+        customerSituation.put("customerAddCount", customerAddCount);
+        customerSituation.put("saleQuotationCustomerCount", saleQuotationCustomerCount);
+        customerSituation.put("contractCustomerCount", contractCustomerCount);
+        return customerSituation;
+    }
+
+    /**
+     * 产品情况
+     */
+    private Map<String, Object> getProductSituation(EmployeeAnalysisDto dto) {
+        Map<String, Object> productSituation = new HashMap<>();
+        //产品存量
+        long productCount = productInfoService.count(q -> q
+                .lt(ObjectUtil.isNotEmpty(dto.getBeginTime()), ProductInfo::getCreateTime, dto.getBeginTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), ProductInfo::getCreateUser, dto.getUserIds())
+        );
+        //产品添加
+        long productAddCount = productInfoService.count(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), ProductInfo::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), ProductInfo::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), ProductInfo::getCreateUser, dto.getUserIds())
+        );
+        productSituation.put("productCount", productCount);
+        productSituation.put("productAddCount", productAddCount);
+        return productSituation;
+    }
+
+    /**
+     * 往来邮件
+     */
+    private Map<String, Object> getCommEmail(EmployeeAnalysisDto dto) {
+        Map<String, Object> commEmail = new HashMap<>();
+        DynamicDataSourceContextHolder.push(SourceConstant.MAIL);
+        //获取发件数
+        BigDecimal sentMailCount = employeeAnalysisMapper.getMail(IWrapper.getWrapper()
+                .eq("t1.folder_name", "Sent Messages")
+                .in("t2.user_id", dto.getUserIds())
+        );
+        //获取收件数
+        BigDecimal receiveMailCount = employeeAnalysisMapper.getMail(IWrapper.getWrapper()
+                .ne("t1.folder_name", "Sent Messages")
+                .in("t2.user_id", dto.getUserIds())
+        );
+        DynamicDataSourceContextHolder.poll();
+        commEmail.put("sentMailCount", sentMailCount);
+        commEmail.put("receiveMailCount", receiveMailCount);
+        return commEmail;
+    }
+
+    /**
+     * 流程统计
+     */
+    private Map<String, Object> getFlowStatistics(EmployeeAnalysisDto dto) {
+        Map<String, Object> flowStatistics = new HashMap<>();
+        DynamicDataSourceContextHolder.push(SourceConstant.BASE);
+        long flowExampleCount = flowExampleService.count(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), FlowExample::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), FlowExample::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), FlowExample::getCreateUser, dto.getUserIds())
+        );
+        long waitFlowExampleCount = flowExampleService.count(q -> q
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), FlowExample::getHandleUserId, dto.getUserIds())
+                .eq(FlowExample::getStatus, 1)
+        );
+        DynamicDataSourceContextHolder.poll();
+        flowStatistics.put("flowExampleCount", flowExampleCount);
+        flowStatistics.put("waitFlowExampleCount", waitFlowExampleCount);
+        return flowStatistics;
+    }
+
+    /**
+     * 销售行为(存量客户)
+     */
+    private Map<String, Object> getSaleSituation(EmployeeAnalysisDto dto) {
+        Map<String, Object> saleAddSituation = new HashMap<>();
+        //报价统计(报价单)
+        DynamicDataSourceContextHolder.push(SourceConstant.SALE);
+        Map<String, Object> quotationAddStatistics = employeeAnalysisMapper.getQuotationStatistics(IWrapper.getWrapper()
+                .eq("status", 30)
+                .lt(ObjectUtil.isNotEmpty(dto.getBeginTime()), "sq.create_time", dto.getBeginTime())
+        );
+        //成交统计(销售合同)
+        Map<String, Object> contractAddStatistics = employeeAnalysisMapper.getContractStatistics(IWrapper.getWrapper()
+                .eq("status", 30)
+                .lt(ObjectUtil.isNotEmpty(dto.getBeginTime()), "c.create_time", dto.getBeginTime())
+        );
+        //到账统计(到账认领)
+        Map<String, Object> claimAddStatistics = employeeAnalysisMapper.getClaimStatistics(IWrapper.getWrapper()
+                .lt(ObjectUtil.isNotEmpty(dto.getBeginTime()), "c.create_time", dto.getBeginTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), "c2.user_id", dto.getUserIds())
+        );
+        DynamicDataSourceContextHolder.poll();
+        //单证数统计
+        long documentsCount = documentsService.count(q -> q
+                .lt(ObjectUtil.isNotEmpty(dto.getBeginTime()), Documents::getCreateTime, dto.getBeginTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), Documents::getCreateUser, dto.getUserIds()));
+
+        saleAddSituation.put("quotationAddStatistics", quotationAddStatistics);
+        saleAddSituation.put("contractAddStatistics", contractAddStatistics);
+        saleAddSituation.put("claimAddStatistics", claimAddStatistics);
+        saleAddSituation.put("documentsCount", documentsCount);
+
+        return saleAddSituation;
+    }
+
+    /**
+     * 销售行为(增量客户)
+     */
+    private Map<String, Object> getSaleAddSituation(EmployeeAnalysisDto dto) {
+        Map<String, Object> saleAddSituation = new HashMap<>();
+        //报价统计(报价单)
+        DynamicDataSourceContextHolder.push(SourceConstant.SALE);
+        Map<String, Object> quotationAddStatistics = employeeAnalysisMapper.getQuotationStatistics(IWrapper.getWrapper()
+                .eq("status", 30)
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), "sq.create_time", dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), "sq.create_time", dto.getEndTime())
+        );
+        //成交统计(销售合同)
+        Map<String, Object> contractAddStatistics = employeeAnalysisMapper.getContractStatistics(IWrapper.getWrapper()
+                .eq("status", 30)
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), "c.create_time", dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), "c.create_time", dto.getEndTime())
+        );
+        //到账统计(到账认领)
+        Map<String, Object> claimAddStatistics = employeeAnalysisMapper.getClaimStatistics(IWrapper.getWrapper()
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), "c.create_time", dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), "c.create_time", dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), "c2.user_id", dto.getUserIds())
+        );
+        DynamicDataSourceContextHolder.poll();
+        //单证数统计
+        long documentsCount = documentsService.count(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), Documents::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), Documents::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), Documents::getCreateUser, dto.getUserIds()));
+
+        saleAddSituation.put("quotationAddStatistics", quotationAddStatistics);
+        saleAddSituation.put("contractAddStatistics", contractAddStatistics);
+        saleAddSituation.put("claimAddStatistics", claimAddStatistics);
+        saleAddSituation.put("documentsCount", documentsCount);
+
+        return saleAddSituation;
+    }
+
+    /**
+     * 采购行为统计
+     */
+    private Map<String, Object> getPurchaseStatistics(EmployeeAnalysisDto dto) {
+        //待采购
+        Map<String, Object> waitPurchaseStatistics = new HashMap<>();
+        long contractProductCount = contractProductService.count(q -> q.gt(ContractProduct::getExpendQuantity, 0));
+        long subscribeDetailCount = subscribeDetailService.count(q -> q.eq(SubscribeDetail::getStatus, 15));
+        waitPurchaseStatistics.put("contractProductCount", contractProductCount);
+        waitPurchaseStatistics.put("subscribeDetailCount", subscribeDetailCount);
+        //采购订单
+        Map<String, Object> purchaseOrder = new HashMap<>();
+        //采购订单数
+        long purchaseCount = purchaseService.count(q -> q
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), Purchase::getCreateTime, dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), Purchase::getCreateTime, dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), Purchase::getCreateUser, dto.getUserIds())
+        );
+
+        DynamicDataSourceContextHolder.push(SourceConstant.PURCHASE);
+        //采购金额
+        BigDecimal purchaseAmount = employeeAnalysisMapper.getPurchaseAmount(IWrapper.getWrapper()
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), "p.create_time", dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), "p.create_time", dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), "p.create_user", dto.getUserIds())
+        );
+        DynamicDataSourceContextHolder.poll();
+        //采购付款金额
+        BigDecimal purchasePayAmount = payService.getPurchasePayAmount(IWrapper.<Pay>getWrapper()
+                .ge(ObjectUtil.isNotEmpty(dto.getBeginTime()), "pay.create_time", dto.getBeginTime())
+                .le(ObjectUtil.isNotEmpty(dto.getEndTime()), "pay.create_time", dto.getEndTime())
+                .in(ObjectUtil.isNotEmpty(dto.getUserIds()), "pay.create_user", dto.getUserIds()));
+        purchaseOrder.put("purchaseCount", purchaseCount);
+        purchaseOrder.put("purchaseAmount", purchaseAmount);
+        purchaseOrder.put("purchasePayAmount", purchasePayAmount);
+        //返回数据
+        Map<String, Object> purchaseStatistics = new HashMap<>();
+        purchaseStatistics.put("purchaseOrder", purchaseOrder);
+        purchaseStatistics.put("waitPurchaseStatistics", waitPurchaseStatistics);
+        return purchaseStatistics;
+    }
+
+}

+ 48 - 0
hx-form/src/main/resources/mapper/EmployeeAnalysisMapper.xml

@@ -0,0 +1,48 @@
+<?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.fjhx.form.mapper.employee.EmployeeAnalysisMapper">
+
+    <select id="getMail" resultType="java.math.BigDecimal">
+        SELECT sum(a.count)
+        FROM (SELECT count(1) AS `count`
+              FROM enterprise_message t1
+                       JOIN enterprise_mailbox t2
+                            ON t1.mailbox_id = t2.id
+                  ${ew.customSqlSegment}
+              UNION
+              SELECT
+                  count ( 1 ) AS `count`
+              FROM
+                  personal_message t1
+                  JOIN personal_mailbox t2
+              ON t1.mailbox_id = t2.id
+                  ${ew.customSqlSegment}) AS a
+    </select>
+    <select id="getQuotationStatistics" resultType="java.util.Map">
+        SELECT if(count(1) is null, 0, count(1))                                 AS `count`,
+               if(sum(sq.amount * sq.rate) is null, 0, sum(sq.amount * sq.rate)) AS sumAmount
+        FROM sale_quotation sq
+            ${ew.customSqlSegment}
+    </select>
+    <select id="getContractStatistics" resultType="java.util.Map">
+        SELECT if(count(1) is null, 0, count(1))                             AS `count`,
+               if(sum(c.amount * c.rate) is null, 0, sum(c.amount * c.rate)) AS sumAmount
+        FROM contract c
+            ${ew.customSqlSegment}
+    </select>
+    <select id="getClaimStatistics" resultType="java.util.Map">
+        SELECT if(count(1) is null, 0, count(1))                                 AS `count`,
+               if(sum(c.amount * arw.rate) is null, 0, sum(c.amount * arw.rate)) AS sumAmount
+        FROM claim c
+                 left join claim_contract cc on cc.claim_id = c.id
+                 LEFT JOIN contract c1 on cc.contract_id = c1.id
+                 left join bytesailing_account.account_running_water arw on c.business_id = arw.id
+                 left join bytesailing_customer.customer c2 on c1.buy_corporation_id = c2.id
+            ${ew.customSqlSegment}
+    </select>
+    <select id="getPurchaseAmount" resultType="java.math.BigDecimal">
+        SELECT SUM(p.amount)
+        FROM purchase p
+            ${ew.customSqlSegment}
+    </select>
+</mapper>

+ 1 - 2
hx-oa/src/main/java/com/fjhx/oa/service/daily/impl/DailyReportDetailsServiceImpl.java

@@ -46,8 +46,7 @@ public class DailyReportDetailsServiceImpl extends ServiceImpl<DailyReportDetail
         msgMap.put("businessId", id);
         msgMap.put("msg", "您有未读的日报");
         for (DailyReportDetails dailyReportDetails : list) {
-            // WebSocketServer.sendInfo(dailyReportDetails.getRecipientId(), 1, msgMap);
-
+//            WebSocketServer.sendInfo(dailyReportDetails.getRecipientId(), 1, msgMap);
             WebSocketPush.byUser(
                     PushTypeEnum.MESSAGE,
                     dailyReportDetails.getRecipientId(),

+ 2 - 4
hx-oa/src/main/java/com/fjhx/oa/service/daily/impl/DailyReportServiceImpl.java

@@ -122,8 +122,7 @@ public class DailyReportServiceImpl extends ServiceImpl<DailyReportMapper, Daily
         msgMap.put("businessId", dailyReportDto.getId());
         msgMap.put("msg", String.format("%s发布了新日志", userName));
         for (DailyReportDetails dailyReportDetails : dailyReportDetailsList) {
-            // WebSocketServer.sendInfo(dailyReportDetails.getRecipientId(), 1, msgMap);
-
+//            WebSocketServer.sendInfo(dailyReportDetails.getRecipientId(), 1, msgMap);
             WebSocketPush.byUser(
                     PushTypeEnum.MESSAGE,
                     dailyReportDetails.getRecipientId(),
@@ -183,8 +182,7 @@ public class DailyReportServiceImpl extends ServiceImpl<DailyReportMapper, Daily
         msgMap.put("businessId", id);
         msgMap.put("msg", String.format("%s给你分享了日报", username));
         for (Long toUserId : toUserIdList) {
-            // WebSocketServer.sendInfo(toUserId, 1, msgMap);
-
+//            WebSocketServer.sendInfo(toUserId, 1, msgMap);
             WebSocketPush.byUser(
                     PushTypeEnum.MESSAGE,
                     toUserId,

+ 2 - 1
hx-oa/src/main/java/com/fjhx/oa/utils/Notice.java

@@ -87,10 +87,11 @@ public class Notice {
             List<Long> scheduleInfoIds = scheduleInfos.stream().map(ScheduleInfo::getId).collect(Collectors.toList());
             List<ScheduleDetails> scheduleDetailsList = scheduleDetailsService.list(q -> q.in(ScheduleDetails::getScheduleInfoId, scheduleInfoIds));
             for (ScheduleDetails scheduleDetails : scheduleDetailsList) {
-                //发送消息
+                // 发送消息
                 ScheduleInfo scheduleInfo = scheduleInfoMap1.get(scheduleDetails.getScheduleInfoId());
                 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 String msg = String.format("您的日程<%s>将于%s开始。", scheduleInfo.getTitle(), sdf.format(scheduleInfo.getStartDate()));
+
                 Map<String, Object> msgMap = new HashMap<>();
                 msgMap.put("businessId", scheduleInfo.getId());
                 msgMap.put("msg", msg);

+ 14 - 2
hx-purchase/src/main/java/com/fjhx/purchase/flow/PayFlow.java

@@ -2,6 +2,7 @@ package com.fjhx.purchase.flow;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fjhx.account.entity.account.enums.PaymentStatusEnum;
@@ -18,8 +19,10 @@ import com.fjhx.purchase.entity.purchase.po.Purchase;
 import com.fjhx.purchase.service.pay.PayDetailService;
 import com.fjhx.purchase.service.pay.PayService;
 import com.fjhx.purchase.service.purchase.PurchaseService;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.ruoyi.system.service.ISysUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -51,6 +54,8 @@ public class PayFlow extends FlowDelegate {
 
     @Autowired
     private PurchaseService purchaseService;
+    @Autowired
+    private ISysUserService userService;
 
     @Override
     public String getFlowKey() {
@@ -106,7 +111,13 @@ public class PayFlow extends FlowDelegate {
         payment.setAccountManagementId(pay.getAccountManagementId());
         payment.setBusinessId(pay.getId());
         payment.setCurrency(pay.getCurrency());
-        payment.setDepartmentId(SecurityUtils.getDeptId());
+
+        DynamicDataSourceContextHolder.push(SourceConstant.BASE);
+        SysUser sysUser = userService.getOne(IWrapper.<SysUser>getWrapper().eq(SysUser::getUserId, pay.getCreateUser()));
+        DynamicDataSourceContextHolder.poll();
+        if (ObjectUtils.isNotEmpty(sysUser)) {
+            payment.setDepartmentId(sysUser.getDeptId());
+        }
         // todo 暂时写死人民币
         payment.setPaymentRemark(pay.getRemark());
         payment.setType(PaymentTypeEnum.REJECT.getKey());
@@ -122,6 +133,7 @@ public class PayFlow extends FlowDelegate {
         payment.setAccountOpening(pay.getAccountOpening());
         payment.setInterbankNumber(pay.getInterbankNumber());
         payment.setPaymentMethod(pay.getPayType());
+        payment.setApplyForTime(pay.getCreateTime());//申请时间
         accountPaymentService.save(payment);
 
         // 修改合同付款状态

+ 9 - 2
hx-purchase/src/main/java/com/fjhx/purchase/mapper/pay/PayMapper.java

@@ -1,19 +1,21 @@
 package com.fjhx.purchase.mapper.pay;
 
-import com.fjhx.purchase.entity.pay.po.Pay;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.purchase.entity.pay.po.Pay;
 import com.fjhx.purchase.entity.pay.vo.PayVo;
 import com.ruoyi.common.utils.wrapper.IWrapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
+
 
 /**
  * <p>
  * 采购付款 Mapper 接口
  * </p>
  *
- * @author 
+ * @author
  * @since 2023-04-13
  */
 public interface PayMapper extends BaseMapper<Pay> {
@@ -23,4 +25,9 @@ public interface PayMapper extends BaseMapper<Pay> {
      */
     Page<PayVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<Pay> wrapper);
 
+    /**
+     * 获取采购付款金额
+     */
+    BigDecimal getPurchasePayAmount(@Param("ew") IWrapper<Pay> wrapper);
+
 }

+ 13 - 5
hx-purchase/src/main/java/com/fjhx/purchase/service/pay/PayService.java

@@ -1,12 +1,14 @@
 package com.fjhx.purchase.service.pay;
 
-import com.fjhx.purchase.entity.pay.po.Pay;
-import com.ruoyi.common.core.service.BaseService;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.purchase.entity.pay.vo.PayVo;
-import com.fjhx.purchase.entity.pay.dto.PaySelectDto;
 import com.fjhx.purchase.entity.pay.dto.PayDto;
+import com.fjhx.purchase.entity.pay.dto.PaySelectDto;
+import com.fjhx.purchase.entity.pay.po.Pay;
+import com.fjhx.purchase.entity.pay.vo.PayVo;
+import com.ruoyi.common.core.service.BaseService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
 
+import java.math.BigDecimal;
 import java.util.Map;
 
 
@@ -47,8 +49,14 @@ public interface PayService extends BaseService<Pay> {
 
     /**
      * 采购付款统计
+     *
      * @param dto
      * @return
      */
-    Map<String,Object> payStatistics(PaySelectDto dto);
+    Map<String, Object> payStatistics(PaySelectDto dto);
+
+    /**
+     * 获取采购付款金额
+     */
+    BigDecimal getPurchasePayAmount(IWrapper<Pay> wrapper);
 }

+ 7 - 0
hx-purchase/src/main/java/com/fjhx/purchase/service/pay/impl/PayServiceImpl.java

@@ -256,5 +256,12 @@ public class PayServiceImpl extends ServiceImpl<PayMapper, Pay> implements PaySe
         return map;
     }
 
+    /**
+     * 获取采购付款金额
+     */
+    @Override
+    public BigDecimal getPurchasePayAmount(IWrapper<Pay> wrapper) {
+        return baseMapper.getPurchasePayAmount(wrapper);
+    }
 
 }

+ 9 - 2
hx-purchase/src/main/resources/mapper/pay/PayMapper.xml

@@ -2,10 +2,17 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fjhx.purchase.mapper.pay.PayMapper">
     <select id="getPage" resultType="com.fjhx.purchase.entity.pay.vo.PayVo">
-        select
-           *
+        select *
         from pay p
             ${ew.customSqlSegment}
     </select>
 
+    <select id="getPurchasePayAmount" resultType="java.math.BigDecimal">
+        SELECT sum(arw.amount * arw.rate)
+        FROM pay pay
+                 JOIN bytesailing_account.account_payment ap ON ap.business_id = pay.id
+                 JOIN bytesailing_account.account_running_water arw ON arw.business_id = ap.id
+            ${ew.customSqlSegment}
+    </select>
+
 </mapper>

+ 10 - 9
hx-purchase/src/main/resources/mapper/purchase/PurchaseMapper.xml

@@ -2,15 +2,16 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fjhx.purchase.mapper.purchase.PurchaseMapper">
     <select id="getPage" resultType="com.fjhx.purchase.entity.purchase.vo.PurchaseVo">
-        select
-            p.*,
-            (
-                select IFNULL(SUM(IFNULL(money,0)*IFNULL(rate,0)),0) from pay_detail t1
-                LEFT JOIN pay t2 ON t1.pay_id = t2.id
-                WHERE t2.`status`  &gt;= 30 AND t2.`status` &lt; 88
-                  AND t1.purchase_id = p.id
-            )AS paySumAmount,
-            ( SELECT `code` FROM `bytesailing_sale`.contract WHERE id = p.data_resource_id ) AS contractCode
+        select p.*,
+               (SELECT IFNULL(SUM(IFNULL(money, 0) * IFNULL(arw.rate, 0)), 0)
+                FROM pay_detail t1
+                         LEFT JOIN pay t2 ON t1.pay_id = t2.id
+                         JOIN bytesailing_account.account_payment ap ON ap.business_id = t2.id
+                         JOIN bytesailing_account.account_running_water arw ON arw.business_id = ap.id
+                WHERE t2.`status` &gt;= 30
+                  AND t2.`status` &lt; 88
+                  AND t1.purchase_id = p.id)                                                  AS paySumAmount,
+               (SELECT `code` FROM `bytesailing_sale`.contract WHERE id = p.data_resource_id) AS contractCode
         from purchase p
             ${ew.customSqlSegment}
     </select>

+ 35 - 0
hx-sale/src/main/java/com/fjhx/sale/controller/after/AfterSalesController.java

@@ -0,0 +1,35 @@
+package com.fjhx.sale.controller.after;
+
+import com.fjhx.sale.entity.after.dto.AfterSalesDto;
+import com.fjhx.sale.service.after.AfterSalesService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * <p>
+ * 售后管理 前端控制器
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@RestController
+@RequestMapping("/afterSales")
+public class AfterSalesController {
+
+    @Autowired
+    private AfterSalesService afterSalesService;
+
+    /**
+     * 售后管理新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody AfterSalesDto afterSalesDto) {
+        afterSalesService.add(afterSalesDto);
+    }
+
+}

+ 70 - 0
hx-sale/src/main/java/com/fjhx/sale/controller/after/AfterSalesDetailController.java

@@ -0,0 +1,70 @@
+package com.fjhx.sale.controller.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.sale.entity.after.dto.AfterSalesDetailDto;
+import com.fjhx.sale.entity.after.dto.AfterSalesDetailSelectDto;
+import com.fjhx.sale.entity.after.vo.AfterSalesDetailVo;
+import com.fjhx.sale.service.after.AfterSalesDetailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * <p>
+ * 售后明细 前端控制器
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@RestController
+@RequestMapping("/afterSalesDetail")
+public class AfterSalesDetailController {
+
+    @Autowired
+    private AfterSalesDetailService afterSalesDetailService;
+
+    /**
+     * 售后明细分页
+     */
+    @PostMapping("/page")
+    public Page<AfterSalesDetailVo> page(@RequestBody AfterSalesDetailSelectDto dto) {
+        return afterSalesDetailService.getPage(dto);
+    }
+
+    /**
+     * 售后管理编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody AfterSalesDetailDto afterSalesDetailDto) {
+        afterSalesDetailService.edit(afterSalesDetailDto);
+    }
+
+    /**
+     * 售后退货
+     */
+    @PostMapping("/salesReturn")
+    public void salesReturn(@RequestBody AfterSalesDetailDto afterSalesDetailDto) {
+        afterSalesDetailService.salesReturn(afterSalesDetailDto);
+    }
+
+    /**
+     * 售后换货
+     */
+    @PostMapping("/salesReplace")
+    public void salesReplace(@RequestBody AfterSalesDetailDto afterSalesDetailDto) {
+        afterSalesDetailService.salesReplace(afterSalesDetailDto);
+    }
+
+    /**
+     * 发起采购
+     */
+    @PostMapping("/initPurchase")
+    public void initPurchase(@RequestBody AfterSalesDetailDto afterSalesDetailDto) {
+        afterSalesDetailService.initPurchase(afterSalesDetailDto);
+    }
+
+}

+ 46 - 0
hx-sale/src/main/java/com/fjhx/sale/controller/after/AfterSalesRecordsController.java

@@ -0,0 +1,46 @@
+package com.fjhx.sale.controller.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.sale.entity.after.dto.AfterSalesRecordSelectDto;
+import com.fjhx.sale.entity.after.dto.AfterSalesRecordsDto;
+import com.fjhx.sale.entity.after.vo.AfterSalesRecordsVo;
+import com.fjhx.sale.service.after.AfterSalesRecordsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * <p>
+ * 售后跟进记录 前端控制器
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@RestController
+@RequestMapping("/afterSalesRecords")
+public class AfterSalesRecordsController {
+
+    @Autowired
+    private AfterSalesRecordsService afterSalesRecordsService;
+
+    /**
+     * 售后跟进记录分页
+     */
+    @PostMapping("/page")
+    public Page<AfterSalesRecordsVo> page(@RequestBody AfterSalesRecordSelectDto dto) {
+        return afterSalesRecordsService.getPage(dto);
+    }
+
+    /**
+     * 售后跟进记录新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody AfterSalesRecordsDto afterSalesRecordDto) {
+        afterSalesRecordsService.add(afterSalesRecordDto);
+    }
+
+}

+ 15 - 5
hx-sale/src/main/java/com/fjhx/sale/controller/contract/ContractProductController.java

@@ -1,13 +1,13 @@
 package com.fjhx.sale.controller.contract;
 
-import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.sale.entity.contract.vo.ContractProductVo;
-import com.fjhx.sale.entity.contract.dto.ContractProductSelectDto;
 import com.fjhx.sale.entity.contract.dto.ContractProductDto;
-import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.sale.entity.contract.dto.ContractProductSelectDto;
+import com.fjhx.sale.entity.contract.vo.ContractProductVo;
 import com.fjhx.sale.service.contract.ContractProductService;
+import com.ruoyi.common.core.domain.BaseSelectDto;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -34,13 +34,23 @@ public class ContractProductController {
     public Page<ContractProductVo> page(@RequestBody ContractProductSelectDto dto) {
         return contractProductService.getPage(dto);
     }
+
+    /**
+     * 采购交接单-产品分页
+     */
+    @PostMapping("/page1")
+    public Page<ContractProductVo> page1(@RequestBody ContractProductSelectDto dto) {
+        return contractProductService.getPage1(dto);
+    }
+
     /**
      * 根据合同ID和客户ID查询未包装的产品
      */
     @GetMapping("/getNoPackContractProductById")
-    public List<ContractProductVo> getNoPackContractProductById(@RequestParam("customerId")String customerId, @RequestParam("contractIds")String contractIds) {
+    public List<ContractProductVo> getNoPackContractProductById(@RequestParam("customerId") String customerId, @RequestParam("contractIds") String contractIds) {
         return contractProductService.getNoPackContractProductById(customerId, contractIds);
     }
+
     /**
      * 外销合同-产品ID集合查询产品
      */

+ 17 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesDetailDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.sale.entity.after.dto;
+
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后明细新增编辑入参实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesDetailDto extends AfterSalesDetail {
+
+}

+ 32 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesDetailSelectDto.java

@@ -0,0 +1,32 @@
+package com.fjhx.sale.entity.after.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后明细列表查询入参实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesDetailSelectDto extends BaseSelectDto {
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 售后类型
+     */
+    private String type;
+
+    /**
+     * 售后状态
+     */
+    private String status;
+
+}

+ 25 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesDto.java

@@ -0,0 +1,25 @@
+package com.fjhx.sale.entity.after.dto;
+
+import com.fjhx.sale.entity.after.po.AfterSales;
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 售后管理新增编辑入参实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesDto extends AfterSales {
+
+    /**
+     * 售后明细列表
+     */
+    List<AfterSalesDetail> afterSalesDetailList;
+
+}

+ 22 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesRecordSelectDto.java

@@ -0,0 +1,22 @@
+package com.fjhx.sale.entity.after.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后跟进记录列表查询入参实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesRecordSelectDto extends BaseSelectDto {
+
+    /**
+     * 售后明细id
+     */
+    private Long afterSalesDetailId;
+
+}

+ 25 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesRecordsDto.java

@@ -0,0 +1,25 @@
+package com.fjhx.sale.entity.after.dto;
+
+import com.fjhx.file.entity.ObsFile;
+import com.fjhx.sale.entity.after.po.AfterSalesRecords;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 售后跟进记录新增编辑入参实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesRecordsDto extends AfterSalesRecords {
+
+    /**
+     * 附件列表
+     */
+    private List<ObsFile> fileList;
+
+}

+ 17 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/dto/AfterSalesSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.sale.entity.after.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后管理列表查询入参实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesSelectDto extends BaseSelectDto {
+
+}

+ 46 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSales.java

@@ -0,0 +1,46 @@
+package com.fjhx.sale.entity.after.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.domain.BasePo;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 售后管理
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+@TableName("after_sales")
+public class AfterSales extends BasePo {
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 销售合同id
+     */
+    private Long contractId;
+
+    /**
+     * 售后类型 字典
+     */
+    private String type;
+
+    /**
+     * 说明
+     */
+    private String remark;
+
+    /**
+     * 售后状态 0进行中1关闭
+     */
+    private Integer status;
+
+}

+ 63 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSalesDetail.java

@@ -0,0 +1,63 @@
+package com.fjhx.sale.entity.after.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.domain.BasePo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 售后明细
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+@TableName("after_sales_detail")
+public class AfterSalesDetail extends BasePo {
+
+    /**
+     * 售后id
+     */
+    private Long afterSalesId;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 售后数量
+     */
+    private BigDecimal quantity;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 销售合同明细id
+     */
+    private Long contractProductId;
+
+    /**
+     * 商品单价
+     */
+    private BigDecimal price;
+
+    /**
+     * 商品金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 售后状态
+     */
+    private Integer status;
+
+}

+ 43 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/po/AfterSalesRecords.java

@@ -0,0 +1,43 @@
+package com.fjhx.sale.entity.after.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.domain.BasePo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 售后跟进记录
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+@TableName("after_sales_records")
+public class AfterSalesRecords extends BasePo {
+
+    /**
+     * 售后明细id
+     */
+    private Long afterSalesDetailId;
+
+    /**
+     * 销售合同id
+     */
+    private Date followUpTime;
+
+    /**
+     * 跟进用户id
+     */
+    private Long followUpUserId;
+
+    /**
+     * 说明
+     */
+    private String remark;
+
+}

+ 58 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/vo/AfterSalesDetailVo.java

@@ -0,0 +1,58 @@
+package com.fjhx.sale.entity.after.vo;
+
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后明细列表查询返回值实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesDetailVo extends AfterSalesDetail {
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+    /**
+     * 客户名称
+     */
+    private String customerName;
+    /**
+     * 合同id
+     */
+    private Long contractId;
+    /**
+     * 合同编号
+     */
+    private String contractCode;
+    /**
+     * 售后类型
+     */
+    private String type;
+
+    /**
+     * 产品编码
+     */
+    private String productCode;
+
+    /**
+     * 产品名称
+     */
+    private String productName;
+
+    /**
+     * 产品规格
+     */
+    private String productSpec;
+
+    /**
+     * 产品规格
+     */
+    private String productUnit;
+
+}

+ 22 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/vo/AfterSalesRecordsVo.java

@@ -0,0 +1,22 @@
+package com.fjhx.sale.entity.after.vo;
+
+import com.fjhx.sale.entity.after.po.AfterSalesRecords;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后跟进记录列表查询返回值实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesRecordsVo extends AfterSalesRecords {
+
+    /**
+     * 跟进用户名称
+     */
+    private String followUpUserName;
+
+}

+ 17 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/after/vo/AfterSalesVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.sale.entity.after.vo;
+
+import com.fjhx.sale.entity.after.po.AfterSales;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 售后管理列表查询返回值实体
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Getter
+@Setter
+public class AfterSalesVo extends AfterSales {
+
+}

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/contract/vo/ContractPdfInfoVo.java

@@ -175,6 +175,11 @@ public class ContractPdfInfoVo {
      */
     private String beneficiaryAddress;
 
+    /**
+     * 税号 预留字段
+     */
+    private String taxNumber;
+
     @Getter
     @Setter
     public static class ProductInfo {

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/contract/vo/ContractVo.java

@@ -144,5 +144,10 @@ public class ContractVo extends Contract {
      */
     private String contractTypeVal;
 
+    /**
+     * 税号 预留字段
+     */
+    private String taxNumber;
+
 }
 

+ 26 - 0
hx-sale/src/main/java/com/fjhx/sale/mapper/after/AfterSalesDetailMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.sale.mapper.after;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import com.fjhx.sale.entity.after.vo.AfterSalesDetailVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 售后明细 Mapper 接口
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+public interface AfterSalesDetailMapper extends BaseMapper<AfterSalesDetail> {
+
+    /**
+     * 售后明细分页
+     */
+    Page<AfterSalesDetailVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<AfterSalesDetail> wrapper);
+
+}

+ 17 - 0
hx-sale/src/main/java/com/fjhx/sale/mapper/after/AfterSalesMapper.java

@@ -0,0 +1,17 @@
+package com.fjhx.sale.mapper.after;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fjhx.sale.entity.after.po.AfterSales;
+
+
+/**
+ * <p>
+ * 售后管理 Mapper 接口
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+public interface AfterSalesMapper extends BaseMapper<AfterSales> {
+
+}

+ 26 - 0
hx-sale/src/main/java/com/fjhx/sale/mapper/after/AfterSalesRecordsMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.sale.mapper.after;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.sale.entity.after.po.AfterSalesRecords;
+import com.fjhx.sale.entity.after.vo.AfterSalesRecordsVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 售后跟进记录 Mapper 接口
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+public interface AfterSalesRecordsMapper extends BaseMapper<AfterSalesRecords> {
+
+    /**
+     * 售后跟进记录分页
+     */
+    Page<AfterSalesRecordsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<AfterSalesRecords> wrapper);
+
+}

+ 46 - 0
hx-sale/src/main/java/com/fjhx/sale/service/after/AfterSalesDetailService.java

@@ -0,0 +1,46 @@
+package com.fjhx.sale.service.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.sale.entity.after.dto.AfterSalesDetailDto;
+import com.fjhx.sale.entity.after.dto.AfterSalesDetailSelectDto;
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import com.fjhx.sale.entity.after.vo.AfterSalesDetailVo;
+import com.ruoyi.common.core.service.BaseService;
+
+
+/**
+ * <p>
+ * 售后明细 服务类
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+public interface AfterSalesDetailService extends BaseService<AfterSalesDetail> {
+
+    /**
+     * 售后明细分页
+     */
+    Page<AfterSalesDetailVo> getPage(AfterSalesDetailSelectDto dto);
+
+    /**
+     * 售后管理编辑
+     */
+    void edit(AfterSalesDetailDto afterSalesDetailDto);
+
+    /**
+     * 售后退货
+     */
+    void salesReturn(AfterSalesDetailDto afterSalesDetailDto);
+
+    /**
+     * 售后换货
+     */
+    void salesReplace(AfterSalesDetailDto afterSalesDetailDto);
+
+    /**
+     * 销售发起采购
+     */
+    void initPurchase(AfterSalesDetailDto afterSalesDetailDto);
+
+}

+ 31 - 0
hx-sale/src/main/java/com/fjhx/sale/service/after/AfterSalesRecordsService.java

@@ -0,0 +1,31 @@
+package com.fjhx.sale.service.after;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.sale.entity.after.dto.AfterSalesRecordSelectDto;
+import com.fjhx.sale.entity.after.dto.AfterSalesRecordsDto;
+import com.fjhx.sale.entity.after.po.AfterSalesRecords;
+import com.fjhx.sale.entity.after.vo.AfterSalesRecordsVo;
+import com.ruoyi.common.core.service.BaseService;
+
+
+/**
+ * <p>
+ * 售后跟进记录 服务类
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+public interface AfterSalesRecordsService extends BaseService<AfterSalesRecords> {
+
+    /**
+     * 售后跟进记录分页
+     */
+    Page<AfterSalesRecordsVo> getPage(AfterSalesRecordSelectDto dto);
+
+    /**
+     * 售后跟进记录新增
+     */
+    void add(AfterSalesRecordsDto afterSalesRecordDto);
+
+}

+ 23 - 0
hx-sale/src/main/java/com/fjhx/sale/service/after/AfterSalesService.java

@@ -0,0 +1,23 @@
+package com.fjhx.sale.service.after;
+
+import com.fjhx.sale.entity.after.dto.AfterSalesDto;
+import com.fjhx.sale.entity.after.po.AfterSales;
+import com.ruoyi.common.core.service.BaseService;
+
+
+/**
+ * <p>
+ * 售后管理 服务类
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+public interface AfterSalesService extends BaseService<AfterSales> {
+
+    /**
+     * 售后管理新增
+     */
+    void add(AfterSalesDto afterSalesDto);
+
+}

+ 196 - 0
hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesDetailServiceImpl.java

@@ -0,0 +1,196 @@
+package com.fjhx.sale.service.after.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.common.utils.Assert;
+import com.fjhx.customer.service.customer.CustomerService;
+import com.fjhx.item.entity.product.po.ProductInfo;
+import com.fjhx.item.service.product.ProductInfoService;
+import com.fjhx.sale.entity.after.dto.AfterSalesDetailDto;
+import com.fjhx.sale.entity.after.dto.AfterSalesDetailSelectDto;
+import com.fjhx.sale.entity.after.po.AfterSales;
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import com.fjhx.sale.entity.after.vo.AfterSalesDetailVo;
+import com.fjhx.sale.entity.contract.po.ContractProduct;
+import com.fjhx.sale.mapper.after.AfterSalesDetailMapper;
+import com.fjhx.sale.service.after.AfterSalesDetailService;
+import com.fjhx.sale.service.after.AfterSalesService;
+import com.fjhx.sale.service.contract.ContractProductService;
+import com.fjhx.sale.service.contract.ContractService;
+import com.fjhx.wms.entity.stock.emums.StockWaitType;
+import com.fjhx.wms.entity.stock.po.StockWait;
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import com.fjhx.wms.service.stock.StockWaitDetailsService;
+import com.fjhx.wms.service.stock.StockWaitService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 售后明细 服务实现类
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Service
+public class AfterSalesDetailServiceImpl extends ServiceImpl<AfterSalesDetailMapper, AfterSalesDetail> implements AfterSalesDetailService {
+
+    @Autowired
+    private CustomerService customerService;
+    @Autowired
+    private ContractService contractService;
+    @Autowired
+    private ProductInfoService productInfoService;
+    @Autowired
+    private StockWaitService stockWaitService;
+    @Autowired
+    private StockWaitDetailsService stockWaitDetailsService;
+    @Autowired
+    private ContractProductService contractProductService;
+    @Autowired
+    private AfterSalesService afterSalesService;
+
+    @Override
+    public Page<AfterSalesDetailVo> getPage(AfterSalesDetailSelectDto dto) {
+        IWrapper<AfterSalesDetail> wrapper = getWrapper();
+        //客户id过滤
+        wrapper.eq("as1", AfterSalesDetailVo::getCustomerId, dto.getCustomerId());
+        //售后类型过滤
+        wrapper.eq("as1", AfterSalesDetailVo::getType, dto.getType());
+        //售后状态过滤
+        wrapper.eq("as1", AfterSalesDetailVo::getStatus, dto.getStatus());
+        //关键字搜索
+        if (ObjectUtils.isNotEmpty(dto.getKeyword())) {
+            List<Long> pIds = productInfoService.listObject(ProductInfo::getId, q -> q
+                    .like(ProductInfo::getCode, dto.getKeyword())
+                    .like(ProductInfo::getName, dto.getKeyword())
+                    .like(ProductInfo::getSpec, dto.getKeyword())
+            );
+            pIds.add(null);
+            wrapper.in("asd", AfterSalesDetail::getProductId, pIds);
+        }
+        //根据创建时间倒序
+        wrapper.orderByDesc("as1", AfterSalesDetail::getCreateTime);
+        Page<AfterSalesDetailVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        List<AfterSalesDetailVo> records = page.getRecords();
+        //赋值客户名称
+        customerService.attributeAssign(records, AfterSalesDetailVo::getCustomerId, (item, customer) -> {
+            item.setCustomerName(customer.getName());
+        });
+        //赋值合同编号
+        contractService.attributeAssign(records, AfterSalesDetailVo::getContractId, (item, contract) -> {
+            item.setContractCode(contract.getCode());
+        });
+        //赋值产品信息
+        productInfoService.attributeAssign(records, AfterSalesDetailVo::getProductId, (item, productInfo) -> {
+            item.setProductCode(productInfo.getCode());
+            item.setProductName(productInfo.getName());
+            item.setProductUnit(productInfo.getSpec());
+            item.setProductUnit(productInfo.getUnit());
+        });
+        return page;
+    }
+
+    @Override
+    public void edit(AfterSalesDetailDto afterSalesDetailSelectDto) {
+        this.updateById(afterSalesDetailSelectDto);
+    }
+
+    /**
+     * 退货
+     */
+    @DSTransactional
+    @Override
+    public void salesReturn(AfterSalesDetailDto afterSalesDetailDto) {
+        Assert.notEmpty(afterSalesDetailDto.getId(), "售后id不能为空");
+        AfterSalesDetail afterSalesDetail = this.getById(afterSalesDetailDto.getId());
+        Assert.notEmpty(afterSalesDetail, "查询不到售后信息");
+
+        //生成售后退货待入库信息
+        StockWait stockWait = new StockWait();
+        stockWait.setType(1);//入库
+        stockWait.setStatus(0);//待入库
+        stockWait.setBusinessType(StockWaitType.SALES_RETURN_IN.getDetailType());
+        stockWait.setBusinessId(afterSalesDetail.getId());
+        stockWaitService.save(stockWait);
+
+        //生成售后退货待入库明细
+        StockWaitDetails stockWaitDetails = new StockWaitDetails();
+        stockWaitDetails.setStockWaitId(stockWait.getId());
+        stockWaitDetails.setProductId(afterSalesDetail.getProductId());
+        stockWaitDetails.setQuantity(afterSalesDetail.getQuantity());
+        stockWaitDetailsService.save(stockWaitDetails);
+    }
+
+    /**
+     * 销售换货
+     */
+    @DSTransactional
+    @Override
+    public void salesReplace(AfterSalesDetailDto afterSalesDetailDto) {
+        Assert.notEmpty(afterSalesDetailDto.getId(), "售后id不能为空");
+        AfterSalesDetail afterSalesDetail = this.getById(afterSalesDetailDto.getId());
+        Assert.notEmpty(afterSalesDetail, "查询不到售后信息");
+
+        //生成售后换货待入库信息
+        StockWait stockWait = new StockWait();
+        stockWait.setType(1);//入库
+        stockWait.setStatus(0);//待入库
+        stockWait.setBusinessType(StockWaitType.SALES_REPLACE_IN.getDetailType());
+        stockWait.setBusinessId(afterSalesDetailDto.getId());
+        stockWaitService.save(stockWait);
+        //生成售后换货待出库信息
+        StockWait stockWait1 = new StockWait();
+        stockWait1.setType(2);//出库
+        stockWait1.setStatus(0);//待出库
+        stockWait1.setBusinessType(StockWaitType.SALES_REPLACE_OUT.getDetailType());
+        stockWait1.setBusinessId(afterSalesDetailDto.getId());
+        stockWaitService.save(stockWait1);
+
+        //生成售后换货待出入库明细
+        //生成入库明细
+        StockWaitDetails stockWaitDetails = new StockWaitDetails();
+        stockWaitDetails.setStockWaitId(stockWait.getId());
+        stockWaitDetails.setProductId(afterSalesDetail.getProductId());
+        stockWaitDetails.setQuantity(afterSalesDetail.getQuantity());
+        stockWaitDetailsService.save(stockWaitDetails);
+        //生成出库明细
+        StockWaitDetails stockWaitDetails1 = new StockWaitDetails();
+        stockWaitDetails1.setStockWaitId(stockWait1.getId());
+        stockWaitDetails1.setProductId(afterSalesDetail.getProductId());
+        stockWaitDetails1.setQuantity(afterSalesDetail.getQuantity());
+        stockWaitDetailsService.save(stockWaitDetails1);
+    }
+
+    /**
+     * 发起采购
+     */
+    @Override
+    @Transactional
+    public void initPurchase(AfterSalesDetailDto afterSalesDetailDto) {
+        Assert.notEmpty(afterSalesDetailDto.getId(), "售后id不能为空");
+        AfterSalesDetail afterSalesDetail = this.getById(afterSalesDetailDto.getId());
+        Assert.notEmpty(afterSalesDetail, "查询不到售后信息");
+        AfterSales afterSales = afterSalesService.getById(afterSalesDetail.getAfterSalesId());
+
+        //创建交接单
+        ContractProduct contractProduct = new ContractProduct();
+        contractProduct.setProductId(afterSalesDetail.getProductId());
+        contractProduct.setQuantity(afterSalesDetail.getQuantity());
+        contractProduct.setExpendQuantity(afterSalesDetail.getQuantity());
+        contractProduct.setContractId(afterSales.getContractId());
+        contractProduct.setPrice(afterSalesDetail.getPrice());
+        contractProduct.setAmount(afterSalesDetail.getAmount());
+        contractProduct.setRemark(afterSalesDetail.getRemark());
+        contractProductService.save(contractProduct);
+    }
+
+}

+ 53 - 0
hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesRecordsServicesImpl.java

@@ -0,0 +1,53 @@
+package com.fjhx.sale.service.after.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.common.utils.Assert;
+import com.fjhx.file.utils.ObsFileUtil;
+import com.fjhx.sale.entity.after.dto.AfterSalesRecordSelectDto;
+import com.fjhx.sale.entity.after.dto.AfterSalesRecordsDto;
+import com.fjhx.sale.entity.after.po.AfterSalesRecords;
+import com.fjhx.sale.entity.after.vo.AfterSalesRecordsVo;
+import com.fjhx.sale.mapper.after.AfterSalesRecordsMapper;
+import com.fjhx.sale.service.after.AfterSalesRecordsService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.ruoyi.system.utils.UserUtil;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 售后跟进记录 服务实现类
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Service
+public class AfterSalesRecordsServicesImpl extends ServiceImpl<AfterSalesRecordsMapper, AfterSalesRecords> implements AfterSalesRecordsService {
+
+    @Override
+    public Page<AfterSalesRecordsVo> getPage(AfterSalesRecordSelectDto dto) {
+        IWrapper<AfterSalesRecords> wrapper = getWrapper();
+        Long afterSalesDetailId = dto.getAfterSalesDetailId();
+        Assert.notEmpty(afterSalesDetailId, "售后明细id不能为空");
+        wrapper.eq(AfterSalesRecordsVo::getAfterSalesDetailId, afterSalesDetailId);
+        wrapper.orderByDesc("asr", AfterSalesRecords::getFollowUpTime);
+        Page<AfterSalesRecordsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        List<AfterSalesRecordsVo> records = page.getRecords();
+        //赋值跟进人名称
+        UserUtil.assignmentNickName(records, AfterSalesRecordsVo::getFollowUpUserId, AfterSalesRecordsVo::setFollowUpUserName);
+        return page;
+    }
+
+    @DSTransactional
+    @Override
+    public void add(AfterSalesRecordsDto afterSalesRecordDto) {
+        this.save(afterSalesRecordDto);
+        ObsFileUtil.saveFile(afterSalesRecordDto.getFileList(), afterSalesRecordDto.getId());
+    }
+
+}

+ 64 - 0
hx-sale/src/main/java/com/fjhx/sale/service/after/impl/AfterSalesServiceImpl.java

@@ -0,0 +1,64 @@
+package com.fjhx.sale.service.after.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.sale.entity.after.dto.AfterSalesDto;
+import com.fjhx.sale.entity.after.po.AfterSales;
+import com.fjhx.sale.entity.after.po.AfterSalesDetail;
+import com.fjhx.sale.entity.contract.po.ContractProduct;
+import com.fjhx.sale.mapper.after.AfterSalesMapper;
+import com.fjhx.sale.service.after.AfterSalesDetailService;
+import com.fjhx.sale.service.after.AfterSalesService;
+import com.fjhx.sale.service.contract.ContractProductService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+
+/**
+ * <p>
+ * 售后管理 服务实现类
+ * </p>
+ *
+ * @author
+ * @since 2023-07-20
+ */
+@Service
+public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSales> implements AfterSalesService {
+    @Autowired
+    private AfterSalesDetailService afterSalesDetailService;
+
+    @Autowired
+    private ContractProductService contractProductService;
+
+    @DSTransactional
+    @Override
+    public void add(AfterSalesDto afterSalesDto) {
+        this.save(afterSalesDto);
+        List<AfterSalesDetail> afterSalesDetailList = afterSalesDto.getAfterSalesDetailList();
+        afterSalesDetailList.forEach(item -> item.setAfterSalesId(afterSalesDto.getId()));
+        //赋值dan
+        List<Long> contractProductIds = afterSalesDetailList.stream().distinct().map(AfterSalesDetail::getContractProductId).collect(Collectors.toList());
+        Map<Long, ContractProduct> longContractProductMap = new HashMap<>();
+        if (ObjectUtil.isNotEmpty(contractProductIds)) {
+            longContractProductMap = contractProductService.mapKEntity(ContractProduct::getId, q -> q.in(ContractProduct::getId, contractProductIds));
+        }
+        for (AfterSalesDetail afterSalesDetail : afterSalesDetailList) {
+            //赋值单价信息
+            ContractProduct oldContractProduct = longContractProductMap.get(afterSalesDetail.getContractProductId());
+            afterSalesDetail.setPrice(BigDecimal.ZERO);
+            if (ObjectUtil.isNotEmpty(oldContractProduct)) {
+                afterSalesDetail.setPrice(oldContractProduct.getPrice());
+            }
+            afterSalesDetail.setAmount(afterSalesDetail.getQuantity().multiply(afterSalesDetail.getPrice()));
+        }
+        afterSalesDetailService.saveBatch(afterSalesDetailList);
+    }
+
+}

+ 9 - 4
hx-sale/src/main/java/com/fjhx/sale/service/contract/ContractProductService.java

@@ -1,11 +1,11 @@
 package com.fjhx.sale.service.contract;
 
-import com.fjhx.sale.entity.contract.po.ContractProduct;
-import com.ruoyi.common.core.service.BaseService;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.sale.entity.contract.vo.ContractProductVo;
-import com.fjhx.sale.entity.contract.dto.ContractProductSelectDto;
 import com.fjhx.sale.entity.contract.dto.ContractProductDto;
+import com.fjhx.sale.entity.contract.dto.ContractProductSelectDto;
+import com.fjhx.sale.entity.contract.po.ContractProduct;
+import com.fjhx.sale.entity.contract.vo.ContractProductVo;
+import com.ruoyi.common.core.service.BaseService;
 
 import java.util.List;
 
@@ -26,6 +26,11 @@ public interface ContractProductService extends BaseService<ContractProduct> {
     Page<ContractProductVo> getPage(ContractProductSelectDto dto);
 
     /**
+     * 采购交接单 分页
+     */
+    Page<ContractProductVo> getPage1(ContractProductSelectDto dto);
+
+    /**
      * 外销合同-根据多个明细ID集合查询合同产品
      */
     List<ContractProductVo> getListDetail(List<Long> ids);

+ 45 - 7
hx-sale/src/main/java/com/fjhx/sale/service/contract/impl/ContractProductServiceImpl.java

@@ -11,6 +11,7 @@ import com.fjhx.common.service.contract.ContractTemplateService;
 import com.fjhx.common.service.corporation.CorporationService;
 import com.fjhx.customer.service.customer.CustomerService;
 import com.fjhx.flow.service.flow.FlowExampleService;
+import com.fjhx.item.entity.product.po.ProductInfo;
 import com.fjhx.item.service.product.ProductClassifyService;
 import com.fjhx.item.service.product.ProductInfoService;
 import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
@@ -82,23 +83,60 @@ public class ContractProductServiceImpl extends ServiceImpl<ContractProductMappe
     @Override
     public Page<ContractProductVo> getPage(ContractProductSelectDto dto) {
         IWrapper<ContractProduct> wrapper = getWrapper();
+        //过滤待处理数量为0的数据
+        wrapper.ne("t1", ContractProduct::getExpendQuantity, 0);
+        //是否到账过滤
+        if (ObjectUtil.isNotEmpty(dto.getIsReceived())) {
+            if (1 == dto.getIsReceived()) {
+                wrapper.isNotNull("co.id");
+            } else {
+                wrapper.isNull("co.id");
+            }
+        }
+        //下发交接单过滤
+        wrapper.eq("t2", Contract::getIssue, 1);
+        return commPage(wrapper, dto);
+    }
+
+    /**
+     * 采购交接单
+     */
+    @Override
+    public Page<ContractProductVo> getPage1(ContractProductSelectDto dto) {
+        IWrapper<ContractProduct> wrapper = getWrapper();
+        //过滤 已到账 或 预付比例==0 的数据
+        wrapper.and(q -> q.isNotNull("co.id").or().eq("t2.advance_ratio", 0));
+        return commPage(wrapper, dto);
+    }
+
+    /**
+     * 公共代码抽取
+     */
+    public Page<ContractProductVo> commPage(IWrapper<ContractProduct> wrapper, ContractProductSelectDto dto) {
         wrapper.orderByDesc("t1", ContractProduct::getCreateTime);
-        wrapper.ne("t1",ContractProduct::getExpendQuantity,0);
         wrapper.between("t2", Contract::getStatus, FlowStatusEnum.PASS.getKey(), FlowStatusEnum.CANCELLATION.getKey() - 1);
-        if(ObjectUtil.isNotEmpty(dto.getDataType())&&dto.getDataType()==0){//合同交接单
+        if (ObjectUtil.isNotEmpty(dto.getDataType()) && dto.getDataType() == 0) {//合同交接单
             wrapper.ne("t1", ContractProduct::getExpendQuantity, BigDecimal.ZERO);
         }
-        if(ObjectUtil.isNotEmpty(dto.getPurchaseStatus())&&dto.getPurchaseStatus()==2){//已采购
+        if (ObjectUtil.isNotEmpty(dto.getPurchaseStatus()) && dto.getPurchaseStatus() == 2) {//已采购
             wrapper.eq("t1", ContractProduct::getExpendQuantity, BigDecimal.ZERO);
-        }else if(ObjectUtil.isNotEmpty(dto.getPurchaseStatus())&&dto.getPurchaseStatus()==1){//部分采购
+        } else if (ObjectUtil.isNotEmpty(dto.getPurchaseStatus()) && dto.getPurchaseStatus() == 1) {//部分采购
             wrapper.gt("t1", ContractProduct::getExpendQuantity, BigDecimal.ZERO);
             wrapper.apply("t1.expend_quantity <t1.quantity");
-        }else if(ObjectUtil.isNotEmpty(dto.getPurchaseStatus())&&dto.getPurchaseStatus()==0){//未采购
+        } else if (ObjectUtil.isNotEmpty(dto.getPurchaseStatus()) && dto.getPurchaseStatus() == 0) {//未采购
             wrapper.apply("t1.expend_quantity = t1.quantity");
         }
-        wrapper.eq("t2",Contract::getIssue,1);
         if (StringUtils.isNotEmpty(dto.getKeyword())) {
-            wrapper.keyword(dto.getKeyword(), new SqlField("t2.`code`"), new SqlField("t2.`user_name`"));
+            List<Long> pids = productInfoService.listObject(ProductInfo::getId, q -> q
+                    .like(ProductInfo::getCode, dto.getKeyword())
+                    .or().like(ProductInfo::getName, dto.getKeyword())
+                    .or().like(ProductInfo::getSpec, dto.getKeyword())
+            );
+            wrapper.and(q -> q
+                    .like("t2.`code`", dto.getKeyword())
+                    .or().like("t2.`user_name`", dto.getKeyword())
+                    .or().in(ContractProductVo::getProductId, pids)
+            );
         }
         //所属公司id过滤
         if (ObjectUtil.isNotEmpty(dto.getCorporationId())) {

+ 23 - 0
hx-sale/src/main/resources/mapper/after/AfterSalesDetailMapper.xml

@@ -0,0 +1,23 @@
+<?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.fjhx.sale.mapper.after.AfterSalesDetailMapper">
+    <select id="getPage" resultType="com.fjhx.sale.entity.after.vo.AfterSalesDetailVo">
+        SELECT asd.id,
+               asd.after_sales_id,
+               asd.product_id,
+               asd.quantity,
+               asd.`status`,
+               asd.create_user,
+               asd.create_time,
+               asd.update_user,
+               asd.update_time,
+               as1.customer_id,
+               as1.contract_id,
+               as1.type,
+               as1.remark
+        FROM after_sales_detail asd
+                 LEFT JOIN after_sales as1 ON asd.after_sales_id = as1.id
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 4 - 0
hx-sale/src/main/resources/mapper/after/AfterSalesMapper.xml

@@ -0,0 +1,4 @@
+<?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.fjhx.sale.mapper.after.AfterSalesMapper">
+</mapper>

+ 18 - 0
hx-sale/src/main/resources/mapper/after/AfterSalesRecordsMapper.xml

@@ -0,0 +1,18 @@
+<?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.fjhx.sale.mapper.after.AfterSalesRecordsMapper">
+    <select id="getPage" resultType="com.fjhx.sale.entity.after.vo.AfterSalesRecordsVo">
+        select asr.id,
+               asr.after_sales_detail_id,
+               asr.follow_up_time,
+               asr.follow_up_user_id,
+               asr.remark,
+               asr.create_user,
+               asr.create_time,
+               asr.update_user,
+               asr.update_time
+        from after_sales_records asr
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 0 - 4
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/abnormal/impl/AbnormalDetailsServiceImpl.java

@@ -77,10 +77,6 @@ public class AbnormalDetailsServiceImpl extends ServiceImpl<AbnormalDetailsMappe
 
         //如果下一跟进人不为空 就给下一跟进人发送消息
         if (ObjectUtil.isNotEmpty(abnormalDetailsDto.getNextHandleUser())) {
-            //给下一个跟进人发消息通知
-            JSONObject meassage = new JSONObject();
-            meassage.put("msg", "有异常需要您跟进");
-            meassage.put("abnormalInfoId", abnormalDetailsDto.getAbnormalInfoId().toString());
             // 给下一个跟进人发消息通知
             JSONObject message = new JSONObject();
             message.put("msg", "有异常需要您跟进");

+ 4 - 1
hx-wms/src/main/java/com/fjhx/wms/entity/stock/emums/StockWaitType.java

@@ -13,7 +13,10 @@ public enum StockWaitType {
     BACK_OUT(InOutType.OUT, 4, "退货出库", ""),
     JD_ORDER_OUT(InOutType.OUT, 5, "京东订单出库", "jd_order"),
     SALE_ORDER_OUT(InOutType.OUT, 6, "销售订单出库", "order_info"),
-    PRODUCTION_TASK_OUT(InOutType.OUT, 7, "生产任务待出库", "production_task");
+    PRODUCTION_TASK_OUT(InOutType.OUT, 7, "生产任务待出库", "production_task"),
+    SALES_RETURN_IN(InOutType.IN, 8, "售后退货入库", "after_sales"),
+    SALES_REPLACE_IN(InOutType.IN, 9, "售后换货入库", "after_sales"),
+    SALES_REPLACE_OUT(InOutType.OUT, 10, "售后换货出库", "after_sales");
 
 
     /**

+ 7 - 0
pom.xml

@@ -31,6 +31,7 @@
         <module>hx-dingding</module>
         <module>hx-data</module>
         <module>hx-jxst</module>
+        <module>hx-form</module>
     </modules>
 
     <properties>
@@ -163,6 +164,12 @@
                 <version>${hx.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>com.fjhx</groupId>
+                <artifactId>hx-form</artifactId>
+                <version>${hx.version}</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>