Browse Source

编辑项目评分

anderx 1 year ago
parent
commit
cf97c27e06

+ 26 - 58
src/main/java/com/goafanti/common/mapper/TaskScoreMapper.xml

@@ -180,78 +180,46 @@
 
 
     <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
+        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.ht_sat_count  htSatCount,b.ht_sat_score_count htSatScoreCount,b.ht_sat_score_average htSatScoreAverage,
+        b.member_count memberCount,b.member_score_count memberScoreCount,b.member_score_average memberScoreAverage
         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="roleId !=null">
+            left join user_role ur on a.id=ur.uid left join role r on ur.rid=r.id
+        </if>
         <if test="page_sql != null">
             ${page_sql}
         </if>
     </select>
-
-    <!--统计总行数-->
-    <select id="findTaskScoreCount" resultType="java.lang.Integer">
-        select count(1)
-        from task_score
+    <sql id="findAdminTaskScoreSql">
         <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 test="name != null">
+                and a.name like concat('%',#{name},'%')
             </if>
-            <if test="responsiveness != null">
-                and responsiveness = #{responsiveness}
+            <if test="depId != null">
+                and a.department_id =#{depId}
             </if>
-            <if test="publicImage != null">
-                and public_image = #{publicImage}
+            <if test="roleId != null">
+                and r.id =#{roleId}
             </if>
-            <if test="serviceAttitude != null">
-                and service_attitude = #{serviceAttitude}
+            <if test="positionId != null">
+                and a.position_id =#{positionId}
             </if>
-            <if test="monthlyReport != null">
-                and monthly_report = #{monthlyReport}
-            </if>
-            <if test="createTime != null">
-                and create_time = #{createTime}
+            <if test="status != null">
+                and a.status =#{status}
             </if>
         </where>
+    </sql>
+
+    <!--统计总行数-->
+    <select id="findAdminTaskScoreCount" resultType="java.lang.Integer">
+        select count(*)
+        from admin a
+        <if test="roleId !=null">
+            left join user_role ur on a.id=ur.uid left join role r on ur.rid=r.id
+        </if>
     </select>
 
     <select id="queryByTid"  resultMap="TaskScoreMap">

+ 32 - 32
src/main/java/com/goafanti/common/model/AdminProjectStatistics.java

@@ -8,10 +8,10 @@ import java.util.Date;
  * 管理员用户项目评分表(AdminProjectStatistics)实体类
  *
  * @author makejava
- * @since 2024-09-29 13:56:50
+ * @since 2024-09-29 14:26:44
  */
 public class AdminProjectStatistics implements Serializable {
-    private static final long serialVersionUID = -17547670868580880L;
+    private static final long serialVersionUID = 609725425891537422L;
     /**
      * id
      */
@@ -23,27 +23,27 @@ public class AdminProjectStatistics implements Serializable {
     /**
      * 高新&科技数
      */
-    private Integer htsatcount;
+    private Integer htSatCount;
     /**
      * 高新&科技评分数
      */
-    private Integer htsatscorecount;
+    private Integer htSatScoreCount;
     /**
      * 高新&科技平均分
      */
-    private Double htsatscoreaverage;
+    private Double htSatScoreAverage;
     /**
      * 会员数
      */
-    private Integer membercount;
+    private Integer memberCount;
     /**
      * 会员评分数
      */
-    private Integer memberscorecount;
+    private Integer memberScoreCount;
     /**
      * 会员平均分
      */
-    private Double memberscoreaverage;
+    private Double memberScoreAverage;
     /**
      * 创建时间
      */
@@ -66,52 +66,52 @@ public class AdminProjectStatistics implements Serializable {
         this.aid = aid;
     }
 
-    public Integer getHtsatcount() {
-        return htsatcount;
+    public Integer getHtSatCount() {
+        return htSatCount;
     }
 
-    public void setHtsatcount(Integer htsatcount) {
-        this.htsatcount = htsatcount;
+    public void setHtSatCount(Integer htSatCount) {
+        this.htSatCount = htSatCount;
     }
 
-    public Integer getHtsatscorecount() {
-        return htsatscorecount;
+    public Integer getHtSatScoreCount() {
+        return htSatScoreCount;
     }
 
-    public void setHtsatscorecount(Integer htsatscorecount) {
-        this.htsatscorecount = htsatscorecount;
+    public void setHtSatScoreCount(Integer htSatScoreCount) {
+        this.htSatScoreCount = htSatScoreCount;
     }
 
-    public Double getHtsatscoreaverage() {
-        return htsatscoreaverage;
+    public Double getHtSatScoreAverage() {
+        return htSatScoreAverage;
     }
 
-    public void setHtsatscoreaverage(Double htsatscoreaverage) {
-        this.htsatscoreaverage = htsatscoreaverage;
+    public void setHtSatScoreAverage(Double htSatScoreAverage) {
+        this.htSatScoreAverage = htSatScoreAverage;
     }
 
-    public Integer getMembercount() {
-        return membercount;
+    public Integer getMemberCount() {
+        return memberCount;
     }
 
-    public void setMembercount(Integer membercount) {
-        this.membercount = membercount;
+    public void setMemberCount(Integer memberCount) {
+        this.memberCount = memberCount;
     }
 
-    public Integer getMemberscorecount() {
-        return memberscorecount;
+    public Integer getMemberScoreCount() {
+        return memberScoreCount;
     }
 
-    public void setMemberscorecount(Integer memberscorecount) {
-        this.memberscorecount = memberscorecount;
+    public void setMemberScoreCount(Integer memberScoreCount) {
+        this.memberScoreCount = memberScoreCount;
     }
 
-    public Double getMemberscoreaverage() {
-        return memberscoreaverage;
+    public Double getMemberScoreAverage() {
+        return memberScoreAverage;
     }
 
-    public void setMemberscoreaverage(Double memberscoreaverage) {
-        this.memberscoreaverage = memberscoreaverage;
+    public void setMemberScoreAverage(Double memberScoreAverage) {
+        this.memberScoreAverage = memberScoreAverage;
     }
 
     public Date getCreateTime() {

+ 55 - 3
src/main/java/com/goafanti/order/bo/TaskScore/InputTaskScore.java

@@ -1,12 +1,64 @@
 package com.goafanti.order.bo.TaskScore;
 
-import com.goafanti.common.model.TaskScore;
-
-public class InputTaskScore extends TaskScore {
 
+public class InputTaskScore {
+    /**
+     * 用户名称
+     */
+    private String name;
+    /**
+     * 部门编号
+     */
+    private String depId;
+    /**
+     * 角色编号
+     */
+    private String roleId;
+    /**
+     * 职位编号
+     */
+    private String positionId;
+    /**
+     * 页数
+     */
     private Integer pageNo;
+    /**
+     * 每页显示条数
+     */
     private Integer pageSize;
 
+    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 getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(String roleId) {
+        this.roleId = roleId;
+    }
+
+    public String getPositionId() {
+        return positionId;
+    }
+
+    public void setPositionId(String positionId) {
+        this.positionId = positionId;
+    }
+
     public Integer getPageNo() {
         return pageNo;
     }