2024-03-30 16:40:01 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
<mapper namespace="com.securitycontrol.screen.mapper.XcIndexMapper">
|
|
|
|
|
|
|
|
|
|
<select id="getProDetails" resultType="com.securitycontrol.entity.system.base.vo.ProVo">
|
2024-04-01 09:57:11 +08:00
|
|
|
select pro_brief AS proBrief,pro_id AS proId,plan_start_time planStartTime,plan_end_time planEndTime,pro_cost AS proCost
|
2024-03-30 16:40:01 +08:00
|
|
|
from tb_project
|
|
|
|
|
where bid_code=#{bidCode}
|
|
|
|
|
</select>
|
|
|
|
|
<!--查询环境检测数据-->
|
|
|
|
|
<select id="getProJcData" resultType="com.securitycontrol.entity.screen.vo.DeviceValueVo">
|
|
|
|
|
select bdd.device_name deviceName,tdd.mode_name modelName,
|
|
|
|
|
tdv.val,tdv.is_warn isWarn,tdv.create_time createTime,sd.dict_name deviceType
|
|
|
|
|
from tb_pro_bd bd
|
2024-04-03 09:28:37 +08:00
|
|
|
INNER join tb_bd_device bdd on bdd.bd_id=bd.id and bdd.del_flag=0
|
2024-03-30 16:40:01 +08:00
|
|
|
LEFT JOIN sys_dict sd on sd.dict_code=bdd.devic_type
|
|
|
|
|
left join tb_device_detail tdd on tdd.device_id=bdd.device_id and tdd.del_flag=0
|
|
|
|
|
left join tb_device_value tdv on tdd.id=tdv.attribute_id
|
|
|
|
|
where tdd.mode_name is not null and sd.dict_code=#{typeCode}
|
|
|
|
|
and bd.bid_code=#{bidCode}
|
|
|
|
|
</select>
|
2024-03-30 18:33:27 +08:00
|
|
|
<select id="getWeekRiskNum" resultType="java.lang.Integer">
|
|
|
|
|
select count(1) num
|
|
|
|
|
from jj_week_plan jwp
|
|
|
|
|
where #{startTime} BETWEEN jwp.start_date AND jwp.end_date
|
2024-04-01 09:57:11 +08:00
|
|
|
AND jwp.bid_no=#{bidCode}
|
2024-03-30 18:33:27 +08:00
|
|
|
</select>
|
|
|
|
|
<select id="getWarnNum" resultType="java.lang.Integer">
|
|
|
|
|
select count(1) num
|
|
|
|
|
from tb_warn
|
|
|
|
|
where DATE_FORMAT(warn_time, '%Y-%m-%d')=#{startTime}
|
|
|
|
|
</select>
|
2024-03-30 16:40:01 +08:00
|
|
|
|
2024-03-30 18:33:27 +08:00
|
|
|
<!--项目进度-->
|
|
|
|
|
<select id="getProBasicInfo" resultType="java.util.Map">
|
|
|
|
|
SELECT tp.bid_code AS bidCode,
|
|
|
|
|
tp.pro_name AS proName,
|
|
|
|
|
tp.plan_start_time AS planStartTime,
|
|
|
|
|
tp.plan_end_time AS planEndTime,
|
|
|
|
|
tgp.plan_id AS planId,
|
|
|
|
|
tgp.gx_weight AS gxWeight,
|
|
|
|
|
tgp.plan_progress AS planProgress
|
|
|
|
|
FROM tb_project tp
|
|
|
|
|
LEFT JOIN tb_gx_plan tgp ON tp.bid_code = tgp.bid_code AND tgp.del_flag = 0
|
|
|
|
|
WHERE tp.del_flag = 0 AND tp.bid_code = #{bidCode}
|
|
|
|
|
</select>
|
|
|
|
|
<!--工程成本记录-->
|
|
|
|
|
<select id="getProCost" resultType="java.lang.String">
|
|
|
|
|
SELECT SUM(cost)
|
|
|
|
|
FROM tb_project_cost
|
|
|
|
|
where curry_day like concat('%',#{time},'%')
|
|
|
|
|
and bid_code=#{bidCode}
|
2024-03-30 16:40:01 +08:00
|
|
|
|
2024-03-30 18:33:27 +08:00
|
|
|
</select>
|
2024-03-30 16:40:01 +08:00
|
|
|
</mapper>
|