Commit 03448d42 authored by 鲁鸿波's avatar 鲁鸿波

监督检查统计修改

parent f626aa38
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.util.CollectionUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -232,6 +233,11 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor
@Override
public List<HazardWorkPlanCheckProblemTypeStatisticsVO> selectCheckProblemTypeStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
if (CollectionUtils.isEmpty(tHazardWorkPlanCheckParam.getOrgIdList())) {
List<String> orgIdList = new ArrayList<>();
orgIdList.add(ContextUtils.getLoginUser().getOrgId());
tHazardWorkPlanCheckParam.setOrgIdList(orgIdList);
}
tHazardWorkPlanCheckParam.setStartTime(montageStartTime(tHazardWorkPlanCheckParam.getStartTime()));
tHazardWorkPlanCheckParam.setEndTime(montageEndTime(tHazardWorkPlanCheckParam.getEndTime()));
return this.baseMapper.selectCheckProblemTypeStatistics(tHazardWorkPlanCheckParam);
......@@ -239,6 +245,11 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor
@Override
public List<HazardWorkPlanCheckProblemCountStatisticsVO> selectCheckProblemCountStatistics(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
if (CollectionUtils.isEmpty(tHazardWorkPlanCheckParam.getOrgIdList())) {
List<String> orgIdList = new ArrayList<>();
orgIdList.add(ContextUtils.getLoginUser().getOrgId());
tHazardWorkPlanCheckParam.setOrgIdList(orgIdList);
}
tHazardWorkPlanCheckParam.setStartTime(montageStartTime(tHazardWorkPlanCheckParam.getStartTime()));
tHazardWorkPlanCheckParam.setEndTime(montageEndTime(tHazardWorkPlanCheckParam.getEndTime()));
return this.baseMapper.selectCheckProblemCountStatistics(tHazardWorkPlanCheckParam);
......
......@@ -261,7 +261,6 @@
AND hwpc.status = '0'
AND hwpc.is_compliant = 0
AND hwpc.problem_type IS NOT NULL
LEFT JOIN t_hazard_work_plan hwp ON hwpc.plan_id = hwp.id
<if test="param.orgIdList != null and param.orgIdList.size()>0">
and (
<foreach item="id" collection="param.orgIdList" separator=" OR ">
......@@ -269,6 +268,10 @@
</foreach>
)
</if>
<if test="param.startTime != null and param.startTime != '' and param.endTime != null and param.endTime != ''">
and hwpc.check_time between #{param.startTime} and #{param.endTime}
</if>
LEFT JOIN t_hazard_work_plan hwp ON hwpc.plan_id = hwp.id
<if test="param.workType!=null and param.workType!=''">
and hwp.work_type = #{param.workType}
</if>
......@@ -278,9 +281,7 @@
<if test="param.stakeholderWork!=null and param.stakeholderWork!=''">
and hwp.stakeholder_work = #{param.stakeholderWork}
</if>
<if test="param.startTime != null and param.startTime != '' and param.endTime != null and param.endTime != ''">
and hwpc.check_time between #{param.startTime} and #{param.endTime}
</if>
GROUP BY
dates.timeStr
ORDER BY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment