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
d70c022f
Commit
d70c022f
authored
Jan 12, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
护理人员、评定人员、监管人员导出
parent
075d702f
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
549 additions
and
81 deletions
+549
-81
pom.xml
apply/apply-service/pom.xml
+0
-21
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+2
-11
SrvOrganController.java
.../java/com/hungraim/ltc/controller/SrvOrganController.java
+28
-0
ChSrvOrganEmpMapper.java
...c/main/java/com/hungraim/ltc/dao/ChSrvOrganEmpMapper.java
+5
-0
DisableApplyMapper.java
...rc/main/java/com/hungraim/ltc/dao/DisableApplyMapper.java
+3
-6
SrvOrganEmpService.java
...ain/java/com/hungraim/ltc/service/SrvOrganEmpService.java
+4
-0
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+9
-9
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+35
-0
ChDisableApplyMapper.xml
...ervice/src/main/resources/mapper/ChDisableApplyMapper.xml
+6
-6
ChSrvOrganEmpMapper.xml
...service/src/main/resources/mapper/ChSrvOrganEmpMapper.xml
+57
-0
TaskController.java
...main/java/com/hungraim/ltc/controller/TaskController.java
+24
-0
TaskMapper.java
...ervice/src/main/java/com/hungraim/ltc/dao/TaskMapper.java
+2
-0
TaskService.java
...e/src/main/java/com/hungraim/ltc/service/TaskService.java
+3
-0
TaskServiceImpl.java
...n/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
+26
-0
ChDisableEvaluateMapper.xml
...ice/src/main/resources/mapper/ChDisableEvaluateMapper.xml
+46
-0
AprEmpExportVO.java
...a/com/hungraim/ltc/pojo/vo/assessment/AprEmpExportVO.java
+49
-0
DisableExportVO.java
...ava/com/hungraim/ltc/pojo/vo/disable/DisableExportVO.java
+19
-28
SrvOrganEmpExportVo.java
...com/hungraim/ltc/pojo/vo/disable/SrvOrganEmpExportVo.java
+42
-0
SuperviseOrganEmpExportVO.java
...aim/ltc/pojo/vo/governance/SuperviseOrganEmpExportVO.java
+43
-0
FileUtils.java
...n-core/src/main/java/com/hungraim/ltc/util/FileUtils.java
+26
-0
SuperviseOrganEmpController.java
...tc/governance/controller/SuperviseOrganEmpController.java
+23
-0
SuperviseOrganEmpMapper.java
.../hungraim/ltc/governance/dao/SuperviseOrganEmpMapper.java
+3
-0
SuperviseOrganEmpService.java
...raim/ltc/governance/service/SuperviseOrganEmpService.java
+3
-0
SuperviseOrganServiceImpl.java
...tc/governance/service/impl/SuperviseOrganServiceImpl.java
+14
-0
SuperviseOrganEmpMapper.xml
...ungraim/ltc/governance/mapper/SuperviseOrganEmpMapper.xml
+58
-0
pom.xml
pom.xml
+19
-0
No files found.
apply/apply-service/pom.xml
View file @
d70c022f
...
@@ -80,27 +80,6 @@
...
@@ -80,27 +80,6 @@
</dependency>
</dependency>
<!--Excel导入导出-->
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-web
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-annotation
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-validator
</artifactId>
<version>
6.1.3.Final
</version>
</dependency>
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
d70c022f
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -234,17 +235,7 @@ public class DisableController {
...
@@ -234,17 +235,7 @@ public class DisableController {
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
1
);
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
1
);
// 命名表格
// 命名表格
String
fileName
=
"disable.xlsx"
;
String
fileName
=
"disable.xlsx"
;
try
{
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setHeader
(
"content-Type"
,
"application/vnd.ms-excel"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 输出流
workbook
.
write
(
response
.
getOutputStream
());
// 清除response
response
.
flushBuffer
();
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
());
}
}
}
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/SrvOrganController.java
View file @
d70c022f
...
@@ -15,16 +15,22 @@ import com.hungraim.ltc.service.SrvEmpCateService;
...
@@ -15,16 +15,22 @@ import com.hungraim.ltc.service.SrvEmpCateService;
import
com.hungraim.ltc.service.SrvEmpTypeService
;
import
com.hungraim.ltc.service.SrvEmpTypeService
;
import
com.hungraim.ltc.service.SrvOrganEmpService
;
import
com.hungraim.ltc.service.SrvOrganEmpService
;
import
com.hungraim.ltc.service.SrvOrganService
;
import
com.hungraim.ltc.service.SrvOrganService
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
"/api.apply/srvOrgan"
)
@RequestMapping
(
"/api.apply/srvOrgan"
)
@AllArgsConstructor
@AllArgsConstructor
@Slf4j
public
class
SrvOrganController
{
public
class
SrvOrganController
{
private
final
SrvOrganService
srvOrganService
;
private
final
SrvOrganService
srvOrganService
;
...
@@ -244,4 +250,26 @@ public class SrvOrganController {
...
@@ -244,4 +250,26 @@ public class SrvOrganController {
return
Result
.
success
();
return
Result
.
success
();
}
}
/**
* 护理人员导出
*
* @param organId 适用机构id
* @param isInvolveChild 是否包含子机构
* @param empName 人员姓名
* @param srvOrganName 护理机构名称
* @param certifNum 身份证号
* @param isLock 人员状态
* @param empType 护理人员类型
*/
@GetMapping
(
"/srvOrganExport"
)
public
void
srvOrganExport
(
Long
organId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
,
HttpServletResponse
response
){
Workbook
workbook
=
srvOrganEmpService
.
srvOrganExport
(
organId
,
isInvolveChild
,
empName
,
srvOrganName
,
certifNum
,
isLock
,
empType
);
// 命名表格
String
fileName
=
"srvOrgan.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvOrganEmpMapper.java
View file @
d70c022f
...
@@ -3,8 +3,10 @@ package com.hungraim.ltc.dao;
...
@@ -3,8 +3,10 @@ package com.hungraim.ltc.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -27,6 +29,8 @@ public interface ChSrvOrganEmpMapper extends BaseMapper<ChSrvOrganEmp> {
...
@@ -27,6 +29,8 @@ public interface ChSrvOrganEmpMapper extends BaseMapper<ChSrvOrganEmp> {
*/
*/
Page
<
SrvOrganEmpListVo
>
getSrvOrganEmpListVo
(
Page
<
SrvOrganEmpListVo
>
page
,
List
<
Long
>
organIds
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
);
Page
<
SrvOrganEmpListVo
>
getSrvOrganEmpListVo
(
Page
<
SrvOrganEmpListVo
>
page
,
List
<
Long
>
organIds
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
);
List
<
SrvOrganEmpExportVo
>
getSrvOrganEmpExportList
(
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/dao/DisableApplyMapper.java
View file @
d70c022f
...
@@ -3,10 +3,7 @@ package com.hungraim.ltc.dao;
...
@@ -3,10 +3,7 @@ package com.hungraim.ltc.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableApply
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableApply
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.DisableInfoVO
;
import
com.hungraim.ltc.pojo.vo.disable.DisableVO
;
import
com.hungraim.ltc.pojo.vo.disable.ExamineRecord
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -45,7 +42,7 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
...
@@ -45,7 +42,7 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
DisableInfoVO
getDisableInfo
(
String
disableInfoId
);
DisableInfoVO
getDisableInfo
(
String
disableInfoId
);
List
<
DisableVO
>
disableExportList
(
@Param
(
value
=
"organIds"
)
List
<
String
>
organIds
,
@Param
(
"provincial"
)
String
provincial
,
List
<
Disable
Export
VO
>
disableExportList
(
@Param
(
value
=
"organIds"
)
List
<
String
>
organIds
,
@Param
(
"provincial"
)
String
provincial
,
@Param
(
"city"
)
String
city
,
@Param
(
"area"
)
String
area
,
@Param
(
"name"
)
String
name
,
@Param
(
"certiCode"
)
String
certiCode
,
@Param
(
"city"
)
String
city
,
@Param
(
"area"
)
String
area
,
@Param
(
"name"
)
String
name
,
@Param
(
"certiCode"
)
String
certiCode
,
@Param
(
"dataFrom"
)
String
dataFrom
,
@Param
(
"applyMethod"
)
Integer
applyMethod
);
@Param
(
"dataFrom"
)
String
dataFrom
,
@Param
(
"applyMethod"
)
Integer
applyMethod
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/SrvOrganEmpService.java
View file @
d70c022f
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.service;
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
import
org.apache.poi.ss.usermodel.Workbook
;
public
interface
SrvOrganEmpService
{
public
interface
SrvOrganEmpService
{
...
@@ -59,4 +60,7 @@ public interface SrvOrganEmpService {
...
@@ -59,4 +60,7 @@ public interface SrvOrganEmpService {
* fileDataList: [], // 对应数据库中的文件数据列表
* fileDataList: [], // 对应数据库中的文件数据列表
*/
*/
void
saveOrUpdateSrvOrganEmp
(
SrvOrganEmpVo
srvOrganEmpVo
);
void
saveOrUpdateSrvOrganEmp
(
SrvOrganEmpVo
srvOrganEmpVo
);
Workbook
srvOrganExport
(
Long
organId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
d70c022f
...
@@ -523,20 +523,20 @@ public class DisableServiceImpl implements DisableService {
...
@@ -523,20 +523,20 @@ public class DisableServiceImpl implements DisableService {
if
(
StrUtil
.
isNotBlank
(
organId
))
{
if
(
StrUtil
.
isNotBlank
(
organId
))
{
organIds
=
Arrays
.
asList
(
organId
.
split
(
","
));
organIds
=
Arrays
.
asList
(
organId
.
split
(
","
));
}
}
List
<
DisableVO
>
records
=
disableApplyMapper
.
disableExportList
(
organIds
,
districtProvincial
,
List
<
Disable
Export
VO
>
records
=
disableApplyMapper
.
disableExportList
(
organIds
,
districtProvincial
,
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
applyMethod
);
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
applyMethod
);
List
<
DisableExportVO
>
disableExportVOList
=
new
ArrayList
<>();
for
(
DisableExportVO
record
:
records
)
{
for
(
DisableVO
record
:
records
)
{
DisableExportVO
disableExportVO
=
new
DisableExportVO
();
BeanUtil
.
copyProperties
(
record
,
disableExportVO
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
record
.
getProvincial
()).
append
(
record
.
getCity
()).
append
(
record
.
getArea
());
if
(
record
.
getProvincial
().
equals
(
record
.
getCity
())){
disableExportVO
.
setProvinCialcityArea
(
stringBuilder
.
toString
());
stringBuilder
.
append
(
record
.
getProvincial
());
disableExportVOList
.
add
(
disableExportVO
);
}
else
{
stringBuilder
.
append
(
record
.
getProvincial
()).
append
(
record
.
getCity
());
}
record
.
setProvinCialcityArea
(
stringBuilder
.
toString
());
}
}
ExportParams
exportParams
=
new
ExportParams
();
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
DisableExportVO
.
class
,
disableExportVOList
);
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
DisableExportVO
.
class
,
records
);
return
workbook
;
return
workbook
;
}
}
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
service
.
impl
;
package
com
.
hungraim
.
ltc
.
service
.
impl
;
import
cn.afterturn.easypoi.excel.ExcelExportUtil
;
import
cn.afterturn.easypoi.excel.entity.ExportParams
;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
import
cn.hutool.core.util.StrUtil
;
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
;
import
com.hungraim.ltc.dao.ChSrvOrganEmpMapper
;
import
com.hungraim.ltc.dao.ChSrvOrganEmpMapper
;
...
@@ -12,6 +16,8 @@ import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
...
@@ -12,6 +16,8 @@ import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChSrvempRiskLevel
;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChSrvempRiskLevel
;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel
;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp
;
import
com.hungraim.ltc.pojo.vo.disable.DisableExportVO
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
...
@@ -22,11 +28,14 @@ import com.hungraim.ltc.util.Result;
...
@@ -22,11 +28,14 @@ import com.hungraim.ltc.util.Result;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -121,4 +130,30 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -121,4 +130,30 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
attachUpdateVo
.
setAttachType
(
AttachType
.
SRV_ORGAN_EMP
.
getUploadType
());
attachUpdateVo
.
setAttachType
(
AttachType
.
SRV_ORGAN_EMP
.
getUploadType
());
attachFeignService
.
updateAttachs
(
attachUpdateVo
);
attachFeignService
.
updateAttachs
(
attachUpdateVo
);
}
}
@Override
public
Workbook
srvOrganExport
(
Long
organId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
)
{
List
<
Long
>
organIds
=
organService
.
getOrganIds
(
organId
,
isInvolveChild
);
List
<
SrvOrganEmpExportVo
>
srvOrganEmpExportList
=
chSrvOrganEmpMapper
.
getSrvOrganEmpExportList
(
organIds
,
empName
,
srvOrganName
,
certifNum
,
isLock
,
empType
);
for
(
SrvOrganEmpExportVo
record
:
srvOrganEmpExportList
)
{
StringBuilder
stringBuilder
=
new
StringBuilder
();
if
(
StringUtils
.
isEmpty
(
record
.
getProvincial
())){
stringBuilder
.
append
(
"--"
);
}
else
if
(
record
.
getProvincial
().
equals
(
record
.
getCity
())){
stringBuilder
.
append
(
record
.
getProvincial
());
}
else
{
stringBuilder
.
append
(
record
.
getProvincial
()).
append
(
record
.
getCity
());
}
record
.
setProvinCialcityArea
(
stringBuilder
.
toString
());
}
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
SrvOrganEmpExportVo
.
class
,
srvOrganEmpExportList
);
return
workbook
;
}
}
}
apply/apply-service/src/main/resources/mapper/ChDisableApplyMapper.xml
View file @
d70c022f
...
@@ -176,26 +176,26 @@
...
@@ -176,26 +176,26 @@
<select
id=
"disableExportList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableVO"
>
<select
id=
"disableExportList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.Disable
Export
VO"
>
select a.APPLY_ID applyId,
select a.APPLY_ID applyId,
o.ORGAN_NAME organName,
o.ORGAN_NAME organName,
a.organ_id organId,
a.organ_id organId,
a.DISTRICT_PROVINCIAL
provincial,
(select dis.district_name from ch_fnd_district dis where a.DISTRICT_PROVINCIAL = dis.district_code)
provincial,
a.DISTRICT_CITY
city,
(select dis.district_name from ch_fnd_district dis where a.DISTRICT_CITY = dis.district_code)
city,
a.DISTRICT_AREA area,
a.DISTRICT_AREA area,
a.REAL_NAME name,
a.REAL_NAME name,
a.birthday birthday,
a.birthday birthday,
a.CERTI_CODE certiCode,
a.CERTI_CODE certiCode,
a.TREATMENT_TYPE treatmentTyte,
a.TREATMENT_TYPE treatmentTyte,
a.OPER_NAME operName,
a.OPER_NAME operName,
a.gender
gender,
DECODE(a.gender, 'M','男','F', '女','N', '不确定')
gender,
a.OPER_CERTI_CODE operCertiCode,
a.OPER_CERTI_CODE operCertiCode,
a.tel tel,
a.tel tel,
a.fixed_tel fixedTel,
a.fixed_tel fixedTel,
m.MODE_NAME srvModeName,
m.MODE_NAME srvModeName,
a.DISE_TYPE_S diseTypeS,
a.DISE_TYPE_S diseTypeS,
a.eff_time
effTime,
to_char(a.eff_time,'yyyy-MM-dd HH24:mi:ss')
effTime,
a.data_from
dataFrom,
DECODE(a.data_from, '1','核心','2', '手机端','3', '待遇申请')
dataFrom,
a.APPLY_STATUS applyStatus,
a.APPLY_STATUS applyStatus,
a.APPLY_METHOD applyMethod
a.APPLY_METHOD applyMethod
from CH_DISABLE_APPLY a
from CH_DISABLE_APPLY a
...
...
apply/apply-service/src/main/resources/mapper/ChSrvOrganEmpMapper.xml
View file @
d70c022f
...
@@ -85,4 +85,60 @@
...
@@ -85,4 +85,60 @@
</where>
</where>
ORDER BY T1.EFF_TIME DESC
ORDER BY T1.EFF_TIME DESC
</select>
</select>
<select
id=
"getSrvOrganEmpExportList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo"
>
SELECT
T1.EMP_ID empId,
T1.SRV_ORGAN_ID srvOrganId,
T1.ORGAN_ID organId,
T4.SRV_ORGAN_NAME srvOrganName,
T5.ORGAN_NAME organName,
T4.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
T1.EMP_NAME empName,
T1.GENDER gender,
T1.AGE age,
T1.CERTIF_TYPE certifType,
T1.CERTIF_NUM certifNum,
T1.MOBILE_PHONE mobilePhone,
T1.EMP_TYPE_ID empTypeId,
T1.EDU_ID eduId,
T1.EMP_TYPE empType,
T1.IS_LOCK isLock,
T1.EFF_TIME effTime,
(select dis.district_name from ch_fnd_district dis where T4.DISTRICT_PROVINCIAL = dis.district_code) provincial,
(select dis.district_name from ch_fnd_district dis where T4.DISTRICT_CITY = dis.district_code) city,
T4.BUNK bunk,
T4.LINK_NAME linkName,
T4.LINK_TEL linkTel
FROM CH_SRV_ORGAN_EMP T1
LEFT JOIN CH_SRV_ORGAN T4 ON T1.SRV_ORGAN_ID = T4.SRV_ORGAN_ID
LEFT JOIN CH_FND_ORGAN T5 ON T1.ORGAN_ID = T5.ORGAN_ID
<where>
<if
test=
"organIds != null and organIds.size() > 0"
>
AND T1.ORGAN_ID IN
<foreach
collection=
"organIds"
separator=
","
close=
")"
open=
"("
item=
"organId"
>
#{organId}
</foreach>
</if>
<if
test=
"empName != null and empName != ''"
>
AND T1.EMP_NAME LIKE CONCAT('%',CONCAT(#{empName},'%'))
</if>
<if
test=
"srvOrganName != null and srvOrganName != ''"
>
AND T4.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{srvOrganName},'%'))
</if>
<if
test=
"certifNum != null and certifNum != ''"
>
AND T1.CERTIF_NUM = #{certifNum}
</if>
<if
test=
"isLock != null"
>
AND T1.IS_LOCK = #{isLock}
</if>
<if
test=
"empType != null"
>
AND T1.EMP_TYPE = #{empType}
</if>
</where>
ORDER BY T1.EFF_TIME DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
View file @
d70c022f
...
@@ -11,14 +11,18 @@ import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
...
@@ -11,14 +11,18 @@ import com.hungraim.ltc.pojo.vo.ReportUpdateVO;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TppesApiException
;
import
com.hungraim.ltc.service.TppesApiException
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
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
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -654,4 +658,24 @@ public class TaskController {
...
@@ -654,4 +658,24 @@ public class TaskController {
}
}
return
Result
.
failed
(
"没有查到日常生活活动能力数据"
);
return
Result
.
failed
(
"没有查到日常生活活动能力数据"
);
}
}
/**
* 评定人员导出
*
* @param provincial 失能人员所在省
* @param city 失能人员所在市
* @param area 失能人员所在区
* @param organName 评定机构名称
* @param name 评定人员姓名
* @param tel 评定人员手机号码
* @param groupLeader 是否组长0组长,1非组长
*/
@GetMapping
(
"/aprEmpExport"
)
public
void
aprEmpExport
(
String
provincial
,
String
city
,
String
area
,
String
organName
,
String
name
,
String
tel
,
String
groupLeader
,
HttpServletResponse
response
){
Workbook
workbook
=
taskService
.
aprEmpExport
(
provincial
,
city
,
area
,
organName
,
name
,
tel
,
groupLeader
);
// 命名表格
String
fileName
=
"aprEmp.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/dao/TaskMapper.java
View file @
d70c022f
...
@@ -61,4 +61,6 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
...
@@ -61,4 +61,6 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
Page
<
ReTaskDistributionVO
>
reTaskDistributionList
(
Page
<
ReTaskDistributionVO
>
page
,
@Param
(
"organIds"
)
List
<
Long
>
organIds
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
);
Page
<
ReTaskDistributionVO
>
reTaskDistributionList
(
Page
<
ReTaskDistributionVO
>
page
,
@Param
(
"organIds"
)
List
<
Long
>
organIds
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
);
Page
<
TaskGroupInfoByPageVO
>
taskGroupInfoListByPage
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNo
,
Integer
pageNo
,
Integer
pageSize
);
Page
<
TaskGroupInfoByPageVO
>
taskGroupInfoListByPage
(
String
aprEmpId
,
String
appointStartTime
,
String
appointEndTime
,
String
queryBeginDate
,
String
queryEndDate
,
String
groupNo
,
Integer
pageNo
,
Integer
pageSize
);
List
<
AprEmpExportVO
>
aprEmpExportList
(
String
provincial
,
String
city
,
String
area
,
String
organName
,
String
name
,
String
tel
,
String
groupLeader
);
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/TaskService.java
View file @
d70c022f
...
@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.entity.assessment.*;
...
@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.entity.assessment.*;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -84,4 +85,6 @@ public interface TaskService {
...
@@ -84,4 +85,6 @@ public interface TaskService {
IPage
<
ChAprTask
>
apprTaskDetailInfo
(
String
appointStartTime
,
String
appointEndTime
,
String
status
,
String
taskGroupNo
,
Integer
pageNo
,
Integer
pageSize
)
throws
TppesApiException
;
IPage
<
ChAprTask
>
apprTaskDetailInfo
(
String
appointStartTime
,
String
appointEndTime
,
String
status
,
String
taskGroupNo
,
Integer
pageNo
,
Integer
pageSize
)
throws
TppesApiException
;
Map
taskReportFractionDtlQueryList
();
Map
taskReportFractionDtlQueryList
();
Workbook
aprEmpExport
(
String
provincial
,
String
city
,
String
area
,
String
organName
,
String
name
,
String
tel
,
String
groupLeader
);
}
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
service
.
impl
;
package
com
.
hungraim
.
ltc
.
service
.
impl
;
import
cn.afterturn.easypoi.excel.ExcelExportUtil
;
import
cn.afterturn.easypoi.excel.entity.ExportParams
;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -14,6 +17,7 @@ import com.hungraim.ltc.pojo.entity.assessment.*;
...
@@ -14,6 +17,7 @@ import com.hungraim.ltc.pojo.entity.assessment.*;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.service.ChAprReportFractionService
;
import
com.hungraim.ltc.service.ChAprReportFractionService
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TaskService
;
...
@@ -25,6 +29,7 @@ import com.hungraim.ltc.util.SerialNumberUtils;
...
@@ -25,6 +29,7 @@ import com.hungraim.ltc.util.SerialNumberUtils;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.beans.BeanUtils
;
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
;
...
@@ -708,4 +713,25 @@ public class TaskServiceImpl implements TaskService {
...
@@ -708,4 +713,25 @@ public class TaskServiceImpl implements TaskService {
};
};
return
typeHashMap
;
return
typeHashMap
;
}
}
@Override
public
Workbook
aprEmpExport
(
String
provincial
,
String
city
,
String
area
,
String
organName
,
String
name
,
String
tel
,
String
groupLeader
)
{
List
<
AprEmpExportVO
>
aprEmpExportList
=
taskMapper
.
aprEmpExportList
(
provincial
,
city
,
area
,
organName
,
name
,
tel
,
groupLeader
);
for
(
AprEmpExportVO
record
:
aprEmpExportList
)
{
StringBuilder
stringBuilder
=
new
StringBuilder
();
if
(
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
record
.
getDistrictProvincial
())){
stringBuilder
.
append
(
"--"
);
}
else
if
(
record
.
getDistrictProvincial
().
equals
(
record
.
getDistrictCity
())){
stringBuilder
.
append
(
record
.
getDistrictProvincial
());
}
else
{
stringBuilder
.
append
(
record
.
getDistrictProvincial
()).
append
(
record
.
getDistrictCity
());
}
record
.
setDistrictProvincial
(
stringBuilder
.
toString
());
}
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
AprEmpExportVO
.
class
,
aprEmpExportList
);
return
workbook
;
}
}
}
assessment/assessment-service/src/main/resources/mapper/ChDisableEvaluateMapper.xml
View file @
d70c022f
...
@@ -449,4 +449,49 @@
...
@@ -449,4 +449,49 @@
</select>
</select>
<select
id=
"aprEmpExportList"
resultType=
"com.hungraim.ltc.pojo.vo.assessment.AprEmpExportVO"
>
SELECT emp.emp_id empId,
srvOrgan.srv_organ_name srvOrganName,
organ.organ_code organCode,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
organ.organ_name organName,
organ.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
emp.real_name realName,
DECODE(emp.gender, 'M','男','F', '女','N', '不确定') gender,
emp.AGE age,
emp.certi_code certiCode,
emp.tel tel,
DECODE(emp.Group_leader, '0','组长','1', '非组长') groupLeader
FROM ch_apr_emp emp
LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id
<where>
<if
test=
"provincial != null and provincial != ''"
>
and (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) = #{provincial}
</if>
<if
test=
"city != null and city != ''"
>
and (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_CITY = dis.DISTRICT_CODE) = #{city}
</if>
<if
test=
"area != null and area != ''"
>
and (SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE organ.DISTRICT_AREA = dis.DISTRICT_CODE) = #{area}
</if>
<if
test=
"organName != null and organName != ''"
>
and organ.organ_name like CONCAT(CONCAT('%',#{organName}) ,'%')
</if>
<if
test=
"name != null and name != ''"
>
and emp.real_name like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if
test=
"tel != null and tel != ''"
>
and emp.tel = #{tel}
</if>
<if
test=
"groupLeader != null and groupLeader != ''"
>
and emp.group_leader = #{groupLeader}
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/AprEmpExportVO.java
0 → 100644
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
assessment
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
lombok.Data
;
/**
*
*/
/**
* @author zwl
* @ClassName SrvOrganEmpExportVo
* @description 评定人员导出
* @date 2023/1/12 21:03
**/
@Data
public
class
AprEmpExportVO
{
@Excel
(
name
=
"适用机构"
,
width
=
20
)
private
String
srvOrganName
;
@Excel
(
name
=
"所在省市"
,
width
=
20
)
private
String
districtProvincial
;
@Excel
(
name
=
"评定机构名称"
,
width
=
20
)
private
String
organName
;
//
@Excel
(
name
=
"统一社会信用代码"
,
width
=
20
)
private
String
unifiedSocialCreditCode
;
@Excel
(
name
=
"评定人员名称"
,
width
=
20
)
private
String
realName
;
@Excel
(
name
=
"评定人员性别"
)
private
String
gender
;
@Excel
(
name
=
"评定人员年龄"
)
private
String
age
;
@Excel
(
name
=
"评定人员身份证号码"
,
width
=
20
)
private
String
certiCode
;
@Excel
(
name
=
"评定人员手机号码"
,
width
=
20
)
private
String
tel
;
@Excel
(
name
=
"是否组长"
)
private
String
groupLeader
;
private
String
districtCity
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/DisableExportVO.java
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* @author zwl
* @author zwl
...
@@ -17,46 +15,39 @@ import java.util.Date;
...
@@ -17,46 +15,39 @@ import java.util.Date;
@Data
@Data
public
class
DisableExportVO
implements
Serializable
{
public
class
DisableExportVO
implements
Serializable
{
//失能人员姓名
@Excel
(
name
=
"所在省市"
)
@Excel
(
name
=
"失能人员姓名"
)
private
String
provinCialcityArea
;
private
String
name
;
//失能人员身份证号码
@Excel
(
name
=
"身份证号码"
)
private
String
certiCode
;
@Excel
(
name
=
"失能人员姓名"
,
width
=
20
)
private
String
name
;
//性别
@Excel
(
name
=
"性别"
)
@Excel
(
name
=
"性别"
)
private
String
gender
;
private
String
gender
;
//联系人姓名
@Excel
(
name
=
"出生日期"
,
exportFormat
=
"yyyy-MM-dd"
,
width
=
15
)
@Excel
(
name
=
"联系人姓名"
)
private
String
birthday
;
private
String
opername
;
@Excel
(
name
=
"失能人员身份证号码"
,
width
=
25
)
private
String
certiCode
;
//失能人员手机号
@Excel
(
name
=
"失能人员联系方式"
,
width
=
20
)
@Excel
(
name
=
"手机号码"
)
private
String
tel
;
private
String
tel
;
//失能人员固话
@Excel
(
name
=
"申请服务方式"
)
@Excel
(
name
=
"座机号码"
)
private
String
srvModeName
;
private
String
fixedtel
;
@Excel
(
name
=
"地址"
)
/* @Excel(name = "诊断疾病" ,width = 20
)
private
String
provinCialcityArea
;
private String
disease;*/
@Excel
(
name
=
"申请时间"
,
width
=
20
)
private
String
effTime
;
//申请来源 网厅:0,核心:1,手机端:2,待遇申请:3
@Excel
(
name
=
"申请来源"
)
@Excel
(
name
=
"来源"
)
private
String
dataFrom
;
private
String
dataFrom
;
// 申请类别
private
String
provincial
;
@Excel
(
name
=
"申请类别"
)
private
Integer
applyMethod
;
//申请服务方式
private
String
city
;
@Excel
(
name
=
"申请服务方式"
)
private
String
srvModeName
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/SrvOrganEmpExportVo.java
0 → 100644
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName SrvOrganEmpExportVo
* @description 护理人员导出列表
* @date 2023/1/12 20:07
**/
@Data
public
class
SrvOrganEmpExportVo
{
@Excel
(
name
=
"适用机构名称"
,
width
=
20
)
private
String
organName
;
@Excel
(
name
=
"机构地址"
,
width
=
20
)
private
String
provinCialcityArea
;
@Excel
(
name
=
"护理机构名称"
,
width
=
20
)
private
String
srvOrganName
;
@Excel
(
name
=
"统一社会信用代码"
,
width
=
20
)
private
String
unifiedSocialCreditCode
;
@Excel
(
name
=
"联系人姓名"
,
width
=
20
)
private
String
linkName
;
@Excel
(
name
=
"联系人电话"
,
width
=
20
)
private
String
linkTel
;
@Excel
(
name
=
"床位数"
)
private
String
bunk
;
private
String
provincial
;
private
String
city
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SuperviseOrganEmpExportVO.java
0 → 100644
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName SrvOrganEmpExportVo
* @description 监管机构人员信息导出列表
* @date 2023/1/12 21:56
**/
@Data
public
class
SuperviseOrganEmpExportVO
{
@Excel
(
name
=
"适用机构"
,
width
=
20
)
private
String
organName
;
@Excel
(
name
=
"监管机构名称"
,
width
=
20
)
private
String
spvOrganName
;
@Excel
(
name
=
"监管人员姓名"
,
width
=
20
)
private
String
spvEmpName
;
// @Excel(name = "证件类型",width = 20)
// private String certifType;
@Excel
(
name
=
"监管人员证件号码"
,
width
=
20
)
private
String
certifNum
;
@Excel
(
name
=
"监管人员手机号"
,
width
=
20
)
private
String
mobilePhone
;
/**
* 人员类型 监管人员:0;管理人员:1
*/
@Excel
(
name
=
"监管人员类型"
,
width
=
20
)
private
String
spvEmpType
;
/**
* 状态 有效:0;失效:1
*/
@Excel
(
name
=
"状态"
)
private
String
isLock
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/FileUtils.java
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
util
;
package
com
.
hungraim
.
ltc
.
util
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -54,4 +57,27 @@ public class FileUtils {
...
@@ -54,4 +57,27 @@ public class FileUtils {
}
}
/**
*@author zwl
*@desc 导出返回设置
*@date 2023/1/12
*@param * @param workbook
* @param fileName
* @param response
*@return void
**/
public
static
void
exportResponse
(
Workbook
workbook
,
String
fileName
,
HttpServletResponse
response
){
try
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setHeader
(
"content-Type"
,
"application/vnd.ms-excel"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 输出流
workbook
.
write
(
response
.
getOutputStream
());
// 清除response
response
.
flushBuffer
();
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
());
}
}
}
}
governance/src/main/java/com/hungraim/ltc/governance/controller/SuperviseOrganEmpController.java
View file @
d70c022f
...
@@ -9,13 +9,17 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp;
...
@@ -9,13 +9,17 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp;
import
com.hungraim.ltc.pojo.vo.governance.ChSuperviseOrganEmpVo
;
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.FileUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
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
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -200,4 +204,23 @@ public class SuperviseOrganEmpController {
...
@@ -200,4 +204,23 @@ public class SuperviseOrganEmpController {
ChSuperviseOrgan
superviseOrgan
=
superviseOrganEmpService
.
getSuperviseOrgan
(
spvOrganId
);
ChSuperviseOrgan
superviseOrgan
=
superviseOrganEmpService
.
getSuperviseOrgan
(
spvOrganId
);
return
Result
.
success
(
superviseOrgan
);
return
Result
.
success
(
superviseOrgan
);
}
}
/**
* 监管机构人员导出
* @param organId 适用机构id
* @param organName 监管机构名称
* @param spvEmpType 监管人员类型 监管人员:0;管理人员:1
* @param spvEmpName 监管人员姓名
* @param mobilePhone 监管人员手机号
* @param isLock 状态 有效:0;失效:1
*/
@GetMapping
(
"/superviseOrganEmpExport"
)
public
void
superviseOrganEmpExport
(
Long
organId
,
Boolean
isInvolveChild
,
String
organName
,
String
spvEmpType
,
String
spvEmpName
,
String
mobilePhone
,
String
isLock
,
HttpServletResponse
response
){
Workbook
workbook
=
superviseOrganEmpService
.
superviseOrganEmpExport
(
organId
,
isInvolveChild
,
organName
,
spvEmpType
,
spvEmpName
,
mobilePhone
,
isLock
);
// 命名表格
String
fileName
=
"superviseOrganEmp.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
}
}
governance/src/main/java/com/hungraim/ltc/governance/dao/SuperviseOrganEmpMapper.java
View file @
d70c022f
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.dao;
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpExportVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -13,4 +14,6 @@ import java.util.List;
...
@@ -13,4 +14,6 @@ import java.util.List;
@Repository
@Repository
public
interface
SuperviseOrganEmpMapper
extends
BaseMapper
<
ChSuperviseOrganEmp
>
{
public
interface
SuperviseOrganEmpMapper
extends
BaseMapper
<
ChSuperviseOrganEmp
>
{
Page
<
SuperviseOrganEmpVO
>
superviseOrganEmpList
(
Page
<
SuperviseOrganEmpVO
>
page
,
List
<
Long
>
organIds
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
);
Page
<
SuperviseOrganEmpVO
>
superviseOrganEmpList
(
Page
<
SuperviseOrganEmpVO
>
page
,
List
<
Long
>
organIds
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
);
List
<
SuperviseOrganEmpExportVO
>
superviseOrganEmpExportList
(
List
<
Long
>
organIds
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/SuperviseOrganEmpService.java
View file @
d70c022f
...
@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp;
...
@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSuperviseOrganEmp;
import
com.hungraim.ltc.pojo.vo.governance.ChSuperviseOrganEmpVo
;
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.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
@@ -42,4 +43,6 @@ public interface SuperviseOrganEmpService extends IService<ChSuperviseOrgan> {
...
@@ -42,4 +43,6 @@ public interface SuperviseOrganEmpService extends IService<ChSuperviseOrgan> {
* @return 返回监管人员详情
* @return 返回监管人员详情
*/
*/
ChSuperviseOrganEmpVo
getSuperviseOrganEmp
(
Long
spvEmpId
);
ChSuperviseOrganEmpVo
getSuperviseOrganEmp
(
Long
spvEmpId
);
Workbook
superviseOrganEmpExport
(
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SuperviseOrganServiceImpl.java
View file @
d70c022f
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
cn.afterturn.easypoi.excel.ExcelExportUtil
;
import
cn.afterturn.easypoi.excel.entity.ExportParams
;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hungraim.ltc.api.OrganFeignService
;
import
com.hungraim.ltc.api.OrganFeignService
;
...
@@ -9,11 +12,13 @@ import com.hungraim.ltc.governance.service.SuperviseOrganEmpService;
...
@@ -9,11 +12,13 @@ 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.ChSuperviseOrganEmpVo
;
import
com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpExportVO
;
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.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -116,4 +121,13 @@ public class SuperviseOrganServiceImpl extends ServiceImpl<SuperviseOrganMapper,
...
@@ -116,4 +121,13 @@ public class SuperviseOrganServiceImpl extends ServiceImpl<SuperviseOrganMapper,
chSuperviseOrganEmpVo
.
setOrganId
(
chSuperviseOrgan
.
getOrganId
());
chSuperviseOrganEmpVo
.
setOrganId
(
chSuperviseOrgan
.
getOrganId
());
return
chSuperviseOrganEmpVo
;
return
chSuperviseOrganEmpVo
;
}
}
@Override
public
Workbook
superviseOrganEmpExport
(
Long
organId
,
Boolean
isIncluded
,
String
organName
,
String
superviseType
,
String
superviseName
,
String
superviseTel
,
String
status
)
{
List
<
SuperviseOrganEmpExportVO
>
superviseOrganEmpVOS
=
superviseOrganEmpMapper
.
superviseOrganEmpExportList
(
getOrganIds
(
organId
,
isIncluded
),
organName
,
superviseType
,
superviseName
,
superviseTel
,
status
);
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
SuperviseOrganEmpExportVO
.
class
,
superviseOrganEmpVOS
);
return
workbook
;
}
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SuperviseOrganEmpMapper.xml
View file @
d70c022f
...
@@ -59,4 +59,61 @@
...
@@ -59,4 +59,61 @@
ORDER BY emp.EFF_TIME desc
ORDER BY emp.EFF_TIME desc
</select>
</select>
<select
id=
"superviseOrganEmpExportList"
resultType=
"com.hungraim.ltc.pojo.vo.governance.SuperviseOrganEmpExportVO"
>
SELECT--监管人员id
emp.spv_emp_id spvEmpId,
--监管机构id
emp.spv_organ_id spvOrganId,
--适用机构
organ.ORGAN_NAME organName,
--机构代码
sOrgan.ORGAN_ID organId,
--监管机构名称
sOrgan.SPV_ORGAN_NAME spvOrganName,
--姓名
emp.SPV_EMP_NAME spvEmpName,
--证件类型
emp.CERTIF_TYPE certifType,
--监管人员证件号码
emp.CERTIF_NUM certifNum,
--监管人员手机号
emp.MOBILE_PHONE mobilePhone,
--人员类型 监管人员:0;管理人员:1
DECODE(emp.SPV_EMP_TYPE, '0','监管人员','1', '管理人员') spvEmpType,
--状态 有效:0;失效:1
DECODE(emp.IS_LOCK, '0','有效','1', '失效') isLock
FROM
--监管人员信息
ch_supervise_organ_emp emp
--监管机构
LEFT JOIN ch_supervise_organ sOrgan ON emp.spv_organ_id = sOrgan.spv_organ_id
--机构定义表
LEFT JOIN CH_FND_ORGAN organ ON sOrgan.organ_id = organ.organ_id
<where>
<if
test=
"organIds != null"
>
and organ.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}
</if>
<if
test=
"superviseType != null and superviseType != ''"
>
and emp.SPV_EMP_TYPE = #{superviseType}
</if>
<if
test=
"superviseName != null and superviseName != ''"
>
and emp.SPV_EMP_NAME LIKE CONCAT('%',CONCAT( #{superviseName} ,'%'))
</if>
<if
test=
"superviseTel != null and superviseTel != ''"
>
and emp.MOBILE_PHONE = #{superviseTel}
</if>
<if
test=
'status != null and status != ""'
>
and emp.IS_LOCK = #{status}
</if>
</where>
ORDER BY emp.EFF_TIME desc
</select>
</mapper>
</mapper>
\ No newline at end of file
pom.xml
View file @
d70c022f
...
@@ -61,6 +61,25 @@
...
@@ -61,6 +61,25 @@
</dependency>
</dependency>
<!--Excel导入导出-->
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-web
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-annotation
</artifactId>
<version>
4.1.0
</version>
</dependency>
</dependencies>
</dependencies>
<dependencyManagement>
<dependencyManagement>
...
...
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