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
0d28a63e
Commit
0d28a63e
authored
Apr 02, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时分配多个护理人员处理
parent
f069d405
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
SrvTaskScheduledController.java
...ltc/governance/controller/SrvTaskScheduledController.java
+1
-1
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+6
-0
ChSrvProgramMapper.xml
...com/hungraim/ltc/governance/mapper/ChSrvProgramMapper.xml
+1
-3
SrvTaskMapper.xml
...rces/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
+11
-3
No files found.
governance/src/main/java/com/hungraim/ltc/governance/controller/SrvTaskScheduledController.java
View file @
0d28a63e
...
...
@@ -32,7 +32,7 @@ public class SrvTaskScheduledController {
@Scheduled
(
cron
=
"0 35
23 * * ?"
)
@Scheduled
(
cron
=
"0 20
23 * * ?"
)
public
void
timeAllocationSrvTask
()
{
boolean
flag
=
redisLock
.
tryLock
(
JOB_KEY
,
1000
*
30
);
if
(
flag
){
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
0d28a63e
...
...
@@ -146,6 +146,11 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTask
.
setStatus
((
short
)
1
);
//状态 未分配:0;已分配:1;已终止2
chSrvTask
.
setSrvDate
(
DateUtils
.
strToDate
(
taskDetails
.
get
(
0
)));
srvTaskMapper
.
insert
(
chSrvTask
);
// 服务计划制定方案修改为已生效
ChSrvProgram
chSrvProgram
=
new
ChSrvProgram
();
chSrvProgram
.
setProgramId
(
Long
.
valueOf
(
programId
));
chSrvProgram
.
setProgStatus
(
1
);
chSrvProgramMapper
.
updateById
(
chSrvProgram
);
//添加服务计划详情
Long
newSrvTaskId
=
chSrvTask
.
getSrvTaskId
();
this
.
insertTaskDetail
(
newSrvTaskId
,
taskDetails
);
...
...
@@ -243,6 +248,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetail
.
setSrvTaskId
(
srvTaskId
);
//taskId
chSrvTaskDetail
.
setSrvDate
(
DateUtils
.
strToDate
(
dateStr
));
//服务开始时间
chSrvTaskDetail
.
setStatus
((
short
)
0
);
//状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetail
.
setFcd
(
new
Date
());
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
// ch_srv_plan
String
programId
=
chSrvTask
.
getProgramId
();
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvProgramMapper.xml
View file @
0d28a63e
...
...
@@ -128,9 +128,7 @@
T4.FINISH_TIME assessDate,
T7.MODE_NAME svrModelName,
T5.SRV_ORGAN_NAME svrOrganName,
<if
test=
"programStatus != null and programStatus != ''"
>
#{programStatus} progStatus,
</if>
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime
FROM CH_SRV_PROGRAM T1
INNER JOIN CH_DISABLE_INFO T2 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
View file @
0d28a63e
...
...
@@ -219,15 +219,22 @@
</where>
</select>
<select
id=
"getAllocationSrvTask"
resultType=
"com.hungraim.ltc.pojo.vo.governance.AllocationSrvTaskVO"
>
select
t.SRV_TASK_ID,t.SRV_DATE,info.EXIT_TIME,info.EXIT_FLAG,info.EXIT_REASON_ID,t.program_id programId
from CH_SRV_TASK t
select
max(t.SRV_TASK_ID) srvTaskId,max(program.PROGRAM_ID) programId,info.REAL_NAME,t.SRV_EMP_ID
from CH_SRV_TASK t
left join CH_DISABLE_INFO info on t.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_apr_task aprtask on info.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
left join CH_SRV_PROGRAM program on program.
DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_SRV_PROGRAM program on program.
program_id = t.program_id
where
<![CDATA[ t.SRV_DATE < sysdate and
(info.EXIT_TIME >
sysdate or info.EXIT_TIME is null)
and sysdate
< program.PROGRAM_EDN_DATE
and
sysdate
>
report.PUBLICITY_END_TIME and program.PROG_STATUS
<
>'2' and t.STATUS
<
>'2' ]]>
and
sysdate
>
report.PUBLICITY_END_TIME and program.PROG_STATUS
<
>'2' and t.STATUS
<
>'2'
group by info.REAL_NAME,t.SRV_EMP_ID ]]>
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment