Commit 821ce0f6 authored by zengxiaoli@yeah.net's avatar zengxiaoli@yeah.net

护理机构人员管理审核

parent 708e63a1
......@@ -55,7 +55,7 @@ public class SrvOrganController {
Integer pageSize, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName) {
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
Page<SrvOrganListVo> page = new Page<>(pageNum, pageSize);
page = srvOrganService.getSrvOrganList(page, organId, isInvolveChild, creditCode, srvOrganName,srvOrganId);
page = srvOrganService.getSrvOrganApplyList(page, organId, isInvolveChild, creditCode, srvOrganName,srvOrganId);
return Result.success(page);
}
......@@ -131,7 +131,7 @@ public class SrvOrganController {
if (null == srvOrganId) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
SrvOrganVo srvOrganVo = srvOrganService.getSrvOrganDetail(srvOrganId);
SrvOrganVo srvOrganVo = srvOrganService.getSrvOrganApplyDetail(srvOrganId);
return Result.success(srvOrganVo);
}
......@@ -153,7 +153,7 @@ public class SrvOrganController {
public Result<Page<SrvOrganEmpListVo>> getSrvOrganEmpListVo(@RequestHeader("Authorization") String token,@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType) {
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
Page<SrvOrganEmpListVo> page = new Page<>(pageNum, pageSize);
page = srvOrganEmpService.getSrvOrganEmpListVo(page, organId, isInvolveChild, empName, srvOrganName, certifNum, isLock, empType,srvOrganId);
page = srvOrganEmpService.getSrvOrganEmpApplyListVo(page, organId, isInvolveChild, empName, srvOrganName, certifNum, isLock, empType,srvOrganId);
return Result.success(page);
}
......@@ -172,6 +172,23 @@ public class SrvOrganController {
return Result.success();
}
/**
* 审核护理机构
*
* @param srvOrganId 护理机构id
* @return 返回执行结果
*/
@DeleteMapping("/auditSrvOrgan")
public Result<SrvOrganVo> auditSrvOrgan(@RequestHeader("Authorization") String token,Long srvOrganId,Integer auditStatus) {
if (null == srvOrganId) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvOrganService.auditSrvOrgan(userId,srvOrganId,auditStatus);
return Result.success();
}
/**
* 获取护理人员的资质列表
*
......@@ -266,7 +283,7 @@ public class SrvOrganController {
/**
* 护理人员导出
*
* @param organId 适用机构id
* @param token 适用机构id
* @param isInvolveChild 是否包含子机构
* @param empName 人员姓名
* @param srvOrganName 护理机构名称
......@@ -318,4 +335,6 @@ public class SrvOrganController {
}
}
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmpApply;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface ChSrvOrganEmpApplyMapper extends BaseMapper<ChSrvOrganEmpApply> {
/**
* 分页查询护理人员列表
*
* @param page 页码参数
* @param organIds 适用机构id集合
* @param empName 人员姓名
* @param srvOrganName 护理机构名称
* @param certifNum 身份证号
* @param isLock 人员状态
* @param empType 护理人员类型
* @return 返回列表
*/
Page<SrvOrganEmpListVo> getSrvOrganApplyEmpListVo(Page<SrvOrganEmpListVo> page, List<Long> organIds, String empName, String srvOrganName, String certifNum, Short isLock, Short empType, Long srvOrganId);
List<SrvOrganEmpExportVo> getSrvOrganEmpApplyExportList(List<Long> organIds, Long srvOrganId, String empName, String srvOrganName, String certifNum, Short isLock, Short empType);
}
\ No newline at end of file
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrganApply;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 护理机构Mapper
*
*/
@Mapper
@Repository
public interface SrvOrganApplyMapper extends BaseMapper<ChSrvOrganApply> {
Page<SrvOrganListVo> getSrvOrganApplyList(Page<SrvOrganListVo> page, @Param("organIds") List<Long> organIds,
@Param("creditCode") String creditCode,
@Param("srvOrganName") String srvOrganName,
@Param("srvOrganId") Long srvOrganId);
}
......@@ -25,7 +25,7 @@ public interface SrvOrganEmpService {
* @param empType 护理人员类型
* @return 返回列表
*/
Page<SrvOrganEmpListVo> getSrvOrganEmpListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType,Long srvOrganId);
Page<SrvOrganEmpListVo> getSrvOrganEmpApplyListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType,Long srvOrganId);
/**
* 修改护理人员的状态
......
......@@ -3,6 +3,7 @@ package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrganApply;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import com.hungraim.ltc.pojo.vo.system.SrvOrganVo;
......@@ -22,6 +23,21 @@ public interface SrvOrganService {
*/
Page<SrvOrganListVo> getSrvOrganList(Page<SrvOrganListVo> page, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName,Long srvOrganId);
/**
* 分页查询护理机构列表
*
* @param page 分页对象
* @param organId 适用机构id
* @param isInvolveChild 是否包含下层机构
* @param creditCode 统一社会信用代码
* @param srvOrganName 护理机构名称
* @return 返回护理机构审核申请列表
*/
Page<SrvOrganListVo> getSrvOrganApplyList(Page<SrvOrganListVo> page, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName, Long srvOrganId);
/**
* 获取所有服务机构等级
*
......@@ -51,6 +67,16 @@ public interface SrvOrganService {
*/
SrvOrganVo getSrvOrganDetail(Long srvOrganId);
/**
* 查询护理机构申请表里的详情
* 20230322
* @param srvOrganId 护理机构id
* @return 返回护理机构申请表详情
*/
SrvOrganVo getSrvOrganApplyDetail(Long srvOrganId);
/**
* 删除护理机构
*
......@@ -58,4 +84,7 @@ public interface SrvOrganService {
*/
void deleteSrvOrgan(Long srvOrganId);
void auditSrvOrgan(Integer userId,Long srvOrganId,Integer auditStatus);
}
......@@ -10,8 +10,10 @@ import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrganApply;
import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvempRiskLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmpApply;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetailDelete;
import com.hungraim.ltc.pojo.vo.disable.*;
......@@ -42,13 +44,16 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
private final ChSrvOrganEmpMapper chSrvOrganEmpMapper;
private final ChSrvOrganEmpApplyMapper chSrvOrganEmpApplyMapper;
private final OrganService organService;
private final AttachFeignService attachFeignService;
private final SrvEmpTypeMapper srvEmpTypeMapper;
private final SrvOrganMapper srvOrganMapper;
private final SrvOrganApplyMapper srvOrganApplyMapper;
@Autowired
private ChSrvempRiskLevelMapper chSrvempRiskLevelMapper;
......@@ -60,9 +65,9 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
@Override
public Page<SrvOrganEmpListVo> getSrvOrganEmpListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType,Long srvOrganId) {
public Page<SrvOrganEmpListVo> getSrvOrganEmpApplyListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType,Long srvOrganId) {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
return chSrvOrganEmpMapper.getSrvOrganEmpListVo(page, organIds, empName, srvOrganName, certifNum, isLock, empType,srvOrganId);
return chSrvOrganEmpApplyMapper.getSrvOrganApplyEmpListVo(page, organIds, empName, srvOrganName, certifNum, isLock, empType,srvOrganId);
}
@Override
......@@ -71,23 +76,27 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
chSrvOrganEmp.setEmpId(empId);
chSrvOrganEmp.setIsLock(isLock);
chSrvOrganEmpMapper.updateById(chSrvOrganEmp);
ChSrvOrganEmpApply chSrvOrganEmpApply = new ChSrvOrganEmpApply();
chSrvOrganEmpApply.setEmpId(empId);
chSrvOrganEmp.setIsLock(isLock);
chSrvOrganEmpApplyMapper.updateById(chSrvOrganEmpApply);
}
@Override
public SrvOrganEmpVo getSrvOrganEmp(Long empId) {
SrvOrganEmpVo srvOrganEmpVo = new SrvOrganEmpVo();
ChSrvOrganEmp chSrvOrganEmp = chSrvOrganEmpMapper.selectById(empId);
Long empTypeId = chSrvOrganEmp.getEmpTypeId();
ChSrvOrganEmpApply chSrvOrganEmpApply = chSrvOrganEmpApplyMapper.selectById(empId);
Long empTypeId = chSrvOrganEmpApply.getEmpTypeId();
if(empTypeId!=null){
ChCfgSrvEmpType chCfgSrvEmpType = srvEmpTypeMapper.selectById(empTypeId);
srvOrganEmpVo.setEmpCateId(chCfgSrvEmpType.getEmpCateId());
}else{
srvOrganEmpVo.setEmpCateId(0);
}
Long srvOrganId = chSrvOrganEmp.getSrvOrganId();
ChSrvOrgan chSrvOrgan = srvOrganMapper.selectById(srvOrganId);
BeanUtils.copyProperties(chSrvOrganEmp, srvOrganEmpVo);
srvOrganEmpVo.setUnifiedSocialCreditCode(chSrvOrgan.getUnifiedSocialCreditCode());
Long srvOrganId = chSrvOrganEmpApply.getSrvOrganId();
ChSrvOrganApply chSrvOrganApply = srvOrganApplyMapper.selectById(srvOrganId);
BeanUtils.copyProperties(chSrvOrganEmpApply, srvOrganEmpVo);
srvOrganEmpVo.setUnifiedSocialCreditCode(chSrvOrganApply.getUnifiedSocialCreditCode());
try {
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(empId, AttachType.SRV_ORGAN_EMP.getUploadType());
if (ResultCode.SUCCESS.getCode().equals(listResult.getCode())) {
......@@ -105,25 +114,25 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
@Override
public void saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo) {
Long empId = srvOrganEmpVo.getEmpId();
ChSrvOrganEmp chSrvOrganEmp = new ChSrvOrganEmp();
BeanUtils.copyProperties(srvOrganEmpVo, chSrvOrganEmp);
ChSrvOrganEmpApply chSrvOrganEmpApply = new ChSrvOrganEmpApply();
BeanUtils.copyProperties(srvOrganEmpVo, chSrvOrganEmpApply);
if (null == empId) {
// 新增
chSrvOrganEmp.setEffTime(new Date());
chSrvOrganEmp.setIsLock((short) 0);
chSrvOrganEmpMapper.insert(chSrvOrganEmp);
updateAttachs(srvOrganEmpVo, chSrvOrganEmp.getEmpId());
chSrvOrganEmpApply.setEffTime(new Date());
chSrvOrganEmpApply.setIsLock((short) 0);
chSrvOrganEmpApplyMapper.insert(chSrvOrganEmpApply);
updateAttachs(srvOrganEmpVo, chSrvOrganEmpApply.getEmpId());
ChSrvempRiskLevel chSrvempRiskLevel = new ChSrvempRiskLevel();
chSrvempRiskLevel.setRiskLevel(0L);
chSrvempRiskLevel.setSrvEmpId(Long.valueOf(chSrvOrganEmp.getEmpId()));
chSrvempRiskLevel.setSrvEmpId(Long.valueOf(chSrvOrganEmpApply.getEmpId()));
chSrvempRiskLevel.setStatus(0);
chSrvempRiskLevel.setFcd(new Date());
chSrvempRiskLevelMapper.insert(chSrvempRiskLevel);
} else {
// 修改
chSrvOrganEmpMapper.updateById(chSrvOrganEmp);
chSrvOrganEmpApplyMapper.updateById(chSrvOrganEmpApply);
updateAttachs(srvOrganEmpVo, empId);
}
}
......@@ -142,7 +151,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
public Workbook srvOrganExport(Long organId,Long srvOrganId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum,
Short isLock, Short empType) {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
List<SrvOrganEmpExportVo> srvOrganEmpExportList = chSrvOrganEmpMapper.getSrvOrganEmpExportList(organIds,srvOrganId, empName, srvOrganName, certifNum, isLock, empType);
List<SrvOrganEmpExportVo> srvOrganEmpExportList = chSrvOrganEmpApplyMapper.getSrvOrganEmpApplyExportList(organIds,srvOrganId, empName, srvOrganName, certifNum, isLock, empType);
for (SrvOrganEmpExportVo record : srvOrganEmpExportList) {
StringBuilder stringBuilder = new StringBuilder();
......
......@@ -12,6 +12,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrganApply;
import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
......@@ -43,6 +44,9 @@ public class SrvOrganServiceImpl implements SrvOrganService {
private final SrvOrganMapper srvOrganMapper;
private final SrvOrganApplyMapper srvOrganApplyMapper;
private final OrganService organService;
private final SrvModeMapper srvModeMapper;
......@@ -85,6 +89,30 @@ public class SrvOrganServiceImpl implements SrvOrganService {
return srvOrganList;
}
@Override
public Page<SrvOrganListVo> getSrvOrganApplyList(Page<SrvOrganListVo> page, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName, Long srvOrganId) {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
Page<SrvOrganListVo> srvOrganApplyList = srvOrganApplyMapper.getSrvOrganApplyList(page, organIds, creditCode, srvOrganName,srvOrganId);
List<SrvOrganListVo> records = srvOrganApplyList.getRecords();
if (records != null && records.size() > 0) {
for (SrvOrganListVo srvOrganListVo : records) {
String srvType = srvOrganListVo.getSrvType();
if (StrUtil.isNotBlank(srvType)) {
String[] split = srvType.split(",");
List<Integer> modeIds = new ArrayList<>();
for (String s : split) {
modeIds.add(Integer.parseInt(s));
}
// 去查询对应的服务方式
List<SrvModeVo> srvModeVos = srvModeMapper.selectByModeIds(modeIds);
srvOrganListVo.setSrvModeVos(srvModeVos);
}
}
}
return srvOrganApplyList;
}
@Override
public List<ChFndSrvOrganLevel> getSrvOrganLevels() {
return chFndSrvOrganLevelMapper.selectList(null);
......@@ -100,11 +128,11 @@ public class SrvOrganServiceImpl implements SrvOrganService {
public void saveOrUpdateSrvOrgan(SrvOrganVo srvOrganVo) {
Integer srvOrganId = srvOrganVo.getSrvOrganId();
List<ChFndAttach> fileDataList = srvOrganVo.getFileDataList();
ChSrvOrgan chSrvOrgan = new ChSrvOrgan();
BeanUtils.copyProperties(srvOrganVo, chSrvOrgan);
ChSrvOrganApply chSrvOrganApply = new ChSrvOrganApply();
BeanUtils.copyProperties(srvOrganVo, chSrvOrganApply);
if (srvOrganId != null) {
// 修改操作
srvOrganMapper.updateById(chSrvOrgan);
srvOrganApplyMapper.updateById(chSrvOrganApply);
AttachUpdateVo attachUpdateVo = new AttachUpdateVo();
attachUpdateVo.setCtrlId(Long.valueOf(srvOrganId));
attachUpdateVo.setAttachType(AttachType.SRV_ORGAN.getUploadType());
......@@ -116,20 +144,20 @@ public class SrvOrganServiceImpl implements SrvOrganService {
} else {
// 添加操作
//校验服务机构是否已存在
ChSrvOrgan selectOrgan = srvOrganMapper.selectOne(new LambdaQueryWrapper<ChSrvOrgan>()
.eq(ChSrvOrgan::getUnifiedSocialCreditCode, srvOrganVo.getUnifiedSocialCreditCode())
.eq(ChSrvOrgan::getStatus, 0));
ChSrvOrgan selectOrgan1 = srvOrganMapper.selectOne(new LambdaQueryWrapper<ChSrvOrgan>()
.eq(ChSrvOrgan::getPermitId, srvOrganVo.getPermitId())
.eq(ChSrvOrgan::getStatus, 0));
ChSrvOrganApply selectOrgan = srvOrganApplyMapper.selectOne(new LambdaQueryWrapper<ChSrvOrganApply>()
.eq(ChSrvOrganApply::getUnifiedSocialCreditCode, srvOrganVo.getUnifiedSocialCreditCode())
.eq(ChSrvOrganApply::getStatus, 0));
ChSrvOrganApply selectOrgan1 = srvOrganApplyMapper.selectOne(new LambdaQueryWrapper<ChSrvOrganApply>()
.eq(ChSrvOrganApply::getPermitId, srvOrganVo.getPermitId())
.eq(ChSrvOrganApply::getStatus, 0));
if (selectOrgan != null || selectOrgan1 != null) {
throw new RuntimeException("服务机构已存在,请不要重复添加");
}
chSrvOrgan.setStatus(0);
chSrvOrgan.setEffTime(new Date());
srvOrganMapper.insert(chSrvOrgan);
chSrvOrganApply.setStatus(0);
chSrvOrganApply.setEffTime(new Date());
srvOrganApplyMapper.insert(chSrvOrganApply);
AttachUpdateVo attachUpdateVo = new AttachUpdateVo();
attachUpdateVo.setCtrlId(Long.valueOf(chSrvOrgan.getSrvOrganId()));
attachUpdateVo.setCtrlId(Long.valueOf(chSrvOrganApply.getSrvOrganId()));
attachUpdateVo.setAttachType(AttachType.SRV_ORGAN.getUploadType());
attachUpdateVo.setChFndAttachs(fileDataList);
Result attachs = attachFeignService.updateAttachs(attachUpdateVo);
......@@ -138,7 +166,7 @@ public class SrvOrganServiceImpl implements SrvOrganService {
}
ChSrvorganRiskLevel chSrvorganRiskLevel = new ChSrvorganRiskLevel();
chSrvorganRiskLevel.setRiskLevel(0L);
chSrvorganRiskLevel.setSrvOrganId(Long.valueOf(chSrvOrgan.getSrvOrganId()));
chSrvorganRiskLevel.setSrvOrganId(Long.valueOf(chSrvOrganApply.getSrvOrganId()));
chSrvorganRiskLevel.setStatus(0);
chSrvorganRiskLevel.setFcd(new Date());
chSrvorganRiskLevelMapper.insert(chSrvorganRiskLevel);
......@@ -159,7 +187,7 @@ public class SrvOrganServiceImpl implements SrvOrganService {
chServiceTypeVoList.add(chServiceTypeVo);
}
}
Long srvOrganIdL = Long.valueOf(chSrvOrgan.getSrvOrganId());
Long srvOrganIdL = Long.valueOf(chSrvOrganApply.getSrvOrganId());
List<ChSrvOrganProject> chSrvOrganProjectList = new ArrayList<>();
//进行服务处理
chServiceTypeVoList.stream().forEach(chServiceTypeVo->{
......@@ -200,12 +228,64 @@ public class SrvOrganServiceImpl implements SrvOrganService {
return srvOrganVo;
}
@Override
public SrvOrganVo getSrvOrganApplyDetail(Long srvOrganId) {
ChSrvOrganApply chSrvOrganApply = srvOrganApplyMapper.selectById(srvOrganId);
SrvOrganVo srvOrganVo = new SrvOrganVo();
BeanUtils.copyProperties(chSrvOrganApply, srvOrganVo);
try {
Result<List<ChFndAttach>> listResult = attachFeignService.selectAttachs(srvOrganId, AttachType.SRV_ORGAN.getUploadType());
if (StrUtil.equals(listResult.getCode(), ResultCode.SUCCESS.getCode())) {
List<ChFndAttach> data = listResult.getData();
if (data != null) {
srvOrganVo.setFileDataList(data);
}
} else {
log.error("查询id为{}的护理机构文件列表失败,失败原因:{}", srvOrganId, listResult.getMsg());
}
} catch (Exception e) {
e.printStackTrace();
log.error("查询id为{}的护理机构文件列表失败,失败原因:{}", srvOrganId, e.getMessage());
}
return srvOrganVo;
}
@Override
public void deleteSrvOrgan(Long srvOrganId) {
ChSrvOrgan chSrvOrgan = new ChSrvOrgan();
chSrvOrgan.setSrvOrganId(srvOrganId.intValue());
chSrvOrgan.setStatus(1);
ChSrvOrganApply chSrvOrganApply = new ChSrvOrganApply();
chSrvOrganApply.setSrvOrganId(srvOrganId.intValue());
chSrvOrganApply.setStatus(1);
srvOrganMapper.updateById(chSrvOrgan);
srvOrganApplyMapper.updateById(chSrvOrganApply);
}
@Override
public void auditSrvOrgan(Integer userId,Long srvOrganId, Integer auditStatus) {
ChSrvOrganApply chSrvOrganApply = new ChSrvOrganApply();
chSrvOrganApply.setSrvOrganId(srvOrganId.intValue());
chSrvOrganApply.setAuditStatus(auditStatus.shortValue());
chSrvOrganApply.setAuditDate(new Date());
chSrvOrganApply.setAuditUserId(userId);
int result = srvOrganApplyMapper.updateById(chSrvOrganApply);
//审核通过 同步到主表
if (result>0) {
//查出申请表的信息同步到主表
chSrvOrganApply = srvOrganApplyMapper.selectOne(new LambdaQueryWrapper<ChSrvOrganApply>()
.eq(ChSrvOrganApply::getSrvOrganId,srvOrganId));
//主表
ChSrvOrgan querySrvOrgan = srvOrganMapper.selectOne(new LambdaQueryWrapper<ChSrvOrgan>()
.eq(ChSrvOrgan::getSrvOrganId,srvOrganId));
ChSrvOrgan chSrvOrgan = new ChSrvOrgan();
BeanUtils.copyProperties(chSrvOrganApply,chSrvOrgan);
if(querySrvOrgan==null){
srvOrganMapper.insert(chSrvOrgan);
}else{
srvOrganMapper.updateById(chSrvOrgan);
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.ChSrvOrganEmpApplyMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmpApply">
<id column="EMP_ID" jdbcType="DECIMAL" property="empId"/>
<result column="EMP_NAME" jdbcType="VARCHAR" property="empName"/>
<result column="ORGAN_ID" jdbcType="VARCHAR" property="organId"/>
<result column="SRV_ORGAN_ID" jdbcType="DECIMAL" property="srvOrganId"/>
<result column="CERTIF_TYPE" jdbcType="VARCHAR" property="certifType"/>
<result column="CERTIF_NUM" jdbcType="VARCHAR" property="certifNum"/>
<result column="GENDER" jdbcType="VARCHAR" property="gender"/>
<result column="AGE" jdbcType="DECIMAL" property="age"/>
<result column="EMP_TYPE_ID" jdbcType="DECIMAL" property="empTypeId"/>
<result column="DEFINE_EMP" jdbcType="DECIMAL" property="defineEmp"/>
<result column="EFF_TIME" jdbcType="TIMESTAMP" property="effTime"/>
<result column="END_EMP" jdbcType="DECIMAL" property="endEmp"/>
<result column="END_TIME" jdbcType="TIMESTAMP" property="endTime"/>
<result column="FCD" jdbcType="TIMESTAMP" property="fcd"/>
<result column="FCU" jdbcType="DECIMAL" property="fcu"/>
<result column="LCD" jdbcType="TIMESTAMP" property="lcd"/>
<result column="LCU" jdbcType="DECIMAL" property="lcu"/>
<result column="IS_LOCK" jdbcType="DECIMAL" property="isLock"/>
<result column="DATA_FROM" jdbcType="DECIMAL" property="dataFrom"/>
<result column="WEB_DEFINE_EMP" jdbcType="DECIMAL" property="webDefineEmp"/>
<result column="WEB_END_EMP" jdbcType="DECIMAL" property="webEndEmp"/>
<result column="EMP_TYPE" jdbcType="DECIMAL" property="empType"/>
<result column="MOBILE_PHONE" jdbcType="VARCHAR" property="mobilePhone"/>
<result column="EDU_ID" jdbcType="DECIMAL" property="eduId"/>
<result column="ACDE_ID" jdbcType="DECIMAL" property="acdeId"/>
<result column="BIG_EMP_TYPE_ID" jdbcType="DECIMAL" property="bigEmpTypeId"/>
<result column="CFG_MODE_ID" jdbcType="DECIMAL" property="cfgModeId"/>
<result column="BASIC_EMP_ID" jdbcType="DECIMAL" property="basicEmpId"/>
<result column="WHITE_LIST" jdbcType="DECIMAL" property="whiteList"/>
<result column="AUDIT_STATUS" jdbcType="DECIMAL" property="auditStatus" />
<result column="AUDIT_DATE" jdbcType="TIMESTAMP" property="auditDate" />
<result column="AUDIT_REASON" jdbcType="VARCHAR" property="auditReason" />
</resultMap>
<sql id="Base_Column_List">
EMP_ID, EMP_NAME, ORGAN_ID, SRV_ORGAN_ID, CERTIF_TYPE, CERTIF_NUM, GENDER, AGE, EMP_TYPE_ID,
DEFINE_EMP, EFF_TIME, END_EMP, END_TIME, FCD, FCU, LCD, LCU, IS_LOCK, DATA_FROM,
WEB_DEFINE_EMP, WEB_END_EMP, EMP_TYPE, MOBILE_PHONE, EDU_ID, ACDE_ID, BIG_EMP_TYPE_ID,
CFG_MODE_ID, BASIC_EMP_ID, WHITE_LIST
</sql>
<select id="getSrvOrganEmpListVo" resultType="com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo">
SELECT
T1.EMP_ID empId,
T1.SRV_ORGAN_ID srvOrganId,
T1.ORGAN_ID organId,
T4.SRV_ORGAN_NAME srvOrganName,
T5.ORGAN_NAME organName,
T4.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
T1.EMP_NAME empName,
T1.GENDER gender,
T1.AGE age,
T1.CERTIF_TYPE certifType,
T1.CERTIF_NUM certifNum,
T1.MOBILE_PHONE mobilePhone,
T1.EMP_TYPE_ID empTypeId,
T1.EDU_ID eduId,
T1.EMP_TYPE empType,
T1.IS_LOCK isLock,
T1.EFF_TIME effTime,
T1.AUDIT_STATUS,
T1.AUDIT_DATE,
T1.AUDIT_REASON
FROM CH_SRV_ORGAN_EMP_APPLY T1
LEFT JOIN CH_SRV_ORGAN T4 ON T1.SRV_ORGAN_ID = T4.SRV_ORGAN_ID
LEFT JOIN CH_FND_ORGAN T5 ON T1.ORGAN_ID = T5.ORGAN_ID
<where>
<if test="organIds != null and organIds.size() > 0">
AND T1.ORGAN_ID IN
<foreach collection="organIds" separator="," close=")" open="(" item="organId">
#{organId}
</foreach>
</if>
<if test="empName != null and empName != ''">
AND T1.EMP_NAME LIKE CONCAT('%',CONCAT(#{empName},'%'))
</if>
<if test="srvOrganName != null and srvOrganName != ''">
AND T4.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{srvOrganName},'%'))
</if>
<if test="certifNum != null and certifNum != ''">
AND T1.CERTIF_NUM = #{certifNum}
</if>
<if test="isLock != null">
AND T1.IS_LOCK = #{isLock}
</if>
<if test="empType != null">
AND T1.EMP_TYPE = #{empType}
</if>
<if test="srvOrganId != null and srvOrganId != 0">
AND T4.SRV_ORGAN_ID = #{srvOrganId}
</if>
</where>
order by T1.AUDIT_STATUS ASC,T1.EFF_TIME desc
</select>
<select id="getSrvOrganEmpExportList" resultType="com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo">
SELECT
T1.EMP_ID empId,
T1.SRV_ORGAN_ID srvOrganId,
T1.ORGAN_ID organId,
T4.SRV_ORGAN_NAME srvOrganName,
T5.ORGAN_NAME organName,
T4.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
T1.EMP_NAME empName,
T1.GENDER gender,
T1.AGE age,
T1.CERTIF_TYPE certifType,
T1.CERTIF_NUM certifNum,
T1.MOBILE_PHONE mobilePhone,
T1.EMP_TYPE_ID empTypeId,
T1.EDU_ID eduId,
T1.EMP_TYPE empType,
T1.IS_LOCK isLock,
T1.EFF_TIME effTime,
(select dis.district_name from ch_fnd_district dis where T4.DISTRICT_PROVINCIAL = dis.district_code) provincial,
(select dis.district_name from ch_fnd_district dis where T4.DISTRICT_CITY = dis.district_code) city,
T4.BUNK bunk,
T4.LINK_NAME linkName,
T4.LINK_TEL linkTel
FROM CH_SRV_ORGAN_EMP_APPLY T1
LEFT JOIN CH_SRV_ORGAN T4 ON T1.SRV_ORGAN_ID = T4.SRV_ORGAN_ID
LEFT JOIN CH_FND_ORGAN T5 ON T1.ORGAN_ID = T5.ORGAN_ID
<where>
<if test="organIds != null and organIds.size() > 0">
AND T1.ORGAN_ID IN
<foreach collection="organIds" separator="," close=")" open="(" item="organId">
#{organId}
</foreach>
</if>
<if test="empName != null and empName != ''">
AND T1.EMP_NAME LIKE CONCAT('%',CONCAT(#{empName},'%'))
</if>
<if test="srvOrganName != null and srvOrganName != ''">
AND T4.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{srvOrganName},'%'))
</if>
<if test="certifNum != null and certifNum != ''">
AND T1.CERTIF_NUM = #{certifNum}
</if>
<if test="isLock != null">
AND T1.IS_LOCK = #{isLock}
</if>
<if test="empType != null">
AND T1.EMP_TYPE = #{empType}
</if>
<if test="srvOrganId != null and srvOrganId != 0" >
AND T4.SRV_ORGAN_ID = #{srvOrganId}
</if>
</where>
order by T1.AUDIT_STATUS ASC,T1.EFF_TIME desc
</select>
</mapper>
\ No newline at end of file
......@@ -145,7 +145,4 @@
</where>
ORDER BY T1.EFF_TIME DESC
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.SrvOrganApplyMapper">
<resultMap id="srvOrganApplyListMap" type="com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo">
<id column="SRV_ORGAN_ID" property="srvOrganId"/>
<result column="ORGAN_ID" property="organId"/>
<result column="ORGAN_NAME" property="organName"/>
<result column="DISTRICT_PROVINCIAL" property="districtProvince"/>
<result column="DISTRICT_CITY" property="districtCity"/>
<result column="DISTRICT_AREA" property="districtArea"/>
<result column="ADRESS_DETAIL" property="addressDetail"/>
<result column="SRV_ORGAN_NAME" property="srvOrganName"/>
<result column="ORGAN_TYPE_ID" property="organTypeId"/>
<result column="ORGAN_TYPE_NAME" property="organTypeName"/>
<result column="UNIFIED_SOCIAL_CREDIT_CODE" property="unifiedSocialCreditCode"/>
<result column="LINK_NAME" property="linkName"/>
<result column="LINK_TEL" property="linkTel"/>
<result column="BUNK" property="bunk"/>
<result column="SRV_TYPE" property="srvType" />
<result column="AUDIT_STATUS" property="auditStatus" />
<result column="AUDIT_DATE" property="auditDate" />
<result column="AUDIT_REASON" property="auditReason" />
</resultMap>
<select id="getSrvOrganApplyList" resultMap="srvOrganApplyListMap">
SELECT T1.SRV_ORGAN_ID,
T1.ORGAN_ID,
T2.ORGAN_NAME,
T1.DISTRICT_PROVINCIAL,
T1.DISTRICT_CITY,
T1.DISTRICT_AREA,
T1.ADRESS_DETAIL,
T1.SRV_ORGAN_NAME,
T1.ORGAN_TYPE_ID,
T3.ORGAN_TYPE_NAME,
T1.UNIFIED_SOCIAL_CREDIT_CODE,
T1.SRV_TYPE,
T1.LINK_NAME,
T1.LINK_TEL,
T1.BUNK,
T1.AUDIT_STATUS,
T1.AUDIT_DATE,
T1.AUDIT_REASON
FROM CH_SRV_ORGAN_APPLY T1
LEFT JOIN CH_FND_ORGAN T2 on T1.ORGAN_ID = T2.ORGAN_ID
LEFT JOIN CH_CFG_SRV_ORGAN_TYPE T3 ON T1.ORGAN_TYPE_ID = T3.ORGAN_TYPE_ID
WHERE T1.STATUS = 0
<if test="organIds != null and organIds.size() > 0">
AND T1.ORGAN_ID IN
<foreach collection="organIds" separator="," open="(" close=")" item="organId">
#{organId}
</foreach>
</if>
<if test="creditCode != null and creditCode != ''">
AND T1.UNIFIED_SOCIAL_CREDIT_CODE = #{creditCode}
</if>
<if test="srvOrganName != null and srvOrganName != ''">
AND T1.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{srvOrganName},'%'))
</if>
<if test="srvOrganId != null and srvOrganId != ''and srvOrganId!=0">
AND T1.SRV_ORGAN_ID = #{srvOrganId}
</if>
order by AUDIT_STATUS ASC,EFF_TIME desc
</select>
</mapper>
\ No newline at end of file
......@@ -14,7 +14,6 @@ import java.io.Serializable;
*/
@Data
@TableName("CH_SRV_ORGAN")
@KeySequence("SEQ_CH_SRV_ORGAN")
public class ChSrvOrgan extends PageInfo implements Serializable {
@TableId(type = IdType.INPUT)
private Integer srvOrganId;
......
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.entity.PageInfo;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 护理机构表
*/
@Data
@TableName("CH_SRV_ORGAN_APPLY")
@KeySequence("SEQ_CH_SRV_ORGAN")
public class ChSrvOrganApply extends PageInfo implements Serializable {
@TableId(type = IdType.INPUT)
private Integer srvOrganId;
private String acptRoadDetail;
private String acptLongitude;
private String unifiedSocialCreditCode;
private String accName;
private String bankNo;
private Integer status;
private java.util.Date endTime;
private Integer acptRoadType;
private String acptProvincial;
private Integer webDefineEmp;
private Integer levelCode;
private String acptCity;
private Integer acptNumberType;
private Integer defineEmp;
private String checkRemarkCh;
private String adressDetail;
private java.util.Date fcd;
private Integer checkStatusCh;
private java.util.Date lcd;
private String acptNumberDetail;
private Integer dataFrom;
private String organId;
private String districtCity;
private Integer endEmp;
private Integer organTypeId;
private String linkName;
private String bankDistrictCity;
private Integer fcu;
private String bankAccCode;
private String bankDistrictProvincial;
private String srvOrganCode;
private Integer lcu;
private String checkRemarkLp;
private String districtProvincial;
private String checkNameLp;
private Integer cardType;
private Integer checkStatusLp;
private Integer bunk;
private String medicareNumber;
private String bankAccName;
private String linkTel;
private Integer webEndEmp;
private String districtArea;
private String linkMail;
private String permitId;
private String acptStreet;
private Integer cfgModeId;
private String remark;
private String bankDistrictWebsite;
private String srvOrganName;
private java.util.Date checkTimeLp;
private String acptAddress;
private String checkNameCh;
private String acptLatitude;
private String acptArea;
private java.util.Date checkTimeCh;
private java.util.Date effTime;
/**
* 提供的服务方式(服务方式id集合,英文逗号分割)
*/
private String srvType;
/**
* 审核状态(0-未审核,1-审核中,2-审核通过,3-审核不通过)
*/
private Short auditStatus;
/**
* 审核人id
*/
private Integer auditUserId;
/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date auditDate;
/**
* 审核原因
*/
private String auditReason;
}
......@@ -17,7 +17,6 @@ import java.util.Date;
*/
@Data
@TableName("CH_SRV_ORGAN_EMP")
@KeySequence("SEQ_CH_SRV_ORGAN_EMP")
public class ChSrvOrganEmp implements Serializable {
/**
* 护理人员id
......
package com.hungraim.ltc.pojo.entity.serviceManage;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* CH_SRV_ORGAN_EMP_APPLY
* @author
*/
@Data
@TableName("CH_SRV_ORGAN_EMP_APPLY")
@KeySequence("SEQ_CH_SRV_ORGAN_EMP")
public class ChSrvOrganEmpApply implements Serializable {
/**
* 护理人员id
*/
@TableId(type = IdType.INPUT)
private Long empId;
/**
* 护理人员姓名
*/
private String empName;
/**
* 机构代码
*/
private String organId;
/**
* 护理机构id
*/
private Long srvOrganId;
/**
* 证件类型
*/
private String certifType;
/**
* 证件号码
*/
private String certifNum;
/**
* 性别 男:M;女:F;不确定 N
*/
private String gender;
/**
* 年龄
*/
private Short age;
/**
* 人员资质
*/
private Long empTypeId;
/**
* 创建人
*/
private Long defineEmp;
/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date effTime;
/**
* 终止人
*/
private Long endEmp;
/**
* 终止时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date endTime;
/**
* 首次操作时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date fcd;
/**
* 首次操作人
*/
private Long fcu;
/**
* 末次操作时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date lcd;
/**
* 末次操作人
*/
private Long lcu;
/**
* 是否失效 有效:0;失效:1
*/
private Short isLock;
/**
* 数据来源 网厅:0,核心:1
*/
private Short dataFrom;
/**
* 网厅创建人
*/
private Long webDefineEmp;
/**
* 网厅终止人
*/
private Long webEndEmp;
/**
* 用户类型 护理人员:0;管理人员:1
*/
private Short empType;
/**
* 手机号码
*/
private String mobilePhone;
/**
* 学历
*/
private Long eduId;
/**
* 职称
*/
private Long acdeId;
/**
* 一级人员资质
*/
private Long bigEmpTypeId;
/**
* 服务配置模式ID
*/
private Long cfgModeId;
/**
* 人员id
*/
private Long basicEmpId;
/**
* 是否白名单 是:0;否:1
*/
private Short whiteList;
/**
* 员工密码
*/
private String empPwd;
/**
* 审核状态(0-未审核,1-审核中,2-审核通过,3-审核不通过)
*/
private Short auditStatus;
/**
* 审核人id
*/
private Integer auditUserId;
/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date auditDate;
/**
* 审核原因
*/
private String auditReason;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
public class SrvOrganEmpListVo extends ChSrvOrganEmp {
......@@ -30,4 +34,28 @@ public class SrvOrganEmpListVo extends ChSrvOrganEmp {
* 统一社会信用代码
*/
private String unifiedSocialCreditCode;
/**
* 审核状态(0-未审核,1-审核中,2-审核通过,3-审核不通过)
*/
private Short auditStatus;
/**
* 审核人id
*/
private Integer auditUserId;
/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date auditDate;
/**
* 审核原因
*/
private String auditReason;
}
package com.hungraim.ltc.pojo.vo.disable;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/**
......@@ -78,4 +81,26 @@ public class SrvOrganListVo {
*/
private Long bunk;
/**
* 审核状态(0-未审核,1-审核中,2-审核通过,3-审核不通过)
*/
private Short auditStatus;
/**
* 审核人id
*/
private Integer auditUserId;
/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date auditDate;
/**
* 审核原因
*/
private String auditReason;
}
......@@ -326,4 +326,27 @@ public class SrvOrganVo{
* 文件列表数据对象
*/
private List<ChFndAttach> fileDataList;
/**
* 审核状态(0-未审核,1-审核中,2-审核通过,3-审核不通过)
*/
private Short auditStatus;
/**
* 审核人id
*/
private Integer auditUserId;
/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date auditDate;
/**
* 审核原因
*/
private String auditReason;
}
\ No newline at end of file
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