Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hubin
long-tern-care-service
Commits
6b5c8c19
Commit
6b5c8c19
authored
Jun 23, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
护理人员详情页面相关接口以及调试
parent
6ab0c3b0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
298 additions
and
2 deletions
+298
-2
SrvOrganController.java
.../java/com/hungraim/ltc/controller/SrvOrganController.java
+60
-2
ChCfgSrvEmpCateMapper.java
...main/java/com/hungraim/ltc/dao/ChCfgSrvEmpCateMapper.java
+17
-0
ChSrvOrganEmpMapper.java
...c/main/java/com/hungraim/ltc/dao/ChSrvOrganEmpMapper.java
+4
-0
SrvEmpCateService.java
...main/java/com/hungraim/ltc/service/SrvEmpCateService.java
+7
-0
SrvOrganEmpService.java
...ain/java/com/hungraim/ltc/service/SrvOrganEmpService.java
+31
-0
SrvEmpCateServiceImpl.java
.../com/hungraim/ltc/service/impl/SrvEmpCateServiceImpl.java
+11
-0
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+80
-0
ChCfgSrvEmpCate.java
...com/hungraim/ltc/pojo/entity/disable/ChCfgSrvEmpCate.java
+57
-0
ChSrvOrganEmp.java
...hungraim/ltc/pojo/entity/serviceManage/ChSrvOrganEmp.java
+10
-0
SrvOrganEmpVo.java
.../java/com/hungraim/ltc/pojo/vo/disable/SrvOrganEmpVo.java
+21
-0
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/controller/SrvOrganController.java
View file @
6b5c8c19
package
com
.
hungraim
.
ltc
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.ChCfgSrvEmpCate
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo
;
import
com.hungraim.ltc.pojo.vo.system.SrvOrganVo
;
import
com.hungraim.ltc.service.SrvEmpCateService
;
import
com.hungraim.ltc.service.SrvEmpTypeService
;
import
com.hungraim.ltc.service.SrvOrganEmpService
;
import
com.hungraim.ltc.service.SrvOrganService
;
...
...
@@ -29,6 +33,8 @@ public class SrvOrganController {
private
final
SrvOrganEmpService
srvOrganEmpService
;
private
final
SrvEmpCateService
srvEmpCateService
;
/**
* 分页查询护理机构列表
*
...
...
@@ -156,11 +162,12 @@ public class SrvOrganController {
/**
* 获取护理人员的资质列表
*
* @param empCateId 护理人员类别id
* @return 返回列表
*/
@GetMapping
(
"/srvEmpTypeList"
)
public
Result
<
List
<
ChCfgSrvEmpType
>>
getSrvEmpTypeList
()
{
List
<
ChCfgSrvEmpType
>
chCfgSrvEmpTypes
=
srvEmpTypeService
.
list
();
public
Result
<
List
<
ChCfgSrvEmpType
>>
getSrvEmpTypeList
(
Integer
empCateId
)
{
List
<
ChCfgSrvEmpType
>
chCfgSrvEmpTypes
=
srvEmpTypeService
.
list
(
new
LambdaQueryWrapper
<
ChCfgSrvEmpType
>().
eq
(
null
!=
empCateId
,
ChCfgSrvEmpType:
:
getEmpCateId
,
empCateId
)
);
return
Result
.
success
(
chCfgSrvEmpTypes
);
}
...
...
@@ -181,5 +188,56 @@ public class SrvOrganController {
return
Result
.
success
();
}
/**
* 获取护理人员类别信息
*
* @return 返回护理人员类别列表
*/
@GetMapping
(
"/srvEmpCateList"
)
public
Result
<
List
<
ChCfgSrvEmpCate
>>
getSrvEmpCateList
()
{
return
Result
.
success
(
srvEmpCateService
.
list
());
}
/**
* 获取护理人员相关信息
*
* @param empId 护理人员id
* @return 返回护理人员信息
*/
@GetMapping
(
"/srvOrganEmp"
)
public
Result
<
SrvOrganEmpVo
>
getSrvOrganEmp
(
Long
empId
)
{
SrvOrganEmpVo
srvOrganEmpVo
=
srvOrganEmpService
.
getSrvOrganEmp
(
empId
);
return
Result
.
success
(
srvOrganEmpVo
);
}
/**
* 保存或修改护理人员对象
*
* @param srvOrganEmpVo 护理人员对象参数
* empId:"", // 护理人员id
* organId: "", // 适用机构id
* srvOrganId: "", // 护理机构id
* unifiedSocialCreditCode: "", // 统一社会信用代码
* empName: "", // 护理人员姓名
* certifType: "", // 护理人员证件类型
* certifNum: "", // 护理人员证件号码
* gender: "", // 护理人员性别
* age: "", // 护理人员年龄
* mobilePhone: "", // 护理人员手机号
* empTypeId: "", // 护理人员资质
* srvCateId: "", // 护理人员类别
* empType: '', // 人员类型
* eduId: "", // 文化水平
* fileDataList: [], // 对应数据库中的文件数据列表
* @return 返回操作结果
*/
@PostMapping
(
"/srvOrganEmp"
)
public
Result
saveOrUpdateSrvOrganEmp
(
SrvOrganEmpVo
srvOrganEmpVo
)
{
if
(
null
==
srvOrganEmpVo
.
getOrganId
()
||
null
==
srvOrganEmpVo
.
getSrvOrganId
()
||
StrUtil
.
isBlank
(
srvOrganEmpVo
.
getEmpName
())
||
StrUtil
.
isBlank
(
srvOrganEmpVo
.
getCertifType
())
||
StrUtil
.
isBlank
(
srvOrganEmpVo
.
getCertifNum
())
||
StrUtil
.
isBlank
(
srvOrganEmpVo
.
getGender
())
||
null
==
srvOrganEmpVo
.
getAge
()
||
StrUtil
.
isBlank
(
srvOrganEmpVo
.
getMobilePhone
())
||
null
==
srvOrganEmpVo
.
getEmpTypeId
()
||
null
==
srvOrganEmpVo
.
getEmpType
()
||
null
==
srvOrganEmpVo
.
getEduId
())
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
srvOrganEmpService
.
saveOrUpdateSrvOrganEmp
(
srvOrganEmpVo
);
return
Result
.
success
();
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChCfgSrvEmpCateMapper.java
0 → 100644
View file @
6b5c8c19
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpCate
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @Entity com.hungraim.ltc.dao.ChCfgSrvEmpCate
*/
@Mapper
public
interface
ChCfgSrvEmpCateMapper
extends
BaseMapper
<
ChCfgSrvEmpCate
>
{
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvOrganEmpMapper.java
View file @
6b5c8c19
...
...
@@ -26,4 +26,7 @@ public interface ChSrvOrganEmpMapper extends BaseMapper<ChSrvOrganEmp> {
* @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
apply/apply-service/src/main/java/com/hungraim/ltc/service/SrvEmpCateService.java
0 → 100644
View file @
6b5c8c19
package
com
.
hungraim
.
ltc
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpCate
;
public
interface
SrvEmpCateService
extends
IService
<
ChCfgSrvEmpCate
>
{
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/SrvOrganEmpService.java
View file @
6b5c8c19
...
...
@@ -2,6 +2,7 @@ package com.hungraim.ltc.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
public
interface
SrvOrganEmpService
{
...
...
@@ -28,4 +29,34 @@ public interface SrvOrganEmpService {
* @return 返回操作状态
*/
void
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
);
/**
* 获取护理人员相关信息
*
* @param empId 护理人员id
* @return 返回护理人员信息
*/
SrvOrganEmpVo
getSrvOrganEmp
(
Long
empId
);
/**
* 保存或修改护理人员对象
*
* @param srvOrganEmpVo 护理人员对象参数
* empId:"", // 护理人员id
* organId: "", // 适用机构id
* srvOrganId: "", // 护理机构id
* unifiedSocialCreditCode: "", // 统一社会信用代码
* empName: "", // 护理人员姓名
* certifType: "", // 护理人员证件类型
* certifNum: "", // 护理人员证件号码
* gender: "", // 护理人员性别
* age: "", // 护理人员年龄
* mobilePhone: "", // 护理人员手机号
* empTypeId: "", // 护理人员资质
* srvCateId: "", // 护理人员类别
* empType: '', // 人员类型
* eduId: "", // 文化水平
* fileDataList: [], // 对应数据库中的文件数据列表
*/
void
saveOrUpdateSrvOrganEmp
(
SrvOrganEmpVo
srvOrganEmpVo
);
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvEmpCateServiceImpl.java
0 → 100644
View file @
6b5c8c19
package
com
.
hungraim
.
ltc
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hungraim.ltc.dao.ChCfgSrvEmpCateMapper
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpCate
;
import
com.hungraim.ltc.service.SrvEmpCateService
;
import
org.springframework.stereotype.Service
;
@Service
public
class
SrvEmpCateServiceImpl
extends
ServiceImpl
<
ChCfgSrvEmpCateMapper
,
ChCfgSrvEmpCate
>
implements
SrvEmpCateService
{
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
6b5c8c19
package
com
.
hungraim
.
ltc
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.dao.ChSrvOrganEmpMapper
;
import
com.hungraim.ltc.dao.SrvEmpTypeMapper
;
import
com.hungraim.ltc.dao.SrvOrganMapper
;
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.serviceManage.ChSrvOrganEmp
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachVo
;
import
com.hungraim.ltc.service.OrganService
;
import
com.hungraim.ltc.service.SrvOrganEmpService
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
@AllArgsConstructor
@Slf4j
public
class
SrvOrganEmpServiceImpl
implements
SrvOrganEmpService
{
private
final
ChSrvOrganEmpMapper
chSrvOrganEmpMapper
;
private
final
OrganService
organService
;
private
final
AttachFeignService
attachFeignService
;
private
final
SrvEmpTypeMapper
srvEmpTypeMapper
;
private
final
SrvOrganMapper
srvOrganMapper
;
@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
);
...
...
@@ -32,4 +55,61 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
chSrvOrganEmp
.
setIsLock
(
isLock
);
chSrvOrganEmpMapper
.
updateById
(
chSrvOrganEmp
);
}
@Override
public
SrvOrganEmpVo
getSrvOrganEmp
(
Long
empId
)
{
SrvOrganEmpVo
srvOrganEmpVo
=
new
SrvOrganEmpVo
();
ChSrvOrganEmp
chSrvOrganEmp
=
chSrvOrganEmpMapper
.
selectById
(
empId
);
Long
empTypeId
=
chSrvOrganEmp
.
getEmpTypeId
();
ChCfgSrvEmpType
chCfgSrvEmpType
=
srvEmpTypeMapper
.
selectById
(
empTypeId
);
Long
srvOrganId
=
chSrvOrganEmp
.
getSrvOrganId
();
ChSrvOrgan
chSrvOrgan
=
srvOrganMapper
.
selectById
(
srvOrganId
);
BeanUtils
.
copyProperties
(
chSrvOrganEmp
,
srvOrganEmpVo
);
srvOrganEmpVo
.
setEmpCateId
(
chCfgSrvEmpType
.
getEmpCateId
());
srvOrganEmpVo
.
setUnifiedSocialCreditCode
(
chSrvOrgan
.
getUnifiedSocialCreditCode
());
try
{
Result
<
List
<
AttachVo
>>
listResult
=
attachFeignService
.
selectAttachs
(
empId
,
AttachType
.
SRV_ORGAN_EMP
.
getUploadType
());
if
(
ResultCode
.
SUCCESS
.
getCode
().
equals
(
listResult
.
getCode
()))
{
List
<
ChFndAttach
>
attaches
=
new
ArrayList
<>();
List
<
AttachVo
>
data
=
listResult
.
getData
();
for
(
AttachVo
datum
:
data
)
{
ChFndAttach
attach
=
new
ChFndAttach
();
BeanUtils
.
copyProperties
(
datum
,
attach
);
attaches
.
add
(
attach
);
}
srvOrganEmpVo
.
setFileDataList
(
attaches
);
}
else
{
log
.
error
(
"请求获取护理人员上传文件出错,出错信息:{}"
,
listResult
.
getMsg
());
}
}
catch
(
Exception
e
)
{
log
.
error
(
"请求获取护理人员上传文件出错,出错信息:{}"
,
e
.
getMessage
());
}
return
srvOrganEmpVo
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
saveOrUpdateSrvOrganEmp
(
SrvOrganEmpVo
srvOrganEmpVo
)
{
Long
empId
=
srvOrganEmpVo
.
getEmpId
();
ChSrvOrganEmp
chSrvOrganEmp
=
new
ChSrvOrganEmp
();
BeanUtils
.
copyProperties
(
srvOrganEmpVo
,
chSrvOrganEmp
);
if
(
null
==
empId
)
{
// 新增
chSrvOrganEmpMapper
.
insert
(
chSrvOrganEmp
);
updateAttachs
(
srvOrganEmpVo
,
chSrvOrganEmp
.
getEmpId
());
}
else
{
// 修改
chSrvOrganEmpMapper
.
updateById
(
chSrvOrganEmp
);
updateAttachs
(
srvOrganEmpVo
,
empId
);
}
}
// 抽取方法
private
void
updateAttachs
(
SrvOrganEmpVo
srvOrganEmpVo
,
Long
empId
)
{
AttachUpdateVo
attachUpdateVo
=
new
AttachUpdateVo
();
attachUpdateVo
.
setChFndAttachs
(
srvOrganEmpVo
.
getFileDataList
());
attachUpdateVo
.
setCtrlId
(
empId
);
attachUpdateVo
.
setAttachType
(
AttachType
.
SRV_ORGAN_EMP
.
getUploadType
());
attachFeignService
.
updateAttachs
(
attachUpdateVo
);
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/disable/ChCfgSrvEmpCate.java
0 → 100644
View file @
6b5c8c19
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
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
*
* @TableName CH_CFG_SRV_EMP_CATE
*/
@TableName
(
value
=
"CH_CFG_SRV_EMP_CATE"
)
@Data
public
class
ChCfgSrvEmpCate
implements
Serializable
{
/**
* 人员类别id
*/
@TableId
private
Integer
empCateId
;
/**
* 人员类型名称
*/
private
String
cateName
;
/**
* 备注
*/
private
String
remark
;
/**
* 基础参数配置id
*/
private
Integer
paraId
;
/**
* 首次操作时间
*/
private
Date
fcd
;
/**
* 首次操作人
*/
private
Integer
fcu
;
/**
* 人员资质ID
*/
private
Integer
qualificationsId
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/serviceManage/ChSrvOrganEmp.java
View file @
6b5c8c19
...
...
@@ -4,7 +4,9 @@ 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
;
...
...
@@ -71,6 +73,8 @@ public class ChSrvOrganEmp implements Serializable {
/**
* 创建时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
effTime
;
/**
...
...
@@ -81,11 +85,15 @@ public class ChSrvOrganEmp implements Serializable {
/**
* 终止时间
*/
@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
;
/**
...
...
@@ -96,6 +104,8 @@ public class ChSrvOrganEmp implements Serializable {
/**
* 末次操作时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
lcd
;
/**
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/SrvOrganEmpVo.java
0 → 100644
View file @
6b5c8c19
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
SrvOrganEmpVo
extends
ChSrvOrganEmp
{
private
String
unifiedSocialCreditCode
;
private
Integer
empCateId
;
/**
* 文件列表数据对象
*/
private
List
<
ChFndAttach
>
fileDataList
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment