浏览代码

查询修改

yusm 1 年之前
父节点
当前提交
0be0964809

+ 1 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/TaskController.java

@@ -91,6 +91,7 @@ public class TaskController {
 
     @RequestMapping("updateTaskStatus")
     public HttpRespMsg updateTaskStatus(TaskDto taskDto) throws Exception {
+        System.out.println("===========>"+taskDto.getStatus());
         return taskService.updateTaskStatus(taskDto,request);
     }
 

+ 6 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/Task.java

@@ -213,6 +213,12 @@ public class Task extends Model<Task> {
     @TableField("task_type")
     private Integer taskType;
 
+    /**
+     * 永不0, 几次之后 1,什么日期之后 2
+     */
+    @TableField("end_type")
+    private Integer endType;
+
     /**
      * 自定义字段存值
      */

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -831,7 +831,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
             msg.setError("缺少用户的关键信息");
         }
         LambdaUpdateWrapper<Task> luw = new LambdaUpdateWrapper<>();
-        luw.set(Task::getStatus,taskDto.getStatus()).eq(Task::getId,taskDto.getStatus());
+        luw.set(Task::getStatus,taskDto.getStatus()).eq(Task::getId,taskDto.getId());
         taskMapper.update(null,luw);
         TaskLog taskLog = new TaskLog();
         taskLog.setUserId(user.getId()).setTaskId(taskDto.getId()).setUserName(user.getName())

+ 9 - 5
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/TaskMapper.xml

@@ -33,6 +33,7 @@
         <result column="finish_date" property="finishDate" />
         <result column="is_delete" property="isDelete" />
         <result column="task_type" property="taskType" />
+        <result column="end_type" property="endType" />
         <result column="plate1" property="plate1" />
         <result column="plate2" property="plate2" />
         <result column="plate3" property="plate3" />
@@ -42,7 +43,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, task_name, company_id, owner_id, contacts_id, executor_id, clue_id, custom_id, business_opportunity_id, order_id, product_id, status, priority, is_repeat, repeat_type, repeat_end_never, repeat_end_count, repeat_end_date, repeat_design_day, repeat_design_sameday, task_desc, creater_id, creater_name, create_date, end_date, start_date, finish_date, is_delete,task_type, plate1, plate2, plate3, plate4, plate5
+        id, task_name, company_id, owner_id, contacts_id, executor_id, clue_id, custom_id, business_opportunity_id, order_id, product_id, status, priority, is_repeat, repeat_type, repeat_end_never, repeat_end_count, repeat_end_date, repeat_design_day, repeat_design_sameday, task_desc, creater_id, creater_name, create_date, end_date, start_date, finish_date, is_delete, task_type, end_type, plate1, plate2, plate3, plate4, plate5
     </sql>
 
     <resultMap id="TaskVoMap" type="com.management.platform.entity.vo.TasKVo">
@@ -75,6 +76,7 @@
         <result column="finish_date" property="finishDate" />
         <result column="is_delete" property="isDelete" />
         <result column="task_type" property="taskType" />
+        <result column="end_type" property="endType" />
         <result column="plate1" property="plate1" />
         <result column="plate2" property="plate2" />
         <result column="plate3" property="plate3" />
@@ -102,6 +104,7 @@
             left join  `sales_order` on task.order_id=`sales_order`.id
             left join  clue on task.clue_id=clue.id
             left join  contacts on task.contacts_id=contacts.id
+            inner join task_executor on task.id=task_executor.task_id
 
         <where>
             and 1=1 and task.is_delete=0
@@ -136,10 +139,10 @@
             <if test=" executorName!= null and executorName != '' ">
                 AND task_executor.executor_name LIKE CONCAT('%', #{executorName}, '%')
             </if>
-            <if test=" startDate!= null and startDate != '' ">
+            <if test=" startDate!= null">
                 AND task.start_date &gt; #{startDate}
             </if>
-            <if test=" endDate!= null and endDate != '' ">
+            <if test=" endDate!= null">
                 AND task.end_date &lt; #{endDate}
             </if>
             <if test=" companyId!= null ">
@@ -165,6 +168,7 @@
         left join  `sales_order` on task.order_id=`sales_order`.id
         left join  clue on task.clue_id=clue.id
         left join  contacts on task.contacts_id=contacts.id
+        inner join task_executor on task.id=task_executor.task_id
 
         <where>
             and 1=1 and task.is_delete=0
@@ -199,10 +203,10 @@
             <if test=" executorName!= null and executorName != '' ">
                 AND task_executor.executor_name LIKE CONCAT('%', #{executorName}, '%')
             </if>
-            <if test=" startDate!= null and startDate != '' ">
+            <if test=" startDate!= null  ">
                 AND task.start_date &gt; #{startDate}
             </if>
-            <if test=" endDate!= null and endDate != '' ">
+            <if test=" endDate!= null  ">
                 AND task.end_date &lt; #{endDate}
             </if>
             <if test=" companyId!= null ">