Commit d0eae670 authored by zhangch's avatar zhangch

Merge branch 'master' of gitee.com:shanghai_heng_ge_information/long-term-care

parents d8f05468 2afebb9e
......@@ -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,37 +25,38 @@
a.APPLY_STATUS applyStatus
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
<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})
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 (#{organId})
</if>
<if test="isIncludeSubsidiaries != '0'">
and a.organ_id = #{organId}
</if>
</if>
<if test="isIncludeSubsidiaries != '0'">
and a.organ_id = #{organId}
<if test="provincial != null and provincial != ''">
and a.DISTRICT_PROVINCIAL = #{provincial}
</if>
</if>
<if test="provincial != null and provincial != ''">
and a.DISTRICT_PROVINCIAL = #{provincial}
</if>
<if test="city != null and city != ''">
and a.DISTRICT_CITY = #{city}
</if>
<if test="area != null and area != ''">
and a.DISTRICT_AREA = #{area}
</if>
<if test="name != null and name != ''">
and a.REAL_NAME like '%'#{name}'%'
</if>
<if test="certiCode != null and certiCode != ''">
and h.CERTI_CODE = #{certiCode}
</if>
<if test="dataFrom != null and dataFrom != ''">
and h.DATA_FROM = #{dataFrom}
</if>
<if test="srvOrganId != null and srvOrganId != ''">
and h.srvOrganId = #{srvOrganId}
</if>
<if test="city != null and city != ''">
and a.DISTRICT_CITY = #{city}
</if>
<if test="area != null and area != ''">
and a.DISTRICT_AREA = #{area}
</if>
<if test="name != null and name != ''">
and a.REAL_NAME like '%'#{name}'%'
</if>
<if test="certiCode != null and certiCode != ''">
and h.CERTI_CODE = #{certiCode}
</if>
<if test="dataFrom != null and dataFrom != ''">
and h.DATA_FROM = #{dataFrom}
</if>
<if test="srvOrganId != null and srvOrganId != ''">
and h.srvOrganId = #{srvOrganId}
</if>
</where>
</select>
<select id="selectDisableExamineInfoByApplyId" resultType="com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO">
......@@ -72,48 +73,47 @@
a.REGIST regist,
a.FIXED_TEL fixedTel,
a.TREATMENT_TYPE treatmentType,
a.ACPT_PROVINCIAL acptProvincial,
a.ACPT_CITY acptCity,
a.ACPT_AREA acptArea,
a.ACPT_STREET acptStreet,
a.ACPT_ADDRESS acptAddress,
a.ACPT_SRV_PROVINCIAL acptSrvProvincial,
a.ACPT_SRV_CITY acptSrvCity,
a.ACPT_SRV_AREA acptSrvArea,
a.ACPT_SRV_STREET acptSrvStreet,
a.ACPT_SRV_ROAD_DETAIL acptSrvRoadDetail,
a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial,
a.ADRESS_DISTRICT_CITY adressDistrictCity,
a.ADRESS_DISTRICT_CODE adressDistrictCode,
a.ADDRESS_ROAD_DETAIL addressRoadDetail,
a.ADDRESS_NUMBER_DETAIL addressNumberDetail,
a.ACPT_PROVINCIAL acptProvincial,
a.ACPT_CITY acptCity,
a.ACPT_AREA acptArea,
a.ACPT_STREET acptStreet,
a.ACPT_ADDRESS acptAddress,
a.ACPT_SRV_PROVINCIAL acptSrvProvincial,
a.ACPT_SRV_CITY acptSrvCity,
a.ACPT_SRV_AREA acptSrvArea,
a.ACPT_SRV_STREET acptSrvStreet,
a.ACPT_SRV_ROAD_DETAIL acptSrvRoadDetail,
a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial,
a.ADRESS_DISTRICT_CITY adressDistrictCity,
a.ADRESS_DISTRICT_CODE adressDistrictCode,
a.ADDRESS_ROAD_DETAIL addressRoadDetail,
a.ADDRESS_NUMBER_DETAIL addressNumberDetail,
a.DISEASE disease,
a.APPLY_METHOD applyMethod,
a.DISEASE_DESC diseaseDesc,
a.MEDICAL_CARD medicalCard,
a.MEDICAL_TYPE medicalType,
a.SRV_ORGAN_ID srvOrganId,
o.PERMIT_ID permitId,
a.DISEASE disease,
a.APPLY_METHOD applyMethod,
a.DISEASE_DESC diseaseDesc,
a.MEDICAL_CARD medicalCard,
a.MEDICAL_TYPE medicalType,
a.SRV_ORGAN_ID srvOrganId,
o.PERMIT_ID permitId,
a.OPER_NAME operName,
a.OPER_CERTI_CODE operCertiCode,
a.OPER_TEL operTel,
a.OPER_RELATION operRelation,
a.OPER_FIXED_TEL operFixedTel,
a.OPER_DISTRICT_PROVINCE operDistrictProvince,
a.OPER_DISTRICT_CITY operDistrictCity,
a.OPER_DISTRICT_CODE operDistrictCode,
a.OPER_STREET operStreet,
a.OPER_ADDRESS operAddress,
a.OPER_NAME operName,
a.OPER_CERTI_CODE operCertiCode,
a.OPER_TEL operTel,
a.OPER_RELATION operRelation,
a.OPER_FIXED_TEL operFixedTel,
a.OPER_DISTRICT_PROVINCE operDistrictProvince,
a.OPER_DISTRICT_CITY operDistrictCity,
a.OPER_DISTRICT_CODE operDistrictCode,
a.OPER_STREET operStreet,
a.OPER_ADDRESS operAddress,
a.CHECK_NAME checkName,
a.APPLY_STATUS applyStatus,
a.CHECK_REMARK checkRemark
from CH_DISABLE_APPLY a,
CH_SRV_ORGAN o
a.CHECK_NAME checkName,
a.APPLY_STATUS applyStatus,
a.CHECK_REMARK checkRemark
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