Commit da781628 authored by zengxiaoli@yeah.net's avatar zengxiaoli@yeah.net

护理机构人员管理审核

parent ae1da1de
...@@ -181,7 +181,7 @@ public class SrvOrganController { ...@@ -181,7 +181,7 @@ public class SrvOrganController {
* @param srvOrganId 护理机构id * @param srvOrganId 护理机构id
* @return 返回执行结果 * @return 返回执行结果
*/ */
@DeleteMapping("/auditSrvOrgan") @PostMapping("/auditSrvOrgan")
public Result<SrvOrganVo> auditSrvOrgan(@RequestHeader("Authorization") String token,Long srvOrganId,Integer auditStatus) { public Result<SrvOrganVo> auditSrvOrgan(@RequestHeader("Authorization") String token,Long srvOrganId,Integer auditStatus) {
if (null == srvOrganId) { if (null == srvOrganId) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
...@@ -191,6 +191,23 @@ public class SrvOrganController { ...@@ -191,6 +191,23 @@ public class SrvOrganController {
return Result.success(); return Result.success();
} }
/**
* 审核护理人员机构
*
* @param empId
* @return 返回执行结果
*/
@PostMapping("/auditSrvOrganEmp")
public Result<SrvOrganVo> auditSrvOrganEmp(@RequestHeader("Authorization") String token,Long empId,Integer auditStatus) {
if (null == empId) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
srvOrganEmpService.auditSrvOrganEmp(userId, empId,auditStatus);
return Result.success();
}
/** /**
* 获取护理人员的资质列表 * 获取护理人员的资质列表
* *
......
...@@ -72,4 +72,7 @@ public interface SrvOrganEmpService { ...@@ -72,4 +72,7 @@ public interface SrvOrganEmpService {
Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId); Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId);
int chSrvTaskDetailDelete(long taskDetailId,String userName); int chSrvTaskDetailDelete(long taskDetailId,String userName);
void auditSrvOrganEmp(Integer userId,Long empId,Integer auditStatus);
} }
...@@ -3,6 +3,7 @@ package com.hungraim.ltc.service.impl; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc.service.impl;
import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.AttachFeignService; import com.hungraim.ltc.api.AttachFeignService;
...@@ -78,7 +79,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -78,7 +79,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
chSrvOrganEmpMapper.updateById(chSrvOrganEmp); chSrvOrganEmpMapper.updateById(chSrvOrganEmp);
ChSrvOrganEmpApply chSrvOrganEmpApply = new ChSrvOrganEmpApply(); ChSrvOrganEmpApply chSrvOrganEmpApply = new ChSrvOrganEmpApply();
chSrvOrganEmpApply.setEmpId(empId); chSrvOrganEmpApply.setEmpId(empId);
chSrvOrganEmp.setIsLock(isLock); chSrvOrganEmpApply.setIsLock(isLock);
chSrvOrganEmpApplyMapper.updateById(chSrvOrganEmpApply); chSrvOrganEmpApplyMapper.updateById(chSrvOrganEmpApply);
} }
...@@ -152,21 +153,6 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -152,21 +153,6 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
Short isLock, Short empType) { Short isLock, Short empType) {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild); List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
List<SrvOrganEmpExportVo> srvOrganEmpExportList = chSrvOrganEmpApplyMapper.getSrvOrganEmpApplyExportList(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();
// if(record == null){
// break;
// }
// if(StringUtils.isEmpty(record.getProvincial())){
// stringBuilder.append("--");
// }else if( record.getProvincial().equals(record.getCity())){
// stringBuilder.append(record.getProvincial());
// }else {
// stringBuilder.append(record.getProvincial()).append(record.getCity());
// }
// record.setProvinCialcityArea(stringBuilder.toString());
// }
ExportParams exportParams = new ExportParams(); ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); // 对应xlsx exportParams.setType(ExcelType.XSSF); // 对应xlsx
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SrvOrganEmpExportVo.class, srvOrganEmpExportList); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SrvOrganEmpExportVo.class, srvOrganEmpExportList);
...@@ -201,4 +187,30 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -201,4 +187,30 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
return chSrvTaskDetailMapper.deleteById(taskDetailId); return chSrvTaskDetailMapper.deleteById(taskDetailId);
} }
@Override
public void auditSrvOrganEmp(Integer userId, Long empId, Integer auditStatus) {
ChSrvOrganEmpApply chSrvOrganEmpApply= new ChSrvOrganEmpApply();
chSrvOrganEmpApply.setEmpId(empId);
chSrvOrganEmpApply.setAuditStatus(auditStatus.shortValue());
chSrvOrganEmpApply.setAuditDate(new Date());
chSrvOrganEmpApply.setAuditUserId(userId);
int result = chSrvOrganEmpApplyMapper.updateById(chSrvOrganEmpApply);
//审核通过 同步到主表
if (result>0) {
//查出申请表的信息同步到主表
chSrvOrganEmpApply = chSrvOrganEmpApplyMapper.selectOne(new LambdaQueryWrapper<ChSrvOrganEmpApply>()
.eq(ChSrvOrganEmpApply::getEmpId,empId));
//主表
ChSrvOrganEmp querySrvOrganEmp = chSrvOrganEmpMapper.selectOne(new LambdaQueryWrapper<ChSrvOrganEmp>()
.eq(ChSrvOrganEmp::getEmpId,empId));
ChSrvOrganEmp chSrvOrganEmp = new ChSrvOrganEmp();
BeanUtils.copyProperties(chSrvOrganEmpApply,chSrvOrganEmp);
if(querySrvOrganEmp==null){
chSrvOrganEmpMapper.insert(chSrvOrganEmp);
}else{
chSrvOrganEmpMapper.updateById(chSrvOrganEmp);
}
}
}
} }
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
WEB_DEFINE_EMP, WEB_END_EMP, EMP_TYPE, MOBILE_PHONE, EDU_ID, ACDE_ID, BIG_EMP_TYPE_ID, 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 CFG_MODE_ID, BASIC_EMP_ID, WHITE_LIST
</sql> </sql>
<select id="getSrvOrganEmpListVo" resultType="com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo"> <select id="getSrvOrganApplyEmpListVo" resultType="com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo">
SELECT SELECT
T1.EMP_ID empId, T1.EMP_ID empId,
T1.SRV_ORGAN_ID srvOrganId, T1.SRV_ORGAN_ID srvOrganId,
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</select> </select>
<select id="getSrvOrganEmpExportList" resultType="com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo"> <select id="getSrvOrganEmpApplyExportList" resultType="com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo">
SELECT SELECT
T1.EMP_ID empId, T1.EMP_ID empId,
T1.SRV_ORGAN_ID srvOrganId, T1.SRV_ORGAN_ID srvOrganId,
......
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