Commit c9677d41 authored by 鲁鸿波's avatar 鲁鸿波

监督检查合规率统计修改

parent 9bf49ce5
...@@ -85,9 +85,13 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor ...@@ -85,9 +85,13 @@ public class THazardWorkPlanCheckServiceImpl extends SuperServiceImpl<THazardWor
@Override @Override
public Page<THazardWorkPlanCheck> selectTHazardWorkPlanCheckManageList(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) { public Page<THazardWorkPlanCheck> selectTHazardWorkPlanCheckManageList(THazardWorkPlanCheckParam tHazardWorkPlanCheckParam) {
IPage<THazardWorkPlanCheck> page = new Page<>(Long.valueOf(tHazardWorkPlanCheckParam.getPage()), Long.valueOf(tHazardWorkPlanCheckParam.getLimit())); IPage<THazardWorkPlanCheck> page = new Page<>(Long.valueOf(tHazardWorkPlanCheckParam.getPage()), Long.valueOf(tHazardWorkPlanCheckParam.getLimit()));
List<String> orgIdList = new ArrayList<>();
if(null != tHazardWorkPlanCheckParam.getOrgIdList() && tHazardWorkPlanCheckParam.getOrgIdList().size()>0){ if(null != tHazardWorkPlanCheckParam.getOrgIdList() && tHazardWorkPlanCheckParam.getOrgIdList().size()>0){
tHazardWorkPlanCheckParam.setOrgIdList(orgDao.selectAllSubId(tHazardWorkPlanCheckParam.getOrgIdList())); tHazardWorkPlanCheckParam.setOrgIdList(orgDao.selectAllSubId(tHazardWorkPlanCheckParam.getOrgIdList()));
orgIdList.addAll(tHazardWorkPlanCheckParam.getOrgIdList());
} }
orgIdList.addAll(orgDao.selectOrgIdAllSubId(ContextUtils.getLoginUser().getOrgId()));
tHazardWorkPlanCheckParam.setOrgIdList(orgIdList);
return this.baseMapper.selectTHazardWorkPlanCheckManageList(page,tHazardWorkPlanCheckParam); return this.baseMapper.selectTHazardWorkPlanCheckManageList(page,tHazardWorkPlanCheckParam);
} }
......
...@@ -23,4 +23,6 @@ public interface TSysOrgDao extends SuperDao<TSysOrg> { ...@@ -23,4 +23,6 @@ public interface TSysOrgDao extends SuperDao<TSysOrg> {
List<String> selectAllSubId(@Param("orgIds") List<String> orgIds); List<String> selectAllSubId(@Param("orgIds") List<String> orgIds);
List<String> selectOrgIdAllSubId(@Param("orgId") String orgId);
} }
...@@ -37,4 +37,15 @@ ...@@ -37,4 +37,15 @@
</foreach> </foreach>
</select> </select>
<select id="selectOrgIdAllSubId" resultType="string">
SELECT org_id FROM t_sys_org
WHERE status = '0' and is_dept = '0'
START WITH parent_id =#{orgId}
CONNECT BY PRIOR org_id = parent_id
union all
SELECT org_id FROM t_sys_org
WHERE status = '0' and is_dept = '0' and org_id=#{orgId}
</select>
</mapper> </mapper>
\ No newline at end of file
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