Commit 8d8ad9ca authored by 蔡镇泽's avatar 蔡镇泽

评定机构信息管理及监管机构信息管理调整

parent 5278e6b7
...@@ -3,6 +3,7 @@ package com.hungraim.ltc.api; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc.api;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
...@@ -18,5 +19,5 @@ public interface OrganFeignService { ...@@ -18,5 +19,5 @@ public interface OrganFeignService {
* @return 返回一个ids集合 * @return 返回一个ids集合
*/ */
@GetMapping("/api.apply/organ/child") @GetMapping("/api.apply/organ/child")
Result<List<Long>> getOrganChild(Long organId, Boolean isInvolveChild); Result<List<Long>> getOrganChild(@RequestParam("organId") Long organId, @RequestParam("isInvolveChild") Boolean isInvolveChild);
} }
...@@ -26,17 +26,18 @@ public class AprOrganController { ...@@ -26,17 +26,18 @@ public class AprOrganController {
/** /**
* 评定机构信息列表 * 评定机构信息列表
* *
* @param pageNum 页码 * @param pageNum 页码
* @param pageSize 每页展示条数 * @param pageSize 每页展示条数
* @param organIds 适用机构id * @param organId 适用机构id
* @param organName 机构名称 * @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param code 统一社会信用代码 * @param organName 机构名称
* @param code 统一社会信用代码
*/ */
@RequestMapping("/aprOrganList") @RequestMapping("/aprOrganList")
public Result<Page<AprOrganVO>> aprOrganList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, public Result<Page<AprOrganVO>> aprOrganList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
String organIds, String organName, String code) { Long organId, Boolean isIncluded, String organName, String code) {
Page<AprOrganVO> page = new Page<>(pageNum, pageSize); Page<AprOrganVO> page = new Page<>(pageNum, pageSize);
page = aprOrganService.aprOrganList(page, organIds, organName, code); page = aprOrganService.aprOrganList(page, organId, isIncluded, organName, code);
return Result.success(page); return Result.success(page);
} }
......
...@@ -35,7 +35,8 @@ public class SuperviseOrganEmpController { ...@@ -35,7 +35,8 @@ public class SuperviseOrganEmpController {
* *
* @param pageNum 页码 * @param pageNum 页码
* @param pageSize 每页展示条数 * @param pageSize 每页展示条数
* @param organIds 适用机构id * @param organId 适用机构id
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param organName 监管机构名称 * @param organName 监管机构名称
* @param superviseType 监管人员类型 监管人员:0;管理人员:1 * @param superviseType 监管人员类型 监管人员:0;管理人员:1
* @param superviseName 监管人员姓名 * @param superviseName 监管人员姓名
...@@ -44,9 +45,9 @@ public class SuperviseOrganEmpController { ...@@ -44,9 +45,9 @@ public class SuperviseOrganEmpController {
*/ */
@RequestMapping("/superviseOrganEmpList") @RequestMapping("/superviseOrganEmpList")
public Result<Page<SuperviseOrganEmpVO>> superviseOrganEmpList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, public Result<Page<SuperviseOrganEmpVO>> superviseOrganEmpList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
String organIds, String organName, String superviseType, String superviseName, String superviseTel, String status) { Long organId, Boolean isIncluded, String organName, String superviseType, String superviseName, String superviseTel, String status) {
Page<SuperviseOrganEmpVO> page = new Page<>(pageNum, pageSize); Page<SuperviseOrganEmpVO> page = new Page<>(pageNum, pageSize);
page = superviseOrganEmpService.superviseOrganEmpList(page, organIds, organName, superviseType, superviseName, superviseTel, status); page = superviseOrganEmpService.superviseOrganEmpList(page, organId, isIncluded, organName, superviseType, superviseName, superviseTel, status);
return Result.success(page); return Result.success(page);
} }
......
...@@ -12,5 +12,5 @@ import java.util.List; ...@@ -12,5 +12,5 @@ import java.util.List;
@Mapper @Mapper
@Repository @Repository
public interface AprOrganMapper extends BaseMapper<ChAprOrgan> { public interface AprOrganMapper extends BaseMapper<ChAprOrgan> {
Page<AprOrganVO> aprOrganList(Page<AprOrganVO> page, List<String> organIds, String organName, String code); Page<AprOrganVO> aprOrganList(Page<AprOrganVO> page, List<Long> organIds, String organName, String code);
} }
...@@ -12,5 +12,5 @@ import java.util.List; ...@@ -12,5 +12,5 @@ import java.util.List;
@Mapper @Mapper
@Repository @Repository
public interface SuperviseOrganEmpMapper extends BaseMapper<ChSuperviseOrganEmp> { public interface SuperviseOrganEmpMapper extends BaseMapper<ChSuperviseOrganEmp> {
Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, List<String> organIds, String organName, String superviseType, String superviseName, String superviseTel, String status); Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, List<Long> organIds, String organName, String superviseType, String superviseName, String superviseTel, String status);
} }
...@@ -11,5 +11,5 @@ import org.springframework.stereotype.Service; ...@@ -11,5 +11,5 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public interface AprOrganService { public interface AprOrganService {
Page<AprOrganVO> aprOrganList(Page<AprOrganVO> page, String organIds, String organName, String code); Page<AprOrganVO> aprOrganList(Page<AprOrganVO> page, Long organId, Boolean isIncluded, String organName, String code);
} }
...@@ -15,7 +15,7 @@ import java.util.List; ...@@ -15,7 +15,7 @@ import java.util.List;
*/ */
@Service @Service
public interface SuperviseOrganEmpService { public interface SuperviseOrganEmpService {
Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, String organIds, String organName, String superviseType, String superviseName, String superviseTel, String status); Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, Long organId, Boolean isIncluded, String organName, String superviseType, String superviseName, String superviseTel, String status);
void updateEmpStatus(String empId, Short isLock); void updateEmpStatus(String empId, Short isLock);
......
package com.hungraim.ltc.governance.service.impl; package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.OrganFeignService;
import com.hungraim.ltc.governance.dao.AprOrganMapper; import com.hungraim.ltc.governance.dao.AprOrganMapper;
import com.hungraim.ltc.governance.service.AprOrganService; import com.hungraim.ltc.governance.service.AprOrganService;
import com.hungraim.ltc.pojo.vo.governance.AprOrganVO; import com.hungraim.ltc.pojo.vo.governance.AprOrganVO;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -19,12 +19,18 @@ import java.util.List; ...@@ -19,12 +19,18 @@ import java.util.List;
public class AprOrganServiceImpl implements AprOrganService { public class AprOrganServiceImpl implements AprOrganService {
private final AprOrganMapper aprOrganMapper; private final AprOrganMapper aprOrganMapper;
private final OrganFeignService organFeignService;
@Override @Override
public Page<AprOrganVO> aprOrganList(Page<AprOrganVO> page, String organId, String organName, String code) { public Page<AprOrganVO> aprOrganList(Page<AprOrganVO> page, Long organId, Boolean isIncluded, String organName, String code) {
List<String> organIds = null; Result<List<Long>> organChild = null;
if (StrUtil.isNotBlank(organId)) { List<Long> organIds = null;
organIds = Arrays.asList(organId.split(",")); if (organId != null) {
if (isIncluded == null) {
isIncluded = false;
}
organChild = organFeignService.getOrganChild(organId, isIncluded);
organIds = organChild.getData();
} }
return aprOrganMapper.aprOrganList(page, organIds, organName, code); return aprOrganMapper.aprOrganList(page, organIds, organName, code);
} }
......
...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.service.impl; ...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.OrganFeignService;
import com.hungraim.ltc.governance.dao.SuperviseOrganEmpMapper; import com.hungraim.ltc.governance.dao.SuperviseOrganEmpMapper;
import com.hungraim.ltc.governance.dao.SuperviseOrganMapper; import com.hungraim.ltc.governance.dao.SuperviseOrganMapper;
import com.hungraim.ltc.governance.service.SuperviseOrganEmpService; import com.hungraim.ltc.governance.service.SuperviseOrganEmpService;
...@@ -9,6 +10,7 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan; ...@@ -9,6 +10,7 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp; import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp;
import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO; import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO;
import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO; import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -26,12 +28,18 @@ import java.util.List; ...@@ -26,12 +28,18 @@ import java.util.List;
public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService { public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
private final SuperviseOrganEmpMapper superviseOrganEmpMapper; private final SuperviseOrganEmpMapper superviseOrganEmpMapper;
private final SuperviseOrganMapper superviseOrganMapper; private final SuperviseOrganMapper superviseOrganMapper;
private final OrganFeignService organFeignService;
@Override @Override
public Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, String organId, String organName, String superviseType, String superviseName, String superviseTel, String status) { public Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, Long organId, Boolean isIncluded, String organName, String superviseType, String superviseName, String superviseTel, String status) {
List<String> organIds = null; Result<List<Long>> organChild = null;
if (StrUtil.isNotBlank(organId)) { List<Long> organIds = null;
organIds = Arrays.asList(organId.split(",")); if (organId != null) {
if (isIncluded == null) {
isIncluded = false;
}
organChild = organFeignService.getOrganChild(organId, isIncluded);
organIds = organChild.getData();
} }
return superviseOrganEmpMapper.superviseOrganEmpList(page, organIds, organName, superviseType, superviseName, superviseTel, status); return superviseOrganEmpMapper.superviseOrganEmpList(page, organIds, organName, superviseType, superviseName, superviseTel, status);
} }
...@@ -93,9 +101,17 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService { ...@@ -93,9 +101,17 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
public void insertOrUpdateSpvInfo(ChSuperviseOrgan spvOrgan) { public void insertOrUpdateSpvInfo(ChSuperviseOrgan spvOrgan) {
if (spvOrgan.getSpvOrganId() != null) { if (spvOrgan.getSpvOrganId() != null) {
//更新 //更新
ChSuperviseOrgan chSuperviseOrgan = superviseOrganMapper.selectById(spvOrgan);
chSuperviseOrgan.setOrganId(spvOrgan.getOrganId());
chSuperviseOrgan.setDistrictProvince(spvOrgan.getDistrictProvince());
chSuperviseOrgan.setDistrictCity(spvOrgan.getDistrictCity());
chSuperviseOrgan.setDistrictArea(spvOrgan.getDistrictArea());
chSuperviseOrgan.setSpvOrganName(spvOrgan.getSpvOrganName());
chSuperviseOrgan.setContactTel(spvOrgan.getContactTel());
superviseOrganMapper.updateById(spvOrgan); superviseOrganMapper.updateById(spvOrgan);
} else { } else {
//新增 //新增
spvOrgan.setIsLock((short) 0);
spvOrgan.setEffTime(new Date()); spvOrgan.setEffTime(new Date());
superviseOrganMapper.insert(spvOrgan); superviseOrganMapper.insert(spvOrgan);
} }
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
--机构代码 --机构代码
sOrgan.ORGAN_ID spvOrganCode, sOrgan.ORGAN_ID spvOrganCode,
--所在省市区 --所在省市区
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE sOrgan.district_province = dis.DISTRICT_CODE) districtProvince, sOrgan.district_province districtProvince,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE sOrgan.district_city = dis.DISTRICT_CODE) districtCity, sOrgan.district_city districtCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE sOrgan.district_area = dis.DISTRICT_CODE) districtArea, sOrgan.district_area districtArea,
--监管机构名称 --监管机构名称
sOrgan.SPV_ORGAN_NAME spvOrganName, sOrgan.SPV_ORGAN_NAME spvOrganName,
--机构联系人姓名 --机构联系人姓名
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
--银行账号 --银行账号
sOrgan.BANK_NO bankNo sOrgan.BANK_NO bankNo
FROM FROM
CH_SUPERVISE_ORGAN sOrgan --监管人员信息 --监管人员信息表
LEFT JOIN ch_srv_organ organ ON sOrgan.organ_id = organ.organ_id --护理机构 CH_SUPERVISE_ORGAN sOrgan
--护理机构表
LEFT JOIN ch_srv_organ organ ON sOrgan.organ_id = organ.organ_id
where sOrgan.IS_LOCK = 0 where sOrgan.IS_LOCK = 0
<if test="organIds != null"> <if test="organIds != null">
and sOrgan.organ_id in and sOrgan.organ_id in
......
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