Commit a6672fb2 authored by 蔡镇泽's avatar 蔡镇泽

失能人员信息列表

parent b061f4c1
......@@ -5,6 +5,7 @@ import com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ism.service.DisableService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.District;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
......@@ -28,6 +29,18 @@ public class DisableController {
private DisableService disableService;
/**
* 省市区
*
* @param districtLevel 区域级别:1省2地级市3县
* @param districtCode 上级区域代码
*/
@RequestMapping("/district")
public Result<List<District>> district(String districtLevel, String districtCode) {
List<District> districts = disableService.district(districtLevel, districtCode);
return Result.success(districts);
}
/**
* 失能人员信息列表
*
* @param organId 适用机构代码
......
package com.hungraim.ism.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.District;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* 失能人员申请历史Mapper
*
* @author czz
*/
@Mapper
@Repository
public interface DistrictMapper extends BaseMapper<District> {
}
......@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.District;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 失能申请Service
*
......@@ -44,4 +47,6 @@ public interface DisableService {
void addDisable(ChDisableApply chDisableApply);
void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark);
List<District> district(String districtLevel, String districtCode);
}
package com.hungraim.ism.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ism.dao.DisableApplyMapper;
import com.hungraim.ism.dao.DistrictMapper;
import com.hungraim.ism.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ism.pojo.vo.disable.ExamineRecord;
import com.hungraim.ism.service.DisableService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.District;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -17,12 +20,14 @@ public class DisableServiceImpl implements DisableService {
@Autowired
private DisableApplyMapper disableApplyMapper;
@Autowired
private DistrictMapper districtMapper;
@Override
public Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganId, int page, int pageSize) {
return disableApplyMapper.disableList(new Page(page, pageSize), organId, districtProvincial,
return disableApplyMapper.disableList(new Page<>(page, pageSize), organId, districtProvincial,
districtCity, districtArea, realName, certiCode, dataFrom, srvOrganId);
}
......@@ -47,4 +52,14 @@ public class DisableServiceImpl implements DisableService {
chDisableApply.setCheckRemark(checkRemark);
}
@Override
public List<District> district(String districtLevel, String districtCode) {
QueryWrapper<District> queryWrapper = new QueryWrapper<District>();
queryWrapper.eq("DISTRICT_LEVEL", districtLevel);
if (!"1".equals(districtLevel)) {
queryWrapper.eq("PARENT_DISTIRCT_CODE", districtCode);
}
return districtMapper.selectList(queryWrapper);
}
}
\ No newline at end of file
......@@ -23,24 +23,28 @@
a.ADRESS_DETAIL adressDetail
from CH_DISABLE_APPLY a,CH_SRV_ORGAN o
where a.organ_id = o.ORGAN_ID
<if test="organId != null">
<if test="organId != null and organId != ''">
and a.organ_id = #{organId}
</if>
<if test="provincial != null and city != null and area != null">
<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">
<if test="name != null and name != ''">
and a.REAL_NAME like '%'#{name}'%'
</if>
<if test="certiCode != null">
<if test="certiCode != null and certiCode != ''">
and h.CERTI_CODE = #{certiCode}
</if>
<if test="dataFrom != null">
<if test="dataFrom != null and dataFrom != ''">
and h.DATA_FROM = #{dataFrom}
</if>
<if test="srvOrganId != null">
<if test="srvOrganId != null and srvOrganId != ''">
and h.srvOrganId = #{srvOrganId}
</if>
</select>
......
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* 省市区数据
*/
@Data
@TableName("CH_DISABLE_APPLY")
public class District {
private String districtCode;
private String organId;
private Integer organRegion;
private String amlDistrictCode;
private String isValid;
private Integer districtLevel;
private String parentDistirctCode;
private String districtNameP;
private Integer districtId;
private String districtName;
private String districtAbbr;
}
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