fanxp 1 jaar geleden
bovenliggende
commit
0cbad97d93
100 gewijzigde bestanden met toevoegingen van 136 en 5283 verwijderingen
  1. 2 6
      src/main/java/com/xjrsoft/common/advice/TransResponseBodyAdvice.java
  2. 5 0
      src/main/java/com/xjrsoft/common/model/tree/ITreeNode.java
  3. 30 13
      src/main/java/com/xjrsoft/common/utils/RedisUtil.java
  4. 94 2
      src/main/java/com/xjrsoft/common/utils/TreeUtil.java
  5. 1 1
      src/main/java/com/xjrsoft/module/app/service/impl/AppPageDesignServiceImpl.java
  6. 4 21
      src/main/java/com/xjrsoft/module/authority/utils/AuthorityUtil.java
  7. 0 189
      src/main/java/com/xjrsoft/module/demo/controller/DemoController.java
  8. 0 113
      src/main/java/com/xjrsoft/module/demo/controller/MultiController.java
  9. 0 37
      src/main/java/com/xjrsoft/module/demo/dto/AddDemoDto.java
  10. 0 36
      src/main/java/com/xjrsoft/module/demo/dto/AddMultiChildDto.java
  11. 0 39
      src/main/java/com/xjrsoft/module/demo/dto/AddMultiDto.java
  12. 0 14
      src/main/java/com/xjrsoft/module/demo/dto/ChainPageDto.java
  13. 0 36
      src/main/java/com/xjrsoft/module/demo/dto/DemoListDto.java
  14. 0 43
      src/main/java/com/xjrsoft/module/demo/dto/DemoPageDto.java
  15. 0 34
      src/main/java/com/xjrsoft/module/demo/dto/MultiListDto.java
  16. 0 37
      src/main/java/com/xjrsoft/module/demo/dto/MultiPageDto.java
  17. 0 39
      src/main/java/com/xjrsoft/module/demo/dto/UpdateDemoDto.java
  18. 0 42
      src/main/java/com/xjrsoft/module/demo/dto/UpdateMultiDto.java
  19. 0 65
      src/main/java/com/xjrsoft/module/demo/entity/Demo.java
  20. 0 52
      src/main/java/com/xjrsoft/module/demo/entity/Multi.java
  21. 0 44
      src/main/java/com/xjrsoft/module/demo/entity/MultiChild.java
  22. 0 17
      src/main/java/com/xjrsoft/module/demo/mapper/DemoMapper.java
  23. 0 13
      src/main/java/com/xjrsoft/module/demo/mapper/MultiChildMapper.java
  24. 0 15
      src/main/java/com/xjrsoft/module/demo/mapper/MultiMapper.java
  25. 0 14
      src/main/java/com/xjrsoft/module/demo/service/IDemoService.java
  26. 0 40
      src/main/java/com/xjrsoft/module/demo/service/IMultiService.java
  27. 0 17
      src/main/java/com/xjrsoft/module/demo/service/impl/DemoServiceImpl.java
  28. 0 58
      src/main/java/com/xjrsoft/module/demo/service/impl/MultiServiceImpl.java
  29. 0 44
      src/main/java/com/xjrsoft/module/demo/vo/DemoPageVo.java
  30. 0 38
      src/main/java/com/xjrsoft/module/demo/vo/DemoVo.java
  31. 0 38
      src/main/java/com/xjrsoft/module/demo/vo/MultiPageVo.java
  32. 0 38
      src/main/java/com/xjrsoft/module/demo/vo/MultiVo.java
  33. 0 302
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/controller/CaseErpBomController.java
  34. 0 51
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/AddCaseErpBomDto.java
  35. 0 48
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/ImportCaseErpBomDto.java
  36. 0 44
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/ImportCaseErpBomVo.java
  37. 0 50
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/UpdateCaseErpBomDto.java
  38. 0 69
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/entity/CaseErpBom.java
  39. 0 9
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/mapper/CaseErpBomMapper.java
  40. 0 8
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/service/ICaseErpBomService.java
  41. 0 12
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/service/ipml/CaseErpBomServiceImpl.java
  42. 0 41
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/vo/CaseErpBomExportVo.java
  43. 0 55
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/vo/CaseErpBomTreeVo.java
  44. 0 38
      src/main/java/com/xjrsoft/module/erpModel/caseErpBom/vo/CaseErpBomVo.java
  45. 0 71
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerContactsController.java
  46. 0 247
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerController.java
  47. 0 91
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerFollowController.java
  48. 0 124
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerGatherController.java
  49. 0 72
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerGatherDetailController.java
  50. 0 17
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerContactsDto.java
  51. 0 42
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerDto.java
  52. 0 35
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerFollowDto.java
  53. 0 32
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerGatherDetailDto.java
  54. 0 43
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerGatherDto.java
  55. 0 29
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/CaseErpCustomerContactsDto.java
  56. 0 44
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/CaseErpCustomerDto.java
  57. 0 41
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/CaseErpCustomerGatherDto.java
  58. 0 41
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/ImportCaseErpCustomerDto.java
  59. 0 16
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/TransferCaseErpCustomerDto.java
  60. 0 25
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerContactsDto.java
  61. 0 43
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerDto.java
  62. 0 37
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerFollowDto.java
  63. 0 33
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerGatherDetailDto.java
  64. 0 44
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerGatherDto.java
  65. 0 83
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomer.java
  66. 0 52
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerContacts.java
  67. 0 52
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerFollow.java
  68. 0 68
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerGather.java
  69. 0 49
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerGatherDetail.java
  70. 0 18
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerContactsMapper.java
  71. 0 18
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerFollowMapper.java
  72. 0 18
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerGatherDetailMapper.java
  73. 0 18
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerGatherMapper.java
  74. 0 18
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerMapper.java
  75. 0 26
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerContactsService.java
  76. 0 21
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerFollowService.java
  77. 0 23
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerGatherDetailService.java
  78. 0 22
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerGatherService.java
  79. 0 68
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerService.java
  80. 0 144
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerContactsServiceImpl.java
  81. 0 54
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerFollowServiceImpl.java
  82. 0 92
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerGatherDetailServiceImpl.java
  83. 0 156
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerGatherServiceImpl.java
  84. 0 602
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerServiceImpl.java
  85. 0 36
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCusGatherDetailInfo.java
  86. 0 44
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerCommonExportVo.java
  87. 0 40
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerContactsInfoVo.java
  88. 0 24
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerDetailInfoVo.java
  89. 0 48
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerExportVo.java
  90. 0 36
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerFollowInfoVo.java
  91. 0 54
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerGatherDetailInfoVo.java
  92. 0 45
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerGatherDetailVo.java
  93. 0 62
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerGatherPageVo.java
  94. 0 45
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerInfoVo.java
  95. 0 74
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerListVo.java
  96. 0 56
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerVo.java
  97. 0 13
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerAllVo.java
  98. 0 16
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerPxaymentVo.java
  99. 0 20
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerSourceVo.java
  100. 0 19
      src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerVo.java

+ 2 - 6
src/main/java/com/xjrsoft/common/advice/TransResponseBodyAdvice.java

@@ -1,12 +1,12 @@
 package com.xjrsoft.common.advice;
 
 import cn.hutool.core.convert.Convert;
-import cn.hutool.core.lang.TypeReference;
 import cn.hutool.core.util.ClassUtil;
 import cn.hutool.core.util.ReflectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.fasterxml.jackson.core.type.TypeReference;
 import com.xjrsoft.common.annotation.Trans;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.TransType;
@@ -33,11 +33,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
 import org.ssssssss.magicapi.modules.db.model.PageResult;
 
 import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**

+ 5 - 0
src/main/java/com/xjrsoft/common/model/tree/ITreeNode.java

