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
ad25a77b
Commit
ad25a77b
authored
Apr 13, 2023
by
zengxiaoli@yeah.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.录入护理人员初始化密码ch123456
2.打卡列表查询加三个检索条件(失能人员姓名,状态,服务时间) 3.打卡列表加导出功能 4.修改护理人员数据状态前加控制。只能存在一条有效数据
parent
0637dab4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
106 additions
and
19 deletions
+106
-19
SrvOrganController.java
.../java/com/hungraim/ltc/controller/SrvOrganController.java
+14
-7
ChSrvTaskDetailMapper.java
...main/java/com/hungraim/ltc/dao/ChSrvTaskDetailMapper.java
+8
-1
SrvOrganEmpService.java
...ain/java/com/hungraim/ltc/service/SrvOrganEmpService.java
+4
-2
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+26
-5
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+37
-0
ChSrvOrganEmp.java
...hungraim/ltc/pojo/entity/serviceManage/ChSrvOrganEmp.java
+7
-0
ChSrvTaskDetail2Vo.java
.../com/hungraim/ltc/pojo/vo/disable/ChSrvTaskDetail2Vo.java
+10
-4
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/controller/SrvOrganController.java
View file @
ad25a77b
...
@@ -195,17 +195,16 @@ public class SrvOrganController {
...
@@ -195,17 +195,16 @@ public class SrvOrganController {
* @return 返回操作状态
* @return 返回操作状态
*/
*/
@PutMapping
(
"/status"
)
@PutMapping
(
"/status"
)
public
Result
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
)
{
public
Result
<
String
>
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
)
{
if
(
null
==
empId
||
null
==
isLock
)
{
if
(
null
==
empId
||
null
==
isLock
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
srvOrganEmpService
.
updateSrvEmpStatus
(
empId
,
isLock
);
int
result
=
srvOrganEmpService
.
updateSrvEmpStatus
(
empId
,
isLock
,
"420101992002253290"
);
return
Result
.
success
();
return
Result
.
success
(
result
>
0
?
""
:
"修改状态失败,请检查是否已存在有效数据"
);
}
}
/**
/**
* 获取护理人员类别信息
* 获取护理人员类别信息
*
* @return 返回护理人员类别列表
* @return 返回护理人员类别列表
*/
*/
@GetMapping
(
"/srvEmpCateList"
)
@GetMapping
(
"/srvEmpCateList"
)
...
@@ -288,15 +287,24 @@ public class SrvOrganController {
...
@@ -288,15 +287,24 @@ public class SrvOrganController {
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
}
@GetMapping
(
"/chSrvTaskDetailExport"
)
public
void
chSrvTaskDetailExport
(
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
,
HttpServletResponse
response
){
Workbook
workbook
=
srvOrganEmpService
.
chSrvTaskDetailExport
(
empId
,
empName
,
status
,
sevrTime
);
// 命名表格
String
fileName
=
"护理人员打卡记录导出.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
/**
/**
* 打卡查询
* 打卡查询
* @param empId
* @param empId
* @param status 0未执行 1执行中 2已执行 3已失效 4已完成
* @return
* @return
*/
*/
@GetMapping
(
"/chSrvTaskDetailQuery"
)
@GetMapping
(
"/chSrvTaskDetailQuery"
)
public
Result
chSrvTaskDetailQuery
(
Integer
pageNum
,
Integer
pageSize
,
Long
empId
){
public
Result
chSrvTaskDetailQuery
(
Integer
pageNum
,
Integer
pageSize
,
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
){
Page
<
ChSrvTaskDetail2Vo
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
ChSrvTaskDetail2Vo
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
page
=
srvOrganEmpService
.
chSrvTaskDetailQuery
(
page
,
empId
);
page
=
srvOrganEmpService
.
chSrvTaskDetailQuery
(
page
,
empId
,
empName
,
status
,
sevrTime
);
if
(
page
.
getSize
()>
0
){
if
(
page
.
getSize
()>
0
){
return
Result
.
success
(
page
);
return
Result
.
success
(
page
);
}
else
{
}
else
{
...
@@ -313,7 +321,6 @@ public class SrvOrganController {
...
@@ -313,7 +321,6 @@ public class SrvOrganController {
@PostMapping
(
"/chSrvTaskDetailDelete"
)
@PostMapping
(
"/chSrvTaskDetailDelete"
)
public
Result
chSrvTaskDetailDelete
(
Long
taskDetailId
,
String
userName
){
public
Result
chSrvTaskDetailDelete
(
Long
taskDetailId
,
String
userName
){
return
srvOrganEmpService
.
chSrvTaskDetailDelete
(
taskDetailId
,
userName
);
return
srvOrganEmpService
.
chSrvTaskDetailDelete
(
taskDetailId
,
userName
);
}
}
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvTaskDetailMapper.java
View file @
ad25a77b
...
@@ -6,10 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -6,10 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo
;
import
com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
/**
...
@@ -24,7 +26,8 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
...
@@ -24,7 +26,8 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
* @param empId
* @param empId
* @return
* @return
*/
*/
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
);
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
);
int
deleteFinshItem
(
long
taskDetailId
);
int
deleteFinshItem
(
long
taskDetailId
);
...
@@ -35,6 +38,10 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
...
@@ -35,6 +38,10 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
ChDisabDetailAccounts
selectAccountsDetail
(
String
disabInfoId
,
String
srvDateStr
);
ChDisabDetailAccounts
selectAccountsDetail
(
String
disabInfoId
,
String
srvDateStr
);
void
updateChDisabDetailAccounts
(
Long
accountsId
,
BigDecimal
accountsAllCostsub
,
BigDecimal
accountsOverallCostsub
,
BigDecimal
accountsPersonalCostsub
);
void
updateChDisabDetailAccounts
(
Long
accountsId
,
BigDecimal
accountsAllCostsub
,
BigDecimal
accountsOverallCostsub
,
BigDecimal
accountsPersonalCostsub
);
List
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailExportList
(
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/SrvOrganEmpService.java
View file @
ad25a77b
...
@@ -35,7 +35,7 @@ public interface SrvOrganEmpService {
...
@@ -35,7 +35,7 @@ public interface SrvOrganEmpService {
* @param isLock 状态 0-有效;1-失效;
* @param isLock 状态 0-有效;1-失效;
* @return 返回操作状态
* @return 返回操作状态
*/
*/
void
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
);
int
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
,
String
certifNum
);
/**
/**
* 获取护理人员相关信息
* 获取护理人员相关信息
...
@@ -70,7 +70,9 @@ public interface SrvOrganEmpService {
...
@@ -70,7 +70,9 @@ public interface SrvOrganEmpService {
Workbook
srvOrganExport
(
Long
organId
,
Long
srvOrganId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Workbook
srvOrganExport
(
Long
organId
,
Long
srvOrganId
,
Boolean
isInvolveChild
,
String
empName
,
String
srvOrganName
,
String
certifNum
,
Short
isLock
,
Short
empType
);
Short
isLock
,
Short
empType
);
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
);
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
);
Result
chSrvTaskDetailDelete
(
long
taskDetailId
,
String
userName
);
Result
chSrvTaskDetailDelete
(
long
taskDetailId
,
String
userName
);
Workbook
chSrvTaskDetailExport
(
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
ad25a77b
...
@@ -73,11 +73,23 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -73,11 +73,23 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
}
}
@Override
@Override
public
void
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
)
{
public
int
updateSrvEmpStatus
(
Long
empId
,
Short
isLock
,
String
certifNum
)
{
int
queryResult
=
0
;
//修改成有效状态前检查是否存在有效数据。存在则不允许修改
if
(
isLock
==
0
){
QueryWrapper
<
ChSrvOrganEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"CERTIF_NUM"
,
certifNum
);
queryWrapper
.
eq
(
"IS_LOCK"
,
0
);
queryResult
=
chSrvOrganEmpMapper
.
selectCount
(
queryWrapper
);
if
(
queryResult
>
0
){
return
0
;
}
}
ChSrvOrganEmp
chSrvOrganEmp
=
new
ChSrvOrganEmp
();
ChSrvOrganEmp
chSrvOrganEmp
=
new
ChSrvOrganEmp
();
chSrvOrganEmp
.
setEmpId
(
empId
);
chSrvOrganEmp
.
setEmpId
(
empId
);
chSrvOrganEmp
.
setIsLock
(
isLock
);
chSrvOrganEmp
.
setIsLock
(
isLock
);
chSrvOrganEmpMapper
.
updateById
(
chSrvOrganEmp
);
queryResult
=
chSrvOrganEmpMapper
.
updateById
(
chSrvOrganEmp
);
return
queryResult
;
}
}
@Override
@Override
...
@@ -126,6 +138,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -126,6 +138,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
// 新增
// 新增
chSrvOrganEmp
.
setEffTime
(
new
Date
());
chSrvOrganEmp
.
setEffTime
(
new
Date
());
chSrvOrganEmp
.
setIsLock
((
short
)
0
);
chSrvOrganEmp
.
setIsLock
((
short
)
0
);
chSrvOrganEmp
.
setEmpPwd
(
"ch123456"
);
chSrvOrganEmpMapper
.
insert
(
chSrvOrganEmp
);
chSrvOrganEmpMapper
.
insert
(
chSrvOrganEmp
);
updateAttachs
(
srvOrganEmpVo
,
chSrvOrganEmp
.
getEmpId
());
updateAttachs
(
srvOrganEmpVo
,
chSrvOrganEmp
.
getEmpId
());
...
@@ -161,13 +174,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -161,13 +174,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
ExportParams
exportParams
=
new
ExportParams
();
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
SrvOrganEmpExportVo
.
class
,
srvOrganEmpExportList
);
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
SrvOrganEmpExportVo
.
class
,
srvOrganEmpExportList
);
return
workbook
;
return
workbook
;
}
}
@Override
@Override
public
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
)
{
public
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetail2Vo
>
page
,
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
)
{
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailVoPage
=
chSrvTaskDetailMapper
.
chSrvTaskDetailQuery
(
page
,
empId
);
Page
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailVoPage
=
chSrvTaskDetailMapper
.
chSrvTaskDetailQuery
(
page
,
empId
,
empName
,
status
,
sevrTime
);
chSrvTaskDetailVoPage
.
getRecords
().
stream
().
filter
(
chSrvTaskDetail
->
{
chSrvTaskDetailVoPage
.
getRecords
().
stream
().
filter
(
chSrvTaskDetail
->
{
if
(
null
!=
chSrvTaskDetail
.
getSevStarTime
()){
if
(
null
!=
chSrvTaskDetail
.
getSevStarTime
()){
chSrvTaskDetail
.
setSevStarTime
(
chSrvTaskDetail
.
getSevStarTime
().
substring
(
0
,
19
));
chSrvTaskDetail
.
setSevStarTime
(
chSrvTaskDetail
.
getSevStarTime
().
substring
(
0
,
19
));
...
@@ -227,6 +239,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -227,6 +239,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
}
}
}
}
@Override
public
Workbook
chSrvTaskDetailExport
(
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
)
{
List
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailExportList
=
chSrvTaskDetailMapper
.
chSrvTaskDetailExportList
(
empId
,
empName
,
status
,
sevrTime
);
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
// 对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
ChSrvTaskDetail2Vo
.
class
,
chSrvTaskDetailExportList
);
return
workbook
;
}
/**
/**
* 计算2个时间相差的天数、小时、分钟、秒
* 计算2个时间相差的天数、小时、分钟、秒
* @param startTime 开始时间
* @param startTime 开始时间
...
...
apply/apply-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
ad25a77b
...
@@ -75,6 +75,43 @@
...
@@ -75,6 +75,43 @@
LEFT JOIN CH_SRV_ORGAN_EMP m ON m.EMP_ID = k.SRV_EMP_ID
LEFT JOIN CH_SRV_ORGAN_EMP m ON m.EMP_ID = k.SRV_EMP_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T5.SRV_ORGAN_ID = m.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T5.SRV_ORGAN_ID = m.SRV_ORGAN_ID
WHERE m.EMP_ID = #{empId}
WHERE m.EMP_ID = #{empId}
<if
test=
"empName != null and empName != ''"
>
and info.REAL_NAME like CONCAT(CONCAT('%',#{empName}) ,'%')
</if>
<if
test=
"status != null and status != ''"
>
and t.STATUS = #{status}
</if>
<if
test=
"sevrTime != null and sevrTime != ''"
>
and (TO_char(t.SRV_START_TIME,'yyyy-MM-dd') = #{sevrTime} or TO_char(t.SRV_END_TIME,'yyyy-MM-dd') = #{sevrTime})
</if>
order by t.TASK_DETAIL_ID desc
</select>
<select
id=
"chSrvTaskDetailExportList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo"
>
SELECT
T5.SRV_ORGAN_NAME srvOrganName,
m.EMP_NAME empName,
info.REAL_NAME realName,
t.SRV_START_TIME sevStarTime,
t.SRV_END_TIME sevEndTime,
decode( t.STATUS, '0', '未执行', '1', '执行中', '2', '已执行', '4', '已完成' ) AS status
FROM
CH_SRV_TASK_DETAIL t
LEFT JOIN CH_SRV_TASK k ON t.SRV_TASK_ID = k.SRV_TASK_ID
left join CH_DISABLE_INFO info on info.DISAB_INFO_ID = k.DISAB_INFO_ID
LEFT JOIN CH_SRV_ORGAN_EMP m ON m.EMP_ID = k.SRV_EMP_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T5.SRV_ORGAN_ID = m.SRV_ORGAN_ID
WHERE m.EMP_ID = #{empId}
<if
test=
"empName != null and empName != ''"
>
and info.REAL_NAME like CONCAT(CONCAT('%',#{empName}) ,'%')
</if>
<if
test=
"status != null and status != ''"
>
and t.STATUS = #{status}
</if>
<if
test=
"sevrTime != null and sevrTime != ''"
>
and (TO_char(t.SRV_START_TIME,'yyyy-MM-dd') = #{sevrTime} or TO_char(t.SRV_END_TIME,'yyyy-MM-dd') = #{sevrTime})
</if>
order by t.TASK_DETAIL_ID desc
order by t.TASK_DETAIL_ID desc
</select>
</select>
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/serviceManage/ChSrvOrganEmp.java
View file @
ad25a77b
...
@@ -173,5 +173,11 @@ public class ChSrvOrganEmp implements Serializable {
...
@@ -173,5 +173,11 @@ public class ChSrvOrganEmp implements Serializable {
*/
*/
private
Short
whiteList
;
private
Short
whiteList
;
/**
* 员工密码
*/
private
String
empPwd
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/ChSrvTaskDetail2Vo.java
View file @
ad25a77b
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -11,19 +12,24 @@ public class ChSrvTaskDetail2Vo extends BaseReq {
...
@@ -11,19 +12,24 @@ public class ChSrvTaskDetail2Vo extends BaseReq {
private
Long
taskDetailId
;
private
Long
taskDetailId
;
@Excel
(
name
=
"护理人员姓名"
,
width
=
20
)
private
String
empName
;
private
String
empName
;
private
Integer
orgamId
;
private
Integer
orgamId
;
private
String
srvOrganId
;
private
String
srvOrganId
;
@Excel
(
name
=
"护理机构名称"
,
width
=
20
)
private
String
srvOrganName
;
private
String
srvOrganName
;
@Excel
(
name
=
"状态"
,
width
=
20
)
private
String
status
;
private
String
status
;
@Excel
(
name
=
"服务开始时间"
,
width
=
40
)
private
String
sevStarTime
;
private
String
sevStarTime
;
@Excel
(
name
=
"服务结束时间"
,
width
=
40
)
private
String
sevEndTime
;
private
String
sevEndTime
;
@Excel
(
name
=
"失能人员姓名"
,
width
=
20
)
private
String
realName
;
private
String
realName
;
private
String
sevrTime
;
}
}
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