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

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

parent 8d8ad9ca
......@@ -15,8 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 监管机构及监管机构人员信息管理Controller
*
......@@ -96,13 +94,18 @@ public class SuperviseOrganEmpController {
/**
* 监管机构信息列表
*
* @param pageNum 页码
* @param pageSize 每页展示条数
* @param organId 适用机构id
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param spvOrganName 监管机构名称
*/
@RequestMapping("/superviseOrganList")
public Result<List<SuperviseOrganVO>> superviseOrganList(String organId, String spvOrganName) {
List<SuperviseOrganVO> result = superviseOrganEmpService.superviseOrganList(organId, spvOrganName);
return Result.success(result);
public Result<Page<SuperviseOrganVO>> superviseOrganList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
Long organId, Boolean isIncluded, String spvOrganName) {
Page<SuperviseOrganVO> page = new Page<>(pageNum, pageSize);
page = superviseOrganEmpService.superviseOrganList(page, organId, isIncluded, spvOrganName);
return Result.success(page);
}
/**
......
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan;
import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO;
import org.apache.ibatis.annotations.Mapper;
......@@ -11,5 +12,5 @@ import java.util.List;
@Mapper
@Repository
public interface SuperviseOrganMapper extends BaseMapper<ChSuperviseOrgan> {
List<SuperviseOrganVO> superviseOrganList(List<String> organIds, String spvOrganName);
Page<SuperviseOrganVO> superviseOrganList(Page<SuperviseOrganVO> page, List<Long> organIds, String spvOrganName);
}
......@@ -6,8 +6,6 @@ import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO;
import com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 监管机构人员信息管理Service
*
......@@ -21,7 +19,7 @@ public interface SuperviseOrganEmpService {
void insertOrUpdateEmpInfo(Long empId, Long spvOrganId, String spvEmpName, String certifType, String certifNum, String gender, Short age, String superviseTel, Short status);
List<SuperviseOrganVO> superviseOrganList(String organId, String spvOrganName);
Page<SuperviseOrganVO> superviseOrganList(Page<SuperviseOrganVO> page, Long organId, Boolean isIncluded, String spvOrganName);
void updateSpvStatus(String spvOrganId, 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.SuperviseOrganEmpMapper;
......@@ -15,7 +14,6 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
......@@ -32,6 +30,10 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
@Override
public Page<SuperviseOrganEmpVO> superviseOrganEmpList(Page<SuperviseOrganEmpVO> page, Long organId, Boolean isIncluded, String organName, String superviseType, String superviseName, String superviseTel, String status) {
return superviseOrganEmpMapper.superviseOrganEmpList(page, getOrganIds(organId, isIncluded, organFeignService), organName, superviseType, superviseName, superviseTel, status);
}
private List<Long> getOrganIds(Long organId, Boolean isIncluded, OrganFeignService organFeignService) {
Result<List<Long>> organChild = null;
List<Long> organIds = null;
if (organId != null) {
......@@ -39,9 +41,9 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
isIncluded = false;
}
organChild = organFeignService.getOrganChild(organId, isIncluded);
organIds = organChild.getData();
return organChild.getData();
}
return superviseOrganEmpMapper.superviseOrganEmpList(page, organIds, organName, superviseType, superviseName, superviseTel, status);
return null;
}
@Override
......@@ -82,12 +84,8 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
}
@Override
public List<SuperviseOrganVO> superviseOrganList(String organId, String spvOrganName) {
List<String> organIds = null;
if (StrUtil.isNotBlank(organId)) {
organIds = Arrays.asList(organId.split(","));
}
return superviseOrganMapper.superviseOrganList(organIds, spvOrganName);
public Page<SuperviseOrganVO> superviseOrganList(Page<SuperviseOrganVO> page, Long organId, Boolean isIncluded, String spvOrganName) {
return superviseOrganMapper.superviseOrganList(page, getOrganIds(organId, isIncluded, organFeignService), spvOrganName);
}
@Override
......
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