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
608078e9
Commit
608078e9
authored
Sep 22, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补卡修改
parent
44e1e30a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
168 additions
and
31 deletions
+168
-31
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+14
-0
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+3
-0
ItemRespVO.java
...ain/java/com/hungraim/ltc/pojo/vo/account/ItemRespVO.java
+20
-0
SrvTaskCardRespDTO.java
.../com/hungraim/ltc/pojo/vo/account/SrvTaskCardRespDTO.java
+14
-0
SrvTaskRespVO.java
.../java/com/hungraim/ltc/pojo/vo/account/SrvTaskRespVO.java
+7
-0
SrvTaskController.java
...hungraim/ltc/governance/controller/SrvTaskController.java
+33
-0
SrvTaskService.java
...a/com/hungraim/ltc/governance/service/SrvTaskService.java
+2
-0
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+75
-31
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
608078e9
...
@@ -742,7 +742,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -742,7 +742,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
@Override
public
SrvTaskCardRespDTO
getSrvTaskCardInfo
(
String
taskDetailId
){
public
SrvTaskCardRespDTO
getSrvTaskCardInfo
(
String
taskDetailId
){
List
<
SrvTaskRespVO
>
records
=
taskDetailMapper
.
getSrvTaskCardInfo
(
taskDetailId
);
List
<
SrvTaskRespVO
>
records
=
taskDetailMapper
.
getSrvTaskCardInfo
(
taskDetailId
);
List
<
ItemRespVO
>
itemRespVOS
=
new
ArrayList
<>();
for
(
SrvTaskRespVO
record
:
records
)
{
ItemRespVO
itemRespVO
=
new
ItemRespVO
();
itemRespVO
.
setItemId
(
record
.
getItemId
());
itemRespVO
.
setItemName
(
record
.
getItemName
());
itemRespVOS
.
add
(
itemRespVO
);
}
SrvTaskCardRespDTO
srvTaskCardRespDTO
=
new
SrvTaskCardRespDTO
();
SrvTaskCardRespDTO
srvTaskCardRespDTO
=
new
SrvTaskCardRespDTO
();
srvTaskCardRespDTO
.
setItemsList
(
itemRespVOS
);
List
<
String
>
collect
=
records
.
stream
().
map
(
SrvTaskRespVO:
:
getItemName
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
records
.
stream
().
map
(
SrvTaskRespVO:
:
getItemName
).
collect
(
Collectors
.
toList
());
String
join
=
StringUtils
.
join
(
collect
,
","
);
String
join
=
StringUtils
.
join
(
collect
,
","
);
srvTaskCardRespDTO
.
setItemName
(
join
);
srvTaskCardRespDTO
.
setItemName
(
join
);
...
@@ -754,7 +762,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -754,7 +762,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
srvTaskCardRespDTO
.
setAuditor
(
records
.
get
(
0
).
getAuditor
());
srvTaskCardRespDTO
.
setAuditor
(
records
.
get
(
0
).
getAuditor
());
srvTaskCardRespDTO
.
setStatus
(
records
.
get
(
0
).
getStatus
());
srvTaskCardRespDTO
.
setStatus
(
records
.
get
(
0
).
getStatus
());
srvTaskCardRespDTO
.
setReason
(
records
.
get
(
0
).
getReason
());
srvTaskCardRespDTO
.
setReason
(
records
.
get
(
0
).
getReason
());
srvTaskCardRespDTO
.
setSrvOrganId
(
records
.
get
(
0
).
getSrvOrganId
());
srvTaskCardRespDTO
.
setModeId
(
records
.
get
(
0
).
getModeId
());
srvTaskCardRespDTO
.
setEmpId
(
records
.
get
(
0
).
getEmpId
());
srvTaskCardRespDTO
.
setAuditRemark
(
records
.
get
(
0
).
getAuditRemark
());
srvTaskCardRespDTO
.
setAuditRemark
(
records
.
get
(
0
).
getAuditRemark
());
srvTaskCardRespDTO
.
setTaskDetailId
(
records
.
get
(
0
).
getTaskDetailId
());
srvTaskCardRespDTO
.
setDisabInfoId
(
records
.
get
(
0
).
getDisabInfoId
());
srvTaskCardRespDTO
.
setSrvTaskId
(
Long
.
parseLong
(
records
.
get
(
0
).
getSrvTaskId
()));
Result
<
List
<
ChFndAttach
>>
listResult
=
attachFeignService
.
selectAttachs
(
Long
.
valueOf
(
taskDetailId
),
AttachType
.
DISABLE
.
getUploadType
());
Result
<
List
<
ChFndAttach
>>
listResult
=
attachFeignService
.
selectAttachs
(
Long
.
valueOf
(
taskDetailId
),
AttachType
.
DISABLE
.
getUploadType
());
if
(
listResult
.
getCode
().
equals
(
ResultCode
.
SUCCESS
.
getCode
()))
{
if
(
listResult
.
getCode
().
equals
(
ResultCode
.
SUCCESS
.
getCode
()))
{
srvTaskCardRespDTO
.
setFileDataList
(
listResult
.
getData
());
srvTaskCardRespDTO
.
setFileDataList
(
listResult
.
getData
());
...
...
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
608078e9
...
@@ -98,6 +98,9 @@
...
@@ -98,6 +98,9 @@
detail.check_status status,
detail.check_status status,
detail.clock_reason reason,
detail.clock_reason reason,
detail.auditor,
detail.auditor,
detail.srv_task_id srvTaskId,
detail.task_detail_id taskDetailId,
info.srv_mode_id modeId,
detail.audit_remark auditRemark
detail.audit_remark auditRemark
from ch_srv_plan plan
from ch_srv_plan plan
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/ItemRespVO.java
0 → 100644
View file @
608078e9
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName ItemRespVO
* @description
* @date 2023/9/21 20:57
**/
@Data
public
class
ItemRespVO
{
// 任务名称
private
String
itemName
;
// 任务名称
private
Long
itemId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvTaskCardRespDTO.java
View file @
608078e9
...
@@ -23,12 +23,23 @@ public class SrvTaskCardRespDTO {
...
@@ -23,12 +23,23 @@ public class SrvTaskCardRespDTO {
// 护理人员
// 护理人员
private
String
empName
;
private
String
empName
;
private
String
empId
;
private
String
modeId
;
private
String
disabInfoId
;
private
String
srvOrganId
;
private
Long
srvTaskId
;
// 任务时间
// 任务时间
private
String
srvDate
;
private
String
srvDate
;
// 任务名称
// 任务名称
private
String
itemName
;
private
String
itemName
;
private
List
<
ItemRespVO
>
itemsList
;
private
Long
status
;
private
Long
status
;
// 服务方式
// 服务方式
...
@@ -40,5 +51,8 @@ public class SrvTaskCardRespDTO {
...
@@ -40,5 +51,8 @@ public class SrvTaskCardRespDTO {
private
String
auditRemark
;
private
String
auditRemark
;
private
Long
taskDetailId
;
private
List
<
ChFndAttach
>
fileDataList
;
private
List
<
ChFndAttach
>
fileDataList
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvTaskRespVO.java
View file @
608078e9
...
@@ -18,6 +18,13 @@ public class SrvTaskRespVO {
...
@@ -18,6 +18,13 @@ public class SrvTaskRespVO {
// 护理机构
// 护理机构
private
String
srvOrganName
;
private
String
srvOrganName
;
private
String
modeId
;
private
String
srvTaskId
;
// 护理人员
// 护理人员
private
String
empName
;
private
String
empName
;
...
...
governance/src/main/java/com/hungraim/ltc/governance/controller/SrvTaskController.java
View file @
608078e9
...
@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.controller;
...
@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.service.SrvTaskService
;
import
com.hungraim.ltc.governance.service.SrvTaskService
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
...
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 服务计划Controller
* 服务计划Controller
...
@@ -166,11 +168,42 @@ public class SrvTaskController {
...
@@ -166,11 +168,42 @@ public class SrvTaskController {
if
(
srvPlanInputVO
.
getDisabInfoId
()
==
null
)
{
if
(
srvPlanInputVO
.
getDisabInfoId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
List
<
ChFndAttach
>
fileDataList
=
srvPlanInputVO
.
getFileDataList
();
if
(
fileDataList
.
size
()
<
2
){
return
Result
.
failed
(
"护理记录单复印件、医疗养老上门补单申请表至少各一张"
);
}
List
<
String
>
collect1
=
fileDataList
.
stream
().
map
(
ChFndAttach:
:
getFileName
)
.
distinct
().
collect
(
Collectors
.
toList
());
boolean
ss
=
(
collect1
.
size
()!=
fileDataList
.
size
())?
true
:
false
;
if
(
ss
){
return
Result
.
failed
(
"上传的附件不可重复"
);
}
Integer
userId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"userId"
);
Integer
userId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"userId"
);
srvPlanInputVO
.
setAdmin
(
String
.
valueOf
(
userId
));
srvPlanInputVO
.
setAdmin
(
String
.
valueOf
(
userId
));
return
srvTaskService
.
saveApplyCard
(
srvPlanInputVO
);
return
srvTaskService
.
saveApplyCard
(
srvPlanInputVO
);
}
}
@PostMapping
(
"/updateApplyCard"
)
public
Result
updateApplyCard
(
@RequestHeader
(
"Authorization"
)
String
token
,
SrvPlanInputVO
srvPlanInputVO
){
if
(
srvPlanInputVO
.
getDisabInfoId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
List
<
ChFndAttach
>
fileDataList
=
srvPlanInputVO
.
getFileDataList
();
if
(
fileDataList
.
size
()
<
2
){
return
Result
.
failed
(
"护理记录单复印件、医疗养老上门补单申请表至少各一张"
);
}
List
<
String
>
collect1
=
fileDataList
.
stream
().
map
(
ChFndAttach:
:
getFileName
)
.
distinct
().
collect
(
Collectors
.
toList
());
boolean
ss
=
(
collect1
.
size
()!=
fileDataList
.
size
())?
true
:
false
;
if
(
ss
){
return
Result
.
failed
(
"上传的附件不可重复"
);
}
Integer
userId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"userId"
);
srvPlanInputVO
.
setAdmin
(
String
.
valueOf
(
userId
));
return
srvTaskService
.
updateApplyCard
(
srvPlanInputVO
);
}
@PostMapping
(
"/auditingCard"
)
@PostMapping
(
"/auditingCard"
)
public
Result
auditingCard
(
AuditingCardVO
auditingCardVO
){
public
Result
auditingCard
(
AuditingCardVO
auditingCardVO
){
return
srvTaskService
.
auditingCard
(
auditingCardVO
);
return
srvTaskService
.
auditingCard
(
auditingCardVO
);
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/SrvTaskService.java
View file @
608078e9
...
@@ -41,6 +41,8 @@ public interface SrvTaskService {
...
@@ -41,6 +41,8 @@ public interface SrvTaskService {
// 补卡
// 补卡
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
);
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
);
Result
updateApplyCard
(
SrvPlanInputVO
srvPlanInputVO
);
Result
auditingCard
(
AuditingCardVO
auditingCardVO
);
Result
auditingCard
(
AuditingCardVO
auditingCardVO
);
Result
queryItemBySrvOrganId
(
Long
srvOrganId
);
Result
queryItemBySrvOrganId
(
Long
srvOrganId
);
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
608078e9
...
@@ -47,7 +47,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -47,7 +47,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
private
final
AccountFeignService
accountFeignService
;
private
final
AccountFeignService
accountFeignService
;
private
final
ChSrvProgramMapper
chSrvProgramMapper
;
private
final
ChSrvProgramMapper
chSrvProgramMapper
;
private
final
ChSrvSendMapper
chSrvSendMapper
;
private
final
ChSrvSendMapper
chSrvSendMapper
;
private
final
SrvSendService
sendService
;
private
final
SrvSendService
sendService
;
/**
/**
* 服务计划制定列表
* 服务计划制定列表
...
@@ -77,7 +77,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -77,7 +77,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
*/
*/
@Override
@Override
public
Page
<
SrvTaskDetailVO
>
getSrvTaskDetailList
(
Page
<
SrvTaskDetailVO
>
page
,
Integer
organId
,
String
disableName
,
String
disableTel
,
String
empName
,
String
certifNum
,
String
srvDate
,
Date
startTime
,
Date
endTime
,
String
status
,
String
modeId
)
{
public
Page
<
SrvTaskDetailVO
>
getSrvTaskDetailList
(
Page
<
SrvTaskDetailVO
>
page
,
Integer
organId
,
String
disableName
,
String
disableTel
,
String
empName
,
String
certifNum
,
String
srvDate
,
Date
startTime
,
Date
endTime
,
String
status
,
String
modeId
)
{
return
srvTaskMapper
.
getSrvTaskDetailList
(
page
,
organId
,
disableName
,
disableTel
,
empName
,
certifNum
,
srvDate
,
startTime
,
endTime
,
status
,
modeId
);
return
srvTaskMapper
.
getSrvTaskDetailList
(
page
,
organId
,
disableName
,
disableTel
,
empName
,
certifNum
,
srvDate
,
startTime
,
endTime
,
status
,
modeId
);
}
}
/**
/**
...
@@ -161,30 +161,30 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -161,30 +161,30 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情
//添加服务计划详情
Long
newSrvTaskId
=
chSrvTask
.
getSrvTaskId
();
Long
newSrvTaskId
=
chSrvTask
.
getSrvTaskId
();
this
.
insertTaskDetail
(
newSrvTaskId
,
taskDetails
);
this
.
insertTaskDetail
(
newSrvTaskId
,
taskDetails
);
saveSrvPlan
(
programId
,
null
);
saveSrvPlan
(
programId
,
null
);
//添加附件
//添加附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
}
else
{
}
else
{
// 修改服务计划
// 修改服务计划
// chSrvTaskDetailMapper.delete(new QueryWrapper<ChSrvTaskDetail>().eq("srv_task_id", Long.parseLong(srvTaskId)));//删除原来的计划详情
// chSrvTaskDetailMapper.delete(new QueryWrapper<ChSrvTaskDetail>().eq("srv_task_id", Long.parseLong(srvTaskId)));//删除原来的计划详情
/* if("2".equals(srvTaskInfoVO.getTaskStatus())){
/* if("2".equals(srvTaskInfoVO.getTaskStatus())){
UpdateWrapper updateWrapper1 = new UpdateWrapper();
UpdateWrapper updateWrapper1 = new UpdateWrapper();
updateWrapper1.eq("SRV_TASK_ID",srvTaskId);
updateWrapper1.eq("SRV_TASK_ID",srvTaskId);
updateWrapper1.set("STATUS",3);
updateWrapper1.set("STATUS",3);
chSrvTaskDetailMapper.update(null,updateWrapper1);
chSrvTaskDetailMapper.update(null,updateWrapper1);
}*/
}*/
// this.insertTaskDetail(Long.parseLong(srvTaskId), taskDetails);
// this.insertTaskDetail(Long.parseLong(srvTaskId), taskDetails);
//修改服务计划
//修改服务计划
ChSrvTask
chSrvTask
=
new
ChSrvTask
();
ChSrvTask
chSrvTask
=
new
ChSrvTask
();
UpdateWrapper
updateWrapper
=
new
UpdateWrapper
();
UpdateWrapper
updateWrapper
=
new
UpdateWrapper
();
updateWrapper
.
eq
(
"SRV_TASK_ID"
,
srvTaskId
);
updateWrapper
.
eq
(
"SRV_TASK_ID"
,
srvTaskId
);
//状态 未分配:0;已分配:1;已终止2
//状态 未分配:0;已分配:1;已终止2
updateWrapper
.
set
(
"STATUS"
,
srvTaskInfoVO
.
getTaskStatus
());
updateWrapper
.
set
(
"STATUS"
,
srvTaskInfoVO
.
getTaskStatus
());
updateWrapper
.
set
(
"LCD"
,
new
Date
());
updateWrapper
.
set
(
"LCD"
,
new
Date
());
updateWrapper
.
set
(
"LCU"
,
param
.
getUserId
());
updateWrapper
.
set
(
"LCU"
,
param
.
getUserId
());
updateWrapper
.
set
(
"END_REASON"
,
srvTaskInfoVO
.
getEndReason
());
updateWrapper
.
set
(
"END_REASON"
,
srvTaskInfoVO
.
getEndReason
());
srvTaskMapper
.
update
(
null
,
updateWrapper
);
srvTaskMapper
.
update
(
null
,
updateWrapper
);
//修改附件
//修改附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), Long.parseLong(srvTaskId));
// this.updateAttachs(srvTaskInfoVO.getListAttach(), Long.parseLong(srvTaskId));
}
}
...
@@ -192,8 +192,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -192,8 +192,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
}
}
public
void
saveSrvPlan
(
String
programId
,
String
srvPlanTime
)
{
public
void
saveSrvPlan
(
String
programId
,
String
srvPlanTime
)
{
List
<
ChSrvPlan
>
chSrvPlans
=
chSrvPlanMapper
.
queryPlan
(
programId
,
srvPlanTime
);
List
<
ChSrvPlan
>
chSrvPlans
=
chSrvPlanMapper
.
queryPlan
(
programId
,
srvPlanTime
);
for
(
ChSrvPlan
chSrvPlan
:
chSrvPlans
)
{
for
(
ChSrvPlan
chSrvPlan
:
chSrvPlans
)
{
chSrvPlan
.
setCreationTime
(
new
Date
());
chSrvPlan
.
setCreationTime
(
new
Date
());
chSrvPlanMapper
.
insert
(
chSrvPlan
);
chSrvPlanMapper
.
insert
(
chSrvPlan
);
...
@@ -202,7 +202,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -202,7 +202,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
// mode_id 4
// mode_id 4
@Override
@Override
public
void
otherPlaceHandler
(
String
programId
)
{
public
void
otherPlaceHandler
(
String
programId
)
{
accountFeignService
.
getOtherPlace
(
programId
);
accountFeignService
.
getOtherPlace
(
programId
);
}
}
...
@@ -242,8 +242,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -242,8 +242,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
Date
programEdnDate
=
chSrvProgram
.
getProgramEdnDate
();
Date
programEdnDate
=
chSrvProgram
.
getProgramEdnDate
();
String
programEdnDateStr
=
DateUtils
.
dateToStr
(
programEdnDate
);
String
programEdnDateStr
=
DateUtils
.
dateToStr
(
programEdnDate
);
int
i
=
chSrvSendMapper
.
updateSrvSendInfo
(
disabInfoId
,
programEdnDateStr
);
int
i
=
chSrvSendMapper
.
updateSrvSendInfo
(
disabInfoId
,
programEdnDateStr
);
if
(
i
>
0
)
{
if
(
i
>
0
)
{
log
.
info
(
"服务分配{}终止成功"
,
disabInfoId
);
log
.
info
(
"服务分配{}终止成功"
,
disabInfoId
);
}
}
}
}
}
}
...
@@ -252,13 +252,13 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -252,13 +252,13 @@ public class SrvTaskServiceImpl implements SrvTaskService {
// 生成计划任务 CH_SRV_TASK_DETAIL
// 生成计划任务 CH_SRV_TASK_DETAIL
for
(
AllocationSrvTaskVO
chSrvTask
:
chSrvTasks
)
{
for
(
AllocationSrvTaskVO
chSrvTask
:
chSrvTasks
)
{
Long
srvTaskId
=
chSrvTask
.
getSrvTaskId
();
Long
srvTaskId
=
chSrvTask
.
getSrvTaskId
();
// 根据任务id和服务时间查询是否已经生成过计划,已经生成了就不需要再生成了,已退出
// 根据任务id和服务时间查询是否已经生成过计划,已经生成了就不需要再生成了,已退出
int
chSrvTaskDetailCount
=
chSrvTaskDetailMapper
int
chSrvTaskDetailCount
=
chSrvTaskDetailMapper
.
getSrvTaskDetail
(
String
.
valueOf
(
srvTaskId
),
dateStr
);
.
getSrvTaskDetail
(
String
.
valueOf
(
srvTaskId
),
dateStr
);
if
(
chSrvTaskDetailCount
>
0
)
{
if
(
chSrvTaskDetailCount
>
0
)
{
log
.
info
(
"{},已经有计划任务了"
,
srvTaskId
);
log
.
info
(
"{},已经有计划任务了"
,
srvTaskId
);
continue
;
continue
;
}
}
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
...
@@ -269,7 +269,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -269,7 +269,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
// ch_srv_plan
// ch_srv_plan
String
programId
=
chSrvTask
.
getProgramId
();
String
programId
=
chSrvTask
.
getProgramId
();
saveSrvPlan
(
programId
,
dateStr
);
saveSrvPlan
(
programId
,
dateStr
);
}
}
}
}
...
@@ -277,8 +277,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -277,8 +277,8 @@ public class SrvTaskServiceImpl implements SrvTaskService {
// 补卡
// 补卡
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
public
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
){
public
Result
saveApplyCard
(
SrvPlanInputVO
srvPlanInputVO
)
{
log
.
info
(
"SrvTaskServiceImpl=======saveApplyCard:{}"
,
JSON
.
toJSONString
(
srvPlanInputVO
));
log
.
info
(
"SrvTaskServiceImpl=======saveApplyCard:{}"
,
JSON
.
toJSONString
(
srvPlanInputVO
));
Long
taskDetailId
=
null
;
Long
taskDetailId
=
null
;
// 先查询是否有计划,有计划了不再生成计划
// 先查询是否有计划,有计划了不再生成计划
List
<
ChSrvTaskDetail
>
chSrvTaskDetailList
=
chSrvTaskDetailMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvTaskDetail
>()
List
<
ChSrvTaskDetail
>
chSrvTaskDetailList
=
chSrvTaskDetailMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvTaskDetail
>()
...
@@ -288,9 +288,9 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -288,9 +288,9 @@ public class SrvTaskServiceImpl implements SrvTaskService {
if
(
CollectionUtil
.
isNotEmpty
(
chSrvTaskDetailList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
chSrvTaskDetailList
))
{
ChSrvTaskDetail
chSrvTaskDetail
=
chSrvTaskDetailList
.
get
(
0
);
ChSrvTaskDetail
chSrvTaskDetail
=
chSrvTaskDetailList
.
get
(
0
);
taskDetailId
=
chSrvTaskDetail
.
getTaskDetailId
();
taskDetailId
=
chSrvTaskDetail
.
getTaskDetailId
();
if
(
modeId
==
3
)
{
if
(
modeId
==
3
)
{
int
status
=
chSrvTaskDetailList
.
stream
().
map
(
ChSrvTaskDetail:
:
getStatus
).
findFirst
().
orElse
((
short
)
0
);
int
status
=
chSrvTaskDetailList
.
stream
().
map
(
ChSrvTaskDetail:
:
getStatus
).
findFirst
().
orElse
((
short
)
0
);
if
(
status
==
1
||
status
==
4
)
{
if
(
status
==
1
||
status
==
4
)
{
return
Result
.
failed
(
"手机app已有任务,不可重复生成"
);
return
Result
.
failed
(
"手机app已有任务,不可重复生成"
);
}
}
ChSrvTaskDetail
chSrvTaskDetailDTO
=
new
ChSrvTaskDetail
();
ChSrvTaskDetail
chSrvTaskDetailDTO
=
new
ChSrvTaskDetail
();
...
@@ -306,10 +306,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -306,10 +306,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
.
eq
(
ChSrvPlan:
:
getDisabInfoId
,
srvPlanInputVO
.
getDisabInfoId
())
.
eq
(
ChSrvPlan:
:
getDisabInfoId
,
srvPlanInputVO
.
getDisabInfoId
())
.
eq
(
ChSrvPlan:
:
getSrvPlanTime
,
srvPlanInputVO
.
getSrvPlanTime
())
.
eq
(
ChSrvPlan:
:
getSrvPlanTime
,
srvPlanInputVO
.
getSrvPlanTime
())
.
eq
(
ChSrvPlan:
:
getModeId
,
srvPlanInputVO
.
getModeId
()));
.
eq
(
ChSrvPlan:
:
getModeId
,
srvPlanInputVO
.
getModeId
()));
if
(
CollectionUtil
.
isNotEmpty
(
srvPlanList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
srvPlanList
))
{
return
Result
.
failed
(
"任务列表已有计划,不可重复生成"
);
return
Result
.
failed
(
"任务列表已有计划,不可重复生成"
);
}
}
}
else
{
}
else
{
// 插入计划表
// 插入计划表
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
...
@@ -326,19 +326,19 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -326,19 +326,19 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetail
.
setClockOperator
(
srvPlanInputVO
.
getAdmin
());
chSrvTaskDetail
.
setClockOperator
(
srvPlanInputVO
.
getAdmin
());
chSrvTaskDetail
.
setFcd
(
new
Date
());
chSrvTaskDetail
.
setFcd
(
new
Date
());
int
insert
=
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
int
insert
=
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
if
(
insert
==
0
)
{
if
(
insert
==
0
)
{
return
Result
.
failed
(
"补卡失败,请重新提交"
);
return
Result
.
failed
(
"补卡失败,请重新提交"
);
}
}
taskDetailId
=
chSrvTaskDetail
.
getTaskDetailId
();
taskDetailId
=
chSrvTaskDetail
.
getTaskDetailId
();
}
}
try
{
try
{
log
.
info
(
"=======SrvTaskServiceImpl.saveApplyCard.taskDetailId:{}"
,
taskDetailId
);
log
.
info
(
"=======SrvTaskServiceImpl.saveApplyCard.taskDetailId:{}"
,
taskDetailId
);
String
[]
itemIds
=
srvPlanInputVO
.
getItemIds
();
String
[]
itemIds
=
srvPlanInputVO
.
getItemIds
();
List
<
ItemDTO
>
itemDTOS
=
chSrvPlanMapper
.
queryItem
(
srvPlanInputVO
.
getSrvOrganId
());
List
<
ItemDTO
>
itemDTOS
=
chSrvPlanMapper
.
queryItem
(
srvPlanInputVO
.
getSrvOrganId
());
for
(
String
r
:
itemIds
)
{
for
(
String
r
:
itemIds
)
{
ChSrvPlan
chSrvPlan
=
new
ChSrvPlan
();
ChSrvPlan
chSrvPlan
=
new
ChSrvPlan
();
chSrvPlan
.
setItemId
(
Long
.
valueOf
(
r
));
chSrvPlan
.
setItemId
(
Long
.
valueOf
(
r
));
if
(
CollectionUtil
.
isNotEmpty
(
itemDTOS
))
{
if
(
CollectionUtil
.
isNotEmpty
(
itemDTOS
))
{
String
itemName
=
itemDTOS
.
stream
().
filter
(
s
->
s
.
getItemId
().
equals
(
r
)).
map
(
ItemDTO:
:
getItemName
).
findFirst
().
orElse
(
null
);
String
itemName
=
itemDTOS
.
stream
().
filter
(
s
->
s
.
getItemId
().
equals
(
r
)).
map
(
ItemDTO:
:
getItemName
).
findFirst
().
orElse
(
null
);
...
@@ -352,20 +352,64 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -352,20 +352,64 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvPlan
.
setSrvPlanTime
(
srvPlanInputVO
.
getSrvPlanTime
());
chSrvPlan
.
setSrvPlanTime
(
srvPlanInputVO
.
getSrvPlanTime
());
chSrvPlan
.
setTaskDetailId
(
taskDetailId
);
chSrvPlan
.
setTaskDetailId
(
taskDetailId
);
int
insert1
=
chSrvPlanMapper
.
insert
(
chSrvPlan
);
int
insert1
=
chSrvPlanMapper
.
insert
(
chSrvPlan
);
if
(
insert1
==
0
)
{
if
(
insert1
==
0
)
{
return
Result
.
failed
(
"补卡失败,请重新提交"
);
return
Result
.
failed
(
"补卡失败,请重新提交"
);
}
}
}
}
srvPlanInputVO
.
setTaskDetailId
(
taskDetailId
);
srvPlanInputVO
.
setTaskDetailId
(
taskDetailId
);
this
.
updateAttachs
(
srvPlanInputVO
);
this
.
updateAttachs
(
srvPlanInputVO
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"=======SrvTaskServiceImpl
error {}"
,
e
);
log
.
error
(
"=======SrvTaskServiceImpl
===saveApplyCard===error {}"
,
e
);
return
Result
.
failed
(
"补卡失败"
);
return
Result
.
failed
(
"补卡失败"
);
}
}
return
Result
.
success
();
return
Result
.
success
();
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Result
updateApplyCard
(
SrvPlanInputVO
srvPlanInputVO
)
{
Long
taskDetailId
=
srvPlanInputVO
.
getTaskDetailId
();
ChSrvTaskDetail
chSrvTaskDetailDTO
=
new
ChSrvTaskDetail
();
chSrvTaskDetailDTO
.
setTaskDetailId
(
taskDetailId
);
// 补卡标识
chSrvTaskDetailDTO
.
setIsClock
((
short
)
1
);
chSrvTaskDetailDTO
.
setCheckStatus
((
short
)
1
);
chSrvTaskDetailDTO
.
setClockReason
(
srvPlanInputVO
.
getClockReason
());
chSrvTaskDetailDTO
.
setClockOperator
(
srvPlanInputVO
.
getAdmin
());
chSrvTaskDetailDTO
.
setLcd
(
new
Date
());
try
{
chSrvTaskDetailMapper
.
updateById
(
chSrvTaskDetailDTO
);
chSrvPlanMapper
.
delete
(
new
QueryWrapper
<
ChSrvPlan
>().
eq
(
"task_detail_id"
,
taskDetailId
));
String
[]
itemIds
=
srvPlanInputVO
.
getItemIds
();
List
<
ItemDTO
>
itemDTOS
=
chSrvPlanMapper
.
queryItem
(
srvPlanInputVO
.
getSrvOrganId
());
for
(
String
r
:
itemIds
)
{
ChSrvPlan
chSrvPlan
=
new
ChSrvPlan
();
chSrvPlan
.
setItemId
(
Long
.
valueOf
(
r
));
if
(
CollectionUtil
.
isNotEmpty
(
itemDTOS
))
{
String
itemName
=
itemDTOS
.
stream
().
filter
(
s
->
s
.
getItemId
().
equals
(
r
)).
map
(
ItemDTO:
:
getItemName
).
findFirst
().
orElse
(
null
);
chSrvPlan
.
setItemName
(
itemName
);
}
chSrvPlan
.
setSrvOrganId
(
srvPlanInputVO
.
getSrvOrganId
());
chSrvPlan
.
setModeId
(
srvPlanInputVO
.
getModeId
());
chSrvPlan
.
setCreationTime
(
new
Date
());
chSrvPlan
.
setDisabInfoId
(
srvPlanInputVO
.
getDisabInfoId
());
chSrvPlan
.
setEmpId
(
srvPlanInputVO
.
getEmpId
());
chSrvPlan
.
setSrvPlanTime
(
srvPlanInputVO
.
getSrvPlanTime
());
chSrvPlan
.
setTaskDetailId
(
taskDetailId
);
int
insert1
=
chSrvPlanMapper
.
insert
(
chSrvPlan
);
}
this
.
updateAttachs
(
srvPlanInputVO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"=======SrvTaskServiceImpl===updateApplyCard===error {}"
,
e
);
return
Result
.
failed
(
"补卡修改失败"
);
}
return
Result
.
success
();
}
@Override
@Override
public
Result
auditingCard
(
AuditingCardVO
auditingCardVO
){
public
Result
auditingCard
(
AuditingCardVO
auditingCardVO
){
...
...
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