Explorar o código

Merge commit '69e9602229ef3ca976b2fb44d9c14c96dcd697f9' into suda

linfutong %!s(int64=2) %!d(string=hai) anos
pai
achega
cf8cf3699f

+ 7 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabRiskPlanAbnormalGroupServiceImpl.java

@@ -76,7 +76,13 @@ public class LabRiskPlanAbnormalGroupServiceImpl implements ILabRiskPlanAbnormal
                 JSONArray sensorList = JSONObject.parseArray(b.getSensorJson());
                 for(int x=0;x<sensorList.size();x++){
                     JSONObject jsonObj=sensorList.getJSONObject(x);
-                    sensorStr.append(jsonObj.get("describe")+":"+jsonObj.get("value")+""+jsonObj.get("unit")==null?"":jsonObj.get("unit")+"  ");
+                    String unit = jsonObj.get("unit")+"";
+                    if(StringUtils.isNotNull(unit)){
+                        sensorStr.append(jsonObj.get("describe")+":"+jsonObj.get("value")+""+jsonObj.get("unit")+"  ");
+                    }else{
+                        sensorStr.append(jsonObj.get("describe")+":"+jsonObj.get("value")+"  ");
+                    }
+//                    sensorStr.append(jsonObj.get("describe")+":"+jsonObj.get("value")+""+jsonObj.get("unit")==null?"":jsonObj.get("unit")+"  ");
                     if(StringUtils.isNotNull(jsonObj.get("funNum")) && (jsonObj.get("funNum")+"").equals("huoyan")){
                         if(!a.getClosePlan()){
                             a.setClosePlan(true);

+ 2 - 2
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabNotifyplanMapper.xml

@@ -104,10 +104,10 @@
             <if test="updateUserid != null ">and t.update_userid = #{updateUserid}</if>
             <if test="updateUsername != null  and updateUsername != ''">and t.update_username like concat('%', #{updateUsername}, '%')</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
-                and str_to_date(t.date_format(create_time,'%Y-%m-%d'),'%Y-%m-%d') &gt;= str_to_date(#{beginTime},'%Y-%m-%d')
+                and str_to_date(date_format(t.create_time,'%Y-%m-%d'),'%Y-%m-%d') &gt;= str_to_date(#{beginTime},'%Y-%m-%d')
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-                and str_to_date(t.date_format(create_time,'%Y-%m-%d'),'%Y-%m-%d') &lt;= str_to_date(#{endTime},'%Y-%m-%d')
+                and str_to_date(date_format(t.create_time,'%Y-%m-%d'),'%Y-%m-%d') &lt;= str_to_date(#{endTime},'%Y-%m-%d')
             </if>
             <if test="searchValue != null and searchValue != ''">
                 and (

+ 0 - 15
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabViolationMapper.xml

@@ -380,21 +380,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             )
             ) v ON s.`id` = v.`subject_id`
             )x2 GROUP BY x2.subjectId ORDER BY num DESC LIMIT 10
-            SELECT x2.subjectId currencyId,IFNULL(COUNT(1),0) num,x2.subjectName currencyName FROM (
-            SELECT v.id,v.`violation_type`,s.id subjectId,s.`name` subjectName
-            FROM sys_dept t INNER JOIN lab_subject s ON t.`dept_id` = s.`build_id` INNER JOIN (
-            SELECT v.reason violation_type, vs.`id`,v.`laboratory_id` subject_id,v.`create_time`
-            FROM lab_negativelist_history v INNER JOIN lab_violation_score_site vs ON v.`reason` = vs.`violation_name`
-            UNION ALL
-            SELECT '其他' violation_type , '-99' id,v.`laboratory_id` subject_id,v.`create_time`
-            FROM lab_negativelist_history v
-            WHERE v.reason NOT IN(
-            SELECT vs.`violation_name`
-            FROM lab_violation_score_site vs
-            )
-            ) v ON s.`id` = v.`subject_id`
-
-            )x2 GROUP BY x2.subjectId ORDER BY num DESC LIMIT 10
         )xs1 LEFT JOIN (
         SELECT xx2.type,xx2.content,xx2.num,xx2.subjectId currencyId,xx2.subjectName currencyName FROM (SELECT x2.subjectId,IFNULL(COUNT(1),0) num FROM (
         SELECT v.id,v.`violation_type`,s.id subjectId,s.`name` subjectName