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
3c5f82ce
Commit
3c5f82ce
authored
Jun 09, 2021
by
蔡镇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监管机构信息管理
parent
dbe1fe67
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
208 additions
and
12 deletions
+208
-12
SuperviseOrganVO.java
...com/hungraim/ltc/pojo/vo/governance/SuperviseOrganVO.java
+60
-0
SuperviseOrganEmpController.java
...tc/governance/controller/SuperviseOrganEmpController.java
+60
-4
SuperviseOrganMapper.java
...com/hungraim/ltc/governance/dao/SuperviseOrganMapper.java
+4
-0
SuperviseOrganEmpService.java
...raim/ltc/governance/service/SuperviseOrganEmpService.java
+6
-1
SuperviseOrganServiceImpl.java
...tc/governance/service/impl/SuperviseOrganServiceImpl.java
+25
-5
SuperviseOrganEmpMapper.xml
...ungraim/ltc/governance/mapper/SuperviseOrganEmpMapper.xml
+5
-2
SuperviseOrganMapper.xml
...m/hungraim/ltc/governance/mapper/SuperviseOrganMapper.xml
+48
-0
No files found.
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SuperviseOrganVO.java
0 → 100644
View file @
3c5f82ce
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
lombok.Data
;
/**
* 监管机构人员信息列表VO
*/
@Data
public
class
SuperviseOrganVO
{
/**
* 监管机构id
*/
private
String
spvOrganId
;
/**
* 适用机构
*/
private
String
organName
;
/**
* 机构代码
*/
private
String
spvOrganCode
;
/**
* 所在省市区
*/
private
String
districtProvince
;
private
String
districtCity
;
private
String
districtArea
;
/**
* 监管机构名称
*/
private
String
spvOrganName
;
/**
* 机构联系人姓名
*/
private
String
contactName
;
/**
* 联系人手机号
*/
private
String
contactTel
;
/**
* 统一社会信用代码
*/
private
String
unifiedSocialCreditCode
;
/**
* 机构联系人邮箱
*/
private
String
contactMail
;
/**
* 银行账户名称
*/
private
String
accName
;
/**
* 银行开户行名称
*/
private
String
bankAccName
;
/**
* 银行账号
*/
private
String
bankNo
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/SuperviseOrganEmpController.java
View file @
3c5f82ce
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.governance.service.SuperviseOrganEmpService
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -92,13 +93,68 @@ public class SuperviseOrganEmpController {
}
/**
*
查询监管机构信息
*
监管机构信息列表
*
* @param organId 适用机构id
* @param organId 适用机构id
* @param spvOrganName 监管机构名称
*/
@RequestMapping
(
"/superviseOrganEmpList"
)
public
Result
<
List
<
ChSuperviseOrgan
>>
superviseOrganList
(
Long
organId
)
{
List
<
ChSuperviseOrgan
>
result
=
superviseOrganEmpService
.
superviseOrganList
(
organId
);
public
Result
<
List
<
SuperviseOrganVO
>>
superviseOrganList
(
String
organId
,
String
spvOrganName
)
{
List
<
SuperviseOrganVO
>
result
=
superviseOrganEmpService
.
superviseOrganList
(
organId
,
spvOrganName
);
return
Result
.
success
(
result
);
}
/**
* 更改监管机构状态
*
* @param spvOrganId 监管机构id
* @param isLock 状态 有效:0;失效:1
*/
@DeleteMapping
(
"/updateSpvStatus"
)
public
Result
updateSpvStatus
(
String
spvOrganId
,
Short
isLock
)
{
if
(
StringUtils
.
isBlank
(
spvOrganId
)
||
isLock
==
null
||
(
isLock
!=
1
&&
isLock
!=
0
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
superviseOrganEmpService
.
updateSpvStatus
(
spvOrganId
,
isLock
);
return
Result
.
success
();
}
/**
* 新增或编辑监管机构信息
*
* @param spvOrgan spvOrganId 监管机构id 没有就新增,有就编辑
* organId 适用机构id
* districtProvince 所在省
* districtCity 所在市
* districtArea 所在区
* spvOrganName 监管机构名称
* unifiedSocialCreditCode 统一社会信用代码
* contactName 机构联系人姓名
* contactTel 联系人手机号
* contactMail 机构联系人邮箱
* accName 银行账户名称
* bankAccName 银行开户行名称
* bankNo 银行账号
*/
@DeleteMapping
(
"/insertOrUpdateSpvInfo"
)
public
Result
insertOrUpdateSpvInfo
(
ChSuperviseOrgan
spvOrgan
)
{
//参数校验
if
(
StringUtils
.
isBlank
(
spvOrgan
.
getOrganId
()))
{
//适用机构id
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
StringUtils
.
isBlank
(
spvOrgan
.
getDistrictProvince
())
||
StringUtils
.
isBlank
(
spvOrgan
.
getDistrictCity
())
||
StringUtils
.
isBlank
(
spvOrgan
.
getDistrictArea
()))
{
//所在省市区
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
StringUtils
.
isBlank
(
spvOrgan
.
getSpvOrganName
()))
{
//监管机构名称
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
StringUtils
.
isBlank
(
spvOrgan
.
getContactName
()))
{
//机构联系人姓名
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
StringUtils
.
isBlank
(
spvOrgan
.
getContactTel
()))
{
//联系人手机号
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
superviseOrganEmpService
.
insertOrUpdateSpvInfo
(
spvOrgan
);
return
Result
.
success
();
}
}
governance/src/main/java/com/hungraim/ltc/governance/dao/SuperviseOrganMapper.java
View file @
3c5f82ce
...
...
@@ -2,10 +2,14 @@ package com.hungraim.ltc.governance.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Mapper
@Repository
public
interface
SuperviseOrganMapper
extends
BaseMapper
<
ChSuperviseOrgan
>
{
List
<
SuperviseOrganVO
>
superviseOrganList
(
List
<
String
>
organIds
,
String
spvOrganName
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/SuperviseOrganEmpService.java
View file @
3c5f82ce
...
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -20,5 +21,9 @@ public interface SuperviseOrganEmpService {
void
insertOrUpdateEmpInfo
(
Long
empId
,
Long
spvOrganId
,
String
spvEmpName
,
String
certifType
,
String
certifNum
,
String
gender
,
Short
age
,
String
superviseTel
,
Short
status
);
List
<
ChSuperviseOrgan
>
superviseOrganList
(
Long
organId
);
List
<
SuperviseOrganVO
>
superviseOrganList
(
String
organId
,
String
spvOrganName
);
void
updateSpvStatus
(
String
spvOrganId
,
Short
isLock
);
void
insertOrUpdateSpvInfo
(
ChSuperviseOrgan
spvOrgan
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SuperviseOrganServiceImpl.java
View file @
3c5f82ce
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.dao.SuperviseOrganEmpMapper
;
import
com.hungraim.ltc.governance.dao.SuperviseOrganMapper
;
...
...
@@ -9,6 +8,7 @@ import com.hungraim.ltc.governance.service.SuperviseOrganEmpService;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
...
...
@@ -74,11 +74,31 @@ public class SuperviseOrganServiceImpl implements SuperviseOrganEmpService {
}
@Override
public
List
<
ChSuperviseOrgan
>
superviseOrganList
(
Long
organId
)
{
if
(
organId
==
null
)
{
return
superviseOrganMapper
.
selectList
(
new
QueryWrapper
<>());
public
List
<
SuperviseOrganVO
>
superviseOrganList
(
String
organId
,
String
spvOrganName
)
{
List
<
String
>
organIds
=
null
;
if
(
StrUtil
.
isNotBlank
(
organId
))
{
organIds
=
Arrays
.
asList
(
organId
.
split
(
","
));
}
return
superviseOrganMapper
.
superviseOrganList
(
organIds
,
spvOrganName
);
}
@Override
public
void
updateSpvStatus
(
String
spvOrganId
,
Short
isLock
)
{
ChSuperviseOrgan
chSuperviseOrgan
=
superviseOrganMapper
.
selectById
(
spvOrganId
);
chSuperviseOrgan
.
setIsLock
(
isLock
);
superviseOrganMapper
.
updateById
(
chSuperviseOrgan
);
}
@Override
public
void
insertOrUpdateSpvInfo
(
ChSuperviseOrgan
spvOrgan
)
{
if
(
spvOrgan
.
getSpvOrganId
()
!=
null
)
{
//更新
superviseOrganMapper
.
updateById
(
spvOrgan
);
}
else
{
return
superviseOrganMapper
.
selectList
(
new
QueryWrapper
<
ChSuperviseOrgan
>().
eq
(
"ORGAN_ID"
,
organId
));
//新增
spvOrgan
.
setEffTime
(
new
Date
());
superviseOrganMapper
.
insert
(
spvOrgan
);
}
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SuperviseOrganEmpMapper.xml
View file @
3c5f82ce
...
...
@@ -31,8 +31,11 @@
LEFT JOIN ch_supervise_organ sOrgan ON emp.spv_organ_id = sOrgan.spv_organ_id --监管机构
LEFT JOIN ch_srv_organ organ ON sOrgan.organ_id = organ.organ_id --护理机构
<where>
<if
test=
"srvOrganId != null"
>
and organ.SRV_ORGAN_ID = #{srvOrganId}
<if
test=
"organIds != null"
>
and organ.SRV_ORGAN_ID in
<foreach
collection=
"organIds"
item=
"organId"
open=
"("
close=
")"
separator=
","
>
#{organId}
</foreach>
</if>
<if
test=
"organName != null and organName != ''"
>
and sOrgan.SPV_ORGAN_NAME = #{organName}
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SuperviseOrganMapper.xml
0 → 100644
View file @
3c5f82ce
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hungraim.ltc.governance.dao.SuperviseOrganMapper"
>
<!--监管机构人员信息列表-->
<select
id=
"superviseOrganList"
resultType=
"com.hungraim.ltc.pojo.vo.governance.SuperviseOrganVO"
>
SELECT--监管机构id
sOrgan.SPV_ORGAN_ID spvOrganId,
--适用机构
organ.srv_organ_name organName,
--机构代码
sOrgan.ORGAN_ID spvOrganCode,
--所在省市区
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE sOrgan.district_province = dis.DISTRICT_CODE) districtProvince,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE sOrgan.district_city = dis.DISTRICT_CODE) districtCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE sOrgan.district_area = dis.DISTRICT_CODE) districtArea,
--监管机构名称
sOrgan.SPV_ORGAN_NAME spvOrganName,
--机构联系人姓名
sOrgan.CONTACT_NAME contactName,
--联系人手机号
sOrgan.CONTACT_TEL contactTel,
--统一社会信用代码
sOrgan.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
--机构联系人邮箱
sOrgan.CONTACT_MAIL contactMail,
--银行账户名称
sOrgan.ACC_NAME accName,
--银行开户行名称
sOrgan.BANK_ACC_NAME bankAccName,
--银行账号
sOrgan.BANK_NO bankNo
FROM
CH_SUPERVISE_ORGAN sOrgan --监管人员信息
LEFT JOIN ch_srv_organ organ ON sOrgan.organ_id = organ.organ_id --护理机构
where sOrgan.IS_LOCK = 0
<if
test=
"organIds != null"
>
and sOrgan.organ_id in
<foreach
collection=
"organIds"
item=
"organId"
open=
"("
close=
")"
separator=
","
>
#{organId}
</foreach>
</if>
<if
test=
"spvOrganName != null and spvOrganName != ''"
>
and sOrgan.SPV_ORGAN_NAME LIKE CONCAT('%',CONCAT( #{spvOrganName} ,'%'))
</if>
</select>
</mapper>
\ No newline at end of file
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