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
c666aadd
Commit
c666aadd
authored
Jun 24, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评定人员页面相关接口
parent
adc7107e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
35 deletions
+61
-35
ChAprEmp.java
...ava/com/hungraim/ltc/pojo/entity/assessment/ChAprEmp.java
+10
-0
AprEmpInfoVO.java
...ava/com/hungraim/ltc/pojo/vo/governance/AprEmpInfoVO.java
+2
-0
AprOrganController.java
...ungraim/ltc/governance/controller/AprOrganController.java
+26
-19
AprOrganService.java
.../com/hungraim/ltc/governance/service/AprOrganService.java
+3
-1
AprOrganServiceImpl.java
...raim/ltc/governance/service/impl/AprOrganServiceImpl.java
+20
-15
No files found.
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/assessment/ChAprEmp.java
View file @
c666aadd
...
...
@@ -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
;
@Data
@TableName
(
"CH_APR_EMP"
)
...
...
@@ -19,14 +21,20 @@ public class ChAprEmp {
private
String
certifTypeCode
;
private
String
eduCode
;
private
Integer
basicEmpId
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
java
.
util
.
Date
endTime
;
private
String
gender
;
private
Integer
defineEmp
;
private
Integer
cfgModeId
;
private
Integer
age
;
private
Integer
aprempTypeIdF
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
java
.
util
.
Date
fcd
;
private
Integer
empType
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
java
.
util
.
Date
lcd
;
private
String
realName
;
private
Integer
aprempTypeIdS
;
...
...
@@ -38,6 +46,8 @@ public class ChAprEmp {
private
String
tel
;
private
String
certifTypeId
;
private
Integer
groupLeader
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
java
.
util
.
Date
effTime
;
private
Integer
aprOrganId
;
private
Integer
lcu
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/AprEmpInfoVO.java
View file @
c666aadd
...
...
@@ -11,5 +11,7 @@ import java.util.List;
*/
@Data
public
class
AprEmpInfoVO
extends
ChAprEmp
{
private
String
organId
;
private
String
unifiedSocialCreditCode
;
private
List
<
ChFndAttach
>
fileDataList
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/AprOrganController.java
View file @
c666aadd
package
com
.
hungraim
.
ltc
.
governance
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.service.AprOrganService
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgAprGroupDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChAprOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprOrganType
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprempType
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChFndEducation
;
...
...
@@ -51,6 +53,21 @@ public class AprOrganController {
}
/**
* 通过organId获取aprOrgan集合
*
* @param organId 适用机构id
* @return 返回评定机构列表
*/
@GetMapping
(
"/aprOrganListByOrganId"
)
public
Result
<
List
<
ChAprOrgan
>>
getAprOrganListByOrganId
(
Long
organId
)
{
if
(
null
==
organId
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
List
<
ChAprOrgan
>
list
=
aprOrganService
.
list
(
new
LambdaQueryWrapper
<
ChAprOrgan
>().
eq
(
ChAprOrgan:
:
getOrganId
,
organId
));
return
Result
.
success
(
list
);
}
/**
* 获取评定机构信息
*
* @param aprOrganId 评定机构id
...
...
@@ -221,28 +238,26 @@ public class AprOrganController {
/**
* 获取评定机构人员信息
*
* @param
aprE
mpId 评定机构人员id
* @param
e
mpId 评定机构人员id
* @return 返回相关信息
*/
@GetMapping
(
"/getAprEmpInfo"
)
public
Result
<
AprEmpInfoVO
>
getAprEmpInfo
(
Long
aprE
mpId
)
{
if
(
null
==
aprE
mpId
)
{
public
Result
<
AprEmpInfoVO
>
getAprEmpInfo
(
Long
e
mpId
)
{
if
(
null
==
e
mpId
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
AprEmpInfoVO
aprEmpInfoVO
=
aprOrganService
.
getAprEmpInfo
(
aprE
mpId
);
AprEmpInfoVO
aprEmpInfoVO
=
aprOrganService
.
getAprEmpInfo
(
e
mpId
);
return
Result
.
success
(
aprEmpInfoVO
);
}
/**
* 新增评定机构人员或更新评定机构人员信息(有emp_id就更新,没有就新增)
*/
@
Delete
Mapping
(
"/addOrUpdateAprEmp"
)
@
Post
Mapping
(
"/addOrUpdateAprEmp"
)
public
Result
addOrUpdateAprEmp
(
AprEmpInfoVO
chAprEmp
)
{
if
(
chAprEmp
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
chAprEmp
.
getEmpId
()
==
null
)
{
//新增
if
(
chAprEmp
.
getAprOrganId
()
==
null
)
{
//评定机构id
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
...
...
@@ -264,6 +279,9 @@ public class AprOrganController {
if
(
StringUtils
.
isBlank
(
chAprEmp
.
getTel
()))
{
//评定人员手机号码
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
null
==
chAprEmp
.
getAprempTypeIdF
()
||
null
==
chAprEmp
.
getAprempTypeIdS
())
{
//评定人员资质id
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
StringUtils
.
isBlank
(
chAprEmp
.
getAprempTypeNameF
())
||
StringUtils
.
isBlank
(
chAprEmp
.
getAprempTypeNameS
()))
{
//评定人员资质
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
...
...
@@ -276,18 +294,7 @@ public class AprOrganController {
if
(
chAprEmp
.
getGroupLeader
()
==
null
)
{
//评定人员是否是组长
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
else
{
//更新
if
(
StringUtils
.
isBlank
(
chAprEmp
.
getTel
()))
{
//评定人员手机号码
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
chAprEmp
.
getAprempTypeIdF
()
==
null
||
chAprEmp
.
getAprempTypeIdS
()
==
null
)
{
//评定人员资质
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
chAprEmp
.
getEduId
()
==
null
)
{
//评定人员文化水平
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
aprOrganService
.
addOrUpdateAprEmp
(
chAprEmp
);
return
Result
.
success
();
}
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/AprOrganService.java
View file @
c666aadd
package
com
.
hungraim
.
ltc
.
governance
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.hungraim.ltc.pojo.entity.assessment.ChCfgAprGroupDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChAprOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprOrganType
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprempType
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChFndEducation
;
...
...
@@ -19,7 +21,7 @@ import java.util.List;
* @author czz
*/
@Service
public
interface
AprOrganService
{
public
interface
AprOrganService
extends
IService
<
ChAprOrgan
>
{
Page
<
AprOrganVO
>
aprOrganList
(
Page
<
AprOrganVO
>
page
,
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
code
);
void
updateAprOrganStatus
(
String
aprOrganId
,
Short
status
);
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/AprOrganServiceImpl.java
View file @
c666aadd
...
...
@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.api.OrganFeignService
;
import
com.hungraim.ltc.governance.dao.*
;
...
...
@@ -35,7 +36,7 @@ import java.util.List;
@Service
@Slf4j
@AllArgsConstructor
public
class
AprOrganServiceImpl
implements
AprOrganService
{
public
class
AprOrganServiceImpl
extends
ServiceImpl
<
AprOrganMapper
,
ChAprOrgan
>
implements
AprOrganService
{
private
final
OrganFeignService
organFeignService
;
private
final
AprOrganMapper
aprOrganMapper
;
...
...
@@ -157,13 +158,13 @@ public class AprOrganServiceImpl implements AprOrganService {
aprEmpMapper
.
insert
(
chAprEmp
);
}
else
{
//更新
ChAprEmp
aprEmp
=
aprEmpMapper
.
selectById
(
chAprEmp
.
getEmpId
());
aprEmp
.
setTel
(
chAprEmp
.
getTel
());
aprEmp
.
setAprempTypeIdF
(
chAprEmp
.
getAprempTypeIdF
());
aprEmp
.
setAprempTypeIdS
(
chAprEmp
.
getAprempTypeIdS
());
aprEmp
.
setEduId
(
chAprEmp
.
getEduId
());
aprEmpMapper
.
updateById
(
a
prEmp
);
chAprEmp
.
setEmpId
(
a
prEmp
.
getEmpId
());
//
ChAprEmp aprEmp = aprEmpMapper.selectById(chAprEmp.getEmpId());
//
aprEmp.setTel(chAprEmp.getTel());
//
aprEmp.setAprempTypeIdF(chAprEmp.getAprempTypeIdF());
//
aprEmp.setAprempTypeIdS(chAprEmp.getAprempTypeIdS());
//
aprEmp.setEduId(chAprEmp.getEduId());
aprEmpMapper
.
updateById
(
chA
prEmp
);
chAprEmp
.
setEmpId
(
chA
prEmp
.
getEmpId
());
}
updateAttachs
(
chAprEmp
.
getFileDataList
(),
chAprEmp
.
getEmpId
().
longValue
(),
AttachType
.
APR_EMP
.
getUploadType
());
}
...
...
@@ -196,21 +197,25 @@ public class AprOrganServiceImpl implements AprOrganService {
@Override
public
AprEmpInfoVO
getAprEmpInfo
(
Long
aprEmpId
)
{
ChAprEmp
chAprEmp
=
aprEmpMapper
.
selectById
(
aprEmpId
);
Integer
aprOrganId
=
chAprEmp
.
getAprOrganId
();
ChAprOrgan
chAprOrgan
=
aprOrganMapper
.
selectById
(
aprOrganId
);
String
organId
=
chAprOrgan
.
getOrganId
();
AprEmpInfoVO
aprEmpInfoVO
=
new
AprEmpInfoVO
();
BeanUtils
.
copyProperties
(
chAprEmp
,
aprEmpInfoVO
);
aprEmpInfoVO
.
setOrganId
(
organId
);
aprEmpInfoVO
.
setUnifiedSocialCreditCode
(
chAprOrgan
.
getUnifiedSocialCreditCode
());
//查询附件列表
Result
<
List
<
ChFndAttach
>>
listResult
=
null
;
try
{
// 返回对应的附件列表
listResult
=
attachFeignService
.
selectAttachs
(
aprEmpId
,
AttachType
.
APR_EMP
.
getUploadType
());
// 返回对应的附件列表
调用文件服务获取对应文件,出错或未获取到就只是相当于没有设置对应的数据,减少系统之间的耦合性
Result
<
List
<
ChFndAttach
>>
listResult
=
attachFeignService
.
selectAttachs
(
aprEmpId
,
AttachType
.
APR_EMP
.
getUploadType
());
if
(!
listResult
.
getCode
().
equals
(
ResultCode
.
SUCCESS
.
getCode
()))
{
log
.
info
(
"请求获取附件列表错误:错误码{},错误信息:{}"
,
listResult
.
getCode
(),
listResult
.
getMsg
());
}
aprEmpInfoVO
.
setFileDataList
(
listResult
.
getData
());
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
log
.
error
(
"请求获取附件列表错误:,错误信息:{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
AprEmpInfoVO
aprEmpInfoVO
=
new
AprEmpInfoVO
();
BeanUtils
.
copyProperties
(
chAprEmp
,
aprEmpInfoVO
);
aprEmpInfoVO
.
setFileDataList
(
listResult
.
getData
());
return
aprEmpInfoVO
;
}
...
...
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