大屏-项目情况-项目监测预警

dev_xd
lj7788 2025-08-29 17:44:18 +08:00
parent 17767e6101
commit ad3c8079e8
2 changed files with 25 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.SmzSspProblemmodify;
import org.apache.ibatis.annotations.Param;
/**
* Mapper
@ -109,4 +110,11 @@ public interface SmzSspProblemmodifyMapper
* @return
*/
public List<SmzSspProblemmodify> getListCountBG(SmzSspProblemmodify where);
/**
* --
* @param projectId
* @return
*/
List<SmzSspProblemmodify> selectCountForBGByProjectId(@Param("projectId") Long projectId);
}

View File

@ -527,4 +527,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if test="infoType != null "> and dic.remark = #{infoType}</if>
</select>
<select id="selectCountForBGByProjectId" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
SELECT 'a' projectName, count(1) id,'全部' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0
union
SELECT 'b' projectName, count(1) id,'全部已完成' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and checkState not in (4)
UNION
SELECT 'c' projectName, count(1) id,'安全全部' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and infoType=0
UNION
SELECT 'd' projectName, count(1) id,'安全全部已完成' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and checkState not in (4) and infoType=0
UNION
SELECT 'e' projectName, count(1) id,'质量全部' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and infoType=1
UNION
SELECT 'f' projectName, count(1) id,'质量全部已完成' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and checkState not in (4) and infoType=1
UNION
SELECT 'g' projectName, count(1) id,'今天全部' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and DATE(createTime) = CURDATE()
UNION
SELECT 'h' projectName, count(1) id,'本周全部' remark from smz_ssp_problemmodify where projectId=#{projectId} and isDel=0 and YEARWEEK(date_format(createTime, '%Y-%m-%d'), 1) = YEARWEEK(now(), 1);
</select>
</mapper>