@@ -21,6 +21,11 @@ public interface ITreeNode<T extends ITreeNode<T, V>, V > {
      */
     V getParentId();
 
+    /**
+     * 设置父级id
+     */
+    void setParentId(V v);
+
     /**
      * 获取子级
      *

+ 30 - 13
src/main/java/com/xjrsoft/common/utils/RedisUtil.java

@@ -1,18 +1,14 @@
 package com.xjrsoft.common.utils;
 
-import cn.hutool.core.lang.TypeReference;
-import cn.hutool.json.JSONUtil;
-import com.google.gson.Gson;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.xjrsoft.common.exception.MyException;
 import lombok.AllArgsConstructor;
-import org.springframework.data.redis.core.HashOperations;
-import org.springframework.data.redis.core.ListOperations;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.data.redis.core.SetOperations;
-import org.springframework.data.redis.core.ValueOperations;
-import org.springframework.data.redis.core.ZSetOperations;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.redis.core.*;
 import org.springframework.stereotype.Component;
 
+import java.io.IOException;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Pattern;
@@ -24,6 +20,7 @@ import java.util.regex.Pattern;
  **/
 @Component
 @AllArgsConstructor
+@Slf4j
 public class RedisUtil {
 
     private RedisTemplate<String, Object> redisTemplate;
@@ -40,7 +37,9 @@ public class RedisUtil {
      * 不设置过期时长
      */
     public final static long NOT_EXPIRE = -1;
-    private final static Gson GSON = new Gson();
+//    private final static Gson GSON = new Gson();
+
+    private final ObjectMapper objectMapper;
 
     public void set(String key, Object value, long expire) {
         valueOperations.set(key, toJson(value));
@@ -143,20 +142,38 @@ public class RedisUtil {
                 object instanceof Double || object instanceof Boolean || object instanceof String) {
             return String.valueOf(object);
         }
-        return GSON.toJson(object);
+        try {
+            return objectMapper.writeValueAsString(object);
+        } catch (IOException e) {
+            log.error("toJson(Object)", e); //$NON-NLS-1$
+        }
+        return null;
+//        return GSON.toJson(object);
     }
 
     /**
      * JSON数据,转成Object
      */
     private <T> T fromJson(String json, Class<T> clazz) {
-        return JSONUtil.toBean(json, clazz, true);
+//        return JSONUtil.toBean(json, clazz, true);
+        try {
+            return objectMapper.readValue(json, clazz);
+        } catch (IOException e) {
+            log.error("fromJson(String, Class<T>)", e);
+        }
+        return null;
     }
 
     /**
      * JSON数据,转成Object
      */
     private <T> T fromJson(String json, TypeReference<T> typeReference) {
-        return JSONUtil.toBean(json, typeReference, true);
+//        return JSONUtil.toBean(json, typeReference, true);
+        try {
+            return objectMapper.readValue(json, typeReference);
+        } catch (IOException e) {
+            log.error("fromJson(String, JsonTypeReference<T>)", e);
+        }
+        return null;
     }
 }

+ 94 - 2
src/main/java/com/xjrsoft/common/utils/TreeUtil.java

@@ -4,8 +4,7 @@ import cn.hutool.core.util.StrUtil;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.model.tree.ITreeNode;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -27,6 +26,8 @@ public class TreeUtil {
     public static <T extends ITreeNode<T,V>,V> List<T> build(List<T> items) {
 
         List<String> notParents = new ArrayList<>();
+        System.out.println("构建树结构");
+        long startTime = System.currentTimeMillis();
 
         items.forEach((node) -> {
             V parentId = node.getParentId();
@@ -53,8 +54,99 @@ public class TreeUtil {
             }
 
         });
+        long endTime = System.currentTimeMillis();
+        System.out.printf("构建树结构:%d \n",(endTime - startTime));
 
         return items.stream().filter(x -> StrUtil.isEmptyIfStr(x.getParentId()) || StrUtil.equals(String.valueOf(x.getParentId()), String.valueOf(GlobalConstant.FIRST_NODE_VALUE)) || notParents.contains(x.getId().toString())).collect(Collectors.toList());
     }
 
+    /**
+     * 构建树结构(目前最快的构建方式)
+     */
+    public static <T extends ITreeNode<T,V>,V> List<T> buildMapTree(List<T> list, V parentId) {
+        // 存放按parentId分组的数据
+        Map<V, List<T>> map = new LinkedHashMap<>();
+
+        list.forEach(node -> {
+            if (node.getParentId() == null){
+                node.setParentId(parentId);
+            }
+            // 取出同一个父亲下的兄弟
+            List<T> brotherList = map.get(node.getParentId());
+            // 判断非空
+            brotherList = brotherList == null ? new LinkedList<>() : brotherList;
+            // 加入到兄弟里面
+            brotherList.add(node);
+            // 把兄弟们重新放到map里面
+            map.put(node.getParentId(), brotherList);
+        });
+
+        list.forEach(node -> {
+            // 去map找它孩子
+            List<T> childrenList = map.get(node.getId());
+            // 把它的孩子丢进去
+            node.setChildren(childrenList);
+        });
+        return map.get(parentId);
+    }
+
+
+    /**
+     *  根据每一个顶级节点(根节点)进行构建树形结构
+     *  @return  构建整棵树
+     */
+    public static <T extends ITreeNode<T,V>,V> List<T> buildTree(List<T> list, V parentId){
+        // treeNodes:保存一个顶级节点所构建出来的完整树形
+        List<T> treeNodes = new ArrayList<T>();
+        // getRootNode():获取所有的根节点
+        for (T treeRootNode : getRootNode(list,parentId)) {
+
+            // 将顶级节点进行构建子树
+            treeRootNode = buildChildTree(treeRootNode,list);
+            // 完成一个顶级节点所构建的树形,增加进来
+            treeNodes.add(treeRootNode);
+        }
+        return treeNodes;
+    }
+
+    /**
+     *   获取需构建的所有根节点(顶级节点)
+     *   @return 所有根节点List集合
+     */
+    private static <T extends ITreeNode<T,V>,V> List<T> getRootNode(List<T> nodeList, V parentId){
+        // 保存所有根节点(所有根节点的数据)
+        List<T> rootNodeList = new ArrayList<>();
+        // treeNode:查询出的每一条数据(节点)
+        for (T treeNode : nodeList){
+            if (treeNode.getParentId() == null){
+                treeNode.setParentId(parentId);
+            }
+            // 判断当前节点是否为根节点,此处注意:若parentId类型是String,则要采用equals()方法判断。
+            if (treeNode.getParentId() == parentId) {
+                rootNodeList.add(treeNode);
+            }
+        }
+        return rootNodeList;
+    }
+
+    /**
+     *  递归-----构建子树形结构
+     *  @param  pNode 根节点(顶级节点)
+     *  @return 整棵树
+     */
+    private static <T extends ITreeNode<T,V>,V> T buildChildTree(T pNode,List<T> nodeList){
+        List<T> childTree = new ArrayList<>();
+        // nodeList:所有节点集合(所有数据)
+        for (T treeNode : nodeList) {
+            V parentId = treeNode.getParentId();
+            // 判断当前节点的父节点ID是否等于根节点的ID,即当前节点为其下的子节点
+            if (parentId != null && treeNode.getParentId().equals(pNode.getId())) {
+                // 再递归进行判断当前节点的情况,调用自身方法
+                childTree.add(buildChildTree(treeNode,nodeList));
+            }
+        }
+        // for循环结束,即节点下没有任何节点,树形构建结束,设置树结果
+        pNode.setChildren(childTree);
+        return pNode;
+    }
 }

+ 1 - 1
src/main/java/com/xjrsoft/module/app/service/impl/AppPageDesignServiceImpl.java

@@ -2,7 +2,6 @@ package com.xjrsoft.module.app.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.lang.TypeReference;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.json.JSON;
 import cn.hutool.json.JSONArray;
@@ -11,6 +10,7 @@ import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fasterxml.jackson.core.type.TypeReference;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.YesOrNoEnum;
 import com.xjrsoft.common.exception.MyException;

+ 4 - 21
src/main/java/com/xjrsoft/module/authority/utils/AuthorityUtil.java

@@ -5,31 +5,22 @@ import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.collection.ListUtil;
 import cn.hutool.core.convert.Convert;
-import cn.hutool.core.lang.TypeReference;
 import cn.hutool.core.util.EnumUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.fasterxml.jackson.core.type.TypeReference;
 import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.enums.DataAuthConditionTypeEnum;
-import com.xjrsoft.common.enums.DataAuthFieldTypeEnum;
-import com.xjrsoft.common.enums.DataAuthMethodEnum;
-import com.xjrsoft.common.enums.DataAuthScopeEnum;
-import com.xjrsoft.common.enums.DataAuthTypeEnum;
+import com.xjrsoft.common.enums.*;
 import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.utils.RedisUtil;
 import com.xjrsoft.module.authority.entity.DataAuth;
 import com.xjrsoft.module.authority.entity.DataAuthConfig;
 import com.xjrsoft.module.authority.entity.DataAuthRelation;
 import com.xjrsoft.module.authority.entity.DataAuthTableRelation;
-import com.xjrsoft.module.organization.entity.Department;
-import com.xjrsoft.module.organization.entity.Post;
-import com.xjrsoft.module.organization.entity.User;
-import com.xjrsoft.module.organization.entity.UserDeptRelation;
-import com.xjrsoft.module.organization.entity.UserPostRelation;
-import com.xjrsoft.module.organization.entity.UserRoleRelation;
+import com.xjrsoft.module.organization.entity.*;
 import lombok.SneakyThrows;
 import net.sf.jsqlparser.expression.Expression;
 import net.sf.jsqlparser.expression.LongValue;
@@ -37,15 +28,7 @@ import net.sf.jsqlparser.expression.Parenthesis;
 import net.sf.jsqlparser.expression.StringValue;
 import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
 import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
-import net.sf.jsqlparser.expression.operators.relational.EqualsTo;
-import net.sf.jsqlparser.expression.operators.relational.ExpressionList;
-import net.sf.jsqlparser.expression.operators.relational.GreaterThan;
-import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals;
-import net.sf.jsqlparser.expression.operators.relational.InExpression;
-import net.sf.jsqlparser.expression.operators.relational.LikeExpression;
-import net.sf.jsqlparser.expression.operators.relational.MinorThan;
-import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
-import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo;
+import net.sf.jsqlparser.expression.operators.relational.*;
 import net.sf.jsqlparser.parser.CCJSqlParserUtil;
 import net.sf.jsqlparser.schema.Column;
 

+ 0 - 189
src/main/java/com/xjrsoft/module/demo/controller/DemoController.java

@@ -1,189 +0,0 @@
-package com.xjrsoft.module.demo.controller;
-
-import cn.dev33.satoken.stp.StpUtil;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.lang.TypeReference;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.unfbx.chatgpt.OpenAiClient;
-import com.unfbx.chatgpt.entity.chat.ChatCompletion;
-import com.unfbx.chatgpt.entity.chat.ChatCompletionResponse;
-import com.unfbx.chatgpt.entity.chat.Message;
-import com.xjrsoft.common.annotation.Limit;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.common.page.ConventPage;
-import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.common.utils.RedisUtil;
-import com.xjrsoft.common.utils.VoToColumnUtil;
-import com.xjrsoft.config.ChatGptConfig;
-import com.xjrsoft.module.demo.dto.AddDemoDto;
-import com.xjrsoft.module.demo.dto.DemoListDto;
-import com.xjrsoft.module.demo.dto.DemoPageDto;
-import com.xjrsoft.module.demo.dto.UpdateDemoDto;
-import com.xjrsoft.module.demo.entity.Demo;
-import com.xjrsoft.module.demo.service.IDemoService;
-import com.xjrsoft.module.demo.vo.DemoPageVo;
-import com.xjrsoft.module.demo.vo.DemoVo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @title: DemoController
- * @Author tzx
- * @Date: 2022/4/16 23:25
- * @Version 1.0
- */
-@RestController
-@RequestMapping(GlobalConstant.SYSTEM_MODULE_PREFIX + "/demo")
-@Api(value = GlobalConstant.SYSTEM_MODULE_PREFIX + "/demo", tags = "代码生产案例代码")
-@AllArgsConstructor
-public class DemoController {
-
-    private final IDemoService demoService;
-
-    private final RedisUtil redisUtil;
-
-    private final ChatGptConfig chatGptConfig;
-
-    @GetMapping("/test-chatgpt")
-    public R test(@RequestParam String text) {
-        //代理可以为null
-        Proxy proxy = null;
-        //如果使用代理
-        if (chatGptConfig.getProxyType() > -1) {
-            proxy = new Proxy(chatGptConfig.getProxyType() == 0 ? Proxy.Type.HTTP : Proxy.Type.SOCKS, new InetSocketAddress(chatGptConfig.getProxy(), chatGptConfig.getPort()));
-        }
-
-        OpenAiClient openAiClient = OpenAiClient.builder()
-                .apiKey(chatGptConfig.getApiKey())
-                .proxy(proxy)
-                .build();
-
-        //记录上下文
-        List<String> msgList = redisUtil.get(GlobalConstant.CHATGPT_PREFIX + StpUtil.getLoginIdAsString(), new TypeReference<List<String>>() {
-        });
-
-        if (msgList == null) {
-            msgList = new ArrayList<>();
-        }
-        //将当前的上下文记录下来
-        msgList.add(text);
-
-        //默认十分钟过期 十分钟内一直操作 一直更新  如果10分钟没有操作就会过期
-        redisUtil.set(GlobalConstant.CHATGPT_PREFIX + StpUtil.getLoginIdAsString(), msgList, 10 * 60);
-
-        List<Message> messages = new ArrayList<>();
-        for (String msg : msgList) {
-            Message message = Message.builder().role(Message.Role.USER).content(msg).build();
-            messages.add(message);
-        }
-
-
-        //简单模型
-        //CompletionResponse completions = //openAiClient.completions("我想申请转专业,从计算机专业转到会计学专业,帮我完成一份两百字左右的申请书");
-        //最新GPT-3.5-Turbo模型
-//        Message message = Message.builder().role(Message.Role.USER).content(text).build();
-        ChatCompletion chatCompletion = ChatCompletion.builder().messages(messages).build();
-        ChatCompletionResponse chatCompletionResponse = openAiClient.chatCompletion(chatCompletion);
-        chatCompletionResponse.getChoices().forEach(e -> {
-            System.out.println(e.getMessage());
-        });
-        //生成一个基本的ERP系统客户表结构的JSON格式示例
-        return R.ok(chatCompletionResponse.getChoices().get(0).getMessage().getContent());
-    }
-
-    @GetMapping(value = "/list")
-    @ApiOperation(value = "demo列表(不分页)")
-    public R list(@Valid DemoListDto dto) {
-        LambdaQueryWrapper<Demo> queryWrapper = new LambdaQueryWrapper<>();
-
-        List<Demo> list = demoService.list(Wrappers.lambdaQuery(Demo.class)
-                .like(StrUtil.isNotBlank(dto.getFieldString()), Demo::getFieldString, dto.getFieldString())
-                .eq(ObjectUtil.isNotNull(dto.getFieldInt()), Demo::getFieldInt, dto.getFieldInt())
-                .eq(ObjectUtil.isNotNull(dto.getFieldLong()), Demo::getFieldLong, dto.getFieldLong())
-                .eq(ObjectUtil.isNotNull(dto.getFieldDouble()), Demo::getFieldDouble, dto.getFieldDouble())
-                .between(ObjectUtil.isNotNull(dto.getFieldDatetimeStart()) && ObjectUtil.isNotNull(dto.getFieldDatetimeEnd()), Demo::getFieldDatetime, dto.getFieldDatetimeStart(), dto.getFieldDatetimeEnd())
-                .last(GlobalConstant.ORDER_BY + StringPool.SPACE + dto.getField() + StringPool.SPACE + ConventPage.getOrder(dto.getOrder()))
-                .select(Demo.class, x -> VoToColumnUtil.fieldsToColumns(DemoPageVo.class).contains(x.getProperty())));
-
-        List<DemoPageVo> demoListVos = BeanUtil.copyToList(list, DemoPageVo.class);
-        return R.ok(demoListVos);
-    }
-
-    @GetMapping(value = "/page")
-    @ApiOperation(value = "demo列表(分页)")
-    public R page(@Valid DemoPageDto dto) {
-
-        LambdaQueryWrapper<Demo> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.like(StrUtil.isNotBlank(dto.getFieldString()), Demo::getFieldString, dto.getFieldString())
-                .eq(ObjectUtil.isNotNull(dto.getFieldInt()), Demo::getFieldInt, dto.getFieldInt())
-                .eq(ObjectUtil.isNotNull(dto.getFieldLong()), Demo::getFieldLong, dto.getFieldLong())
-                .eq(ObjectUtil.isNotNull(dto.getFieldDouble()), Demo::getFieldDouble, dto.getFieldDouble())
-                .between(ObjectUtil.isNotNull(dto.getFieldDatetimeStart()) && ObjectUtil.isNotNull(dto.getFieldDatetimeEnd()), Demo::getFieldDatetime, dto.getFieldDatetimeStart(), dto.getFieldDatetimeEnd())
-                .select(Demo.class, x -> VoToColumnUtil.fieldsToColumns(DemoPageVo.class).contains(x.getProperty()));
-        IPage<Demo> page = demoService.page(ConventPage.getPage(dto), queryWrapper);
-        PageOutput<DemoPageVo> pageOutput = ConventPage.getPageOutput(page, DemoPageVo.class);
-        return R.ok(pageOutput);
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询demo信息")
-    public R info(@RequestParam Long id) {
-        Demo demo = demoService.getById(id);
-        if (demo == null) {
-            return R.error("找不到此数据!");
-        }
-        return R.ok(BeanUtil.toBean(demo, DemoVo.class));
-    }
-
-    @PostMapping
-    @ApiOperation(value = "新增demo")
-    public R add(@Valid @RequestBody AddDemoDto dto) {
-        Demo demo = BeanUtil.toBean(dto, Demo.class);
-        return R.ok(demoService.save(demo));
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改demo")
-    public R update(@Valid @RequestBody UpdateDemoDto dto) {
-
-        Demo demo = BeanUtil.toBean(dto, Demo.class);
-
-        return R.ok(demoService.updateById(demo));
-    }
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    public R delete(@Valid @RequestBody List<Long> ids) {
-        return R.ok(demoService.removeBatchByIds(ids));
-    }
-
-
-    @GetMapping(value = "/test")
-    @ApiOperation(value = "cccccc")
-    @Limit(key = "cachingTest", count = 5, time = 2, msg = "当前排队人数较多,请稍后再试!")
-    public R test() throws InterruptedException {
-        System.out.println("xxxxxxxxxxxxxxxxx");
-        return R.ok();
-    }
-}

+ 0 - 113
src/main/java/com/xjrsoft/module/demo/controller/MultiController.java

@@ -1,113 +0,0 @@
-package com.xjrsoft.module.demo.controller;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.common.page.ConventPage;
-import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.common.utils.VoToColumnUtil;
-import com.xjrsoft.module.demo.dto.AddMultiDto;
-import com.xjrsoft.module.demo.dto.MultiListDto;
-import com.xjrsoft.module.demo.dto.MultiPageDto;
-import com.xjrsoft.module.demo.dto.UpdateMultiDto;
-import com.xjrsoft.module.demo.entity.Multi;
-import com.xjrsoft.module.demo.service.IMultiService;
-import com.xjrsoft.module.demo.vo.MultiPageVo;
-import com.xjrsoft.module.demo.vo.MultiVo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:48
- */
-
-@RestController
-@RequestMapping(GlobalConstant.SYSTEM_MODULE_PREFIX + "/multi")
-@Api(value = GlobalConstant.SYSTEM_MODULE_PREFIX + "/multi",tags = "代码生产案例(多表)代码")
-@AllArgsConstructor
-public class MultiController {
-
-    private final IMultiService multiService;
-
-    @GetMapping(value = "/list")
-    @ApiOperation(value="Multi列表(不分页)")
-    public R list(@Valid MultiListDto dto){
-        List<Multi> list = multiService.listDeep(Wrappers.lambdaQuery(Multi.class)
-                .like(StrUtil.isNotBlank(dto.getFieldString()),Multi::getFieldString,dto.getFieldString())
-                .eq(ObjectUtil.isNotNull(dto.getFieldInt()),Multi::getFieldInt,dto.getFieldInt())
-                .eq(ObjectUtil.isNotNull(dto.getFieldLong()),Multi::getFieldLong,dto.getFieldLong())
-                .eq(ObjectUtil.isNotNull(dto.getFieldDouble()),Multi::getFieldDouble,dto.getFieldDouble())
-                .between(ObjectUtil.isNotNull(dto.getFieldDatetimeStart()) && ObjectUtil.isNotNull(dto.getFieldDatetimeEnd()),Multi::getFieldDatetime,dto.getFieldDatetimeStart(),dto.getFieldDatetimeEnd())
-                .select(Multi.class, x -> VoToColumnUtil.fieldsToColumns(MultiPageVo.class).contains(x.getProperty())));
-
-        List<MultiPageVo> multiListVos = BeanUtil.copyToList(list, MultiPageVo.class);
-        return R.ok(multiListVos);
-    }
-
-    @GetMapping(value = "/page")
-    @ApiOperation(value="Multi列表(分页)")
-    public R page(@Valid MultiPageDto dto){
-
-        LambdaQueryWrapper<Multi> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.like(StrUtil.isNotBlank(dto.getFieldString()),Multi::getFieldString,dto.getFieldString())
-                .eq(ObjectUtil.isNotNull(dto.getFieldInt()),Multi::getFieldInt,dto.getFieldInt())
-                .eq(ObjectUtil.isNotNull(dto.getFieldLong()),Multi::getFieldLong,dto.getFieldLong())
-                .eq(ObjectUtil.isNotNull(dto.getFieldDouble()),Multi::getFieldDouble,dto.getFieldDouble())
-                .between(ObjectUtil.isNotNull(dto.getFieldDatetimeStart()) && ObjectUtil.isNotNull(dto.getFieldDatetimeEnd()),Multi::getFieldDatetime,dto.getFieldDatetimeStart(),dto.getFieldDatetimeEnd())
-                .select(Multi.class,x -> VoToColumnUtil.fieldsToColumns(MultiPageVo.class).contains(x.getProperty()));
-        IPage<Multi> page = multiService.pageDeep(ConventPage.getPage(dto), queryWrapper);
-        PageOutput<MultiPageVo> pageOutput = ConventPage.getPageOutput(page, MultiPageVo.class);
-        return R.ok(pageOutput);
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value="根据id查询multi信息")
-    public R info(@RequestParam Long id){
-        Multi multi = multiService.getByIdDeep(id);
-        if (multi == null) {
-            return R.error("找不到此数据!");
-        }
-        return R.ok(BeanUtil.toBean(multi, MultiVo.class));
-    }
-
-    @PostMapping
-    @ApiOperation(value = "新增multi")
-    public R add(@Valid @RequestBody AddMultiDto dto){
-        Multi multi = BeanUtil.toBean(dto, Multi.class);
-        return R.ok(multiService.add(multi));
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改multi")
-    public R update(@Valid @RequestBody UpdateMultiDto dto){
-
-        Multi multi = BeanUtil.toBean(dto, Multi.class);
-        return R.ok(multiService.update(multi));
-    }
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    public R delete(@Valid @RequestBody List<Long> ids){
-        return R.ok(multiService.delete(ids));
-    }
-
-
-}

+ 0 - 37
src/main/java/com/xjrsoft/module/demo/dto/AddDemoDto.java

@@ -1,37 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @title: AddDemoDto
- * @Author tzx
- * @Date: 2022/4/17 0:08
- * @Version 1.0
- */
-@Data
-public class AddDemoDto {
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-}

+ 0 - 36
src/main/java/com/xjrsoft/module/demo/dto/AddMultiChildDto.java

@@ -1,36 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:54
- */
-@Data
-public class AddMultiChildDto {
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-
-}

+ 0 - 39
src/main/java/com/xjrsoft/module/demo/dto/AddMultiDto.java

@@ -1,39 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:53
- */
-@Data
-public class AddMultiDto {
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-
-    @ApiModelProperty("multi子表入参")
-    private List<AddMultiChildDto> childList;
-}

+ 0 - 14
src/main/java/com/xjrsoft/module/demo/dto/ChainPageDto.java

@@ -1,14 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import com.xjrsoft.common.page.PageInput;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * @Author: tzx
- * @Date: 2023/4/6 15:32
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ChainPageDto extends PageInput {
-}

+ 0 - 36
src/main/java/com/xjrsoft/module/demo/dto/DemoListDto.java

@@ -1,36 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import com.xjrsoft.common.page.ListInput;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/20 10:52
- */
-@Data
-public class DemoListDto extends ListInput {
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("开始时间")
-    private LocalDateTime fieldDatetimeStart;
-
-    @ApiModelProperty("结束时间")
-    private LocalDateTime fieldDatetimeEnd;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-}

+ 0 - 43
src/main/java/com/xjrsoft/module/demo/dto/DemoPageDto.java

@@ -1,43 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import com.xjrsoft.common.page.PageInput;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-/**
- * @title: DemoPageDto
- * @Author tzx
- * @Date: 2022/4/16 23:26
- * @Version 1.0
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class DemoPageDto extends PageInput {
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("开始时间")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private LocalDateTime fieldDatetimeStart;
-
-    @ApiModelProperty("结束时间")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private LocalDateTime fieldDatetimeEnd;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 34
src/main/java/com/xjrsoft/module/demo/dto/MultiListDto.java

@@ -1,34 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:50
- */
-@Data
-public class MultiListDto {
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("开始时间")
-    private LocalDateTime fieldDatetimeStart;
-
-    @ApiModelProperty("结束时间")
-    private LocalDateTime fieldDatetimeEnd;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 37
src/main/java/com/xjrsoft/module/demo/dto/MultiPageDto.java

@@ -1,37 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import com.xjrsoft.common.page.PageInput;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.time.LocalDateTime;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:50
- */
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class MultiPageDto extends PageInput {
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("开始时间")
-    private LocalDateTime fieldDatetimeStart;
-
-    @ApiModelProperty("结束时间")
-    private LocalDateTime fieldDatetimeEnd;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 39
src/main/java/com/xjrsoft/module/demo/dto/UpdateDemoDto.java

@@ -1,39 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @title: UpdateDemoDto
- * @Author tzx
- * @Date: 2022/4/17 0:10
- * @Version 1.0
- */
-@Data
-public class UpdateDemoDto {
-
-    private Long id;
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-}

+ 0 - 42
src/main/java/com/xjrsoft/module/demo/dto/UpdateMultiDto.java

@@ -1,42 +0,0 @@
-package com.xjrsoft.module.demo.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:55
- */
-@Data
-public class UpdateMultiDto {
-
-    @ApiModelProperty("id")
-    private String id;
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-
-    @ApiModelProperty("multi子表入参")
-    private List<AddMultiChildDto> childList;
-}

+ 0 - 65
src/main/java/com/xjrsoft/module/demo/entity/Demo.java

@@ -1,65 +0,0 @@
-package com.xjrsoft.module.demo.entity;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @title: Demo
- * @Author tzx
- * @Date: 2022/4/16 23:33
- * @Version 1.0
- */
-@Data
-@TableName("xjr_demo")
-@ApiModel(value = "demo对象", description = "")
-public class Demo {
-
-    private Long id;
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-
-    @TableField(fill = FieldFill.INSERT)
-    private Long createUserId;
-
-    @TableField(fill = FieldFill.INSERT)
-    private LocalDateTime createDate;
-
-    @TableField(fill = FieldFill.UPDATE)
-    private Long modifyUserId;
-
-    @TableField(fill = FieldFill.UPDATE)
-    private LocalDateTime modifyDate;
-
-    @TableLogic
-    @TableField(fill = FieldFill.INSERT)
-    private Integer deleteMark;
-
-    @TableField(fill = FieldFill.INSERT)
-    private Integer enabledMark;
-}

+ 0 - 52
src/main/java/com/xjrsoft/module/demo/entity/Multi.java

@@ -1,52 +0,0 @@
-package com.xjrsoft.module.demo.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.github.yulichang.annotation.EntityMapping;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:57
- */
-@Data
-@TableName("xjr_multi")
-@ApiModel(value = "multi对象", description = "")
-public class Multi {
-
-    @ApiModelProperty(value = "id")
-    private Long id;
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-
-    /**
-     * 查询下级 一对多
-     */
-    @TableField(exist = false)
-    @EntityMapping(thisField = "id", joinField = "parentId")
-    private List<MultiChild> childList;
-}

+ 0 - 44
src/main/java/com/xjrsoft/module/demo/entity/MultiChild.java

@@ -1,44 +0,0 @@
-package com.xjrsoft.module.demo.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 14:58
- */
-@Data
-@TableName("xjr_multi_child")
-@ApiModel(value = "multi_child对象", description = "")
-public class MultiChild {
-    @ApiModelProperty(value = "id")
-    private Long id;
-
-    @ApiModelProperty("字符串")
-    private Long parentId;
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("排序")
-    private Integer sortCode;
-}

+ 0 - 17
src/main/java/com/xjrsoft/module/demo/mapper/DemoMapper.java

@@ -1,17 +0,0 @@
-package com.xjrsoft.module.demo.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xjrsoft.common.annotation.DataPermission;
-import com.xjrsoft.module.demo.entity.Demo;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @title: DemoMapper
- * @Author tzx
- * @Date: 2022/4/16 23:31
- * @Version 1.0
- */
-@Mapper
-@DataPermission
-public interface DemoMapper extends BaseMapper<Demo> {
-}

+ 0 - 13
src/main/java/com/xjrsoft/module/demo/mapper/MultiChildMapper.java

@@ -1,13 +0,0 @@
-package com.xjrsoft.module.demo.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.xjrsoft.module.demo.entity.MultiChild;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 15:24
- */
-@Mapper
-public interface MultiChildMapper extends MPJBaseMapper<MultiChild> {
-}

+ 0 - 15
src/main/java/com/xjrsoft/module/demo/mapper/MultiMapper.java

@@ -1,15 +0,0 @@
-package com.xjrsoft.module.demo.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.xjrsoft.module.demo.entity.Multi;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @title: DemoMapper
- * @Author tzx
- * @Date: 2022/4/16 23:31
- * @Version 1.0
- */
-@Mapper
-public interface MultiMapper extends MPJBaseMapper<Multi> {
-}

+ 0 - 14
src/main/java/com/xjrsoft/module/demo/service/IDemoService.java

@@ -1,14 +0,0 @@
-package com.xjrsoft.module.demo.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xjrsoft.module.demo.entity.Demo;
-
-/**
- * @title: IDemoService
- * @Author tzx
- * @Date: 2022/4/16 23:28
- * @Version 1.0
- */
-
-public interface IDemoService extends IService<Demo> {
-}

+ 0 - 40
src/main/java/com/xjrsoft/module/demo/service/IMultiService.java

@@ -1,40 +0,0 @@
-package com.xjrsoft.module.demo.service;
-
-import com.github.yulichang.base.MPJBaseService;
-import com.xjrsoft.module.demo.entity.Multi;
-
-import java.util.List;
-
-/**
- * @title: IDemoService
- * @Author tzx
- * @Date: 2022/4/16 23:28
- * @Version 1.0
- */
-
-public interface IMultiService extends MPJBaseService<Multi> {
-    /**
-     * 新增
-     *
-     * @param multi
-     * @return
-     */
-    Boolean add(Multi multi);
-
-    /**
-     * 更新
-     *
-     * @param multi
-     * @return
-     */
-    Boolean update(Multi multi);
-
-    /**
-     * 删除
-     *
-     * @param ids
-     * @return
-     */
-    Boolean delete(List<Long> ids);
-
-}

+ 0 - 17
src/main/java/com/xjrsoft/module/demo/service/impl/DemoServiceImpl.java

@@ -1,17 +0,0 @@
-package com.xjrsoft.module.demo.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xjrsoft.module.demo.entity.Demo;
-import com.xjrsoft.module.demo.mapper.DemoMapper;
-import com.xjrsoft.module.demo.service.IDemoService;
-import org.springframework.stereotype.Service;
-
-/**
- * @title: DemoServiceImpl
- * @Author tzx
- * @Date: 2022/4/16 23:28
- * @Version 1.0
- */
-@Service
-public class DemoServiceImpl extends ServiceImpl<DemoMapper, Demo> implements IDemoService {
-}

+ 0 - 58
src/main/java/com/xjrsoft/module/demo/service/impl/MultiServiceImpl.java

@@ -1,58 +0,0 @@
-package com.xjrsoft.module.demo.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.xjrsoft.module.demo.entity.Multi;
-import com.xjrsoft.module.demo.entity.MultiChild;
-import com.xjrsoft.module.demo.mapper.MultiChildMapper;
-import com.xjrsoft.module.demo.mapper.MultiMapper;
-import com.xjrsoft.module.demo.service.IMultiService;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * @title: DemoServiceImpl
- * @Author tzx
- * @Date: 2022/4/16 23:28
- * @Version 1.0
- */
-@Service
-@AllArgsConstructor
-public class MultiServiceImpl extends MPJBaseServiceImpl<MultiMapper, Multi> implements IMultiService {
-
-    private final MultiMapper multiMapper;
-
-    private final MultiChildMapper multiChildMapper;
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Boolean add(Multi multi) {
-        multiMapper.insert(multi);
-        for (MultiChild multiChild : multi.getChildList()) {
-            multiChildMapper.insert(multiChild);
-        }
-        return true;
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public Boolean update(Multi multi) {
-        multiMapper.updateById(multi);
-        multiChildMapper.deleteBatchIds(multi.getChildList().stream().map(MultiChild::getId).collect(Collectors.toList()));
-        for (MultiChild multiChild : multi.getChildList()) {
-            multiChildMapper.insert(multiChild);
-        }
-        return true;
-    }
-
-    @Override
-    public Boolean delete(List<Long> ids) {
-        multiMapper.deleteBatchIds(ids);
-        multiChildMapper.delete(Wrappers.lambdaQuery(MultiChild.class).in(MultiChild::getParentId, ids));
-        return true;
-    }
-}

+ 0 - 44
src/main/java/com/xjrsoft/module/demo/vo/DemoPageVo.java

@@ -1,44 +0,0 @@
-package com.xjrsoft.module.demo.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.xjrsoft.common.annotation.Trans;
-import com.xjrsoft.common.enums.TransType;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @title: DemoPageVo
- * @Author tzx
- * @Date: 2022/4/16 23:27
- * @Version 1.0
- */
-@Data
-public class DemoPageVo {
-
-    private String id;
-
-    @ApiModelProperty("字符串")
-    @Trans(type = TransType.DIC)
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    @Trans(type = TransType.DIC)
-    private String remark;
-
-
-}

+ 0 - 38
src/main/java/com/xjrsoft/module/demo/vo/DemoVo.java

@@ -1,38 +0,0 @@
-package com.xjrsoft.module.demo.vo;
-
-import com.xjrsoft.common.annotation.Trans;
-import com.xjrsoft.common.enums.TransType;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @title: DemoVo
- * @Author tzx
- * @Date: 2022/4/17 0:10
- * @Version 1.0
- */
-@Data
-public class DemoVo {
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    @Trans(type = TransType.DIC)
-    private String remark;
-
-}

+ 0 - 38
src/main/java/com/xjrsoft/module/demo/vo/MultiPageVo.java

@@ -1,38 +0,0 @@
-package com.xjrsoft.module.demo.vo;
-
-import com.xjrsoft.module.demo.entity.MultiChild;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 15:03
- */
-@Data
-public class MultiPageVo {
-    private String id;
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("multi子表")
-    private List<MultiChild> childList;
-}

+ 0 - 38
src/main/java/com/xjrsoft/module/demo/vo/MultiVo.java

@@ -1,38 +0,0 @@
-package com.xjrsoft.module.demo.vo;
-
-import com.xjrsoft.module.demo.entity.MultiChild;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @Author: tzx
- * @Date: 2022/4/26 15:03
- */
-@Data
-public class MultiVo {
-
-    @ApiModelProperty("字符串")
-    private String fieldString;
-
-    @ApiModelProperty("整型")
-    private String fieldInt;
-
-    @ApiModelProperty("时间")
-    private LocalDateTime fieldDatetime;
-
-    @ApiModelProperty("浮点")
-    private Double fieldDouble;
-
-    @ApiModelProperty("长整型")
-    private Long fieldLong;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-
-    @ApiModelProperty("multi子表")
-    private List<MultiChild> childList;
-}

+ 0 - 302
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/controller/CaseErpBomController.java

@@ -1,302 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.controller;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.support.ExcelTypeEnum;
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.yulichang.toolkit.MPJWrappers;
-import com.xjrsoft.common.annotation.XjrLog;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.common.utils.TreeUtil;
-import com.xjrsoft.common.utils.VoToColumnUtil;
-import com.xjrsoft.module.erpModel.caseErpBom.dto.AddCaseErpBomDto;
-import com.xjrsoft.module.erpModel.caseErpBom.dto.ImportCaseErpBomDto;
-import com.xjrsoft.module.erpModel.caseErpBom.dto.ImportCaseErpBomVo;
-import com.xjrsoft.module.erpModel.caseErpBom.dto.UpdateCaseErpBomDto;
-import com.xjrsoft.module.erpModel.caseErpBom.entity.CaseErpBom;
-import com.xjrsoft.module.erpModel.caseErpBom.service.ICaseErpBomService;
-import com.xjrsoft.module.erpModel.caseErpBom.vo.CaseErpBomExportVo;
-import com.xjrsoft.module.erpModel.caseErpBom.vo.CaseErpBomTreeVo;
-import com.xjrsoft.module.erpModel.caseErpBom.vo.CaseErpBomVo;
-import com.xjrsoft.module.erpModel.caseErpMaterial.entity.CaseErpMaterial;
-import com.xjrsoft.module.erpModel.caseErpMaterial.service.ICaseErpMaterialService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import lombok.SneakyThrows;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.validation.Valid;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * BOM信息【case_erp_bom】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-06-19
- */
-@RestController
-@RequestMapping(GlobalConstant.CASE_ERP_BOM +"/caseErpBom")
-@Api(value = GlobalConstant.CASE_ERP_BOM +"/caseErpBom", tags = "BOM信息")
-@AllArgsConstructor
-public class CaseErpBomController {
-    private ICaseErpBomService caseErpBomService;
-
-    private ICaseErpMaterialService caseErpMaterialService;
-
-    @GetMapping(value = "/tree")
-    @ApiOperation(value = "Bom信息树")
-    @XjrLog(value = "Bom信息 所有数据")
-    public R tree() {
-        List<CaseErpBom> list = caseErpBomService.list(Wrappers.<CaseErpBom>lambdaQuery()
-                        .orderByDesc(CaseErpBom::getCreateDate)
-                .select(CaseErpBom.class, x -> VoToColumnUtil.fieldsToColumns(CaseErpBomTreeVo.class).contains(x.getProperty())));
-        List<CaseErpBomTreeVo> voList = BeanUtil.copyToList(list, CaseErpBomTreeVo.class);
-        List<CaseErpBomTreeVo> treeVoList = TreeUtil.build(voList);
-        return R.ok(treeVoList);
-    }
-
-    @GetMapping("/verification")
-    @ApiOperation(value = "系统验证")
-    public R verification(@RequestParam Long id){
-        List<CaseErpBom> list = caseErpBomService.list();
-        List<Long> ids = list.stream().map(o -> o.getMaterialId()).collect(Collectors.toList());
-        if(ids.contains(id)){
-            return R.error("该物料已进行过bom配置不能再次配置");
-        }else {
-            return R.ok();
-        }
-    }
-
-    @PostMapping
-    @ApiOperation(value = "新增BOM物料")
-    public R add(@RequestBody AddCaseErpBomDto dto){
-        List<CaseErpBom> list = caseErpBomService.list();
-        List<CaseErpMaterial> caseErpMaterialList = caseErpMaterialService.list();
-        CaseErpBom copy = BeanUtil.toBean(dto, CaseErpBom.class);
-        if(ObjectUtil.isNotEmpty(dto.getParentId()) && dto.getParentId()!= 0L){
-            CaseErpBom caseErpBom = list.stream().filter(x -> x.getId().equals(dto.getParentId())).findFirst().orElse(new CaseErpBom());
-            if (StrUtil.isNotBlank(caseErpBom.getBomLevel())){
-                List<Long> ids = StrUtil.split(caseErpBom.getBomLevel().toString(), StringPool.DASH)
-                        .stream().map(str -> Long.valueOf(str)).collect(Collectors.toList());
-                if (CollectionUtil.isNotEmpty(ids)){
-                    List<Long> materialIds = list.stream().filter(x -> ids.contains(x.getId())).map(CaseErpBom::getMaterialId).collect(Collectors.toList());
-                    if(materialIds.contains(dto.getMaterialId())){
-                        return R.error("不允许添加包括该子物料在内和所有直系的上级物料");
-                    }
-                }
-            }
-        }
-        else {
-            copy.setCount(new BigDecimal("1"));
-            copy.setParentId(0L);
-        }
-        if (StrUtil.isNotBlank(copy.getCode())){
-            CaseErpMaterial caseErpMaterial = caseErpMaterialList.stream().filter(x -> x.getCode().equals(copy.getCode())).findFirst().orElse(new CaseErpMaterial());
-            if (ObjectUtil.isNotEmpty(caseErpMaterial.getId())){
-                copy.setMaterialId(caseErpMaterial.getId());
-            }else {
-                R.error("此物料不存在");
-            }
-        }
-        caseErpBomService.save(copy);
-        //保存层级
-        if (ObjectUtil.isNotEmpty(dto.getParentId())&& dto.getParentId()!= 0L){
-            CaseErpBom caseErpBom = list.stream().filter(x -> x.getId().equals(dto.getParentId())).findFirst().orElse(new CaseErpBom());
-            copy.setBomLevel(caseErpBom.getBomLevel()+ StringPool.DASH + copy.getId());
-        }else {
-            copy.setBomLevel(copy.getId().toString());
-        }
-        caseErpBomService.updateById(copy);
-        return R.ok();
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询物料信息(当前以及子级信息)")
-    public R info(@RequestParam(required = false) Long id) {
-        if (ObjectUtil.isNotEmpty(id)){
-            CaseErpBomVo caseErpBomVo = caseErpBomService.selectJoinOne(CaseErpBomVo.class,
-                    MPJWrappers.<CaseErpBom>lambdaJoin()
-                            .distinct()
-                            .eq(CaseErpBom::getId,id)
-                            .select(CaseErpBom::getId)
-                            .select(CaseErpBom.class, x -> VoToColumnUtil.fieldsToColumns(CaseErpBomVo.class).contains(x.getProperty())));
-            //子级物料信息
-            List<Long> childIds = caseErpBomService.list().stream().filter(x -> StrUtil.isNotBlank(x.getBomLevel())
-                    && x.getBomLevel().contains(id + StringPool.DASH)).map(CaseErpBom::getId).collect(Collectors.toList());
-            if (CollectionUtil.isNotEmpty(childIds)){
-                List<CaseErpBomVo> caseErpBomVoList = caseErpBomService.selectJoinList(CaseErpBomVo.class,
-                        MPJWrappers.<CaseErpBom>lambdaJoin()
-                                .distinct()
-                                .in(CaseErpBom::getId, childIds)
-                                .select(CaseErpBom::getId)
-                                .select(CaseErpBom.class, x -> VoToColumnUtil.fieldsToColumns(CaseErpBomVo.class).contains(x.getProperty())));
-                if (CollectionUtil.isNotEmpty(caseErpBomVoList)){
-                    caseErpBomVo.setChildList(caseErpBomVoList);
-                }
-            }
-            CaseErpBomVo arr[];
-            arr = new CaseErpBomVo[1];
-            arr[0] = caseErpBomVo;
-            return R.ok(arr);
-        }else {
-            return R.ok();
-        }
-
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改Bom信息")
-    public R update(@Valid @RequestBody UpdateCaseErpBomDto dto) {
-        List<CaseErpBom> list = caseErpBomService.list();
-        if(ObjectUtil.isNotEmpty(dto.getParentId())){
-            CaseErpBom caseErpBom = list.stream().filter(x -> x.getId().equals(dto.getParentId())).findFirst().orElse(new CaseErpBom());
-            if (StrUtil.isNotBlank(caseErpBom.getBomLevel())){
-                //上级bom信息
-                List<Long> ids = StrUtil.split(caseErpBom.getBomLevel().toString(), StringPool.DASH)
-                        .stream().map(str -> Long.valueOf(str)).collect(Collectors.toList());
-                if (CollectionUtil.isNotEmpty(ids)){
-                    List<Long> materialIds = list.stream().filter(x -> ids.contains(x.getId())).map(CaseErpBom::getMaterialId).collect(Collectors.toList());
-                    if(materialIds.contains(dto.getMaterialId())){
-                        return R.error("不允许修改包括该子物料在内和所有直系的上级物料");
-                    }
-                }
-                //下级bom信息
-                List<Long> childIds = list.stream().filter(x -> StrUtil.isNotBlank(x.getBomLevel())
-                        && x.getBomLevel().contains(caseErpBom.getId() + StringPool.DASH)).map(CaseErpBom::getId).collect(Collectors.toList());
-                if (CollectionUtil.isNotEmpty(childIds)){
-                    List<Long> materialIds = list.stream().filter(x -> childIds.contains(x.getId())).map(CaseErpBom::getMaterialId).collect(Collectors.toList());
-                    if(materialIds.contains(dto.getMaterialId())){
-                        return R.error("不允许修改成为:该级别物料子物料在内和所有直系的下级物料");
-                    }
-                }
-            }
-        }
-        CaseErpBom copy = BeanUtil.toBean(dto, CaseErpBom.class);
-        List<CaseErpMaterial> caseErpMaterialList = caseErpMaterialService.list();
-        if (StrUtil.isNotBlank(copy.getCode())){
-            CaseErpMaterial caseErpMaterial = caseErpMaterialList.stream().filter(x -> x.getCode().equals(copy.getCode())).findFirst().orElse(new CaseErpMaterial());
-            if (ObjectUtil.isNotEmpty(caseErpMaterial.getId())){
-                copy.setMaterialId(caseErpMaterial.getId());
-            }else {
-                R.error("此物料不存在");
-            }
-        }
-        caseErpBomService.updateById(copy);
-        return R.ok(true);
-    }
-
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    @XjrLog(value = "删除bom信息")
-    public R delete(@Valid @RequestBody Long id) {
-        List<CaseErpBom> list = caseErpBomService.list();
-        CaseErpBom caseErpBom = list.stream().filter(x -> x.getId().equals(id)).findFirst().orElse(new CaseErpBom());
-        if (ObjectUtil.isNotEmpty(caseErpBom)){
-            //下级物料信息
-            List<Long> childIds = list.stream().filter(x -> StrUtil.isNotBlank(x.getBomLevel())
-                    && x.getBomLevel().contains(caseErpBom.getId() + StringPool.DASH)).map(CaseErpBom::getId).collect(Collectors.toList());
-            if (CollectionUtil.isNotEmpty(childIds)){
-                return R.error("存在下级物料信息,不允许删除");
-            }
-            else {
-                caseErpBomService.removeById(id);
-            }
-        }
-        return R.ok();
-    }
-
-    @PostMapping(value = "/export")
-    @ApiOperation(value = "导出")
-    @XjrLog(value = "导出Bom信息")
-    public ResponseEntity<byte[]> exportAll() {
-        List<CaseErpBomExportVo> caseErpBomVoList = caseErpBomService.selectJoinList(CaseErpBomExportVo.class,
-                MPJWrappers.<CaseErpBom>lambdaJoin()
-                        .distinct()
-                        .select(CaseErpBom::getId)
-                        .select(CaseErpBom.class, x -> VoToColumnUtil.fieldsToColumns(CaseErpBomExportVo.class).contains(x.getProperty())));
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-
-        EasyExcel.write(bot, CaseErpBomExportVo.class).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(caseErpBomVoList);
-        return R.fileStream(bot.toByteArray(), "产品Bom信息" + ExcelTypeEnum.XLSX.getValue());
-    }
-
-    @PostMapping("/import")
-    @ApiOperation(value = "导入")
-    public R importData(@RequestParam MultipartFile file) throws IOException {
-        List<ImportCaseErpBomVo> voList = EasyExcel.read(file.getInputStream()).head(ImportCaseErpBomVo.class).sheet().doReadSync();
-        List<ImportCaseErpBomDto> importCaseErpBomDtoList = BeanUtil.copyToList(voList, ImportCaseErpBomDto.class);
-        List<CaseErpMaterial> caseErpMaterialList = caseErpMaterialService.list();
-        List<CaseErpBom> list = caseErpBomService.list();
-        List<AddCaseErpBomDto> addCaseErpBomDtoList = new ArrayList<>();
-        for (ImportCaseErpBomDto importCaseErpBomDto : importCaseErpBomDtoList) {
-            if (StrUtil.isBlank(importCaseErpBomDto.getParentName())){
-                importCaseErpBomDto.setParentId(0L);
-            }else {
-                CaseErpBom caseErpBom = list.stream().filter(x -> x.getName().equals(importCaseErpBomDto.getParentName())).findFirst().orElse(new CaseErpBom());
-                if (ObjectUtil.isNotEmpty(caseErpBom.getId())){
-                    importCaseErpBomDto.setParentId(caseErpBom.getId());
-                }else {
-                    importCaseErpBomDto.setParentId(0L);
-                    return R.error("父级名称填写错误");
-                }
-            }
-            AddCaseErpBomDto addCaseErpBomDto = BeanUtil.toBean(importCaseErpBomDto, AddCaseErpBomDto.class);
-            if (StrUtil.isNotBlank(importCaseErpBomDto.getCode())){
-                CaseErpMaterial caseErpMaterial = caseErpMaterialList.stream().filter(x -> x.getCode().equals(importCaseErpBomDto.getCode())).findFirst().orElse(new CaseErpMaterial());
-                if (ObjectUtil.isNotEmpty(caseErpMaterial.getId())){
-                    addCaseErpBomDto.setMaterialId(caseErpMaterial.getId());
-                }else {
-                    return R.error("此物料不存在");
-                }
-            }
-            addCaseErpBomDtoList.add(addCaseErpBomDto);
-        }
-        List<CaseErpBom> caseErpBomList =  BeanUtil.copyToList(addCaseErpBomDtoList, CaseErpBom.class);
-        caseErpBomService.saveBatch(caseErpBomList);
-        for (CaseErpBom caseErpBom : caseErpBomList) {
-            //保存层级
-            if (ObjectUtil.isNotEmpty(caseErpBom.getParentId())&& caseErpBom.getParentId()!= 0L){
-                CaseErpBom caseErpBom1 = list.stream().filter(x -> x.getId().equals(caseErpBom.getParentId())).findFirst().orElse(new CaseErpBom());
-                caseErpBom.setBomLevel(caseErpBom1.getBomLevel()+ StringPool.DASH + caseErpBom.getId());
-            }else {
-                caseErpBom.setBomLevel(caseErpBom.getId().toString());
-            }
-        }
-        caseErpBomService.updateBatchById(caseErpBomList);
-        return R.ok(true);
-    }
-
-    @GetMapping("/export")
-    @ApiOperation(value = "下载模板")
-    @SneakyThrows
-    public ResponseEntity<byte[]> export() {
-        List<ImportCaseErpBomVo> caseErpBomVoList = new ArrayList<>();
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, ImportCaseErpBomVo.class).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(BeanUtil.copyToList(caseErpBomVoList, ImportCaseErpBomVo.class));
-        return R.fileStream(bot.toByteArray(), "产品Bom信息模板" + ExcelTypeEnum.XLSX.getValue());
-    }
-
-}

+ 0 - 51
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/AddCaseErpBomDto.java

@@ -1,51 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.dto;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-@Data
-public class AddCaseErpBomDto implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("父级id")
-    @ExcelProperty("父级id")
-    private Long parentId;
-
-    @ApiModelProperty("物料外键id")
-    @ExcelProperty("物料外键id")
-    private Long materialId;
-
-    @ApiModelProperty("物料编码")
-    @ExcelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    @ExcelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    @ExcelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    @ExcelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    @ExcelProperty("物料类别名称")
-    private String  typeName;
-
-    @ApiModelProperty("物料属性名称")
-    @ExcelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    @ExcelProperty("子级物料数量")
-    private BigDecimal count;
-
-}

+ 0 - 48
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/ImportCaseErpBomDto.java

@@ -1,48 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.dto;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-@Data
-public class ImportCaseErpBomDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("父级id")
-    private Long parentId;
-
-    @ApiModelProperty("父级名称")
-    @ExcelProperty("父级名称")
-    private String parentName;
-
-    @ApiModelProperty("物料编码")
-    @ExcelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    @ExcelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    @ExcelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    @ExcelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    @ExcelProperty("物料类别名称")
-    private String  typeName;
-
-    @ApiModelProperty("物料属性名称")
-    @ExcelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    @ExcelProperty("数量")
-    private BigDecimal count;
-}

+ 0 - 44
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/ImportCaseErpBomVo.java

@@ -1,44 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.dto;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-@Data
-public class ImportCaseErpBomVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-    @ApiModelProperty("父级名称")
-    @ExcelProperty("父级名称")
-    private String parentName;
-
-    @ApiModelProperty("物料编码")
-    @ExcelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    @ExcelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    @ExcelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    @ExcelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    @ExcelProperty("物料类别名称")
-    private String  typeName;
-
-    @ApiModelProperty("物料属性名称")
-    @ExcelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    @ExcelProperty("数量")
-    private BigDecimal count;
-}

+ 0 - 50
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/dto/UpdateCaseErpBomDto.java

@@ -1,50 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.dto;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-@Data
-public class UpdateCaseErpBomDto implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    @ApiModelProperty("父级id")
-    private Long parentId;
-
-    @ApiModelProperty("层级")
-    @JsonProperty("level")
-    private String bomLevel;
-
-    @ApiModelProperty("物料外键id")
-    private Long materialId;
-
-    @ApiModelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    private String  typeName;
-
-    @ApiModelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    private BigDecimal count;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-}

+ 0 - 69
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/entity/CaseErpBom.java

@@ -1,69 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.entity;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xjrsoft.common.model.base.AuditEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
- * <p>
- * BOM信息【case_erp_bom】
- * </p>
- *
- * @author hnyyzy
- * @since 2023-06-19
- */
-@Data
-@TableName("case_erp_bom")
-@ApiModel(value = "CaseErpBom对象", description = "BOM信息【case_erp_bom】")
-@EqualsAndHashCode(callSuper = false)
-public class CaseErpBom extends AuditEntity implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("父级id")
-    private Long parentId;
-
-    @ApiModelProperty("层级")
-    private String bomLevel;
-
-    @ApiModelProperty("物料外键id")
-    private Long materialId;
-
-    @ApiModelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    @ExcelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    @ExcelProperty("物料类别名称")
-    private String  typeName;
-
-    @ApiModelProperty("物料属性名称")
-    @ExcelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    private BigDecimal count;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-}

+ 0 - 9
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/mapper/CaseErpBomMapper.java

@@ -1,9 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.xjrsoft.module.erpModel.caseErpBom.entity.CaseErpBom;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface CaseErpBomMapper extends MPJBaseMapper<CaseErpBom> {
-}

+ 0 - 8
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/service/ICaseErpBomService.java

@@ -1,8 +0,0 @@
-
-package com.xjrsoft.module.erpModel.caseErpBom.service;
-
-import com.github.yulichang.base.MPJBaseService;
-import com.xjrsoft.module.erpModel.caseErpBom.entity.CaseErpBom;
-
-public interface ICaseErpBomService extends MPJBaseService<CaseErpBom> {
-}

+ 0 - 12
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/service/ipml/CaseErpBomServiceImpl.java

@@ -1,12 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.service.ipml;
-
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.xjrsoft.module.erpModel.caseErpBom.entity.CaseErpBom;
-import com.xjrsoft.module.erpModel.caseErpBom.mapper.CaseErpBomMapper;
-import com.xjrsoft.module.erpModel.caseErpBom.service.ICaseErpBomService;
-import org.springframework.stereotype.Service;
-
-@Service
-public class CaseErpBomServiceImpl extends MPJBaseServiceImpl<CaseErpBomMapper, CaseErpBom> implements ICaseErpBomService {
-
-}

+ 0 - 41
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/vo/CaseErpBomExportVo.java

@@ -1,41 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.vo;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-@Data
-public class CaseErpBomExportVo {
-
-    @ApiModelProperty("物料编号")
-    @ExcelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    @ExcelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    @ExcelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("物料类别")
-    @ExcelProperty("物料类别")
-    private String typeName;
-
-    @ApiModelProperty("数量")
-    @ExcelProperty("数量")
-    private BigDecimal count;
-
-    @ApiModelProperty("单位")
-    @ExcelProperty("单位")
-    private String unitName;
-
-
-    @ApiModelProperty("属性")
-    @ExcelProperty("属性")
-    private String propertyName;
-
-}

+ 0 - 55
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/vo/CaseErpBomTreeVo.java

@@ -1,55 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.vo;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.xjrsoft.common.model.tree.ITreeNode;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-@Data
-public class CaseErpBomTreeVo implements ITreeNode<CaseErpBomTreeVo,Long>, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("父级id")
-    private Long parentId;
-
-    @ApiModelProperty("层级")
-    @JsonProperty("level")
-    private String bomLevel;
-
-    @ApiModelProperty("物料外键id")
-    private Long materialId;
-
-    @ApiModelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    private String  typeName;
-
-    @ApiModelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    private BigDecimal count;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    private List<CaseErpBomTreeVo> children;
-}

+ 0 - 38
src/main/java/com/xjrsoft/module/erpModel/caseErpBom/vo/CaseErpBomVo.java

@@ -1,38 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpBom.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-@Data
-public class CaseErpBomVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    @ApiModelProperty("物料编码")
-    private String code;
-
-    @ApiModelProperty("物料名称")
-    private String name;
-
-    @ApiModelProperty("规格型号")
-    private String model;
-
-    @ApiModelProperty("单位名称")
-    private String unitName;
-
-    @ApiModelProperty("物料类别名称")
-    private String typeName;
-
-    @ApiModelProperty("物料属性名称")
-    private String propertyName;
-
-    @ApiModelProperty("子级物料数量")
-    private BigDecimal count;
-
-
-    private List<CaseErpBomVo> childList;
-}

+ 0 - 71
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerContactsController.java

@@ -1,71 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.controller;
-
-import com.xjrsoft.common.annotation.XjrLog;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerContacts;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerContactsService;
-import com.xjrsoft.module.erpModel.caseErpLog.service.ICaseErpLogService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-
-/**
- * <p>
- * 客户联系人【case_erp_customer_contacts】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@RestController
-@RequestMapping(GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerContacts")
-@Api(value = GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerContacts", tags = "客户联系人")
-@AllArgsConstructor
-public class CaseErpCustomerContactsController {
-    private ICaseErpCustomerContactsService caseErpCustomerContactsService;
-
-    private ICaseErpLogService caseErpLogService;
-
-
-    @PostMapping
-    @ApiOperation(value = "新增客户联系人信息")
-    public R add(@Valid @RequestBody AddCaseErpCustomerContactsDto dto) {
-        return R.ok(caseErpCustomerContactsService.add(dto));
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改客户联系人信息")
-    public R update(@Valid @RequestBody UpdateCaseErpCustomerContactsDto dto) {
-        return R.ok(caseErpCustomerContactsService.update(dto));
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询客户联系人信息")
-    public R info(@RequestParam Long id) {
-        CaseErpCustomerContacts caseErpCustomerContacts = caseErpCustomerContactsService.getById(id);
-        if (caseErpCustomerContacts == null) {
-            R.error("找不到此客户联系人信息!");
-        }
-        return R.ok(caseErpCustomerContacts);
-    }
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    @XjrLog(value = "删除客户联系人信息")
-    public R delete(@Valid @RequestBody Long id) {
-        return R.ok(caseErpCustomerContactsService.removeById(id));
-    }
-}

+ 0 - 247
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerController.java

@@ -1,247 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.controller;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.convert.Convert;
-import cn.hutool.core.lang.TypeReference;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.support.ExcelTypeEnum;
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.xjrsoft.common.annotation.XjrLog;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.common.utils.RedisUtil;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.ImportCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.TransferCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomer;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerCommonExportVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerExportVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerListVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerVo;
-import com.xjrsoft.module.organization.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import lombok.SneakyThrows;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.validation.Valid;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-
-/**
- * <p>
- * 客户信息【case_erp_customer】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@RestController
-@RequestMapping(GlobalConstant.CASE_ERP_CUSTOMER+"/caseErpCustomer")
-@Api(value = GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomer", tags = "客户信息")
-@AllArgsConstructor
-public class CaseErpCustomerController {
-    private ICaseErpCustomerService caseErpCustomerService;
-
-    private RedisUtil redisUtil;
-
-    @GetMapping(value = "/list")
-    @ApiOperation("所以客户列表,不分页")
-    public R list() {
-        List<CaseErpCustomer> list = caseErpCustomerService.list();
-        List<CaseErpCustomerListVo> caseErpCustomerListVos = BeanUtil.copyToList(list, CaseErpCustomerListVo.class);
-        List<User> userList = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        for (CaseErpCustomerListVo caseErpCustomerListVo : caseErpCustomerListVos) {
-            if (StrUtil.isNotBlank(caseErpCustomerListVo.getSaleIds())){
-                String allUserIdStr = StrUtil.join(StringPool.COMMA, caseErpCustomerListVo.getSaleIds());
-                List<Long> ids = Arrays.stream(allUserIdStr.split(StringPool.COMMA)).map(Convert::toLong).collect(Collectors.toList());
-                List<String> names = userList.stream().filter(x -> ids.contains(x.getId())).map(User::getName).collect(Collectors.toList());
-                if (CollectionUtil.isNotEmpty(names)){
-                    caseErpCustomerListVo.setSaleNames(StrUtil.join(StringPool.COMMA,names));
-                }
-            }
-            caseErpCustomerListVo.setSalePhone("18333333333");
-        }
-        return R.ok(caseErpCustomerListVos);
-    }
-
-    @GetMapping(value = "/page")
-    @ApiOperation("客户信息、客户公海列表分页")
-    public R page(CaseErpCustomerDto dto) {
-        return R.ok(caseErpCustomerService.getPageList(dto));
-    }
-
-    @PostMapping
-    @ApiOperation(value = "新增客户信息、公海信息")
-    public R add(@Valid @RequestBody AddCaseErpCustomerDto dto) {
-        long count = caseErpCustomerService.count(Wrappers.<CaseErpCustomer>query().lambda().eq(CaseErpCustomer::getName, dto.getName()));
-        if (count > 0) {
-            return R.error("此客户信息已经存在!");
-        }
-        return R.ok(caseErpCustomerService.add(dto));
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改客户信息、公海信息")
-    public R update(@Valid @RequestBody UpdateCaseErpCustomerDto dto) {
-        return R.ok(caseErpCustomerService.update(dto));
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询客户信息、公海信息(返回id值,编辑使用)")
-    public R info(@RequestParam Long id) {
-        CaseErpCustomer caseErpCustomer = caseErpCustomerService.getById(id);
-        if (caseErpCustomer == null) {
-            R.error("找不到此客户信息!");
-        }
-        CaseErpCustomerInfoVo caseErpCustomerInfoVo = caseErpCustomerService.info(caseErpCustomer);
-        return R.ok(caseErpCustomerInfoVo);
-    }
-
-    @GetMapping(value = "/base-info")
-    @ApiOperation(value = "根据id查询客户基本信息(返回名称值,详情查看使用)")
-    public R baseInfo(@RequestParam Long id) {
-        CaseErpCustomer caseErpCustomer = caseErpCustomerService.getById(id);
-        if (caseErpCustomer == null) {
-            R.error("找不到此客户信息!");
-        }
-        CaseErpCustomerVo caseErpCustomerVo = caseErpCustomerService.baseInfo(caseErpCustomer);
-        return R.ok(caseErpCustomerVo);
-    }
-
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    @XjrLog(value = "删除客户信息、公海信息")
-    public R delete(@Valid @RequestBody Long id) {
-        return R.ok(caseErpCustomerService.delete(id));
-    }
-
-    @PutMapping("/common")
-    @ApiOperation(value = "移入公海")
-    public R common(@Valid @RequestBody List<Long> ids) {
-        return R.ok( caseErpCustomerService.common(ids));
-    }
-
-    @PutMapping("/transfer")
-    @ApiOperation(value = "转移")
-    public R transfer(@Valid @RequestBody TransferCaseErpCustomerDto dto) {
-        return R.ok( caseErpCustomerService.transfer(dto));
-    }
-
-    @PostMapping(value = "/export")
-    @ApiOperation(value = "客户列表导出")
-    @XjrLog(value = "导出表单数据")
-    public ResponseEntity<byte[]> export(@RequestBody List<Long> ids) {
-        List<CaseErpCustomerExportVo> exportVoList = caseErpCustomerService.export(ids);
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, CaseErpCustomerExportVo.class).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(exportVoList);
-        return R.fileStream(bot.toByteArray(), "客户列表" + ExcelTypeEnum.XLSX.getValue());
-    }
-
-    @PostMapping("/import")
-    @ApiOperation(value = "客户列表导入")
-    public R importData(@RequestParam MultipartFile file) throws IOException {
-        return R.ok(caseErpCustomerService.importData(file));
-    }
-
-    @GetMapping("/export")
-    @ApiOperation(value = "客户列表下载模板")
-    @SneakyThrows
-    public ResponseEntity<byte[]> export() {
-        List<ImportCaseErpCustomerDto> importCaseErpUnitDtos = new ArrayList<>();
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, ImportCaseErpCustomerDto.class).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(BeanUtil.copyToList(importCaseErpUnitDtos, ImportCaseErpCustomerDto.class));
-        return R.fileStream(bot.toByteArray(), "客户列表模板" + ExcelTypeEnum.XLSX.getValue());
-    }
-
-    @PostMapping(value = "/export-common")
-    @ApiOperation(value = "客户公海导出")
-    @XjrLog(value = "导出表单数据")
-    public ResponseEntity<byte[]> exportCommonAll() {
-        List<CaseErpCustomerCommonExportVo> exportVoList = caseErpCustomerService.exportCommon();
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, CaseErpCustomerCommonExportVo.class).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(exportVoList);
-        return R.fileStream(bot.toByteArray(), "客户公海" + ExcelTypeEnum.XLSX.getValue());
-    }
-
-    @PostMapping("/import-common")
-    @ApiOperation(value = "客户公海导入")
-    public R importCommonData(@RequestParam MultipartFile file) throws IOException {
-        return R.ok(caseErpCustomerService.importCommonData(file));
-    }
-
-    @GetMapping("/export-common")
-    @ApiOperation(value = "客户公海下载模板")
-    @SneakyThrows
-    public ResponseEntity<byte[]> exportCommon() {
-        List<ImportCaseErpCustomerDto> importCaseErpUnitDtos = new ArrayList<>();
-        ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, ImportCaseErpCustomerDto.class).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(BeanUtil.copyToList(importCaseErpUnitDtos, ImportCaseErpCustomerDto.class));
-        return R.fileStream(bot.toByteArray(), "客户公海模板" + ExcelTypeEnum.XLSX.getValue());
-    }
-
-    @GetMapping(value = "/detail-info")
-    @ApiOperation(value = "根据id查询详情信息")
-    public R detailInfo(@RequestParam Long id) {
-        CaseErpCustomer caseErpCustomer = caseErpCustomerService.getById(id);
-        if (caseErpCustomer == null) {
-            R.error("找不到此客户信息!");
-        }
-        return R.ok(caseErpCustomerService.detailInfo(caseErpCustomer));
-    }
-
-    @PutMapping(value = "/get-from-common")
-    @ApiOperation(value = "根据id领取客户")
-    public R getFromCommon(@Valid @RequestBody TransferCaseErpCustomerDto dto) {
-        return R.ok(caseErpCustomerService.getFromCommon(dto.getId()));
-    }
-
-
-    @GetMapping("/customer-source")
-    @ApiOperation(value="客户来源统计")
-    public R customerSource() {
-        return R.ok(caseErpCustomerService.getCustomerSource());
-    }
-
-    @GetMapping("/customer-statistics")
-    @ApiOperation(value="统计今日客户数据")
-    public R customerStatistics() {
-        return R.ok(caseErpCustomerService.getAll());
-    }
-
-    @GetMapping("/customer-gather")
-    @ApiOperation(value="客户回款")
-    public R customerGather() {
-        return R.ok(caseErpCustomerService.getCustomerPaymexnt());
-    }
-
-    @GetMapping("/customer-type")
-    @ApiOperation(value="客户类型分布")
-    public R getCustomerType() {
-        return R.ok(caseErpCustomerService.getCustomerType());
-    }
-}

+ 0 - 91
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerFollowController.java

@@ -1,91 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.controller;
-
-import cn.hutool.core.bean.BeanUtil;
-import com.xjrsoft.common.annotation.XjrLog;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerFollowDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerFollowDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerFollow;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerFollowService;
-import com.xjrsoft.module.erpModel.caseErpLog.entity.CaseErpLog;
-import com.xjrsoft.module.erpModel.caseErpLog.service.ICaseErpLogService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-
-/**
- * <p>
- * 客户跟进【case_erp_customer_follow】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@RestController
-@RequestMapping(GlobalConstant.CASE_ERP_CUSTOMER+"/caseErpCustomerFollow")
-@Api(value = GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerFollow", tags = "客户跟进")
-@AllArgsConstructor
-public class CaseErpCustomerFollowController {
-
-    private ICaseErpCustomerFollowService caseErpCustomerFollowService;
-
-    private ICaseErpLogService caseErpLogService;
-
-    @PostMapping
-    @ApiOperation(value = "新增客户跟进信息")
-    public R add(@Valid @RequestBody AddCaseErpCustomerFollowDto dto) {
-        CaseErpCustomerFollow caseErpCustomerFollow = BeanUtil.toBean(dto, CaseErpCustomerFollow.class);
-        caseErpCustomerFollowService.save(caseErpCustomerFollow);
-
-        CaseErpLog log = new CaseErpLog();
-        log.setKeyId(dto.getCustomerId());
-        log.setCategoryId(0);
-        log.setExecuteResultJson("新增客户跟进");
-        caseErpLogService.save(log);
-
-        return R.ok(true);
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改客户跟进信息")
-    public R update(@Valid @RequestBody UpdateCaseErpCustomerFollowDto dto) {
-        CaseErpCustomerFollow caseErpCustomerFollow = BeanUtil.toBean(dto, CaseErpCustomerFollow.class);
-        caseErpCustomerFollowService.updateById(caseErpCustomerFollow);
-
-        CaseErpLog log = new CaseErpLog();
-        log.setKeyId(dto.getCustomerId());
-        log.setCategoryId(0);
-        log.setExecuteResultJson("修改客户跟进");
-        caseErpLogService.save(log);
-
-        return R.ok(true);
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询客户跟进信息")
-    public R info(@RequestParam Long id) {
-        CaseErpCustomerFollow caseErpCustomerFollow = caseErpCustomerFollowService.getById(id);
-        if (caseErpCustomerFollow == null) {
-            R.error("找不到此客户跟进信息!");
-        }
-        return R.ok(caseErpCustomerFollow);
-    }
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    @XjrLog(value = "删除客户跟进信息")
-    public R delete(@Valid @RequestBody Long id) {
-        return R.ok(caseErpCustomerFollowService.removeById(id));
-    }
-}

+ 0 - 124
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerGatherController.java

@@ -1,124 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.controller;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.convert.Convert;
-import cn.hutool.core.lang.TypeReference;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
-import com.xjrsoft.common.annotation.XjrLog;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.common.utils.RedisUtil;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerGatherDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerGatherDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerGatherDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomer;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerGatherService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerService;
-import com.xjrsoft.module.organization.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 客户回款【case_erp_customer_gather】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@RestController
-@RequestMapping(GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerGather")
-@Api(value = GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerGather", tags = "客户回款")
-@AllArgsConstructor
-public class CaseErpCustomerGatherController {
-    private ICaseErpCustomerGatherService caseErpCustomerGatherService;
-
-    private ICaseErpCustomerService caseErpCustomerService;
-
-    private RedisUtil redisUtil;
-
-    @GetMapping(value = "/page")
-    @ApiOperation("客户回款分页")
-    public R page(CaseErpCustomerGatherDto dto) {
-        return R.ok(caseErpCustomerGatherService.getPageList(dto));
-    }
-
-    @PostMapping
-    @ApiOperation(value = "新增客户回款信息")
-    public R add(@Valid @RequestBody AddCaseErpCustomerGatherDto dto) {
-        CaseErpCustomerGather caseErpCustomerGather = BeanUtil.toBean(dto, CaseErpCustomerGather.class);
-        CaseErpCustomer byId = caseErpCustomerService.getById(dto.getCustomerId());
-        if (StrUtil.isNotBlank(byId.getName())){
-            caseErpCustomerGather.setName(byId.getName());
-        }
-        caseErpCustomerGather.setAlreadyAmount(BigDecimal.ZERO);
-        caseErpCustomerGather.setUnpaidAmount(dto.getWaitAmount());
-        List<User> allUser = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        String allUserIdStr = StrUtil.join(StringPool.COMMA, dto.getPrincipalIds());
-        List<Long> ids = Arrays.stream(allUserIdStr.split(StringPool.COMMA)).map(Convert::toLong).collect(Collectors.toList());
-        List<String> names = allUser.stream().filter(x -> ids.contains(x.getId())).map(User::getName).collect(Collectors.toList());
-        caseErpCustomerGather.setPrincipalNames(StrUtil.join(StringPool.COMMA,names));
-        caseErpCustomerGatherService.save(caseErpCustomerGather);
-        return R.ok(true);
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改客户回款信息")
-    public R update(@Valid @RequestBody UpdateCaseErpCustomerGatherDto dto) {
-        CaseErpCustomerGather caseErpCustomerGather = BeanUtil.toBean(dto, CaseErpCustomerGather.class);
-        CaseErpCustomer byId = caseErpCustomerService.getById(dto.getCustomerId());
-        if (StrUtil.isNotBlank(byId.getName())){
-            caseErpCustomerGather.setName(byId.getName());
-        }
-        List<User> allUser = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        String allUserIdStr = StrUtil.join(StringPool.COMMA, dto.getPrincipalIds());
-        List<Long> ids = Arrays.stream(allUserIdStr.split(StringPool.COMMA)).map(Convert::toLong).collect(Collectors.toList());
-        List<String> names = allUser.stream().filter(x -> ids.contains(x.getId())).map(User::getName).collect(Collectors.toList());
-        caseErpCustomerGather.setPrincipalNames(StrUtil.join(StringPool.COMMA,names));
-        return R.ok(caseErpCustomerGatherService.updateById(caseErpCustomerGather));
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询客户回款信息")
-    public R info(@RequestParam Long id) {
-        CaseErpCustomerGather caseErpCustomerGather = caseErpCustomerGatherService.getById(id);
-        if (caseErpCustomerGather == null) {
-            R.error("找不到此客户回款信息!");
-        }
-        return R.ok(caseErpCustomerGather);
-    }
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    @XjrLog(value = "删除客户回款信息")
-    public R delete(@Valid @RequestBody Long id) {
-        return R.ok(caseErpCustomerGatherService.removeById(id));
-    }
-
-
-    @GetMapping(value = "/gather-detail-info")
-    @ApiOperation(value = "根据客户回款id查询客户回款记录信息")
-    public R gatherDetailInfo(@RequestParam Long id) {
-        return R.ok(caseErpCustomerGatherService.gatherDetailInfo(id));
-    }
-
-}

+ 0 - 72
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/controller/CaseErpCustomerGatherDetailController.java

@@ -1,72 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.controller;
-
-import cn.hutool.core.bean.BeanUtil;
-import com.xjrsoft.common.annotation.XjrLog;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerGatherDetailDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerGatherDetailDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerGatherDetailService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCusGatherDetailInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.validation.Valid;
-
-/**
- * <p>
- * 客户回款详情【case_erp_customer_gather_detail】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@RestController
-@RequestMapping(GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerGatherDetail")
-@Api(value = GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerGatherDetail", tags = "客户回款详情")
-@AllArgsConstructor
-public class CaseErpCustomerGatherDetailController {
-
-    private ICaseErpCustomerGatherDetailService caseErpCustomerGatherDetailService;
-
-
-    @PostMapping
-    @ApiOperation(value = "新增客户回款详情信息")
-    public R add(@Valid @RequestBody AddCaseErpCustomerGatherDetailDto dto) {
-        return R.ok(caseErpCustomerGatherDetailService.add(dto));
-    }
-
-    @PutMapping
-    @ApiOperation(value = "修改客户回款详情信息")
-    public R update(@Valid @RequestBody UpdateCaseErpCustomerGatherDetailDto dto) {
-        return R.ok(caseErpCustomerGatherDetailService.edit(dto));
-    }
-
-    @GetMapping(value = "/info")
-    @ApiOperation(value = "根据id查询客户回款详情信息")
-    public R info(@RequestParam Long id) {
-        CaseErpCustomerGatherDetail caseErpCustomerGatherDetail = caseErpCustomerGatherDetailService.getById(id);
-        if (caseErpCustomerGatherDetail == null) {
-            R.error("找不到此客户回款详情信息!");
-        }
-        return R.ok(BeanUtil.toBean(caseErpCustomerGatherDetail, CaseErpCusGatherDetailInfo.class));
-    }
-
-    @DeleteMapping
-    @ApiOperation(value = "删除")
-    @XjrLog(value = "删除客户回款详情信息")
-    public R delete(@Valid @RequestBody Long id) {
-        return R.ok(caseErpCustomerGatherDetailService.delete(id));
-    }
-
-}

+ 0 - 17
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerContactsDto.java

@@ -1,17 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.List;
-
-@Data
-public class AddCaseErpCustomerContactsDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long customerId;
-
-    @ApiModelProperty("添加联系人集合")
-    private List<CaseErpCustomerContactsDto> caseErpCustomerContactsDtoList;
-}

+ 0 - 42
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerDto.java

@@ -1,42 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.List;
-
-@Data
-public class AddCaseErpCustomerDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("客户状态(0正常,1公海)")
-    private Integer state;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型,数据字典id")
-    private Long typeId;
-
-    @ApiModelProperty("公司性质,数据字典id")
-    private Long natureId;
-
-    @ApiModelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源,数据字典id")
-    private Long sourceId;
-
-    @ApiModelProperty("规模,数据字典id")
-    private Long scaleId;
-
-    @ApiModelProperty("地址")
-    private String address;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("添加联系人集合")
-    private List<CaseErpCustomerContactsDto> addCaseErpCustomerContactsDtoList;
-}

+ 0 - 35
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerFollowDto.java

@@ -1,35 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@Data
-public class AddCaseErpCustomerFollowDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("跟进方式数据字典id")
-    private Long followTypeId;
-
-    @ApiModelProperty("跟进时间")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp followTime;
-
-    @ApiModelProperty("下次跟进时间")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp nextFollowTime;
-
-    @ApiModelProperty("说明")
-    private String content;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 32
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerGatherDetailDto.java

@@ -1,32 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-
-@Data
-public class AddCaseErpCustomerGatherDetailDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("客户回款外键(case_erp_customer)")
-    private Long gatherId;
-
-    @ApiModelProperty("回款金额")
-    private BigDecimal amountCollect;
-
-    @ApiModelProperty("回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @JsonProperty("date")
-    private Timestamp refundDate;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 43
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/AddCaseErpCustomerGatherDto.java

@@ -1,43 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-
-@Data
-public class AddCaseErpCustomerGatherDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("计划回款金额")
-    private BigDecimal waitAmount;
-
-    @ApiModelProperty("计划回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp receivedDate;
-
-    @ApiModelProperty("最迟回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp finallyDate;
-
-    @ApiModelProperty("合同负责人")
-    private String principalIds;
-
-    @ApiModelProperty("合同标题")
-    private String title;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 29
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/CaseErpCustomerContactsDto.java

@@ -1,29 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class CaseErpCustomerContactsDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long customerId;
-
-    @ApiModelProperty("是否为默认联系人(1是,0否)")
-    private Integer isDefault;
-
-    @ApiModelProperty("姓名")
-    private String name;
-
-    @ApiModelProperty("电话")
-    private String phone;
-
-    @ApiModelProperty("职位")
-    private String post;
-
-    @ApiModelProperty("部门")
-    private String dept;
-
-}

+ 0 - 44
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/CaseErpCustomerDto.java

@@ -1,44 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.xjrsoft.common.page.PageInput;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CaseErpCustomerDto extends PageInput {
-    /**
-     * 客户名称
-     */
-    private String name;
-
-    /**
-     * 客户类型
-     */
-    private Long typeId;
-
-    /**
-     * 来源
-     */
-    private Long sourceId;
-
-    /**
-     * 客户状态(0正常,1公海)
-     */
-    private Integer state;
-
-    /**
-     * 开始时间
-     */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private Date startTime;
-
-    /**
-     * 结束时间
-     */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private Date endTime;
-}

+ 0 - 41
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/CaseErpCustomerGatherDto.java

@@ -1,41 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.xjrsoft.common.page.PageInput;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CaseErpCustomerGatherDto extends PageInput {
-    /**
-     * 客户名称
-     */
-    private String name;
-
-    /**
-     * 计划回款开始时间
-     */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private Date receivedStartTime;
-
-    /**
-     * 计划回款结束时间
-     */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private Date receivedEndTime;
-
-    /**
-     * 最迟回款开始时间
-     */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private Date finallyStartTime;
-
-    /**
-     * 最迟回款结束时间
-     */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private Date finallyEndTime;
-}

+ 0 - 41
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/ImportCaseErpCustomerDto.java

@@ -1,41 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class ImportCaseErpCustomerDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("客户名称")
-    @ExcelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型")
-    @ExcelProperty("客户类型")
-    private String typeName;
-
-    @ApiModelProperty("所在行业")
-    @ExcelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源")
-    @ExcelProperty("来源")
-    private String sourceName;
-
-    @ApiModelProperty("规模")
-    @ExcelProperty("规模")
-    private String scaleName;
-
-    @ApiModelProperty("公司性质")
-    @ExcelProperty("公司性质")
-    private String natureName;
-
-    @ApiModelProperty("地址")
-    @ExcelProperty("地址")
-    private String address;
-
-}

+ 0 - 16
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/TransferCaseErpCustomerDto.java

@@ -1,16 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class TransferCaseErpCustomerDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    @ApiModelProperty("转移人员ids")
-    private String saleIds;
-}

+ 0 - 25
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerContactsDto.java

@@ -1,25 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class UpdateCaseErpCustomerContactsDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    private Long customerId;
-    @ApiModelProperty("是否为默认联系人(1是,0否)")
-    private Integer isDefault;
-    @ApiModelProperty("姓名")
-    private String name;
-    @ApiModelProperty("电话")
-    private String phone;
-    @ApiModelProperty("职位")
-    private String post;
-    @ApiModelProperty("部门")
-    private String dept;
-
-}

+ 0 - 43
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerDto.java

@@ -1,43 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.List;
-
-@Data
-public class UpdateCaseErpCustomerDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    @ApiModelProperty("客户状态(0正常,1公海)")
-    private Integer state;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型,数据字典id")
-    private Long typeId;
-
-    @ApiModelProperty("公司性质,数据字典id")
-    private Long natureId;
-
-    @ApiModelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源,数据字典id")
-    private Long sourceId;
-
-    @ApiModelProperty("规模,数据字典id")
-    private Long scaleId;
-
-    @ApiModelProperty("地址")
-    private String address;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("添加联系人集合")
-    private List<CaseErpCustomerContactsDto> addCaseErpCustomerContactsDtoList;
-}

+ 0 - 37
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerFollowDto.java

@@ -1,37 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@Data
-public class UpdateCaseErpCustomerFollowDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("跟进方式数据字典id")
-    private Long followTypeId;
-
-    @ApiModelProperty("跟进时间")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp followTime;
-
-    @ApiModelProperty("下次跟进时间")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp nextFollowTime;
-
-    @ApiModelProperty("说明")
-    private String content;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 33
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerGatherDetailDto.java

@@ -1,33 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-
-@Data
-public class UpdateCaseErpCustomerGatherDetailDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    @ApiModelProperty("客户回款外键(case_erp_customer)")
-    private Long gatherId;
-
-    @ApiModelProperty("回款金额")
-    private BigDecimal amountCollect;
-
-    @ApiModelProperty("回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @JsonProperty("date")
-    private Timestamp refundDate;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 44
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/dto/UpdateCaseErpCustomerGatherDto.java

@@ -1,44 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-
-@Data
-public class UpdateCaseErpCustomerGatherDto implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("计划回款金额")
-    private BigDecimal waitAmount;
-
-    @ApiModelProperty("计划回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp receivedDate;
-
-    @ApiModelProperty("最迟回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Timestamp finallyDate;
-
-    @ApiModelProperty("合同负责人ids")
-    private String principalIds;
-
-    @ApiModelProperty("合同标题")
-    private String title;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 83
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomer.java

@@ -1,83 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.entity;
-
-import com.baomidou.mybatisplus.annotation.FieldStrategy;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xjrsoft.common.model.base.AuditEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-/**
- * <p>
- * 客户信息【case_erp_customer】
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@TableName("case_erp_customer")
-@ApiModel(value = "CaseErpCustomer对象", description = "客户信息【case_erp_customer】")
-@EqualsAndHashCode(callSuper = false)
-@Data
-public class CaseErpCustomer extends AuditEntity implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型,数据字典id")
-    private Long typeId;
-
-    @ApiModelProperty("公司性质,数据字典id")
-    private Long natureId;
-
-    @ApiModelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源,数据字典id")
-    private Long sourceId;
-
-    @ApiModelProperty("规模,数据字典id")
-    private Long scaleId;
-
-    @ApiModelProperty("地址")
-    private String address;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("默认联系人姓名")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultName;
-
-    @ApiModelProperty("默认联系人电话")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultPhone;
-
-    @ApiModelProperty("默认联系人职位")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultPost;
-
-    @ApiModelProperty("默认联系人部门")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultDep;
-
-    @ApiModelProperty("客户所属人员(销售人员)")
-    private String saleIds;
-
-    @ApiModelProperty("客户状态(0正常,1公海)")
-    private Integer state;
-
-    @ApiModelProperty("加入公海日期")
-    private LocalDateTime inOpenDate;
-
-}

+ 0 - 52
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerContacts.java

@@ -1,52 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xjrsoft.common.model.base.AuditEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * 客户联系人【case_erp_customer_contacts】
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@TableName("case_erp_customer_contacts")
-@ApiModel(value = "CaseErpCustomerContacts对象", description = "客户联系人【case_erp_customer_contacts】")
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class CaseErpCustomerContacts extends AuditEntity implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("是否为默认联系人(1是,0否)")
-    private Integer isDefault;
-
-    @ApiModelProperty("姓名")
-    private String name;
-
-    @ApiModelProperty("电话")
-    private String phone;
-
-    @ApiModelProperty("职位")
-    private String post;
-
-    @ApiModelProperty("部门")
-    private String dept;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-}

+ 0 - 52
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerFollow.java

@@ -1,52 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xjrsoft.common.model.base.AuditEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-/**
- * <p>
- * 客户跟进【case_erp_customer_follow】
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@TableName("case_erp_customer_follow")
-@ApiModel(value = "CaseErpCustomerFollow对象", description = "客户跟进【case_erp_customer_follow】")
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class CaseErpCustomerFollow extends AuditEntity implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("跟进方式数据字典id")
-    private Long followTypeId;
-
-    @ApiModelProperty("跟进时间")
-    private LocalDateTime followTime;
-
-    @ApiModelProperty("下次跟进时间")
-    private LocalDateTime nextFollowTime;
-
-    @ApiModelProperty("说明")
-    private String content;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 68
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerGather.java

@@ -1,68 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xjrsoft.common.model.base.AuditEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-/**
- * <p>
- * 客户回款【case_erp_customer_gather】
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@TableName("case_erp_customer_gather")
-@ApiModel(value = "CaseErpCustomerGather对象", description = "客户回款【case_erp_customer_gather】")
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class CaseErpCustomerGather extends AuditEntity implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("计划回款金额")
-    private BigDecimal waitAmount;
-
-    @ApiModelProperty("已回款金额")
-    private BigDecimal alreadyAmount;
-
-    @ApiModelProperty("未回款金额")
-    private BigDecimal unpaidAmount;
-
-    @ApiModelProperty("计划回款日期")
-    private LocalDateTime receivedDate;
-
-    @ApiModelProperty("最迟回款日期")
-    private LocalDateTime finallyDate;
-
-    @ApiModelProperty("合同负责人ids")
-    private String principalIds;
-
-    @ApiModelProperty("合同负责人names")
-    private String principalNames;
-
-    @ApiModelProperty("合同标题")
-    private String title;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-}

+ 0 - 49
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/entity/CaseErpCustomerGatherDetail.java

@@ -1,49 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.xjrsoft.common.model.base.AuditEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-/**
- * <p>
- * 客户回款详情【case_erp_customer_gather_detail】
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@TableName("case_erp_cus_gather_detail")
-@ApiModel(value = "CaseErpCusGatherDetail对象", description = "客户回款详情【case_erp_cus_gather_detail】")
-@Data
-@EqualsAndHashCode(callSuper = false)
-public class CaseErpCustomerGatherDetail extends AuditEntity implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户回款外键(case_erp_customer)")
-    private Long gatherId;
-
-    @ApiModelProperty("回款金额")
-    private BigDecimal amountCollect;
-
-    @ApiModelProperty("回款日期")
-    private LocalDateTime refundDate;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-
-}

+ 0 - 18
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerContactsMapper.java

@@ -1,18 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerContacts;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * <p>
- * 客户联系人【case_erp_customer_contacts】 Mapper 接口
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@Mapper
-public interface CaseErpCustomerContactsMapper extends BaseMapper<CaseErpCustomerContacts> {
-
-}

+ 0 - 18
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerFollowMapper.java

@@ -1,18 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerFollow;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * <p>
- * 客户跟进【case_erp_customer_follow】 Mapper 接口
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@Mapper
-public interface CaseErpCustomerFollowMapper extends BaseMapper<CaseErpCustomerFollow> {
-
-}

+ 0 - 18
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerGatherDetailMapper.java

@@ -1,18 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * <p>
- * 客户回款详情【case_erp_customer_gather_detail】 Mapper 接口
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@Mapper
-public interface CaseErpCustomerGatherDetailMapper extends BaseMapper<CaseErpCustomerGatherDetail> {
-
-}

+ 0 - 18
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerGatherMapper.java

@@ -1,18 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * <p>
- * 客户回款【case_erp_customer_gather】 Mapper 接口
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@Mapper
-public interface CaseErpCustomerGatherMapper extends BaseMapper<CaseErpCustomerGather> {
-
-}

+ 0 - 18
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/mapper/CaseErpCustomerMapper.java

@@ -1,18 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.mapper;
-
-import com.github.yulichang.base.MPJBaseMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomer;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * <p>
- * 客户信息【case_erp_customer】 Mapper 接口
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@Mapper
-public interface CaseErpCustomerMapper extends MPJBaseMapper<CaseErpCustomer> {
-
-}

+ 0 - 26
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerContactsService.java

@@ -1,26 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerContacts;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerContactsInfoVo;
-import com.xjrsoft.module.organization.entity.User;
-
-import java.util.List;
-
-/**
- * <p>
- * 客户联系人【case_erp_customer_contacts】 服务类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-public interface ICaseErpCustomerContactsService extends IService<CaseErpCustomerContacts> {
-    Boolean add(AddCaseErpCustomerContactsDto dto);
-
-    Boolean update(UpdateCaseErpCustomerContactsDto dto);
-
-    List<CaseErpCustomerContactsInfoVo> info(List<CaseErpCustomerContacts> caseErpCustomerContactsList, List<User> userList);
-}

+ 0 - 21
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerFollowService.java

@@ -1,21 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerFollow;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerFollowInfoVo;
-import com.xjrsoft.module.organization.entity.User;
-import com.xjrsoft.module.system.entity.DictionaryDetail;
-
-import java.util.List;
-
-/**
- * <p>
- * 客户跟进【case_erp_customer_follow】 服务类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-public interface ICaseErpCustomerFollowService extends IService<CaseErpCustomerFollow> {
-    List<CaseErpCustomerFollowInfoVo> info(List<CaseErpCustomerFollow> caseErpCustomerFollowList,List<DictionaryDetail> dictionaryDetailList,List<User> userList);
-}

+ 0 - 23
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerGatherDetailService.java

@@ -1,23 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerGatherDetailDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerGatherDetailDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
-
-/**
- * <p>
- * 客户回款详情【case_erp_customer_gather_detail】 服务类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-public interface ICaseErpCustomerGatherDetailService extends IService<CaseErpCustomerGatherDetail> {
-    Boolean add(AddCaseErpCustomerGatherDetailDto dto);
-
-    Boolean edit(UpdateCaseErpCustomerGatherDetailDto dto);
-
-    Boolean delete(Long id);
-
-}

+ 0 - 22
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerGatherService.java

@@ -1,22 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerGatherDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerGatherDetailInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerGatherPageVo;
-
-/**
- * <p>
- * 客户回款【case_erp_customer_gather】 服务类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-public interface ICaseErpCustomerGatherService extends IService<CaseErpCustomerGather> {
-    CaseErpCustomerGatherDetailInfoVo gatherDetailInfo(Long id);
-
-    PageOutput<CaseErpCustomerGatherPageVo> getPageList(CaseErpCustomerGatherDto dto);
-}

+ 0 - 68
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/ICaseErpCustomerService.java

@@ -1,68 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service;
-
-import com.github.yulichang.base.MPJBaseService;
-import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.TransferCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomer;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerCommonExportVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerDetailInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerExportVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerAllVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerPxaymentVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerSourceVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerVo;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * <p>
- * 客户信息【case_erp_customer】 服务类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-public interface ICaseErpCustomerService extends MPJBaseService<CaseErpCustomer> {
-    Boolean add(AddCaseErpCustomerDto dto);
-
-    Boolean update(UpdateCaseErpCustomerDto dto);
-
-    Boolean delete(Long id);
-
-    PageOutput<CaseErpCustomerVo> getPageList(CaseErpCustomerDto dto);
-
-    Boolean common(List<Long> ids);
-
-    Boolean transfer(TransferCaseErpCustomerDto dto);
-
-    CaseErpCustomerInfoVo info(CaseErpCustomer caseErpCustomer);
-
-    List<CaseErpCustomerExportVo> export(List<Long> ids);
-
-    List<CaseErpCustomerCommonExportVo> exportCommon();
-
-    Boolean importData( MultipartFile file) throws IOException;
-
-    Boolean importCommonData( MultipartFile file) throws IOException;
-
-    CaseErpCustomerVo baseInfo(CaseErpCustomer caseErpCustomer);
-
-    CaseErpCustomerDetailInfoVo detailInfo(CaseErpCustomer caseErpCustomer);
-
-    Boolean getFromCommon(Long id);
-
-    List<CustomerSourceVo> getCustomerSource();
-
-    List<CustomerAllVo> getAll();
-
-    List<CustomerPxaymentVo> getCustomerPaymexnt();
-
-    List<CustomerVo> getCustomerType();
-}

+ 0 - 144
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerContactsServiceImpl.java

@@ -1,144 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xjrsoft.common.enums.YesOrNoEnum;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomer;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerContacts;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerContactsMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerContactsService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerContactsInfoVo;
-import com.xjrsoft.module.erpModel.caseErpLog.entity.CaseErpLog;
-import com.xjrsoft.module.erpModel.caseErpLog.service.ICaseErpLogService;
-import com.xjrsoft.module.organization.entity.User;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <p>
- * 客户联系人【case_erp_customer_contacts】 服务实现类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@Service
-@AllArgsConstructor
-public class CaseErpCustomerContactsServiceImpl extends ServiceImpl<CaseErpCustomerContactsMapper, CaseErpCustomerContacts> implements ICaseErpCustomerContactsService {
-    private final ICaseErpLogService caseErpLogService;
-
-    private final CaseErpCustomerMapper caseErpCustomerMapper;
-
-    @Override
-    public Boolean add(AddCaseErpCustomerContactsDto dto) {
-        if (CollectionUtil.isNotEmpty(dto.getCaseErpCustomerContactsDtoList())){
-            for (CaseErpCustomerContactsDto caseErpCustomerContactsDto : dto.getCaseErpCustomerContactsDtoList()) {
-                //如果新增的客户联系人是默认联系人,就将其它的设置为非默认联系人,并且修改customer表里面对应的字段
-                if (caseErpCustomerContactsDto.getIsDefault() == YesOrNoEnum.YES.getCode()){
-                    List<CaseErpCustomerContacts> list = this.list(Wrappers.<CaseErpCustomerContacts>query().lambda()
-                            .eq(CaseErpCustomerContacts::getCustomerId, dto.getCustomerId()).eq(CaseErpCustomerContacts::getIsDefault, YesOrNoEnum.YES.getCode()));
-                    CaseErpCustomer caseErpCustomer = new CaseErpCustomer();
-                    caseErpCustomer.setId(dto.getCustomerId());
-                    if (StrUtil.isNotBlank(caseErpCustomerContactsDto.getName())){
-                        caseErpCustomer.setDefaultName(caseErpCustomerContactsDto.getName());
-                    }
-                    if (StrUtil.isNotBlank(caseErpCustomerContactsDto.getPhone())){
-                        caseErpCustomer.setDefaultPhone(caseErpCustomerContactsDto.getPhone());
-                    }
-                    if (StrUtil.isNotBlank(caseErpCustomerContactsDto.getDept())){
-                        caseErpCustomer.setDefaultDep(caseErpCustomerContactsDto.getDept());
-                    }
-                    if (StrUtil.isNotBlank(caseErpCustomerContactsDto.getPost())){
-                        caseErpCustomer.setDefaultPost(caseErpCustomerContactsDto.getPost());
-                    }
-                    caseErpCustomerMapper.updateById(caseErpCustomer);
-                    if (list.size()>0){
-                        for (CaseErpCustomerContacts caseErpCustomerContacts : list) {
-                            caseErpCustomerContacts.setIsDefault(YesOrNoEnum.NO.getCode());
-                        }
-                        this.updateBatchById(list);
-                    }
-                }
-            }
-            List<CaseErpCustomerContacts> caseErpCustomerContactsList = BeanUtil.copyToList(dto.getCaseErpCustomerContactsDtoList(), CaseErpCustomerContacts.class);
-            for (CaseErpCustomerContacts caseErpCustomerContacts : caseErpCustomerContactsList) {
-                caseErpCustomerContacts.setCustomerId(dto.getCustomerId());
-            }
-            this.saveBatch(caseErpCustomerContactsList);
-        }
-
-        CaseErpLog log = new CaseErpLog();
-        log.setKeyId(dto.getCustomerId());
-        log.setCategoryId(0);
-        log.setExecuteResultJson("新增客户联系人");
-        caseErpLogService.save(log);
-
-        return true;
-    }
-
-    @Override
-    public Boolean update(UpdateCaseErpCustomerContactsDto dto) {
-        //如果修改的客户联系人是默认联系人,就将其它的设置为非默认联系人,并且修改customer表里面对应的字段
-        if (dto.getIsDefault() == YesOrNoEnum.YES.getCode()){
-            List<CaseErpCustomerContacts> list = this.list(Wrappers.<CaseErpCustomerContacts>query().lambda()
-                    .eq(CaseErpCustomerContacts::getCustomerId, dto.getCustomerId()).eq(CaseErpCustomerContacts::getIsDefault, YesOrNoEnum.YES.getCode()));
-            CaseErpCustomer caseErpCustomer = new CaseErpCustomer();
-            caseErpCustomer.setId(dto.getCustomerId());
-            if (StrUtil.isNotBlank(dto.getName())){
-                caseErpCustomer.setDefaultName(dto.getName());
-            }
-            if (StrUtil.isNotBlank(dto.getPhone())){
-                caseErpCustomer.setDefaultPhone(dto.getPhone());
-            }
-            if (StrUtil.isNotBlank(dto.getDept())){
-                caseErpCustomer.setDefaultDep(dto.getDept());
-            }
-            if (StrUtil.isNotBlank(dto.getPost())){
-                caseErpCustomer.setDefaultPost(dto.getPost());
-            }
-            caseErpCustomerMapper.updateById(caseErpCustomer);
-            if (list.size()>0){
-                for (CaseErpCustomerContacts caseErpCustomerContacts : list) {
-                    caseErpCustomerContacts.setIsDefault(YesOrNoEnum.NO.getCode());
-                }
-                this.updateBatchById(list);
-            }
-        }
-
-        CaseErpCustomerContacts caseErpCustomerContacts = BeanUtil.toBean(dto, CaseErpCustomerContacts.class);
-        caseErpCustomerContacts.setCustomerId(dto.getCustomerId());
-        this.updateById(caseErpCustomerContacts);
-
-        CaseErpLog log = new CaseErpLog();
-        log.setKeyId(dto.getCustomerId());
-        log.setCategoryId(0);
-        log.setExecuteResultJson("修改客户联系人");
-        caseErpLogService.save(log);
-
-        return null;
-    }
-
-    @Override
-    public List<CaseErpCustomerContactsInfoVo> info(List<CaseErpCustomerContacts> caseErpCustomerContactsList,  List<User> userList) {
-        List<CaseErpCustomerContactsInfoVo> caseErpCustomerContactsInfoVoList = new ArrayList<>();
-        for (CaseErpCustomerContacts caseErpCustomerContacts : caseErpCustomerContactsList) {
-            CaseErpCustomerContactsInfoVo caseErpCustomerContactsInfoVo = BeanUtil.toBean(caseErpCustomerContacts, CaseErpCustomerContactsInfoVo.class);
-            User user = userList.stream().filter(x -> x.getId().equals(caseErpCustomerContacts.getCreateUserId())).findFirst().orElse(new User());
-            if (StrUtil.isNotBlank(user.getName())){
-                caseErpCustomerContactsInfoVo.setCreateUserName(user.getName());
-            }
-            caseErpCustomerContactsInfoVoList.add(caseErpCustomerContactsInfoVo);
-        }
-        return caseErpCustomerContactsInfoVoList;
-    }
-}

+ 0 - 54
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerFollowServiceImpl.java

@@ -1,54 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerFollow;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerFollowMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerFollowService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerFollowInfoVo;
-import com.xjrsoft.module.organization.entity.User;
-import com.xjrsoft.module.system.entity.DictionaryDetail;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <p>
- * 客户跟进【case_erp_customer_follow】 服务实现类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@Service
-@AllArgsConstructor
-public class CaseErpCustomerFollowServiceImpl extends ServiceImpl<CaseErpCustomerFollowMapper, CaseErpCustomerFollow> implements ICaseErpCustomerFollowService {
-
-    @Override
-    public List<CaseErpCustomerFollowInfoVo> info(List<CaseErpCustomerFollow> caseErpCustomerFollowList, List<DictionaryDetail> dictionaryDetailList, List<User> userList) {
-        List<CaseErpCustomerFollowInfoVo> caseErpCustomerFollowInfoVoList = new ArrayList<>();
-        for (CaseErpCustomerFollow caseErpCustomerFollow : caseErpCustomerFollowList) {
-            CaseErpCustomerFollowInfoVo caseErpCustomerFollowInfoVo = BeanUtil.toBean(caseErpCustomerFollow, CaseErpCustomerFollowInfoVo.class);
-            if (ObjectUtil.isNotEmpty(caseErpCustomerFollow.getFollowTypeId())){
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getId().equals(caseErpCustomerFollow.getFollowTypeId())).findFirst().orElse(new DictionaryDetail());
-                if (StrUtil.isNotBlank(dictionaryDetail.getName())){
-                    caseErpCustomerFollowInfoVo.setFollowTypeName(dictionaryDetail.getName());
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomerFollow.getCreateUserId())){
-
-                User user = userList.stream().filter(x -> x.getId().equals(caseErpCustomerFollow.getCreateUserId())).findFirst().orElse(new User());
-                if (StrUtil.isNotBlank(user.getName())){
-                    caseErpCustomerFollowInfoVo.setCreateUserName(user.getName());
-                }
-            }
-            caseErpCustomerFollowInfoVoList.add(caseErpCustomerFollowInfoVo);
-        }
-
-        return caseErpCustomerFollowInfoVoList;
-    }
-}

+ 0 - 92
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerGatherDetailServiceImpl.java

@@ -1,92 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerGatherDetailDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerGatherDetailDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerGatherDetailMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerGatherMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerGatherDetailService;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-
-/**
- * <p>
- * 客户回款详情【case_erp_customer_gather_detail】 服务实现类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@Service
-@AllArgsConstructor
-public class CaseErpCustomerGatherDetailServiceImpl extends ServiceImpl<CaseErpCustomerGatherDetailMapper, CaseErpCustomerGatherDetail> implements ICaseErpCustomerGatherDetailService {
-
-    private final CaseErpCustomerGatherMapper caseErpCustomerGatherMapper;
-
-    @Override
-    public Boolean add(AddCaseErpCustomerGatherDetailDto dto) {
-        CaseErpCustomerGatherDetail caseErpCustomerGatherDetail = BeanUtil.toBean(dto, CaseErpCustomerGatherDetail.class);
-        this.save(caseErpCustomerGatherDetail);
-
-        CaseErpCustomerGather gather = caseErpCustomerGatherMapper.selectById(dto.getGatherId());
-
-        //未还款减去本次还款 等于下一次的未还款
-        BigDecimal subtract = gather.getUnpaidAmount().subtract(caseErpCustomerGatherDetail.getAmountCollect());
-        gather.setUnpaidAmount(subtract);
-        //将已还款新增 本次还款  等于 下一次的已还款
-        BigDecimal alreadyAmount = gather.getAlreadyAmount();
-        if (ObjectUtil.isNotEmpty(alreadyAmount)){
-            gather.setAlreadyAmount(alreadyAmount.add(caseErpCustomerGatherDetail.getAmountCollect()));
-        }else {
-            gather.setAlreadyAmount(dto.getAmountCollect());
-        }
-        caseErpCustomerGatherMapper.updateById(gather);
-        return true;
-    }
-
-    @Override
-    public Boolean edit(UpdateCaseErpCustomerGatherDetailDto dto) {
-        CaseErpCustomerGatherDetail caseErpCustomerGatherDetail = BeanUtil.toBean(dto, CaseErpCustomerGatherDetail.class);
-
-        CaseErpCustomerGather gather = caseErpCustomerGatherMapper.selectById(dto.getGatherId());
-
-        //原来的详情信息
-        CaseErpCustomerGatherDetail oldDetail = this.getById(dto.getId());
-
-        //加回原数据
-        gather.setUnpaidAmount(gather.getUnpaidAmount().add(oldDetail.getAmountCollect()));
-
-        //再减去修改后的
-        BigDecimal subtract = gather.getUnpaidAmount().subtract(dto.getAmountCollect());
-        gather.setUnpaidAmount(subtract);
-
-        //减去原有的
-        gather.setAlreadyAmount(gather.getAlreadyAmount().subtract(oldDetail.getAmountCollect()));
-
-        gather.setAlreadyAmount(gather.getAlreadyAmount().add(dto.getAmountCollect()));
-
-        this.updateById(caseErpCustomerGatherDetail);
-        caseErpCustomerGatherMapper.updateById(gather);
-        return true;
-    }
-
-    @Override
-    public Boolean delete(Long id) {
-        CaseErpCustomerGatherDetail caseErpCustomerGatherDetail = this.getById(id);
-        CaseErpCustomerGather caseErpCustomerGather = caseErpCustomerGatherMapper.selectById(caseErpCustomerGatherDetail.getGatherId());
-        //未回款
-        caseErpCustomerGather.setUnpaidAmount(caseErpCustomerGather.getUnpaidAmount().add(caseErpCustomerGatherDetail.getAmountCollect()));
-        //已回款
-        caseErpCustomerGather.setAlreadyAmount(caseErpCustomerGather.getAlreadyAmount().subtract(caseErpCustomerGatherDetail.getAmountCollect()));
-        caseErpCustomerGatherMapper.updateById(caseErpCustomerGather);
-        return this.removeById(id);
-    }
-
-
-}

+ 0 - 156
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerGatherServiceImpl.java

@@ -1,156 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.convert.Convert;
-import cn.hutool.core.lang.TypeReference;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.model.result.R;
-import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.common.utils.RedisUtil;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerGatherDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerGatherMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerGatherDetailService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerGatherService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerGatherDetailInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerGatherDetailVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerGatherPageVo;
-import com.xjrsoft.module.organization.entity.User;
-import com.xjrsoft.module.workflow.utils.WorkFlowUtil;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-import java.time.Duration;
-import java.time.LocalDateTime;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 客户回款【case_erp_customer_gather】 服务实现类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
-@Service
-@AllArgsConstructor
-public class CaseErpCustomerGatherServiceImpl extends ServiceImpl<CaseErpCustomerGatherMapper, CaseErpCustomerGather> implements ICaseErpCustomerGatherService {
-
-    private final ICaseErpCustomerGatherDetailService caseErpCustomerGatherDetailService;
-
-    private RedisUtil redisUtil;
-
-    @Override
-    public CaseErpCustomerGatherDetailInfoVo gatherDetailInfo(Long id) {
-        CaseErpCustomerGather caseErpCustomerGather = this.getById(id);
-        if (caseErpCustomerGather == null) {
-            R.error("找不到此客户回款信息!");
-        }
-        CaseErpCustomerGatherDetailInfoVo caseErpCustomerGatherDetailInfoVo = BeanUtil.toBean(caseErpCustomerGather, CaseErpCustomerGatherDetailInfoVo.class);
-        List<User> allUser = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        if (StrUtil.isNotBlank(caseErpCustomerGather.getPrincipalIds())) {
-            List<Long> ids = Arrays.stream(caseErpCustomerGather.getPrincipalIds().split(StringPool.COMMA)).map(Convert::toLong).collect(Collectors.toList());
-            List<String> names = allUser.stream().filter(x -> ids.contains(x.getId())).map(User::getName).collect(Collectors.toList());
-            caseErpCustomerGatherDetailInfoVo.setPrincipalNames(StrUtil.join(StringPool.COMMA, names));
-        }
-        if (ObjectUtil.isNotEmpty(caseErpCustomerGather.getCreateUserId())) {
-            User user = allUser.stream().filter(x -> x.getId().equals(caseErpCustomerGather.getCreateUserId())).findFirst().orElse(new User());
-            if (StrUtil.isNotBlank(user.getName())) {
-                caseErpCustomerGatherDetailInfoVo.setCreateUserName(user.getName());
-            }
-        }
-        User user = allUser.stream().filter(x -> ObjectUtil.isNotEmpty(caseErpCustomerGather.getCreateUserId()) && x.getId().equals(caseErpCustomerGather.getCreateUserId())).findFirst().orElse(new User());
-        if (StrUtil.isNotBlank(user.getName())) {
-            caseErpCustomerGatherDetailInfoVo.setCreateUserName(user.getName());
-        }
-        List<CaseErpCustomerGatherDetail> list = caseErpCustomerGatherDetailService.list(Wrappers.<CaseErpCustomerGatherDetail>query().lambda()
-                .eq(CaseErpCustomerGatherDetail::getGatherId, id).orderByDesc(CaseErpCustomerGatherDetail::getCreateDate));
-        List<CaseErpCustomerGatherDetailVo> caseErpCustomerGatherDetailVos = BeanUtil.copyToList(list, CaseErpCustomerGatherDetailVo.class);
-        for (CaseErpCustomerGatherDetailVo caseErpCustomerGatherDetailVo : caseErpCustomerGatherDetailVos) {
-            if (ObjectUtil.isNotEmpty(caseErpCustomerGatherDetailVo.getCreateUserId())) {
-                User user1 = allUser.stream().filter(x -> x.getId().equals(caseErpCustomerGatherDetailVo.getCreateUserId())).findFirst().orElse(new User());
-                if (StrUtil.isNotBlank(user1.getName())) {
-                    caseErpCustomerGatherDetailVo.setCreateUserName(user1.getName());
-                }
-            }
-        }
-        caseErpCustomerGatherDetailInfoVo.setCaseErpCustomerGatherDetailVoList(caseErpCustomerGatherDetailVos);
-        return caseErpCustomerGatherDetailInfoVo;
-    }
-
-    @Override
-    public PageOutput<CaseErpCustomerGatherPageVo> getPageList(CaseErpCustomerGatherDto dto) {
-        if (ObjectUtil.isNotNull(dto.getReceivedStartTime()) && ObjectUtil.isNotNull(dto.getReceivedEndTime())) {
-            dto.setReceivedStartTime(WorkFlowUtil.getStartOfDay(dto.getReceivedStartTime()));
-            dto.setReceivedEndTime(WorkFlowUtil.getEndOfDay(dto.getReceivedEndTime()));
-        }
-        if (ObjectUtil.isNotNull(dto.getFinallyStartTime()) && ObjectUtil.isNotNull(dto.getFinallyEndTime())) {
-            dto.setFinallyStartTime(WorkFlowUtil.getStartOfDay(dto.getFinallyStartTime()));
-            dto.setFinallyEndTime(WorkFlowUtil.getEndOfDay(dto.getFinallyEndTime()));
-        }
-        List<CaseErpCustomerGather> list = this.list(Wrappers.<CaseErpCustomerGather>query().lambda()
-                .like(StrUtil.isNotBlank(dto.getKeyword()), CaseErpCustomerGather::getName, dto.getKeyword())
-                        .orderByDesc(CaseErpCustomerGather::getCreateDate)
-                .between(ObjectUtil.isNotNull(dto.getFinallyStartTime()) && ObjectUtil.isNotNull(dto.getFinallyEndTime())
-                        , CaseErpCustomerGather::getFinallyDate, dto.getFinallyStartTime(), dto.getFinallyEndTime())
-                .between(ObjectUtil.isNotNull(dto.getReceivedStartTime()) && ObjectUtil.isNotNull(dto.getReceivedEndTime())
-                        , CaseErpCustomerGather::getReceivedDate, dto.getReceivedStartTime(), dto.getReceivedEndTime())
-        );
-        List<CaseErpCustomerGatherPageVo> caseErpCustomerGatherPageVoList = BeanUtil.copyToList(list, CaseErpCustomerGatherPageVo.class);
-
-        List<Long> gatherIdList = caseErpCustomerGatherDetailService.list().stream().map(x -> x.getGatherId()).collect(Collectors.toList());
-
-        List<User> allUser = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        for (CaseErpCustomerGatherPageVo caseErpCustomerGatherPageVo : caseErpCustomerGatherPageVoList) {
-            if (ObjectUtil.isNotEmpty(caseErpCustomerGatherPageVo.getCreateUserId())){
-                User user = allUser.stream().filter(x -> x.getId().equals(caseErpCustomerGatherPageVo.getCreateUserId())).findFirst().orElse(new User());
-                if (StrUtil.isNotBlank(user.getName())){
-                    caseErpCustomerGatherPageVo.setCreateUserName(user.getName());
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomerGatherPageVo.getUnpaidAmount()) && BigDecimal.ZERO.compareTo(caseErpCustomerGatherPageVo.getUnpaidAmount()) == 0){//已完成
-                caseErpCustomerGatherPageVo.setState(1);//已完成
-                caseErpCustomerGatherPageVo.setOverDay(0L);
-            }else {
-                //逾期天数:今天-计划回款时间
-                LocalDateTime now = LocalDateTime.now();
-                if (gatherIdList.contains(caseErpCustomerGatherPageVo.getId()) || now.isAfter(caseErpCustomerGatherPageVo.getReceivedDate())) {
-                    caseErpCustomerGatherPageVo.setState(0);//进行中
-                } else {
-                    caseErpCustomerGatherPageVo.setState(-1);//未开始
-                }
-
-                if (caseErpCustomerGatherPageVo.getAlreadyAmount() == null) {
-                    caseErpCustomerGatherPageVo.setAlreadyAmount(BigDecimal.ZERO);
-                }
-                if (caseErpCustomerGatherPageVo.getUnpaidAmount() == null) {
-                    caseErpCustomerGatherPageVo.setUnpaidAmount(BigDecimal.ZERO);
-                }
-                // 逾期天数
-                if (now.isAfter(caseErpCustomerGatherPageVo.getFinallyDate())) {
-                    long between = Duration.between(caseErpCustomerGatherPageVo.getFinallyDate(), LocalDateTime.now()).toDays();
-                    caseErpCustomerGatherPageVo.setOverDay(between);
-                } else {
-                    caseErpCustomerGatherPageVo.setOverDay(0L);
-                }
-            }
-        }
-        PageOutput<CaseErpCustomerGatherPageVo> output = new PageOutput<>();
-        output.setCurrentPage(dto.getLimit());
-        output.setPageSize(dto.getSize());
-        output.setTotal(list.size());
-        output.setList(caseErpCustomerGatherPageVoList);
-        return output;
-    }
-}

+ 0 - 602
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/service/impl/CaseErpCustomerServiceImpl.java

@@ -1,602 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.service.impl;
-
-import cn.dev33.satoken.stp.StpUtil;
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.date.DateField;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.lang.TypeReference;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.excel.EasyExcel;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.xjrsoft.common.enums.YesOrNoEnum;
-import com.xjrsoft.common.exception.MyException;
-import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.common.utils.RedisUtil;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerContactsDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.CaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.ImportCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.TransferCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerDto;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomer;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerContacts;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerFollow;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerGatherDetailMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerGatherMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.mapper.CaseErpCustomerMapper;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerContactsService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerFollowService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerService;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerCommonExportVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerContactsInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerDetailInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerExportVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerFollowInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerInfoVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCustomerVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerAllVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerPxaymentVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerSourceVo;
-import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CustomerVo;
-import com.xjrsoft.module.erpModel.caseErpLog.entity.CaseErpLog;
-import com.xjrsoft.module.erpModel.caseErpLog.service.ICaseErpLogService;
-import com.xjrsoft.module.organization.entity.User;
-import com.xjrsoft.module.system.entity.DictionaryDetail;
-import com.xjrsoft.module.system.service.IDictionarydetailService;
-import com.xjrsoft.module.workflow.utils.WorkFlowUtil;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * <p>
- * 客户信息【case_erp_customer】 服务实现类
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-11
- */
-@Service
-@AllArgsConstructor
-public class CaseErpCustomerServiceImpl extends MPJBaseServiceImpl<CaseErpCustomerMapper, CaseErpCustomer> implements ICaseErpCustomerService {
-
-    private final ICaseErpCustomerContactsService caseErpCustomerContactsService;
-
-    private final ICaseErpCustomerFollowService caseErpCustomerFollowService;
-
-    private final CaseErpCustomerGatherDetailMapper caseErpCustomerGatherDetailMapper;
-
-    private final CaseErpCustomerGatherMapper caseErpCustomerGatherMapper;
-
-
-    private final IDictionarydetailService dictionarydetailService;
-
-    private RedisUtil redisUtil;
-
-    private ICaseErpLogService caseErpLogService;
-
-    @Override
-    public PageOutput<CaseErpCustomerVo> getPageList(CaseErpCustomerDto dto) {
-        if (ObjectUtil.isNotNull(dto.getStartTime()) && ObjectUtil.isNotNull(dto.getEndTime())) {
-            dto.setStartTime(WorkFlowUtil.getStartOfDay(dto.getStartTime()));
-            dto.setEndTime(WorkFlowUtil.getEndOfDay(dto.getEndTime()));
-        }
-
-        List<CaseErpCustomer> list = this.list(Wrappers.lambdaQuery(CaseErpCustomer.class)
-                        .orderByDesc(CaseErpCustomer::getCreateDate)
-                .eq(ObjectUtil.isNotEmpty(dto.getState()), CaseErpCustomer::getState, dto.getState())
-                .eq(ObjectUtil.isNotEmpty(dto.getTypeId()), CaseErpCustomer::getTypeId, dto.getTypeId())
-                .like(StrUtil.isNotBlank(dto.getName()), CaseErpCustomer::getName, dto.getName())
-                .like(ObjectUtil.isNotEmpty(dto.getState()) && dto.getState().equals(YesOrNoEnum.NO.getCode()),
-                        CaseErpCustomer::getSaleIds, StpUtil.getLoginIdAsString()) // 当前人员的id,非公海客户
-                .eq(ObjectUtil.isNotEmpty(dto.getSourceId()), CaseErpCustomer::getSourceId, dto.getSourceId())
-                .between(ObjectUtil.isNotNull(dto.getStartTime()) && ObjectUtil.isNotNull(dto.getEndTime())
-                        , CaseErpCustomer::getCreateDate, dto.getStartTime(), dto.getEndTime()));
-
-        //进行id和名称的转换
-        List<CaseErpCustomerVo> result = this.convert(list);
-        PageOutput<CaseErpCustomerVo> output = new PageOutput<>();
-        output.setCurrentPage(dto.getLimit());
-        output.setPageSize(dto.getSize());
-        output.setTotal(list.size());
-        output.setList(result);
-
-        return output;
-    }
-
-    @Override
-    public Boolean common(List<Long> ids) {
-        List<CaseErpCustomer> caseErpCustomerList = new ArrayList<>();
-        List<CaseErpLog> caseErpLogList = new ArrayList<>();
-        List<CaseErpCustomer> caseErpCustomers = this.list();
-        for (Long id : ids) {
-            //需要先查询再修改,防止出现转移的时候默认联系人、电话等数据为空,因为实体类设置了,更新时不忽略为空的数据    @TableField(updateStrategy = FieldStrategy.IGNORED)
-            CaseErpCustomer caseErpCustomer = caseErpCustomers.stream().filter(x -> x.getId().equals(id)).findFirst().orElse(new CaseErpCustomer());
-            if (caseErpCustomer == null){
-                throw new MyException("找不到此客户信息!");
-            }
-            caseErpCustomer.setState(YesOrNoEnum.YES.getCode());
-            caseErpCustomer.setSaleIds(null);
-            caseErpCustomer.setInOpenDate(LocalDateTime.now());
-            caseErpCustomerList.add(caseErpCustomer);
-
-            CaseErpLog log = new CaseErpLog();
-            log.setKeyId(id);
-            log.setCategoryId(0);
-            log.setExecuteResultJson("客户移入公海");
-            caseErpLogList.add(log);
-        }
-        this.updateBatchById(caseErpCustomerList);
-        caseErpLogService.saveBatch(caseErpLogList);
-        return true;
-    }
-
-    @Override
-    public Boolean transfer(TransferCaseErpCustomerDto dto) {
-        //需要先查询再修改,防止出现转移的时候默认联系人、电话等数据为空,因为实体类设置了,更新时不忽略为空的数据    @TableField(updateStrategy = FieldStrategy.IGNORED)
-        CaseErpCustomer caseErpCustomer = this.getById(dto.getId());
-        if (caseErpCustomer == null){
-            throw new MyException("找不到此客户信息!");
-        }
-        caseErpCustomer.setId(dto.getId());
-        caseErpCustomer.setSaleIds(dto.getSaleIds());
-        this.updateById(caseErpCustomer);
-
-        CaseErpLog log = new CaseErpLog();
-        log.setKeyId(dto.getId());
-        log.setCategoryId(0);
-        log.setExecuteResultJson("客户转移");
-        caseErpLogService.save(log);
-
-        return true;
-    }
-
-    @Override
-    public CaseErpCustomerInfoVo info(CaseErpCustomer caseErpCustomer) {
-        CaseErpCustomerInfoVo caseErpCustomerInfoVo = BeanUtil.toBean(caseErpCustomer, CaseErpCustomerInfoVo.class);
-        List<CaseErpCustomerContacts> list = caseErpCustomerContactsService.list(Wrappers.<CaseErpCustomerContacts>query().lambda().eq(CaseErpCustomerContacts::getCustomerId, caseErpCustomer.getId()));
-        caseErpCustomerInfoVo.setCaseErpCustomerContacts(list);
-        return caseErpCustomerInfoVo;
-    }
-
-    @Override
-    public List<CaseErpCustomerExportVo> export(List<Long> ids) {
-        List<CaseErpCustomer> list = this.list(Wrappers.lambdaQuery(CaseErpCustomer.class)
-                .in(CaseErpCustomer::getId, ids));
-        //进行id和名称的转换
-        List<CaseErpCustomerVo> result = this.convert(list);
-        List<CaseErpCustomerExportVo> exportVoList = BeanUtil.copyToList(result, CaseErpCustomerExportVo.class);
-        return exportVoList;
-    }
-
-    @Override
-    public Boolean importData(MultipartFile file) throws IOException {
-        return this.importCommon(file, YesOrNoEnum.NO.getCode());
-    }
-
-    /**
-     * 客户列表与公海列表导入公共方法
-     *
-     * @param file  导入的文件
-     * @param state 1公海列表,0客户列表
-     * @return
-     * @throws IOException
-     */
-    private Boolean importCommon(MultipartFile file, Integer state) throws IOException {
-        List<ImportCaseErpCustomerDto> savedDataList = EasyExcel.read(file.getInputStream()).head(ImportCaseErpCustomerDto.class).sheet().doReadSync();
-        List<CaseErpCustomer> caseErpCustomerList = new ArrayList<>();
-        List<DictionaryDetail> dictionaryDetailList = dictionarydetailService.list();
-        for (ImportCaseErpCustomerDto importCaseErpCustomerDto : savedDataList) {
-            CaseErpCustomer caseErpCustomer = BeanUtil.toBean(importCaseErpCustomerDto, CaseErpCustomer.class);
-            if (state == YesOrNoEnum.NO.getCode()) {
-                caseErpCustomer.setState(YesOrNoEnum.NO.getCode());
-                caseErpCustomer.setSaleIds(StpUtil.getLoginIdAsString());
-            } else {
-                caseErpCustomer.setState(YesOrNoEnum.YES.getCode());
-                caseErpCustomer.setSaleIds(null);
-            }
-            if (StrUtil.isNotBlank(importCaseErpCustomerDto.getTypeName())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getName().equals(importCaseErpCustomerDto.getTypeName())).findFirst().orElse(new DictionaryDetail());
-                if (ObjectUtil.isNotEmpty(dictionaryDetail.getId())) {
-                    caseErpCustomer.setTypeId(dictionaryDetail.getId());
-                }
-            }
-            if (StrUtil.isNotBlank(importCaseErpCustomerDto.getScaleName())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getName().equals(importCaseErpCustomerDto.getScaleName())).findFirst().orElse(new DictionaryDetail());
-                if (ObjectUtil.isNotEmpty(dictionaryDetail.getId())) {
-                    caseErpCustomer.setScaleId(dictionaryDetail.getId());
-                }
-            }
-            if (StrUtil.isNotBlank(importCaseErpCustomerDto.getNatureName())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getName().equals(importCaseErpCustomerDto.getNatureName())).findFirst().orElse(new DictionaryDetail());
-                if (ObjectUtil.isNotEmpty(dictionaryDetail.getId())) {
-                    caseErpCustomer.setNatureId(dictionaryDetail.getId());
-                }
-            }
-            if (StrUtil.isNotBlank(importCaseErpCustomerDto.getSourceName())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getName().equals(importCaseErpCustomerDto.getSourceName())).findFirst().orElse(new DictionaryDetail());
-                if (ObjectUtil.isNotEmpty(dictionaryDetail.getId())) {
-                    caseErpCustomer.setSourceId(dictionaryDetail.getId());
-                }
-            }
-            caseErpCustomerList.add(caseErpCustomer);
-        }
-        return this.saveBatch(BeanUtil.copyToList(caseErpCustomerList, CaseErpCustomer.class));
-    }
-
-    @Override
-    public List<CaseErpCustomerCommonExportVo> exportCommon() {
-        List<CaseErpCustomer> list = this.list(Wrappers.lambdaQuery(CaseErpCustomer.class)
-                .in(CaseErpCustomer::getState, YesOrNoEnum.YES.getCode()));
-        //进行id和名称的转换
-        List<CaseErpCustomerVo> result = this.convert(list);
-        List<CaseErpCustomerCommonExportVo> exportVoList = BeanUtil.copyToList(result, CaseErpCustomerCommonExportVo.class);
-        return exportVoList;
-    }
-
-    @Override
-    public Boolean importCommonData(MultipartFile file) throws IOException {
-        return this.importCommon(file, YesOrNoEnum.YES.getCode());
-    }
-
-    @Override
-    public CaseErpCustomerVo baseInfo(CaseErpCustomer caseErpCustomer) {
-        List<CaseErpCustomer> caseErpCustomerList = new ArrayList<>();
-        caseErpCustomerList.add(caseErpCustomer);
-        //做转换使用
-        List<CaseErpCustomerVo> convert = this.convert(caseErpCustomerList);
-        CaseErpCustomerVo caseErpCustomerVo = new CaseErpCustomerVo();
-        if (CollectionUtil.isNotEmpty(convert)) {
-            caseErpCustomerVo = convert.get(0);
-        }
-        return caseErpCustomerVo;
-    }
-
-    @Override
-    public CaseErpCustomerDetailInfoVo detailInfo(CaseErpCustomer caseErpCustomer) {
-        List<DictionaryDetail> dictionaryDetailList = dictionarydetailService.list();
-        List<User> userList = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        CaseErpCustomerDetailInfoVo caseErpCustomerDetailInfoVo = new CaseErpCustomerDetailInfoVo();
-        //客户信息
-        CaseErpCustomerVo caseErpCustomerVo = this.baseInfo(caseErpCustomer);
-        caseErpCustomerDetailInfoVo.setId(caseErpCustomer.getId());
-        caseErpCustomerDetailInfoVo.setCaseErpCustomerVo(caseErpCustomerVo);
-        //跟进人信息
-        List<CaseErpCustomerFollow> list = caseErpCustomerFollowService.list(Wrappers.<CaseErpCustomerFollow>query().lambda()
-                .eq(CaseErpCustomerFollow::getCustomerId, caseErpCustomer.getId()).orderByDesc(CaseErpCustomerFollow::getCreateDate));
-        List<CaseErpCustomerFollowInfoVo> caseErpCustomerFollowInfoVoList = caseErpCustomerFollowService.info(list, dictionaryDetailList, userList);
-        caseErpCustomerDetailInfoVo.setCaseErpCustomerFollowInfoVoList(caseErpCustomerFollowInfoVoList);
-        //联系人信息
-        List<CaseErpCustomerContacts> caseErpCustomerContactsList = caseErpCustomerContactsService.list(Wrappers.<CaseErpCustomerContacts>query().lambda()
-                .eq(CaseErpCustomerContacts::getCustomerId, caseErpCustomer.getId()).orderByDesc(CaseErpCustomerContacts::getCreateDate));
-        List<CaseErpCustomerContactsInfoVo> caseErpCustomerContactsInfoVoList = caseErpCustomerContactsService.info(caseErpCustomerContactsList, userList);
-        caseErpCustomerDetailInfoVo.setCaseErpCustomerContactsInfoVoList(caseErpCustomerContactsInfoVoList);
-        //操作记录
-        List<CaseErpLog> caseErpLogList = caseErpLogService.list(Wrappers.<CaseErpLog>query().lambda()
-                .eq(CaseErpLog::getKeyId, caseErpCustomer.getId()).orderByDesc(CaseErpLog::getCreateDate));
-
-        for (CaseErpLog caseErpLog : caseErpLogList) {
-            if (ObjectUtil.isNotEmpty(caseErpLog.getCreateUserId())){
-                User user = userList.stream().filter(x -> x.getId().equals(caseErpLog.getCreateUserId())).findFirst().orElse(new User());
-                caseErpLog.setOperateUserAccount(user.getName());
-            }
-        }
-        caseErpCustomerDetailInfoVo.setCaseErpLogList(caseErpLogList);
-
-        return caseErpCustomerDetailInfoVo;
-    }
-
-    @Override
-    public Boolean getFromCommon(Long id) {
-        //需要先查询再修改,防止出现转移的时候默认联系人、电话等数据为空,因为实体类设置了,更新时不忽略为空的数据    @TableField(updateStrategy = FieldStrategy.IGNORED)
-        CaseErpCustomer customer = this.getById(id);
-        customer.setState(YesOrNoEnum.NO.getCode());
-        customer.setSaleIds(StpUtil.getLoginIdAsString());
-        this.updateById(customer);
-
-        CaseErpLog log = new CaseErpLog();
-        log.setKeyId(id);
-        log.setCategoryId(0);
-        log.setExecuteResultJson("客户领取");
-        caseErpLogService.save(log);
-
-        return true;
-    }
-
-    @Override
-    public List<CustomerSourceVo> getCustomerSource() {
-        List<CustomerSourceVo> list = new ArrayList<>();
-        CustomerSourceVo supplierRiskVo = new CustomerSourceVo();
-        supplierRiskVo.setName("访问官网");
-        supplierRiskVo.setValue(25);
-        CustomerSourceVo supplierRiskVo2 = new CustomerSourceVo();
-        supplierRiskVo2.setName("电话销售");
-        supplierRiskVo2.setValue(35);
-        CustomerSourceVo supplierRiskVo3 = new CustomerSourceVo();
-        supplierRiskVo3.setName("客户介绍");
-        supplierRiskVo3.setValue(20);
-        CustomerSourceVo supplierRiskVo4 = new CustomerSourceVo();
-        supplierRiskVo4.setName("主动来电");
-        supplierRiskVo4.setValue(18);
-        CustomerSourceVo supplierRiskVo5 = new CustomerSourceVo();
-        supplierRiskVo5.setName("其他途径");
-        supplierRiskVo5.setValue(2);
-        list.add(supplierRiskVo);
-        list.add(supplierRiskVo2);
-        list.add(supplierRiskVo3);
-        list.add(supplierRiskVo4);
-        list.add(supplierRiskVo5);
-        return list;
-    }
-
-    @Override
-    public List<CustomerAllVo> getAll() {
-        List<CustomerAllVo> result = new ArrayList<>();
-
-        List<CaseErpCustomer> caseErpCustomerList = this.baseMapper.selectList(Wrappers.<CaseErpCustomer>query().lambda()
-                .eq(CaseErpCustomer::getState,0)
-                .gt(CaseErpCustomer::getCreateDate,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,-1))
-                .lt(CaseErpCustomer::getCreateDate,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,-1))
-        );
-        CustomerAllVo customerAllVo = new CustomerAllVo();
-        customerAllVo.setName("今日新增客户");
-        customerAllVo.setNum(caseErpCustomerList.size());
-        result.add(customerAllVo);
-
-        List<CaseErpCustomerFollow> caseErpCustomerFollowList = caseErpCustomerFollowService.list(Wrappers.<CaseErpCustomerFollow>query().lambda()
-                        .gt(CaseErpCustomerFollow::getCreateDate,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,-1))
-                        .lt(CaseErpCustomerFollow::getCreateDate,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,-1))
-                );
-        CustomerAllVo customerAllVo2 = new CustomerAllVo();
-        customerAllVo2.setName("今日跟进客户");
-        customerAllVo2.setNum(caseErpCustomerFollowList.size());
-        result.add(customerAllVo2);
-
-        List<CaseErpCustomerGatherDetail> caseErpCustomergatherdetails = caseErpCustomerGatherDetailMapper.selectList(Wrappers.<CaseErpCustomerGatherDetail>query().lambda()
-                .gt(CaseErpCustomerGatherDetail::getRefundDate,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,-1))
-                .lt(CaseErpCustomerGatherDetail::getRefundDate,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,1)));
-        CustomerAllVo customerAllVo3=new CustomerAllVo();
-        customerAllVo3.setName("今日回款客户");
-        customerAllVo3.setNum(caseErpCustomergatherdetails.size());
-        result.add(customerAllVo3);
-
-
-        List<CaseErpCustomerFollow> caseErpCustomerfollows2 = caseErpCustomerFollowService.list(Wrappers.<CaseErpCustomerFollow>query().lambda()
-                .gt(CaseErpCustomerFollow::getNextFollowTime,DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.DAY_OF_MONTH,0))
-        );
-        CustomerAllVo customerAllVo4=new CustomerAllVo();
-        customerAllVo4.setName("待跟进客户");
-        customerAllVo4.setNum(caseErpCustomerfollows2.size());
-        result.add(customerAllVo4);
-
-        List<CaseErpCustomerGather> caseErpCustomergathers = caseErpCustomerGatherMapper.selectList(Wrappers.<CaseErpCustomerGather>query().lambda()
-                .gt(CaseErpCustomerGather::getReceivedDate, DateUtil.offset(DateUtil.parse(DateUtil.now(),"yyyy-MM-dd"), DateField.MONTH,0)));
-        CustomerAllVo customerAllVo5=new CustomerAllVo();
-        customerAllVo5.setName("待回款客户");
-        customerAllVo5.setNum(caseErpCustomergathers.size());
-        result.add(customerAllVo5);
-
-        return result;
-    }
-
-    @Override
-    public List<CustomerPxaymentVo> getCustomerPaymexnt() {
-        List<CustomerPxaymentVo>list=new ArrayList<>();
-        CustomerPxaymentVo vo=new CustomerPxaymentVo();
-        List<String>category=new ArrayList<>();
-        List<Integer>data=new ArrayList<>();
-        for (int i = 0; i < 12; i++) {
-            category.add(i+1+"月"); data.add(77+i*15);
-        }
-        vo.setCategory(category);vo.setData(data);vo.setKey(2);vo.setName("年度");list.add(vo);
-        CustomerPxaymentVo vo2=new CustomerPxaymentVo();
-        List<String>category2=new ArrayList<>();
-        List<Integer>data2=new ArrayList<>();
-        category2.add("一季度"); category2.add("二季度"); category2.add("三季度"); category2.add("四季度");
-        data2.add(100);data2.add(235);data2.add(300);data2.add(365);
-        vo2.setCategory(category2);vo2.setData(data2);vo2.setKey(1);vo2.setName("季度");list.add(vo2);
-        CustomerPxaymentVo vo3=new CustomerPxaymentVo();
-        List<String>category3=new ArrayList<>();
-        List<Integer>data3=new ArrayList<>();
-        for (int i = 0; i < 30; i++) {
-            category3.add(i+1+"日"); data3.add(57+i*11);
-        }
-        vo3.setCategory(category3);vo3.setData(data3);vo3.setKey(0);vo3.setName("月度");list.add(vo3);
-        return list;
-    }
-
-    @Override
-    public List<CustomerVo> getCustomerType() {
-        List<CustomerVo> result = new ArrayList<>();
-        List<CaseErpCustomer> caseErpCustomerList = this.list();
-        List<DictionaryDetail> list = dictionarydetailService.list(Wrappers.<DictionaryDetail>query().lambda().eq(DictionaryDetail::getItemId, 1679007059387240450L));
-        for (DictionaryDetail dictionaryDetail : list) {
-            CustomerVo customerVo = new CustomerVo();
-            customerVo.setName(dictionaryDetail.getName());
-            List<CaseErpCustomer> collect = caseErpCustomerList.stream().filter(x -> x.getTypeId().equals(dictionaryDetail.getId())).collect(Collectors.toList());
-            customerVo.setValue(collect.size());
-            result.add(customerVo);
-        }
-        return result;
-    }
-
-    /**
-     * 将id转换成名称
-     *
-     * @param list
-     * @return
-     */
-    private List<CaseErpCustomerVo> convert(List<CaseErpCustomer> list) {
-        List<CaseErpCustomerVo> result = new ArrayList<>();
-        List<DictionaryDetail> dictionaryDetailList = dictionarydetailService.list();
-        List<User> userList = redisUtil.get(GlobalConstant.USER_CACHE_KEY, new TypeReference<List<User>>() {
-        });
-        for (CaseErpCustomer caseErpCustomer : list) {
-            CaseErpCustomerVo caseErpCustomerVo = BeanUtil.toBean(caseErpCustomer, CaseErpCustomerVo.class);
-            if (ObjectUtil.isNotEmpty(caseErpCustomer.getTypeId())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getId().equals(caseErpCustomer.getTypeId())).findFirst().orElse(new DictionaryDetail());
-                if (StrUtil.isNotBlank(dictionaryDetail.getName())) {
-                    caseErpCustomerVo.setTypeName(dictionaryDetail.getName());
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomer.getSourceId())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getId().equals(caseErpCustomer.getSourceId())).findFirst().orElse(new DictionaryDetail());
-                if (StrUtil.isNotBlank(dictionaryDetail.getName())) {
-                    caseErpCustomerVo.setSourceName(dictionaryDetail.getName());
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomer.getNatureId())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getId().equals(caseErpCustomer.getNatureId())).findFirst().orElse(new DictionaryDetail());
-                if (StrUtil.isNotBlank(dictionaryDetail.getName())) {
-                    caseErpCustomerVo.setNatureName(dictionaryDetail.getName());
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomer.getScaleId())) {
-                DictionaryDetail dictionaryDetail = dictionaryDetailList.stream().filter(x -> x.getId().equals(caseErpCustomer.getScaleId())).findFirst().orElse(new DictionaryDetail());
-                if (StrUtil.isNotBlank(dictionaryDetail.getName())) {
-                    caseErpCustomerVo.setScaleName(dictionaryDetail.getName());
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomer.getSaleIds())) {
-                List<Long> userIds = userList.stream().filter(x -> caseErpCustomer.getSaleIds().contains(x.getId().toString())).map(User::getId).collect(Collectors.toList());
-                if (CollectionUtil.isNotEmpty(userIds)) {
-                    String userNames = WorkFlowUtil.getAllUserNamesByIds(userIds);
-                    caseErpCustomerVo.setSaleName(userNames);
-                }
-            }
-            if (ObjectUtil.isNotEmpty(caseErpCustomer.getCreateUserId())) {
-                User user = userList.stream().filter(x -> x.getId().equals(caseErpCustomer.getCreateUserId())).findFirst().orElse(new User());
-                if (StrUtil.isNotBlank(user.getName())) {
-                    caseErpCustomerVo.setCreateUserName(user.getName());
-                }
-            }
-            result.add(caseErpCustomerVo);
-        }
-        return result;
-    }
-
-    @Override
-    public Boolean add(AddCaseErpCustomerDto dto) {
-        CaseErpCustomer caseErpCustomer = BeanUtil.toBean(dto, CaseErpCustomer.class);
-        if (ObjectUtil.isNotEmpty(dto.getState()) && dto.getState() == YesOrNoEnum.NO.getCode()) {
-            caseErpCustomer.setSaleIds(StpUtil.getLoginIdAsString());//正常新增
-        } else {//公海新增
-            caseErpCustomer.setInOpenDate(LocalDateTime.now());
-        }
-        boolean save = this.save(caseErpCustomer);
-        if (CollectionUtil.isNotEmpty(dto.getAddCaseErpCustomerContactsDtoList())) {
-            CaseErpCustomerContactsDto caseErpCustomerContactsDto1 = dto.getAddCaseErpCustomerContactsDtoList().stream().filter(x -> x.getIsDefault().equals(YesOrNoEnum.YES.getCode())).findFirst().orElse(new CaseErpCustomerContactsDto());
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getName())) {
-                caseErpCustomer.setDefaultName(caseErpCustomerContactsDto1.getName());
-            }
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getPhone())) {
-                caseErpCustomer.setDefaultPhone(caseErpCustomerContactsDto1.getPhone());
-            }
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getDept())) {
-                caseErpCustomer.setDefaultDep(caseErpCustomerContactsDto1.getDept());
-            }
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getPost())) {
-                caseErpCustomer.setDefaultPost(caseErpCustomerContactsDto1.getPost());
-            }
-            this.updateById(caseErpCustomer);
-            List<CaseErpCustomerContacts> caseErpCustomerContacts = BeanUtil.copyToList(dto.getAddCaseErpCustomerContactsDtoList(), CaseErpCustomerContacts.class);
-            if (save && CollectionUtil.isNotEmpty(caseErpCustomerContacts)) {
-                for (CaseErpCustomerContacts caseErpCustomerContact : caseErpCustomerContacts) {
-                    caseErpCustomerContact.setCustomerId(caseErpCustomer.getId());
-                }
-                caseErpCustomerContactsService.saveBatch(caseErpCustomerContacts);
-            }
-        }
-        if (dto.getState() == YesOrNoEnum.YES.getCode()) {//公海客户新增
-            CaseErpLog log = new CaseErpLog();
-            log.setKeyId(caseErpCustomer.getId());
-            log.setCategoryId(0);
-            log.setExecuteResultJson("新增公海客户信息");
-            caseErpLogService.save(log);
-        } else {//客户新增
-            CaseErpLog log = new CaseErpLog();
-            log.setKeyId(caseErpCustomer.getId());
-            log.setCategoryId(0);
-            log.setExecuteResultJson("新增客户信息");
-            caseErpLogService.save(log);
-        }
-        return true;
-    }
-
-    @Override
-    public Boolean update(UpdateCaseErpCustomerDto dto) {
-        CaseErpCustomer caseErpCustomer = BeanUtil.toBean(dto, CaseErpCustomer.class);
-        boolean save = this.updateById(caseErpCustomer);
-        if (CollectionUtil.isNotEmpty(dto.getAddCaseErpCustomerContactsDtoList())) {
-            CaseErpCustomerContactsDto caseErpCustomerContactsDto1 = dto.getAddCaseErpCustomerContactsDtoList().stream().filter(x -> x.getIsDefault().equals(YesOrNoEnum.YES.getCode())).findFirst().orElse(new CaseErpCustomerContactsDto());
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getName())) {
-                caseErpCustomer.setDefaultName(caseErpCustomerContactsDto1.getName());
-            }
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getPhone())) {
-                caseErpCustomer.setDefaultPhone(caseErpCustomerContactsDto1.getPhone());
-            }
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getDept())) {
-                caseErpCustomer.setDefaultDep(caseErpCustomerContactsDto1.getDept());
-            }
-            if (StrUtil.isNotBlank(caseErpCustomerContactsDto1.getPost())) {
-                caseErpCustomer.setDefaultPost(caseErpCustomerContactsDto1.getPost());
-            }
-            this.updateById(caseErpCustomer);
-            List<CaseErpCustomerContacts> caseErpCustomerContacts = BeanUtil.copyToList(dto.getAddCaseErpCustomerContactsDtoList(), CaseErpCustomerContacts.class);
-            if (save) {
-                for (CaseErpCustomerContacts caseErpCustomerContact : caseErpCustomerContacts) {
-                    caseErpCustomerContact.setCustomerId(caseErpCustomer.getId());
-                }
-                //先删除再新增
-                caseErpCustomerContactsService.remove(Wrappers.<CaseErpCustomerContacts>query().lambda().eq(CaseErpCustomerContacts::getCustomerId, caseErpCustomer.getId()));
-                caseErpCustomerContactsService.saveBatch(caseErpCustomerContacts);
-            }
-        }else {
-            caseErpCustomer.setDefaultName(null);
-            caseErpCustomer.setDefaultPhone(null);
-            caseErpCustomer.setDefaultPost(null);
-            caseErpCustomer.setDefaultDep(null);
-            this.updateById(caseErpCustomer);
-            caseErpCustomerContactsService.remove(Wrappers.<CaseErpCustomerContacts>query().lambda().eq(CaseErpCustomerContacts::getCustomerId, caseErpCustomer.getId()));
-        }
-        if (dto.getState() == YesOrNoEnum.YES.getCode()) {//公海客户修改
-            CaseErpLog log = new CaseErpLog();
-            log.setKeyId(caseErpCustomer.getId());
-            log.setCategoryId(0);
-            log.setExecuteResultJson("修改公海客户信息");
-            caseErpLogService.save(log);
-        } else {//客户新增
-            CaseErpLog log = new CaseErpLog();
-            log.setKeyId(caseErpCustomer.getId());
-            log.setCategoryId(0);
-            log.setExecuteResultJson("修改客户信息");
-            caseErpLogService.save(log);
-        }
-        return true;
-    }
-
-    @Override
-    public Boolean delete(Long id) {
-        //删客户表信息
-        this.removeById(id);
-        //删除联系表信息
-        caseErpCustomerContactsService.remove(Wrappers.<CaseErpCustomerContacts>query().lambda().eq(CaseErpCustomerContacts::getCustomerId, id));
-        //删除跟进表数据
-        caseErpCustomerFollowService.remove(Wrappers.<CaseErpCustomerFollow>query().lambda().eq(CaseErpCustomerFollow::getCustomerId, id));
-        return true;
-    }
-
-}

+ 0 - 36
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCusGatherDetailInfo.java

@@ -1,36 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-
-@Data
-public class CaseErpCusGatherDetailInfo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户回款外键(case_erp_customer)")
-    private Long gatherId;
-
-    @ApiModelProperty("回款金额")
-    private BigDecimal amountCollect;
-
-    @ApiModelProperty("回款日期")
-    @JsonProperty("date")
-    private Timestamp refundDate;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-
-}

+ 0 - 44
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerCommonExportVo.java

@@ -1,44 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerCommonExportVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-    @ApiModelProperty("客户名称")
-    @ExcelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型")
-    @ExcelProperty("客户类型")
-    private String typeName;
-
-    @ApiModelProperty("联系人")
-    @ExcelProperty("联系人")
-    private String defaultName;
-
-    @ApiModelProperty("电话号码")
-    @ExcelProperty("电话号码")
-    private String defaultPhone;
-
-    @ApiModelProperty("所在行业")
-    @ExcelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源")
-    @ExcelProperty("来源")
-    private String sourceName;
-
-    @ApiModelProperty("加入公海日期")
-    @ExcelProperty("加入公海日期")
-    private LocalDateTime inOpenDate;
-
-    @ApiModelProperty("创建人")
-    @ExcelProperty("创建人")
-    private String createUserName;
-}

+ 0 - 40
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerContactsInfoVo.java

@@ -1,40 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerContactsInfoVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("是否为默认联系人(1是,0否)")
-    private Integer isDefault;
-
-    @ApiModelProperty("姓名")
-    private String name;
-
-    @ApiModelProperty("电话")
-    private String phone;
-
-    @ApiModelProperty("职位")
-    private String post;
-
-    @ApiModelProperty("部门")
-    private String dept;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    private LocalDateTime createDate;
-
-    private String createUserName;
-}

+ 0 - 24
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerDetailInfoVo.java

@@ -1,24 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.xjrsoft.module.erpModel.caseErpLog.entity.CaseErpLog;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.List;
-
-@Data
-public class CaseErpCustomerDetailInfoVo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    private CaseErpCustomerVo caseErpCustomerVo;
-
-    private List<CaseErpCustomerFollowInfoVo> caseErpCustomerFollowInfoVoList;
-
-    private List<CaseErpCustomerContactsInfoVo> caseErpCustomerContactsInfoVoList;
-
-    private List<CaseErpLog> caseErpLogList;
-
-}

+ 0 - 48
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerExportVo.java

@@ -1,48 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerExportVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-    @ApiModelProperty("客户名称")
-    @ExcelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型")
-    @ExcelProperty("客户类型")
-    private String typeName;
-
-    @ApiModelProperty("联系人")
-    @ExcelProperty("联系人")
-    private String defaultName;
-
-    @ApiModelProperty("电话号码")
-    @ExcelProperty("电话号码")
-    private String defaultPhone;
-
-    @ApiModelProperty("所在行业")
-    @ExcelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源")
-    @ExcelProperty("来源")
-    private String sourceName;
-
-    @ApiModelProperty("归属")
-    @ExcelProperty("归属")
-    private String saleName;
-
-    @ApiModelProperty("创建日期")
-    @ExcelProperty("创建日期")
-    private LocalDateTime createDate;
-
-    @ApiModelProperty("创建人")
-    @ExcelProperty("创建人")
-    private String createUserName;
-}

