Guo1B0 1 rok temu
rodzic
commit
8d7d2ab2f2

+ 4 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ClueController.java

@@ -48,18 +48,20 @@ public class ClueController {
 
 
     @RequestMapping("getDetail")
-    public Object getDetail(@RequestBody Clue clue) {
+    public Object getDetail(Clue clue) {
         HttpRespMsg msg = new HttpRespMsg();
         msg.setData(clueService.getInfo(clue));
         return msg;
     }
 
     @RequestMapping("listClue")
-    public Object list(@RequestBody Clue clue, HttpServletRequest request) {
+    public Object list(Clue clue, HttpServletRequest request) {
         //TODO token待定
         User user = userMapper.selectById(request.getHeader("Token"));
         clue.setCompanyId(user.getCompanyId());
         clue.setIsDelete(0);
+        clue.setEndTime(clue.getEndTime() + " 23:59:59");
+        clue.setPageIndex((clue.getPageIndex()-1) * clue.getPageFrom() );
         boolean isAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部线索");
         boolean isNotAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看负责部门线索");
         List<Clue> list = new ArrayList<>();

+ 4 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/Clue.java

@@ -8,6 +8,7 @@ import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -139,8 +140,9 @@ public class Clue extends Model<Clue> {
      */
     @TableField("create_time")
     private Date createTime;
-    private Date startTime;
-    private Date endTime;
+    private String startTime;
+
+    private String endTime;
 
     private Integer pageIndex;
     private Integer pageFrom;

+ 49 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ClueMapper.xml

@@ -60,6 +60,15 @@
         <if test="clueName != null and clueName != '' ">
         and  c.clue_name =  #{clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clueSourceId != null">
         and  c.clue_source_id =  #{clueSourceId}
         </if>
@@ -94,7 +103,7 @@
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
         and c.incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
-        and c.incharger_id is null
+        or c.incharger_id is null
         <if test="clue.startTime != null and clue.endTime != null ">
             and  c.create_time BETWEEN  #{clue.startTime} and #{clue.endTime}
         </if>
@@ -104,6 +113,15 @@
         <if test="clue.clueSourceId != null">
             and  c.clue_source_id =  #{clue.clueSourceId}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.customerIndustryId != null">
             and  c.customer_industry_id =  #{clue.customerIndustryId}
         </if>
@@ -133,13 +151,22 @@
         from Clue c
         where
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
-        and c.incharger_id = #{userId} and c.incharger_id is null
+        and c.incharger_id = #{userId} or c.incharger_id is null
         <if test="clue.startTime != null and clue.endTime != null ">
             and  c.create_time BETWEEN  #{clue.startTime} and #{clue.endTime}
         </if>
         <if test="clue.clueName != null and clue.clueName != '' ">
             and  c.clue_name =  #{clue.clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.clueSourceId != null">
             and  c.clue_source_id =  #{clue.clueSourceId}
         </if>
@@ -230,13 +257,22 @@
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
         and c.incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
-        and c.incharger_id is null
+        or c.incharger_id is null
         <if test="clue.startTime != null and clue.endTime != null ">
             and  c.create_time BETWEEN  #{clue.startTime} and #{clue.endTime}
         </if>
         <if test="clue.clueName != null and clue.clueName != '' ">
             and  c.clue_name =  #{clue.clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.clueSourceId != null">
             and  c.clue_source_id =  #{clue.clueSourceId}
         </if>
@@ -250,13 +286,22 @@
         from Clue c
         where
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
-        and c.incharger_id = #{userId} and c.incharger_id is null
+        and c.incharger_id = #{userId} or c.incharger_id is null
         <if test="clue.startTime != null and clue.endTime != null ">
             and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
         </if>
         <if test="clue.clueName != null and clue.clueName != '' ">
             and c.clue_name = #{clue.clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.clueSourceId != null">
             and c.clue_source_id = #{clue.clueSourceId}
         </if>