Commit e732d5f8 authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/dev_20230406_护理评定人员录入功能改造_zxl_' into uat_ch_master

parents 80996e2b 5bb529e6
...@@ -260,15 +260,15 @@ public class SrvOrganController { ...@@ -260,15 +260,15 @@ public class SrvOrganController {
|| null == srvOrganEmpVo.getEduId()) { || null == srvOrganEmpVo.getEduId()) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
srvOrganEmpService.saveOrUpdateSrvOrganEmp(srvOrganEmpVo); int result= srvOrganEmpService.saveOrUpdateSrvOrganEmp(srvOrganEmpVo);
return Result.success(); return result>0?Result.failed("该护理人员已存在于系统,请勿重复录入"):Result.success();
} }
/** /**
* 护理人员导出 * 护理人员导出
* *
* @param organId 适用机构id *
* @param isInvolveChild 是否包含子机构 * @param isInvolveChild 是否包含子机构
* @param empName 人员姓名 * @param empName 人员姓名
* @param srvOrganName 护理机构名称 * @param srvOrganName 护理机构名称
......
...@@ -64,7 +64,7 @@ public interface SrvOrganEmpService { ...@@ -64,7 +64,7 @@ public interface SrvOrganEmpService {
* eduId: "", // 文化水平 * eduId: "", // 文化水平
* fileDataList: [], // 对应数据库中的文件数据列表 * fileDataList: [], // 对应数据库中的文件数据列表
*/ */
void saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo); int saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo);
Workbook srvOrganExport(Long organId,Long srvOrganId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Workbook srvOrganExport(Long organId,Long srvOrganId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum,
Short isLock, Short empType); Short isLock, Short empType);
......
...@@ -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.QueryWrapper;
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;
...@@ -103,11 +104,19 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -103,11 +104,19 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo) { public int saveOrUpdateSrvOrganEmp(SrvOrganEmpVo srvOrganEmpVo) {
Long empId = srvOrganEmpVo.getEmpId(); Long empId = srvOrganEmpVo.getEmpId();
ChSrvOrganEmp chSrvOrganEmp = new ChSrvOrganEmp(); ChSrvOrganEmp chSrvOrganEmp = new ChSrvOrganEmp();
BeanUtils.copyProperties(srvOrganEmpVo, chSrvOrganEmp); BeanUtils.copyProperties(srvOrganEmpVo, chSrvOrganEmp);
int queryResult = 0;
if (null == empId) { if (null == empId) {
QueryWrapper<ChSrvOrganEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("CERTIF_NUM", chSrvOrganEmp.getCertifNum());
queryWrapper.eq("IS_LOCK",0);
queryResult = chSrvOrganEmpMapper.selectCount(queryWrapper);
if(queryResult>0){
return queryResult;
}
// 新增 // 新增
chSrvOrganEmp.setEffTime(new Date()); chSrvOrganEmp.setEffTime(new Date());
chSrvOrganEmp.setIsLock((short) 0); chSrvOrganEmp.setIsLock((short) 0);
...@@ -120,12 +129,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -120,12 +129,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
chSrvempRiskLevel.setStatus(0); chSrvempRiskLevel.setStatus(0);
chSrvempRiskLevel.setFcd(new Date()); chSrvempRiskLevel.setFcd(new Date());
chSrvempRiskLevelMapper.insert(chSrvempRiskLevel); chSrvempRiskLevelMapper.insert(chSrvempRiskLevel);
} else { } else {
// 修改 // 修改
chSrvOrganEmpMapper.updateById(chSrvOrganEmp); chSrvOrganEmpMapper.updateById(chSrvOrganEmp);
updateAttachs(srvOrganEmpVo, empId); updateAttachs(srvOrganEmpVo, empId);
} }
return queryResult;
} }
// 抽取方法 // 抽取方法
......
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