+ 0 - 36
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerFollowInfoVo.java

@@ -1,36 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerFollowInfoVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户信息外键(case_erp_customer)")
-    private Long customerId;
-
-    @ApiModelProperty("跟进方式")
-    private String followTypeName;
-
-    @ApiModelProperty("跟进时间")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime followTime;
-
-    @ApiModelProperty("下次跟进时间")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime nextFollowTime;
-
-    @ApiModelProperty("说明")
-    private String content;
-
-    @ApiModelProperty("跟进人")
-    private String createUserName;
-}

+ 0 - 54
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerGatherDetailInfoVo.java

@@ -1,54 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Data
-public class CaseErpCustomerGatherDetailInfoVo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("计划回款金额")
-    private BigDecimal waitAmount;
-
-    @ApiModelProperty("已回款金额")
-    private BigDecimal alreadyAmount;
-
-    @ApiModelProperty("未回款金额")
-    private BigDecimal unpaidAmount;
-
-    @ApiModelProperty("计划回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime receivedDate;
-
-    @ApiModelProperty("最迟回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime finallyDate;
-
-    @ApiModelProperty("合同负责人名称")
-    private String principalNames;
-
-    @ApiModelProperty("合同标题")
-    private String title;
-
-    @ApiModelProperty("创建人")
-    private String createUserName;
-
-    @ApiModelProperty("创建日期")
-    private LocalDateTime createDate;
-
-    @ApiModelProperty("回款记录详情信息集合")
-    List<CaseErpCustomerGatherDetailVo> caseErpCustomerGatherDetailVoList;
-
-}

+ 0 - 45
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerGatherDetailVo.java

@@ -1,45 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerGatherDetailVo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    @ApiModelProperty("客户回款外键(case_erp_customer)")
-    private Long gatherId;
-
-    @ApiModelProperty("回款金额")
-    private BigDecimal amountCollect;
-
-    @ApiModelProperty("回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @JsonProperty("date")
-    private LocalDateTime refundDate;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("备注")
-    private String remark;
-
-    @ApiModelProperty("创建人id")
-    private Long createUserId;
-
-    @ApiModelProperty("创建人")
-    private String createUserName;
-
-    @ApiModelProperty("创建日期")
-    private LocalDateTime createDate;
-
-}

+ 0 - 62
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerGatherPageVo.java

@@ -1,62 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerGatherPageVo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("计划回款金额")
-    private BigDecimal waitAmount;
-
-    @ApiModelProperty("已回款金额")
-    private BigDecimal alreadyAmount;
-
-    @ApiModelProperty("未回款金额")
-    private BigDecimal unpaidAmount;
-
-    @ApiModelProperty("计划回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime receivedDate;
-
-    @ApiModelProperty("最迟回款日期")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private LocalDateTime finallyDate;
-
-    @ApiModelProperty("合同负责人Ids")
-    private String principalIds;
-
-    @ApiModelProperty("合同负责人名称")
-    private String principalNames;
-
-    @ApiModelProperty("合同标题")
-    private String title;
-
-    @ApiModelProperty("创建人id")
-    private Long createUserId;
-
-    @ApiModelProperty("创建人")
-    private String createUserName;
-
-    @ApiModelProperty("创建日期")
-    private LocalDateTime createDate;
-
-    @ApiModelProperty("状态(-1未开始,0进行中,1已完成)")
-    private Integer state;
-
-    @ApiModelProperty("逾期天数")
-    private Long overDay;
-
-}

+ 0 - 45
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerInfoVo.java

@@ -1,45 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerContacts;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.List;
-
-@Data
-public class CaseErpCustomerInfoVo implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    @ApiModelProperty("客户状态(0正常,1公海)")
-    private Integer state;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型,数据字典id")
-    private Long typeId;
-
-    @ApiModelProperty("公司性质,数据字典id")
-    private Long natureId;
-
-    @ApiModelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源,数据字典id")
-    private Long sourceId;
-
-    @ApiModelProperty("规模,数据字典id")
-    private Long scaleId;
-
-    @ApiModelProperty("地址")
-    private String address;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("添加联系人集合")
-    private List<CaseErpCustomerContacts>  caseErpCustomerContacts;
-}

