Commit 9fd063a3 authored by zhangch's avatar zhangch

护理人员列表页面相关接口

parent d5ec095e
......@@ -4,8 +4,12 @@ import cn.hutool.core.util.StrUtil;
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.ChCfgSrvEmpType;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import com.hungraim.ltc.pojo.vo.system.SrvOrganVo;
import com.hungraim.ltc.service.SrvEmpTypeService;
import com.hungraim.ltc.service.SrvOrganEmpService;
import com.hungraim.ltc.service.SrvOrganService;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
......@@ -21,6 +25,10 @@ public class SrvOrganController {
private final SrvOrganService srvOrganService;
private final SrvEmpTypeService srvEmpTypeService;
private final SrvOrganEmpService srvOrganEmpService;
/**
* 分页查询护理机构列表
*
......@@ -110,6 +118,27 @@ public class SrvOrganController {
}
/**
* 分页查询护理人员列表
*
* @param pageNum 页码参数
* @param pageSize 页码参数
* @param organId 适用机构id
* @param isInvolveChild 是否包含子机构
* @param empName 人员姓名
* @param srvOrganName 护理机构名称
* @param certifNum 身份证号
* @param isLock 人员状态
* @param empType 护理人员类型
* @return 返回列表
*/
@GetMapping("/srvOrganEmpList")
public Result<Page<SrvOrganEmpListVo>> getSrvOrganEmpListVo(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType) {
Page<SrvOrganEmpListVo> page = new Page<>(pageNum, pageSize);
page = srvOrganEmpService.getSrvOrganEmpListVo(page, organId, isInvolveChild, empName, srvOrganName, certifNum, isLock, empType);
return Result.success(page);
}
/**
* 删除护理机构
*
* @param srvOrganId 护理机构id
......@@ -124,4 +153,33 @@ public class SrvOrganController {
return Result.success();
}
/**
* 获取护理人员的资质列表
*
* @return 返回列表
*/
@GetMapping("/srvEmpTypeList")
public Result<List<ChCfgSrvEmpType>> getSrvEmpTypeList() {
List<ChCfgSrvEmpType> chCfgSrvEmpTypes = srvEmpTypeService.list();
return Result.success(chCfgSrvEmpTypes);
}
/**
* 修改护理人员的状态
*
* @param empId 护理人员id
* @param isLock 状态 0-有效;1-失效;
* @return 返回操作状态
*/
@PutMapping("/status")
public Result updateSrvEmpStatus(Long empId, Short isLock) {
if (null == empId || null == isLock) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
srvOrganEmpService.updateSrvEmpStatus(empId, isLock);
return Result.success();
}
}
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.ChSrvOrganEmp;
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 ChSrvOrganEmpMapper extends BaseMapper<ChSrvOrganEmp> {
/**
* 分页查询护理人员列表
*
* @param page 页码参数
* @param organIds 适用机构id集合
* @param empName 人员姓名
* @param srvOrganName 护理机构名称
* @param certifNum 身份证号
* @param isLock 人员状态
* @param empType 护理人员类型
* @return 返回列表
*/
Page<SrvOrganEmpListVo> getSrvOrganEmpListVo(Page<SrvOrganEmpListVo> page, List<Long> organIds, String empName, String srvOrganName, String certifNum, Short isLock, Short empType);
}
\ No newline at end of file
package com.hungraim.ltc.governance.dao;
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ChSrvOrganEmpMapper extends BaseMapper<ChSrvOrganEmp> {
}
\ No newline at end of file
public interface SrvEmpTypeMapper extends BaseMapper<ChCfgSrvEmpType> {
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
public interface SrvEmpTypeService extends IService<ChCfgSrvEmpType> {
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
public interface SrvOrganEmpService {
/**
* 分页查询护理人员列表
*
* @param page 页码参数
* @param organId 适用机构id
* @param isInvolveChild 是否包含子机构
* @param empName 人员姓名
* @param srvOrganName 护理机构名称
* @param certifNum 身份证号
* @param isLock 人员状态
* @param empType 护理人员类型
* @return 返回列表
*/
Page<SrvOrganEmpListVo> getSrvOrganEmpListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType);
/**
* 修改护理人员的状态
*
* @param empId 护理人员id
* @param isLock 状态 0-有效;1-失效;
* @return 返回操作状态
*/
void updateSrvEmpStatus(Long empId, Short isLock);
}
......@@ -57,4 +57,5 @@ public interface SrvOrganService {
* @param srvOrganId 护理机构id
*/
void deleteSrvOrgan(Long srvOrganId);
}
package com.hungraim.ltc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.dao.SrvEmpTypeMapper;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import com.hungraim.ltc.service.SrvEmpTypeService;
import org.springframework.stereotype.Service;
@Service
public class SrvEmpTypeServiceImpl extends ServiceImpl<SrvEmpTypeMapper, ChCfgSrvEmpType> implements SrvEmpTypeService {
}
package com.hungraim.ltc.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.dao.ChSrvOrganEmpMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.service.OrganService;
import com.hungraim.ltc.service.SrvOrganEmpService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@AllArgsConstructor
public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
private final ChSrvOrganEmpMapper chSrvOrganEmpMapper;
private final OrganService organService;
@Override
public Page<SrvOrganEmpListVo> getSrvOrganEmpListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType) {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
return chSrvOrganEmpMapper.getSrvOrganEmpListVo(page, organIds, empName, srvOrganName, certifNum, isLock, empType);
}
@Override
public void updateSrvEmpStatus(Long empId, Short isLock) {
ChSrvOrganEmp chSrvOrganEmp = new ChSrvOrganEmp();
chSrvOrganEmp.setEmpId(empId);
chSrvOrganEmp.setIsLock(isLock);
chSrvOrganEmpMapper.updateById(chSrvOrganEmp);
}
}
package com.hungraim.ltc.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.dao.ChCfgSrvOrganTypeMapper;
......@@ -10,6 +11,7 @@ import com.hungraim.ltc.dao.SrvOrganMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
......@@ -151,4 +153,5 @@ public class SrvOrganServiceImpl implements SrvOrganService {
chSrvOrgan.setStatus(1);
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.ChSrvOrganEmpMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp">
<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"/>
</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
FROM CH_SRV_ORGAN_EMP 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>
</where>
ORDER BY T1.EFF_TIME DESC
</select>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.SysConfig;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
* 学历基表
* @TableName CH_FND_EDUCATION
*/
@TableName(value ="CH_FND_EDUCATION")
@Data
public class ChFndEducation implements Serializable {
/**
* 学历ID
*/
@TableId(type= IdType.INPUT)
private Integer eduId;
/**
* 学历名称
*/
private String eduCode;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* @TableName CH_CFG_SRV_EMP_TYPE
*/
@TableName(value ="CH_CFG_SRV_EMP_TYPE")
@Data
public class ChCfgSrvEmpType implements Serializable {
/**
* 人员类别id
*/
@TableId(type=IdType.INPUT)
private Integer empTypeId;
/**
* 人员类型名称
*/
private String typeName;
/**
* 备注
*/
private String remark;
/**
* 人员类别id
*/
private Integer empCateId;
/**
* 基础参数配置id
*/
private Integer paraId;
/**
* 首次操作时间
*/
private Date fcd;
/**
* 首次操作人
*/
private Integer fcu;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import lombok.Data;
@Data
public class SrvOrganEmpListVo extends ChSrvOrganEmp {
/**
* 护理人员资质名称
*/
private String typeName;
/**
* 文化水平
*/
private String eduCode;
/**
* 护理机构名称
*/
private String srvOrganName;
/**
* 适用机构名称
*/
private String organName;
/**
* 统一社会信用代码
*/
private String unifiedSocialCreditCode;
}
<?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.governance.dao.ChSrvOrganEmpMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp">
<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" />
</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>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.system.controller;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndEducation;
import com.hungraim.ltc.system.service.EducationService;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api.system/education")
@AllArgsConstructor
public class EducationController {
private final EducationService educationService;
/**
* 获取学历数据列表
*
* @return 返回列表
*/
@GetMapping("/list")
public Result<List<ChFndEducation>> getEducationList() {
return Result.success(educationService.list());
}
}
package com.hungraim.ltc.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndEducation;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EducationMapper extends BaseMapper<ChFndEducation> {
}
package com.hungraim.ltc.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndEducation;
public interface EducationService extends IService<ChFndEducation> {
}
package com.hungraim.ltc.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndEducation;
import com.hungraim.ltc.system.dao.EducationMapper;
import com.hungraim.ltc.system.service.EducationService;
import org.springframework.stereotype.Service;
@Service
public class EducationServiceImpl extends ServiceImpl<EducationMapper, ChFndEducation> implements EducationService {
}
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