Browse Source

编辑项目评分

anderx 1 year ago
parent
commit
c3249d8f69

+ 76 - 0
src/main/java/com/goafanti/common/mapper/TaskScoreMapper.xml

@@ -178,6 +178,82 @@
         where id = #{id}
     </delete>
 
+
+    <select id="findAdminTaskScoreList" resultType="com.goafanti.order.bo.TaskScore.OutTaskScore">
+        select a.id,a.name ,a.department_id depId,c.name depName,a.superior_id superId,a2.name superName,a.status ,a.last_login_time  lastLoginTime
+        b.htSatCount htSatCount
+        from admin a left join admin_project_statistics b on a.id =b.aid
+        left join department c on a.department_id =c.id
+        left join admin a2 on a.superior_id =a2.id
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="tid != null">
+                and tid = #{tid}
+            </if>
+            <if test="professionalism != null">
+                and professionalism = #{professionalism}
+            </if>
+            <if test="communicationSkills != null">
+                and communication_skills = #{communicationSkills}
+            </if>
+            <if test="responsiveness != null">
+                and responsiveness = #{responsiveness}
+            </if>
+            <if test="publicImage != null">
+                and public_image = #{publicImage}
+            </if>
+            <if test="serviceAttitude != null">
+                and service_attitude = #{serviceAttitude}
+            </if>
+            <if test="monthlyReport != null">
+                and monthly_report = #{monthlyReport}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findTaskScoreCount" resultType="java.lang.Integer">
+        select count(1)
+        from task_score
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="tid != null">
+                and tid = #{tid}
+            </if>
+            <if test="professionalism != null">
+                and professionalism = #{professionalism}
+            </if>
+            <if test="communicationSkills != null">
+                and communication_skills = #{communicationSkills}
+            </if>
+            <if test="responsiveness != null">
+                and responsiveness = #{responsiveness}
+            </if>
+            <if test="publicImage != null">
+                and public_image = #{publicImage}
+            </if>
+            <if test="serviceAttitude != null">
+                and service_attitude = #{serviceAttitude}
+            </if>
+            <if test="monthlyReport != null">
+                and monthly_report = #{monthlyReport}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+    </select>
+
     <select id="queryByTid"  resultMap="TaskScoreMap">
         select
         <include refid="TaskScoreAllSql"/>

+ 25 - 0
src/main/java/com/goafanti/order/bo/TaskScore/InputTaskScore.java

@@ -0,0 +1,25 @@
+package com.goafanti.order.bo.TaskScore;
+
+import com.goafanti.common.model.TaskScore;
+
+public class InputTaskScore extends TaskScore {
+
+    private Integer pageNo;
+    private Integer pageSize;
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+}

+ 73 - 0
src/main/java/com/goafanti/order/bo/TaskScore/OutTaskScore.java

@@ -0,0 +1,73 @@
+package com.goafanti.order.bo.TaskScore;
+
+import com.goafanti.common.model.TaskScore;
+
+public class OutTaskScore extends TaskScore {
+    private String name;
+    private String depId;
+    private String depname;
+    private String superId;
+    private String superName;
+    private String status;
+    private String lastLoginTime;
+
+
+
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public String getDepname() {
+        return depname;
+    }
+
+    public void setDepname(String depname) {
+        this.depname = depname;
+    }
+
+    public String getSuperId() {
+        return superId;
+    }
+
+    public void setSuperId(String superId) {
+        this.superId = superId;
+    }
+
+    public String getSuperName() {
+        return superName;
+    }
+
+    public void setSuperName(String superName) {
+        this.superName = superName;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getLastLoginTime() {
+        return lastLoginTime;
+    }
+
+    public void setLastLoginTime(String lastLoginTime) {
+        this.lastLoginTime = lastLoginTime;
+    }
+}

+ 5 - 2
src/main/java/com/goafanti/order/controller/TaskScoreController.java

@@ -3,6 +3,7 @@ package com.goafanti.order.controller;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.TaskScore;
+import com.goafanti.order.bo.TaskScore.InputTaskScore;
 import com.goafanti.order.service.TaskScoreService;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -91,9 +92,11 @@ public class TaskScoreController extends BaseController {
      * @return
      */
     @GetMapping("/list")
-    public Result<TaskScore> list(TaskScore in, Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.taskScoreService.list(in, pageNo, pageSize));
+    public Result<TaskScore> list(InputTaskScore in) {
+        return new Result<>().data(this.taskScoreService.list(in));
     }
 
+
+
 }
 

+ 2 - 1
src/main/java/com/goafanti/order/service/TaskScoreService.java

@@ -1,6 +1,7 @@
 package com.goafanti.order.service;
 
 import com.goafanti.common.model.TaskScore;
+import com.goafanti.order.bo.TaskScore.InputTaskScore;
 
 /**
  * 项目评分列表(TaskScore)表服务接口
@@ -49,7 +50,7 @@ public interface TaskScoreService {
      * @param in 参数
      * @return 是否成功
      */
-    Object list(TaskScore in, Integer pageNo, Integer pageSize);
+    Object list(InputTaskScore in);
 
     Object updateByTid(TaskScore taskScore);
 

+ 6 - 4
src/main/java/com/goafanti/order/service/impl/TaskScoreServiceImpl.java

@@ -11,6 +11,7 @@ import com.goafanti.common.model.TaskScore;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.TOrderTaskBo;
+import com.goafanti.order.bo.TaskScore.InputTaskScore;
 import com.goafanti.order.service.TaskScoreService;
 import org.springframework.stereotype.Service;
 
@@ -40,13 +41,14 @@ public class TaskScoreServiceImpl extends BaseMybatisDao<TaskScoreMapper> implem
 
 
     @Override
-    public Pagination<TaskScore> list(TaskScore taskScore, Integer pageNo, Integer pageSize) {
+    public Pagination<TaskScore> list(InputTaskScore in) {
         Map<String, Object> params = new HashMap<>();
-        params.put("in", taskScore);
-        return (Pagination<TaskScore>) findPage("findTaskScoreList",
-                "findTaskScoreCount", params, pageNo, pageSize);
+        params.put("in", in);
+        return (Pagination<TaskScore>) findPage("findAdminTaskScoreList",
+                "findAdminTaskScoreList", params, in.getPageNo(), in.getPageSize());
     }
 
+
     @Override
     public Object updateByTid(TaskScore taskScore) {
         TaskScore taskScore2 = taskScoreMapper.queryByTid(taskScore.getTid());