省侧大屏
This commit is contained in:
parent
c16ba37ecf
commit
cab920a18c
|
|
@ -4,6 +4,7 @@ import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
|||
import com.securitycontrol.entity.screen.vo.ConstrQuality;
|
||||
import com.securitycontrol.entity.screen.vo.MapRiskVo;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -124,12 +125,25 @@ public interface IScIndexMapper {
|
|||
|
||||
/**
|
||||
* 效率分析(工程进度分析)
|
||||
*
|
||||
* @param dto
|
||||
* @return List<Map < Object>>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/3/28 13:47
|
||||
*/
|
||||
@MapKey("id")
|
||||
@MapKey("orgId")
|
||||
List<Map<String, Object>> efficiencyAnalysis(ScreenParamDto dto);
|
||||
|
||||
/**
|
||||
* 获取隐患数
|
||||
* @param orgId
|
||||
* @param dto
|
||||
* @return List<Map<String, Object>>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/3/28 15:44
|
||||
*/
|
||||
@MapKey("bidCode")
|
||||
List<Map<String, Object>> getDangerNum(@Param("orgId") String orgId, @Param("params") ScreenParamDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.common.core.constant.Constant;
|
||||
import com.securitycontrol.common.core.utils.StringUtils;
|
||||
import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
|
|
@ -211,7 +210,18 @@ public class ScIndexServiceImpl implements IScIndexService {
|
|||
dto.setStartTime(timeArr[0]);
|
||||
dto.setEndTime(timeArr[1]);
|
||||
list = mapper.potentialSafetyHazard(dto);
|
||||
|
||||
// 获取隐患数
|
||||
list.forEach(item -> {
|
||||
int num = 0;
|
||||
List<Map<String, Object>> dangerList = mapper.getDangerNum(String.valueOf(item.get("orgId")), dto);
|
||||
for (Map<String, Object> map : dangerList) {
|
||||
Integer dangerNum = Integer.parseInt(String.valueOf(map.get("num")));
|
||||
if (dangerNum > 0) {
|
||||
num++;
|
||||
}
|
||||
}
|
||||
item.put("dangerNum", num);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("工程安全隐患分析", e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,4 +131,18 @@
|
|||
)a ON tgp.plan_id = a.planId
|
||||
WHERE tp.del_flag = 0
|
||||
</select>
|
||||
<!--获取地市隐患数-->
|
||||
<select id="getDangerNum" resultType="java.util.Map">
|
||||
SELECT jwp.bid_no AS bidCode,
|
||||
IFNULL(a.num,0) AS num
|
||||
FROM jj_week_plan jwp
|
||||
LEFT JOIN (
|
||||
SELECT tw.bid_code,COUNT(tw.bid_code) AS num
|
||||
FROM tb_warn tw
|
||||
WHERE tw.warn_time BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
GROUP BY tw.bid_code
|
||||
) a ON jwp.bid_no = a.bid_code
|
||||
WHERE jwp.start_date BETWEEN #{params.startTime} AND #{params.endTime} AND jwp.end_date BETWEEN #{params.startTime} AND #{params.endTime}
|
||||
AND jwp.build_no = #{orgId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue