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

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

parent 936a9157
...@@ -36,6 +36,26 @@ public class DisableServiceImpl implements DisableService { ...@@ -36,6 +36,26 @@ public class DisableServiceImpl implements DisableService {
public Page<DisableVO> disableList(String organId, String isIncludeSubsidiaries, String districtProvincial, String districtCity, public Page<DisableVO> disableList(String organId, String isIncludeSubsidiaries, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom, String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganId, int page, int pageSize) { 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, return disableApplyMapper.disableList(new Page<>(page, pageSize), organId, isIncludeSubsidiaries, districtProvincial,
districtCity, districtArea, realName, certiCode, dataFrom, srvOrganId); districtCity, districtArea, realName, certiCode, dataFrom, srvOrganId);
} }
...@@ -91,6 +111,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -91,6 +111,7 @@ public class DisableServiceImpl implements DisableService {
public List<ChFndOrgan> fndOrganRoot() { public List<ChFndOrgan> fndOrganRoot() {
QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>(); QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("IS_LEAF", "1"); queryWrapper.eq("IS_LEAF", "1");
queryWrapper.and(wrapper -> wrapper.eq("PARENT_ID", "").or().eq("PARENT_ID", null));
return fndOrganMapper.selectList(queryWrapper); return fndOrganMapper.selectList(queryWrapper);
} }
......
...@@ -24,37 +24,38 @@ ...@@ -24,37 +24,38 @@
a.APPLY_STATUS applyStatus a.APPLY_STATUS applyStatus
from CH_DISABLE_APPLY a from CH_DISABLE_APPLY a
LEFT JOIN CH_FND_ORGAN o ON a.organ_id = o.ORGAN_ID 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 LEFT JOIN CH_FND_SRV_MODE m ON a.srv_mode_id = m.SRV_MODE_ID
<if test="organId != null and organId != ''"> <where>
<if test="isIncludeSubsidiaries == '0'"> <if test="organId != null and organId != ''">
and a.organ_id in (select organ_id form CH_FND_ORGAN where PARENT_ID = #{organId}) <if test="isIncludeSubsidiaries == '0'">
and a.organ_id in (#{organId})
</if>
<if test="isIncludeSubsidiaries != '0'">
and a.organ_id = #{organId}
</if>
</if> </if>
<if test="isIncludeSubsidiaries != '0'"> <if test="provincial != null and provincial != ''">
and a.organ_id = #{organId} and a.DISTRICT_PROVINCIAL = #{provincial}
</if> </if>
</if> <if test="city != null and city != ''">
and a.DISTRICT_CITY = #{city}
<if test="provincial != null and provincial != ''"> </if>
and a.DISTRICT_PROVINCIAL = #{provincial} <if test="area != null and area != ''">
</if> and a.DISTRICT_AREA = #{area}
<if test="city != null and city != ''"> </if>
and a.DISTRICT_CITY = #{city} <if test="name != null and name != ''">
</if> and a.REAL_NAME like '%'#{name}'%'
<if test="area != null and area != ''"> </if>
and a.DISTRICT_AREA = #{area} <if test="certiCode != null and certiCode != ''">
</if> and h.CERTI_CODE = #{certiCode}
<if test="name != null and name != ''"> </if>
and a.REAL_NAME like '%'#{name}'%' <if test="dataFrom != null and dataFrom != ''">
</if> and h.DATA_FROM = #{dataFrom}
<if test="certiCode != null and certiCode != ''"> </if>
and h.CERTI_CODE = #{certiCode} <if test="srvOrganId != null and srvOrganId != ''">
</if> and h.srvOrganId = #{srvOrganId}
<if test="dataFrom != null and dataFrom != ''"> </if>
and h.DATA_FROM = #{dataFrom} </where>
</if>
<if test="srvOrganId != null and srvOrganId != ''">
and h.srvOrganId = #{srvOrganId}
</if>
</select> </select>
<select id="selectDisableExamineInfoByApplyId" resultType="com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO"> <select id="selectDisableExamineInfoByApplyId" resultType="com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO">
...@@ -71,48 +72,47 @@ ...@@ -71,48 +72,47 @@
a.REGIST regist, a.REGIST regist,
a.FIXED_TEL fixedTel, a.FIXED_TEL fixedTel,
a.TREATMENT_TYPE treatmentType, a.TREATMENT_TYPE treatmentType,
a.ACPT_PROVINCIAL acptProvincial, a.ACPT_PROVINCIAL acptProvincial,
a.ACPT_CITY acptCity, a.ACPT_CITY acptCity,
a.ACPT_AREA acptArea, a.ACPT_AREA acptArea,
a.ACPT_STREET acptStreet, a.ACPT_STREET acptStreet,
a.ACPT_ADDRESS acptAddress, a.ACPT_ADDRESS acptAddress,
a.ACPT_SRV_PROVINCIAL acptSrvProvincial, a.ACPT_SRV_PROVINCIAL acptSrvProvincial,
a.ACPT_SRV_CITY acptSrvCity, a.ACPT_SRV_CITY acptSrvCity,
a.ACPT_SRV_AREA acptSrvArea, a.ACPT_SRV_AREA acptSrvArea,
a.ACPT_SRV_STREET acptSrvStreet, a.ACPT_SRV_STREET acptSrvStreet,
a.ACPT_SRV_ROAD_DETAIL acptSrvRoadDetail, a.ACPT_SRV_ROAD_DETAIL acptSrvRoadDetail,
a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial, a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial,
a.ADRESS_DISTRICT_CITY adressDistrictCity, a.ADRESS_DISTRICT_CITY adressDistrictCity,
a.ADRESS_DISTRICT_CODE adressDistrictCode, a.ADRESS_DISTRICT_CODE adressDistrictCode,
a.ADDRESS_ROAD_DETAIL addressRoadDetail, a.ADDRESS_ROAD_DETAIL addressRoadDetail,
a.ADDRESS_NUMBER_DETAIL addressNumberDetail, a.ADDRESS_NUMBER_DETAIL addressNumberDetail,
a.DISEASE disease, a.DISEASE disease,
a.APPLY_METHOD applyMethod, a.APPLY_METHOD applyMethod,
a.DISEASE_DESC diseaseDesc, a.DISEASE_DESC diseaseDesc,
a.MEDICAL_CARD medicalCard, a.MEDICAL_CARD medicalCard,
a.MEDICAL_TYPE medicalType, a.MEDICAL_TYPE medicalType,
a.SRV_ORGAN_ID srvOrganId, a.SRV_ORGAN_ID srvOrganId,
o.PERMIT_ID permitId, o.PERMIT_ID permitId,
a.OPER_NAME operName, a.OPER_NAME operName,
a.OPER_CERTI_CODE operCertiCode, a.OPER_CERTI_CODE operCertiCode,
a.OPER_TEL operTel, a.OPER_TEL operTel,
a.OPER_RELATION operRelation, a.OPER_RELATION operRelation,
a.OPER_FIXED_TEL operFixedTel, a.OPER_FIXED_TEL operFixedTel,
a.OPER_DISTRICT_PROVINCE operDistrictProvince, a.OPER_DISTRICT_PROVINCE operDistrictProvince,
a.OPER_DISTRICT_CITY operDistrictCity, a.OPER_DISTRICT_CITY operDistrictCity,
a.OPER_DISTRICT_CODE operDistrictCode, a.OPER_DISTRICT_CODE operDistrictCode,
a.OPER_STREET operStreet, a.OPER_STREET operStreet,
a.OPER_ADDRESS operAddress, a.OPER_ADDRESS operAddress,
a.CHECK_NAME checkName, a.CHECK_NAME checkName,
a.APPLY_STATUS applyStatus, a.APPLY_STATUS applyStatus,
a.CHECK_REMARK checkRemark a.CHECK_REMARK checkRemark
from CH_DISABLE_APPLY a, from CH_DISABLE_APPLY a
CH_SRV_ORGAN o LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.organ_code
where a.APPLY_ID = #{applyId} where a.APPLY_ID = #{applyId}
and a.SRV_ORGAN_ID = o.organ_code
</select> </select>
<select id="listExamineRecordByApplyId" resultType="com.hungraim.ism.pojo.vo.disable.ExamineRecord"> <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