فهرست منبع

Merge remote-tracking branch 'origin/dev_v1.0.0' into dev_v1.0.0

wangliang 1 سال پیش
والد
کامیت
4447afb35c

+ 11 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysNoticeResult.java

@@ -25,6 +25,9 @@ public class SysNoticeResult extends SysNotice implements Serializable {
     @ApiModelProperty(value = "创建人")
     private String createName;
 
+    @ApiModelProperty(value = "回执进度")
+    private String readCount;
+
     public String getCreateName() {
         return createName;
     }
@@ -32,4 +35,12 @@ public class SysNoticeResult extends SysNotice implements Serializable {
     public void setCreateName(String createName) {
         this.createName = createName;
     }
+
+    public String getReadCount() {
+        return readCount;
+    }
+
+    public void setReadCount(String readCount) {
+        this.readCount = readCount;
+    }
 }

+ 11 - 7
sop-business/src/main/resources/mapper/ServiceAnalyseMapper.xml

@@ -42,18 +42,22 @@
         </where>
     </select>
     <select id="servicePersonnelTotal" resultType="java.lang.Integer">
+<!--        SELECT-->
+<!--        count( sd.region_user_id )+-->
+<!--        count( sd.engineer_user_id )+-->
+<!--        SUM( length( sd.assistant_engineer_user_ids )- length( REPLACE ( sd.assistant_engineer_user_ids, ',', '' ))+ 1 )-->
+<!--        FROM-->
+<!--        t_b_service s-->
+<!--        LEFT JOIN t_b_sop_info sop ON sop.service_id = s.id-->
+<!--        LEFT JOIN t_b_sop_info_detail sd ON sd.sop_info_id = sop.id-->
         SELECT
-        count( sd.region_user_id )+
-        count( sd.engineer_user_id )+
-        SUM( length( sd.assistant_engineer_user_ids )- length( REPLACE ( sd.assistant_engineer_user_ids, ',', '' ))+ 1 )
+        count(DISTINCT s.user_id)
         FROM
-        t_b_service s
-        LEFT JOIN t_b_sop_info sop ON sop.service_id = s.id
-        LEFT JOIN t_b_sop_info_detail sd ON sd.sop_info_id = sop.id
+        t_b_user_archives_allocation s
         <where>
 
             <if test="serviceUnitId != null and serviceUnitId != ''">
-                and s.id = #{serviceUnitId}
+                and s.service_id = #{serviceUnitId}
             </if>
 
         </where>

+ 8 - 2
sop-business/src/main/resources/mapper/SysNoticeMapper.xml

@@ -3,8 +3,14 @@
 <mapper namespace="com.qmth.sop.business.mapper.SysNoticeMapper">
 
     <select id="query" resultType="com.qmth.sop.business.bean.result.SysNoticeResult">
-        select a.*,su.real_name as createName from sys_notice a
-        left join sys_user su on su.id = a.create_id
+        SELECT
+        a.*,
+        su.real_name AS createName,
+        m.readCount
+        FROM
+        sys_notice a
+        LEFT JOIN sys_user su ON su.id = a.create_id
+        LEFT JOIN ( SELECT m.notice_id, CONCAT( sum( m.STATUS ), '/', count( m.id )) readCount FROM sys_message m GROUP BY m.notice_id ) m ON m.notice_id = a.id
         <where>
             and a.enable = 1
             <if test="query != null and query != ''">