Commit 2afebb9e authored by 蔡镇泽's avatar 蔡镇泽

失能人员信息列表省市区、机构

parent 936a9157
......@@ -36,6 +36,26 @@ public class DisableServiceImpl implements DisableService {
public Page<DisableVO> disableList(String organId, String isIncludeSubsidiaries, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganId, int page, int pageSize) {
//拼接子机构id
if ("0".equals(isIncludeSubsidiaries)) {
boolean flag = true;
while (flag) {
QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("STATUS", "1");
queryWrapper.eq("PARENT_ID", organId);
List<ChFndOrgan> organs = fndOrganMapper.selectList(queryWrapper);
if (organs != null && organs.size() != 0) {
for (ChFndOrgan chFndOrgan : organs) {
organId = organId + "," + chFndOrgan.getOrganId();
if ("2".equals(chFndOrgan.getIsLeaf())) {
flag = false;
}
}
} else {
flag = false;
}
}
}
return disableApplyMapper.disableList(new Page<>(page, pageSize), organId, isIncludeSubsidiaries, districtProvincial,
districtCity, districtArea, realName, certiCode, dataFrom, srvOrganId);
}
......@@ -91,6 +111,7 @@ public class DisableServiceImpl implements DisableService {
public List<ChFndOrgan> fndOrganRoot() {
QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("IS_LEAF", "1");
queryWrapper.and(wrapper -> wrapper.eq("PARENT_ID", "").or().eq("PARENT_ID", null));
return fndOrganMapper.selectList(queryWrapper);
}
......
......@@ -25,15 +25,15 @@
from CH_DISABLE_APPLY a
LEFT JOIN CH_FND_ORGAN o ON a.organ_id = o.ORGAN_ID
LEFT JOIN CH_FND_SRV_MODE m ON a.srv_mode_id = m.SRV_MODE_ID
<where>
<if test="organId != null and organId != ''">
<if test="isIncludeSubsidiaries == '0'">
and a.organ_id in (select organ_id form CH_FND_ORGAN where PARENT_ID = #{organId})
and a.organ_id in (#{organId})
</if>
<if test="isIncludeSubsidiaries != '0'">
and a.organ_id = #{organId}
</if>
</if>
<if test="provincial != null and provincial != ''">
and a.DISTRICT_PROVINCIAL = #{provincial}
</if>
......@@ -55,6 +55,7 @@
<if test="srvOrganId != null and srvOrganId != ''">
and h.srvOrganId = #{srvOrganId}
</if>
</where>
</select>
<select id="selectDisableExamineInfoByApplyId" resultType="com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO">
......@@ -109,10 +110,9 @@
a.CHECK_NAME checkName,
a.APPLY_STATUS applyStatus,
a.CHECK_REMARK checkRemark
from CH_DISABLE_APPLY a,
CH_SRV_ORGAN o
from CH_DISABLE_APPLY a
LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.organ_code
where a.APPLY_ID = #{applyId}
and a.SRV_ORGAN_ID = o.organ_code
</select>
<select id="listExamineRecordByApplyId" resultType="com.hungraim.ism.pojo.vo.disable.ExamineRecord">
......
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