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
9f1836f8
Commit
9f1836f8
authored
Jun 28, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监管人员列表以及监管人员详情相关接口
parent
c666aadd
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
112 additions
and
51 deletions
+112
-51
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+3
-0
ChSuperviseOrganEmp.java
...im/ltc/pojo/entity/serviceManage/ChSuperviseOrganEmp.java
+10
-0
ChSuperviseOrganEmpVo.java
...ungraim/ltc/pojo/vo/governance/ChSuperviseOrganEmpVo.java
+13
-0
SuperviseOrganEmpVO.java
.../hungraim/ltc/pojo/vo/governance/SuperviseOrganEmpVO.java
+1
-1
SuperviseOrganEmpController.java
...tc/governance/controller/SuperviseOrganEmpController.java
+52
-25
SuperviseOrganEmpService.java
...raim/ltc/governance/service/SuperviseOrganEmpService.java
+12
-2
AprOrganServiceImpl.java
...raim/ltc/governance/service/impl/AprOrganServiceImpl.java
+1
-0
SuperviseOrganServiceImpl.java
...tc/governance/service/impl/SuperviseOrganServiceImpl.java
+18
-21
SuperviseOrganEmpMapper.xml
...ungraim/ltc/governance/mapper/SuperviseOrganEmpMapper.xml
+2
-2
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
9f1836f8
...
@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
@Service
@Service
...
@@ -86,6 +87,8 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -86,6 +87,8 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
BeanUtils
.
copyProperties
(
srvOrganEmpVo
,
chSrvOrganEmp
);
BeanUtils
.
copyProperties
(
srvOrganEmpVo
,
chSrvOrganEmp
);
if
(
null
==
empId
)
{
if
(
null
==
empId
)
{
// 新增
// 新增
chSrvOrganEmp
.
setEffTime
(
new
Date
());
chSrvOrganEmp
.
setIsLock
((
short
)
0
);
chSrvOrganEmpMapper
.
insert
(
chSrvOrganEmp
);
chSrvOrganEmpMapper
.
insert
(
chSrvOrganEmp
);
updateAttachs
(
srvOrganEmpVo
,
chSrvOrganEmp
.
getEmpId
());
updateAttachs
(
srvOrganEmpVo
,
chSrvOrganEmp
.
getEmpId
());
}
else
{
}
else
{
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/serviceManage/ChSuperviseOrganEmp.java
View file @
9f1836f8
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.annotation.IdType;
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -90,6 +92,8 @@ public class ChSuperviseOrganEmp implements Serializable {
...
@@ -90,6 +92,8 @@ public class ChSuperviseOrganEmp implements Serializable {
/**
/**
* 创建时间
* 创建时间
*/
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
effTime
;
private
Date
effTime
;
/**
/**
...
@@ -100,11 +104,15 @@ public class ChSuperviseOrganEmp implements Serializable {
...
@@ -100,11 +104,15 @@ public class ChSuperviseOrganEmp implements Serializable {
/**
/**
* 终止时间
* 终止时间
*/
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
endTime
;
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
;
private
Date
fcd
;
/**
/**
...
@@ -115,6 +123,8 @@ public class ChSuperviseOrganEmp implements Serializable {
...
@@ -115,6 +123,8 @@ public class ChSuperviseOrganEmp implements Serializable {
/**
/**
* 末次操作时间
* 末次操作时间
*/
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
lcd
;
private
Date
lcd
;
/**
/**
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/ChSuperviseOrganEmpVo.java
0 → 100644
View file @
9f1836f8
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
lombok.Data
;
@Data
public
class
ChSuperviseOrganEmpVo
extends
ChSuperviseOrganEmp
{
/**
* 适用机构id
*/
private
String
organId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SuperviseOrganEmpVO.java
View file @
9f1836f8
...
@@ -22,7 +22,7 @@ public class SuperviseOrganEmpVO {
...
@@ -22,7 +22,7 @@ public class SuperviseOrganEmpVO {
/**
/**
* 机构代码
* 机构代码
*/
*/
private
String
spvOrganCode
;
private
String
organId
;
/**
/**
* 监管机构名称
* 监管机构名称
*/
*/
...
...
governance/src/main/java/com/hungraim/ltc/governance/controller/SuperviseOrganEmpController.java
View file @
9f1836f8
package
com
.
hungraim
.
ltc
.
governance
.
controller
;
package
com
.
hungraim
.
ltc
.
governance
.
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.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.service.SuperviseOrganEmpService
;
import
com.hungraim.ltc.governance.service.SuperviseOrganEmpService
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.vo.governance.ChSuperviseOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
...
@@ -12,6 +16,8 @@ import org.apache.commons.lang.StringUtils;
...
@@ -12,6 +16,8 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* 监管机构及监管机构人员信息管理Controller
* 监管机构及监管机构人员信息管理Controller
*
*
...
@@ -26,6 +32,21 @@ public class SuperviseOrganEmpController {
...
@@ -26,6 +32,21 @@ public class SuperviseOrganEmpController {
private
SuperviseOrganEmpService
superviseOrganEmpService
;
private
SuperviseOrganEmpService
superviseOrganEmpService
;
/**
/**
* 根据organId获取对应的监管机构列表
*
* @param organId 适用机构id
* @return 返回监管机构列表
*/
@GetMapping
(
"/spvOrganListByOrganId"
)
public
Result
<
List
<
ChSuperviseOrgan
>>
getSpvOrganListByOrganId
(
String
organId
)
{
if
(
StrUtil
.
isBlank
(
organId
))
{
return
Result
.
success
();
}
List
<
ChSuperviseOrgan
>
list
=
superviseOrganEmpService
.
list
(
new
LambdaQueryWrapper
<
ChSuperviseOrgan
>().
eq
(
ChSuperviseOrgan:
:
getOrganId
,
organId
));
return
Result
.
success
(
list
);
}
/**
* 监管机构人员信息列表
* 监管机构人员信息列表
*
*
* @param pageNum 页码
* @param pageNum 页码
...
@@ -33,58 +54,64 @@ public class SuperviseOrganEmpController {
...
@@ -33,58 +54,64 @@ public class SuperviseOrganEmpController {
* @param organId 适用机构id
* @param organId 适用机构id
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param organName 监管机构名称
* @param organName 监管机构名称
* @param s
uperviseType
监管人员类型 监管人员:0;管理人员:1
* @param s
pvEmpType
监管人员类型 监管人员:0;管理人员:1
* @param s
uperviseName
监管人员姓名
* @param s
pvEmpName
监管人员姓名
* @param
superviseTel
监管人员手机号
* @param
mobilePhone
监管人员手机号
* @param
status
状态 有效:0;失效:1
* @param
isLock
状态 有效:0;失效:1
*/
*/
@RequestMapping
(
"/superviseOrganEmpList"
)
@RequestMapping
(
"/superviseOrganEmpList"
)
public
Result
<
Page
<
SuperviseOrganEmpVO
>>
superviseOrganEmpList
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
public
Result
<
Page
<
SuperviseOrganEmpVO
>>
superviseOrganEmpList
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
s
uperviseType
,
String
superviseName
,
String
superviseTel
,
String
status
)
{
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
s
pvEmpType
,
String
spvEmpName
,
String
mobilePhone
,
String
isLock
)
{
Page
<
SuperviseOrganEmpVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
SuperviseOrganEmpVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
page
=
superviseOrganEmpService
.
superviseOrganEmpList
(
page
,
organId
,
isIncluded
,
organName
,
s
uperviseType
,
superviseName
,
superviseTel
,
status
);
page
=
superviseOrganEmpService
.
superviseOrganEmpList
(
page
,
organId
,
isIncluded
,
organName
,
s
pvEmpType
,
spvEmpName
,
mobilePhone
,
isLock
);
return
Result
.
success
(
page
);
return
Result
.
success
(
page
);
}
}
/**
/**
* 获取监管人员详情
*
* @param spvEmpId 监管人员id
* @return 返回监管人员详情
*/
@GetMapping
(
"/superviseOrganEmp"
)
public
Result
<
ChSuperviseOrganEmpVo
>
getSuperviseOrganEmp
(
Long
spvEmpId
)
{
if
(
null
==
spvEmpId
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
ChSuperviseOrganEmpVo
chSuperviseOrganEmp
=
superviseOrganEmpService
.
getSuperviseOrganEmp
(
spvEmpId
);
return
Result
.
success
(
chSuperviseOrganEmp
);
}
/**
* 更改监管机构人员状态
* 更改监管机构人员状态
*
*
* @param
empId
监管机构人员id
* @param
spvEmpId
监管机构人员id
* @param isLock 状态 有效:0;失效:1
* @param isLock 状态 有效:0;失效:1
*/
*/
@DeleteMapping
(
"/updateEmpStatus"
)
@DeleteMapping
(
"/updateEmpStatus"
)
public
Result
updateEmpStatus
(
String
e
mpId
,
Short
isLock
)
{
public
Result
updateEmpStatus
(
String
spvE
mpId
,
Short
isLock
)
{
if
(
StringUtils
.
isBlank
(
e
mpId
)
||
isLock
==
null
||
(
isLock
!=
1
&&
isLock
!=
0
))
{
if
(
StringUtils
.
isBlank
(
spvE
mpId
)
||
isLock
==
null
||
(
isLock
!=
1
&&
isLock
!=
0
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
superviseOrganEmpService
.
updateEmpStatus
(
e
mpId
,
isLock
);
superviseOrganEmpService
.
updateEmpStatus
(
spvE
mpId
,
isLock
);
return
Result
.
success
();
return
Result
.
success
();
}
}
/**
/**
* 新增或编辑监管机构人员
* 新增或编辑监管机构人员
*
*
* @param empId 监管机构人员id 有就修改,没有就新增
* @param chSuperviseOrganEmp 监管机构人员实体对象
* @param spvOrganId 监管机构id
* @param spvEmpName 监管人员姓名
* @param certifType 证件类型
* @param certifNum 证件号码
* @param gender 性别 男:M;女:F;不确定N
* @param age 年龄
* @param superviseTel 手机号码
* @param status 人员类型 有效:0;失效:1
*/
*/
@DeleteMapping
(
"/insertOrUpdateEmpInfo"
)
@PostMapping
(
"/insertOrUpdateEmpInfo"
)
public
Result
insertOrUpdateEmpInfo
(
Long
empId
,
Long
spvOrganId
,
String
spvEmpName
,
String
certifType
,
public
Result
insertOrUpdateEmpInfo
(
ChSuperviseOrganEmp
chSuperviseOrganEmp
)
{
String
certifNum
,
String
gender
,
Short
age
,
String
superviseTel
,
Short
status
)
{
//参数校验
//参数校验
if
(
empId
==
null
&&
spvOrganId
==
null
)
{
if
(
chSuperviseOrganEmp
.
getSpvOrganId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
if
(
StringUtils
.
isBlank
(
spvEmpName
)
||
StringUtils
.
isBlank
(
certifType
)
||
StringUtils
.
isBlank
(
gender
)
||
StringUtils
.
isBlank
(
superviseTel
)
||
(
status
!=
1
&&
status
!=
0
))
{
if
(
StringUtils
.
isBlank
(
chSuperviseOrganEmp
.
getSpvEmpName
())
||
StringUtils
.
isBlank
(
chSuperviseOrganEmp
.
getCertifType
())
||
StringUtils
.
isBlank
(
chSuperviseOrganEmp
.
getGender
())
||
StringUtils
.
isBlank
(
chSuperviseOrganEmp
.
getMobilePhone
()
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
superviseOrganEmpService
.
insertOrUpdateEmpInfo
(
empId
,
spvOrganId
,
spvEmpName
,
certifType
,
certifNum
,
gender
,
age
,
superviseTel
,
status
);
superviseOrganEmpService
.
insertOrUpdateEmpInfo
(
chSuperviseOrganEmp
);
return
Result
.
success
();
return
Result
.
success
();
}
}
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/SuperviseOrganEmpService.java
View file @
9f1836f8
package
com
.
hungraim
.
ltc
.
governance
.
service
;
package
com
.
hungraim
.
ltc
.
governance
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.vo.governance.ChSuperviseOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -12,12 +15,12 @@ import org.springframework.stereotype.Service;
...
@@ -12,12 +15,12 @@ import org.springframework.stereotype.Service;
* @author czz
* @author czz
*/
*/
@Service
@Service
public
interface
SuperviseOrganEmpService
{
public
interface
SuperviseOrganEmpService
extends
IService
<
ChSuperviseOrgan
>
{
Page
<
SuperviseOrganEmpVO
>
superviseOrganEmpList
(
Page
<
SuperviseOrganEmpVO
>
page
,
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
);
Page
<
SuperviseOrganEmpVO
>
superviseOrganEmpList
(
Page
<
SuperviseOrganEmpVO
>
page
,
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
);
void
updateEmpStatus
(
String
empId
,
Short
isLock
);
void
updateEmpStatus
(
String
empId
,
Short
isLock
);
void
insertOrUpdateEmpInfo
(
Long
empId
,
Long
spvOrganId
,
String
spvEmpName
,
String
certifType
,
String
certifNum
,
String
gender
,
Short
age
,
String
superviseTel
,
Short
status
);
void
insertOrUpdateEmpInfo
(
ChSuperviseOrganEmp
chSuperviseOrganEmp
);
Page
<
SuperviseOrganVO
>
superviseOrganList
(
Page
<
SuperviseOrganVO
>
page
,
Long
organId
,
Boolean
isIncluded
,
String
spvOrganName
);
Page
<
SuperviseOrganVO
>
superviseOrganList
(
Page
<
SuperviseOrganVO
>
page
,
Long
organId
,
Boolean
isIncluded
,
String
spvOrganName
);
...
@@ -32,4 +35,11 @@ public interface SuperviseOrganEmpService {
...
@@ -32,4 +35,11 @@ public interface SuperviseOrganEmpService {
* @return 返回相关信息
* @return 返回相关信息
*/
*/
ChSuperviseOrgan
getSuperviseOrgan
(
Long
spvOrganId
);
ChSuperviseOrgan
getSuperviseOrgan
(
Long
spvOrganId
);
/**
* 获取监管人员详情
* @param spvEmpId 监管人员id
* @return 返回监管人员详情
*/
ChSuperviseOrganEmpVo
getSuperviseOrganEmp
(
Long
spvEmpId
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/AprOrganServiceImpl.java
View file @
9f1836f8
...
@@ -155,6 +155,7 @@ public class AprOrganServiceImpl extends ServiceImpl<AprOrganMapper, ChAprOrgan>
...
@@ -155,6 +155,7 @@ public class AprOrganServiceImpl extends ServiceImpl<AprOrganMapper, ChAprOrgan>
if
(
chAprEmp
.
getEmpId
()
==
null
)
{
if
(
chAprEmp
.
getEmpId
()
==
null
)
{
//新增
//新增
chAprEmp
.
setEffTime
(
new
Date
());
chAprEmp
.
setEffTime
(
new
Date
());
chAprEmp
.
setIsLock
(
0
);
aprEmpMapper
.
insert
(
chAprEmp
);
aprEmpMapper
.
insert
(
chAprEmp
);
}
else
{
}
else
{
//更新
//更新
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SuperviseOrganServiceImpl.java
View file @
9f1836f8
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hungraim.ltc.api.OrganFeignService
;
import
com.hungraim.ltc.api.OrganFeignService
;
import
com.hungraim.ltc.governance.dao.SuperviseOrganEmpMapper
;
import
com.hungraim.ltc.governance.dao.SuperviseOrganEmpMapper
;
import
com.hungraim.ltc.governance.dao.SuperviseOrganMapper
;
import
com.hungraim.ltc.governance.dao.SuperviseOrganMapper
;
import
com.hungraim.ltc.governance.service.SuperviseOrganEmpService
;
import
com.hungraim.ltc.governance.service.SuperviseOrganEmpService
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.vo.governance.ChSuperviseOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -23,7 +26,7 @@ import java.util.List;
...
@@ -23,7 +26,7 @@ import java.util.List;
@Service
@Service
@Slf4j
@Slf4j
@AllArgsConstructor
@AllArgsConstructor
public
class
SuperviseOrganServiceImpl
implements
SuperviseOrganEmpService
{
public
class
SuperviseOrganServiceImpl
extends
ServiceImpl
<
SuperviseOrganMapper
,
ChSuperviseOrgan
>
implements
SuperviseOrganEmpService
{
private
final
SuperviseOrganEmpMapper
superviseOrganEmpMapper
;
private
final
SuperviseOrganEmpMapper
superviseOrganEmpMapper
;
private
final
SuperviseOrganMapper
superviseOrganMapper
;
private
final
SuperviseOrganMapper
superviseOrganMapper
;
private
final
OrganFeignService
organFeignService
;
private
final
OrganFeignService
organFeignService
;
...
@@ -54,31 +57,15 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
...
@@ -54,31 +57,15 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
}
}
@Override
@Override
public
void
insertOrUpdateEmpInfo
(
Long
empId
,
Long
spvOrganId
,
String
spvEmpName
,
String
certifType
,
String
certifNum
,
String
gender
,
Short
age
,
String
superviseTel
,
Short
status
)
{
public
void
insertOrUpdateEmpInfo
(
ChSuperviseOrganEmp
chSuperviseOrganEmp
)
{
if
(
empId
!=
null
)
{
Long
spvEmpId
=
chSuperviseOrganEmp
.
getSpvEmpId
();
if
(
spvEmpId
!=
null
)
{
//更新
//更新
ChSuperviseOrganEmp
chSuperviseOrganEmp
=
superviseOrganEmpMapper
.
selectById
(
empId
);
chSuperviseOrganEmp
.
setSpvOrganId
(
spvOrganId
);
chSuperviseOrganEmp
.
setSpvEmpName
(
spvEmpName
);
chSuperviseOrganEmp
.
setCertifType
(
certifType
);
chSuperviseOrganEmp
.
setCertifNum
(
certifNum
);
chSuperviseOrganEmp
.
setGender
(
gender
);
chSuperviseOrganEmp
.
setAge
(
age
);
chSuperviseOrganEmp
.
setMobilePhone
(
superviseTel
);
chSuperviseOrganEmp
.
setIsLock
(
status
);
superviseOrganEmpMapper
.
updateById
(
chSuperviseOrganEmp
);
superviseOrganEmpMapper
.
updateById
(
chSuperviseOrganEmp
);
}
else
{
}
else
{
//新增
//新增
ChSuperviseOrganEmp
chSuperviseOrganEmp
=
new
ChSuperviseOrganEmp
();
chSuperviseOrganEmp
.
setEffTime
(
new
Date
());
chSuperviseOrganEmp
.
setEffTime
(
new
Date
());
chSuperviseOrganEmp
.
setSpvOrganId
(
spvOrganId
);
chSuperviseOrganEmp
.
setIsLock
((
short
)
0
);
chSuperviseOrganEmp
.
setSpvEmpName
(
spvEmpName
);
chSuperviseOrganEmp
.
setCertifType
(
certifType
);
chSuperviseOrganEmp
.
setCertifNum
(
certifNum
);
chSuperviseOrganEmp
.
setGender
(
gender
);
chSuperviseOrganEmp
.
setAge
(
age
);
chSuperviseOrganEmp
.
setMobilePhone
(
superviseTel
);
chSuperviseOrganEmp
.
setIsLock
(
status
);
superviseOrganEmpMapper
.
insert
(
chSuperviseOrganEmp
);
superviseOrganEmpMapper
.
insert
(
chSuperviseOrganEmp
);
}
}
}
}
...
@@ -119,4 +106,14 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
...
@@ -119,4 +106,14 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
public
ChSuperviseOrgan
getSuperviseOrgan
(
Long
spvOrganId
)
{
public
ChSuperviseOrgan
getSuperviseOrgan
(
Long
spvOrganId
)
{
return
superviseOrganMapper
.
selectById
(
spvOrganId
);
return
superviseOrganMapper
.
selectById
(
spvOrganId
);
}
}
@Override
public
ChSuperviseOrganEmpVo
getSuperviseOrganEmp
(
Long
spvEmpId
)
{
ChSuperviseOrganEmpVo
chSuperviseOrganEmpVo
=
new
ChSuperviseOrganEmpVo
();
ChSuperviseOrganEmp
chSuperviseOrganEmp
=
superviseOrganEmpMapper
.
selectById
(
spvEmpId
);
BeanUtils
.
copyProperties
(
chSuperviseOrganEmp
,
chSuperviseOrganEmpVo
);
ChSuperviseOrgan
chSuperviseOrgan
=
superviseOrganMapper
.
selectById
(
chSuperviseOrganEmp
.
getSpvOrganId
());
chSuperviseOrganEmpVo
.
setOrganId
(
chSuperviseOrgan
.
getOrganId
());
return
chSuperviseOrganEmpVo
;
}
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SuperviseOrganEmpMapper.xml
View file @
9f1836f8
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
--适用机构
--适用机构
organ.ORGAN_NAME organName,
organ.ORGAN_NAME organName,
--机构代码
--机构代码
sOrgan.ORGAN_ID
spvOrganCode
,
sOrgan.ORGAN_ID
organId
,
--监管机构名称
--监管机构名称
sOrgan.SPV_ORGAN_NAME spvOrganName,
sOrgan.SPV_ORGAN_NAME spvOrganName,
--姓名
--姓名
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
LEFT JOIN CH_FND_ORGAN organ ON sOrgan.organ_id = organ.organ_id
LEFT JOIN CH_FND_ORGAN organ ON sOrgan.organ_id = organ.organ_id
<where>
<where>
<if
test=
"organIds != null"
>
<if
test=
"organIds != null"
>
and organ.
SRV_
ORGAN_ID in
and organ.ORGAN_ID in
<foreach
collection=
"organIds"
item=
"organId"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"organIds"
item=
"organId"
open=
"("
close=
")"
separator=
","
>
#{organId}
#{organId}
</foreach>
</foreach>
...
...
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