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

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

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