+ 0 - 74
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerListVo.java

@@ -1,74 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import com.baomidou.mybatisplus.annotation.FieldStrategy;
-import com.baomidou.mybatisplus.annotation.TableField;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerListVo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    @ApiModelProperty("主键")
-    private Long id;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型,数据字典id")
-    private Long typeId;
-
-    @ApiModelProperty("公司性质,数据字典id")
-    private Long natureId;
-
-    @ApiModelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源,数据字典id")
-    private Long sourceId;
-
-    @ApiModelProperty("规模,数据字典id")
-    private Long scaleId;
-
-    @ApiModelProperty("地址")
-    private String address;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("默认联系人姓名")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultName;
-
-    @ApiModelProperty("默认联系人电话")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultPhone;
-
-    @ApiModelProperty("默认联系人职位")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultPost;
-
-    @ApiModelProperty("默认联系人部门")
-    @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private String defaultDep;
-
-    @ApiModelProperty("客户所属人员(销售人员)")
-    private String saleIds;
-
-    @ApiModelProperty("客户所属人员名称")
-    private String saleNames;
-
-    @ApiModelProperty("客户所属人员电话")
-    private String salePhone;
-
-    @ApiModelProperty("客户状态(0正常,1公海)")
-    private Integer state;
-
-    @ApiModelProperty("加入公海日期")
-    private LocalDateTime inOpenDate;
-
-}

+ 0 - 56
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CaseErpCustomerVo.java

@@ -1,56 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-@Data
-public class CaseErpCustomerVo implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private Long id;
-
-    @ApiModelProperty("客户名称")
-    private String name;
-
-    @ApiModelProperty("客户类型名称")
-    private String typeName;
-
-    @ApiModelProperty("公司性质,数据字典id")
-    private String natureName;
-
-    @ApiModelProperty("所在行业")
-    private String industry;
-
-    @ApiModelProperty("来源,数据字典id")
-    private String sourceName;
-
-    @ApiModelProperty("规模,数据字典id")
-    private String scaleName;
-
-    @ApiModelProperty("地址")
-    private String address;
-
-    @ApiModelProperty("附件")
-    private String filePath;
-
-    @ApiModelProperty("默认联系人姓名")
-    private String defaultName;
-
-    @ApiModelProperty("默认联系人电话")
-    private String defaultPhone;
-
-    @ApiModelProperty("归属")
-    private String saleName;
-
-    @ApiModelProperty("加入公海日期")
-    private LocalDateTime inOpenDate;
-
-    private String createUserName;
-
-    private LocalDateTime createDate;
-
-}

+ 0 - 13
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerAllVo.java

@@ -1,13 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import lombok.Data;
-
-@Data
-public class CustomerAllVo {
-
-    private String name;
-
-
-    private int num;
-
-}

+ 0 - 16
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerPxaymentVo.java

@@ -1,16 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import lombok.Data;
-
-import java.util.List;
-
-@Data
-public class CustomerPxaymentVo {
-    private Integer key;
-
-    private String name;
-
-    private List<String> category;
-
-   private List<Integer> data;
-}

+ 0 - 20
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerSourceVo.java

@@ -1,20 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import lombok.Data;
-
-@Data
-public class CustomerSourceVo {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 客户类型
-     */
-
-    private String name;
-
-    /**
-     * value
-     */
-
-    private int value;
-}

+ 0 - 19
src/main/java/com/xjrsoft/module/erpModel/caseErpCustomer/vo/CustomerVo.java

@@ -1,19 +0,0 @@
-package com.xjrsoft.module.erpModel.caseErpCustomer.vo;
-
-import lombok.Data;
-
-@Data
-public class CustomerVo {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 客户类型
-     */
-    private String name;
-
-    /**
-     * value
-     */
-
-    private int value;
-}

Some files were not shown because too many files changed in this diff