Browse Source

实际完成时间查询

2 years ago
parent
commit
fd924be9b4

+ 4 - 4
platform-dao/src/main/resources/mapper/check/CheckJobMapper.xml

@@ -70,7 +70,7 @@
             and checkjob.feedback = #{feedback}
         </if>
         <if test="status ==null and startTimeStart != null ">
-            and checkjob.start_time <![CDATA[>=]]>; #{startTimeStart}
+            and checkjob.start_time <![CDATA[>=]]>#{startTimeStart}
         </if>
         <if test="status ==null and startTimeEnd != null">
             and checkjob.start_time <![CDATA[<=]]> #{startTimeEnd}
@@ -98,7 +98,7 @@
             and checkjob.actual_start_time = #{actualStartTime}
         </if>
         <if test="actualEndTimeStart != null">
-            and checkjob.actual_end_time <![CDATA[>=]]>; #{actualEndTimeStart}
+            and checkjob.actual_end_time <![CDATA[>=]]> #{actualEndTimeStart}
         </if>
         <if test="actualEndTimeEnd != null">
             and checkjob.actual_end_time <![CDATA[<=]]> #{actualEndTimeEnd}
@@ -125,7 +125,7 @@
             and checkjob.update_user_name = #{updateUserName}
         </if>
         <if test="createdTimeStart != null">
-            and checkjob.created_time <![CDATA[>=]]>; #{createdTimeStart}
+            and checkjob.created_time <![CDATA[>=]]> #{createdTimeStart}
         </if>
         <if test="createdTimeEnd != null">
             and checkjob.created_time <![CDATA[<=]]> #{createdTimeEnd}
@@ -134,7 +134,7 @@
             and checkjob.created_time = #{createdTime}
         </if>
         <if test="updateTimeStart != null">
-            and checkjob.update_time <![CDATA[>=]]>; #{updateTimeStart}
+            and checkjob.update_time <![CDATA[>=]]> #{updateTimeStart}
         </if>
         <if test="updateTimeEnd != null">
             and checkjob.update_time <![CDATA[<=]]> #{updateTimeEnd}

+ 2 - 2
platform-dao/src/main/resources/mapper/sb/SbInfoMapper.xml

@@ -567,10 +567,10 @@ user.real_name as saveUserName
 
     <select id="getByIds" parameterType="java.util.List" resultType="com.platform.dao.vo.sb.SbInfoVO">
         select
-        <include refid="Left_Column"/>
+        sb.*
         from t_sb_info sb
         where sb.id in
-        <foreach item="item" index="index" collection="ids" open="(" close=")" separator=",">
+        <foreach item="item" index="index" collection="list" open="(" close=")" separator=",">
             #{item}
         </foreach>
     </select>

+ 2 - 2
platform-dao/src/main/resources/mapper/sb/SbPositionMapper.xml

@@ -51,8 +51,8 @@
         position.name as positionName, position.id as positionId,count(1) as waitNum
         from t_sb_position position left join t_sb_info info on position.id=info.position_id left join t_check_job job
         on info.id = job.sb_id
-        where job.status = 1 position .id in
-        <foreach item="item" index="index" collection="ids" open="(" close=")" separator=",">
+        where job.status = 1 and position .id in
+        <foreach item="item" index="index" collection="list" open="(" close=")" separator=",">
             #{item}
         </foreach>
     </select>

+ 3 - 0
platform-service/src/main/java/com/platform/service/check/impl/CheckJobServiceImpl.java

@@ -144,6 +144,9 @@ public class CheckJobServiceImpl extends BaseServiceImpl<CheckJobMapper, CheckJo
         List<CheckJobVO> checkJobVOS = getJobVO(checkJobDTO);
         List<String> sbIds = checkJobVOS.stream().map(CheckJobVO::getSbId).distinct().collect(Collectors.toList());
         //查出所有的设备
+        if (sbIds==null||sbIds.size()==0){
+            return new ArrayList<CheckJobVO>();
+        }
         List<SbInfoVO> sbInfoVOS = sbInfoMapper.getByIds(sbIds);
         List<String> positionIds = sbInfoVOS.stream().map(SbInfoVO::getPositionId).distinct().collect(Collectors.toList());
         List<CheckJobVO> checkJobVOS1 = sbPositionMapper.getByIds(positionIds);