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
25477c28
Commit
25477c28
authored
Nov 06, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务方案制定字段添加、护理记录排序、退出时间修改
parent
8a726e82
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
105 additions
and
24 deletions
+105
-24
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+1
-1
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+2
-1
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+16
-15
ChSrvPlan.java
...va/com/hungraim/ltc/pojo/entity/governance/ChSrvPlan.java
+6
-4
ChSrvProgramSet.java
...ngraim/ltc/pojo/entity/serviceManage/ChSrvProgramSet.java
+3
-0
ProgramSetAndProjectVo.java
...ngraim/ltc/pojo/vo/governance/ProgramSetAndProjectVo.java
+6
-0
SrvPlanInputVO.java
...a/com/hungraim/ltc/pojo/vo/governance/SrvPlanInputVO.java
+1
-1
SrvProgramServiceImpl.java
...im/ltc/governance/service/impl/SrvProgramServiceImpl.java
+27
-0
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+38
-1
ChSrvOrganProjectMapper.xml
...ungraim/ltc/governance/mapper/ChSrvOrganProjectMapper.xml
+2
-0
ChSrvPlanMapper.xml
...es/com/hungraim/ltc/governance/mapper/ChSrvPlanMapper.xml
+3
-1
No files found.
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
25477c28
...
...
@@ -162,7 +162,7 @@ from CH_SRV_TASK_FINISH_ITEM item
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_INFO_ID = #{req.disabInfoId}
and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc,
detail.TASK_DETAIL_ID
and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc,
item.task_finish_item_id
</select>
...
...
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
25477c28
...
...
@@ -77,8 +77,9 @@
<if
test=
"req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"
>
AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</where>
</where>
order by status,taskDetailId
</select>
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
25477c28
...
...
@@ -654,25 +654,25 @@ public class DisableServiceImpl implements DisableService {
ChDisableInfo
chDisableInfo
=
new
ChDisableInfo
();
chDisableInfo
.
setDisabInfoId
(
disableInfoId
);
chDisableInfo
.
setExitFlag
(
1
);
chDisableInfo
.
setExitTime
(
date
);
chDisableInfo
.
setExitReasonId
(
exitReasonId
);
chDisableInfo
.
setLcd
(
new
Date
());
chDisableInfo
.
setExitSrvOrganId
(
srvOrganId
);
int
result
=
disableInfoMapper
.
updateById
(
chDisableInfo
);
boolean
now
=
DateUtils
.
isNow
(
date
);
if
(
now
)
{
disableExitHanlder
(
exitReasonId
,
srvOrganId
,
disableInfoId
,
date
);
}
else
{
// 插入历史记录
ChDisableExit
chDisableExit
=
new
ChDisableExit
();
chDisableExit
.
setDisabInfoId
(
disableInfoId
);
chDisableExit
.
setExitReasonId
(
exitReasonId
);
chDisableExit
.
setExitTime
(
date
);
chDisableExit
.
setSrvOrganId
(
srvOrganId
);
disableExitMapper
.
insert
(
chDisableExit
);
return
Result
.
failed
(
"操作成功,退出状态及服务方案和计划将在"
+
exitTime
+
"日自动终止"
);
}
//
boolean now = DateUtils.isNow(date);
//
if (now) {
disableExitHanlder
(
exitReasonId
,
srvOrganId
,
disableInfoId
,
date
);
//
} else {
//
// 插入历史记录
//
ChDisableExit chDisableExit = new ChDisableExit();
//
chDisableExit.setDisabInfoId(disableInfoId);
//
chDisableExit.setExitReasonId(exitReasonId);
//
chDisableExit.setExitTime(date);
//
chDisableExit.setSrvOrganId(srvOrganId);
//
disableExitMapper.insert(chDisableExit);
//
return Result.failed("操作成功,退出状态及服务方案和计划将在"+exitTime+"日自动终止");
//
}
if
(
result
>
0
)
{
return
Result
.
success
();
}
else
{
...
...
@@ -695,6 +695,7 @@ public class DisableServiceImpl implements DisableService {
chSrvProgram
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvProgram
.
setProgStatus
(
2
);
chSrvProgram
.
setEndReason
(
"失能人员退出,终止方案"
);
chSrvProgram
.
setLcd
(
new
Date
());
disableInfoMapper
.
updateSrvProgramById
(
chSrvProgram
);
UpdateWrapper
updateWrapper2
=
new
UpdateWrapper
();
...
...
@@ -708,7 +709,7 @@ public class DisableServiceImpl implements DisableService {
ChSrvSend
chSrvSend
=
new
ChSrvSend
();
chSrvSend
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvSend
.
setEndTime
(
date
);
chSrvSend
.
setLcd
(
new
Date
());
// 更新已分配为已退出
chSrvSend
.
setStatus
((
short
)
3
);
disableInfoMapper
.
updateSrvSendById
(
chSrvSend
);
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/governance/ChSrvPlan.java
View file @
25477c28
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
governance
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
lombok.Data
;
import
java.util.Date
;
...
...
@@ -26,5 +23,10 @@ public class ChSrvPlan {
private
Long
isStatus
;
private
Long
isBill
;
private
Date
lcd
;
@TableField
(
exist
=
false
)
private
String
itemWeek
;
@TableField
(
exist
=
false
)
private
String
planningFrequencyType
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/serviceManage/ChSrvProgramSet.java
View file @
25477c28
...
...
@@ -154,5 +154,7 @@ public class ChSrvProgramSet implements Serializable {
*/
private
String
remark
;
private
String
itemWeek
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/ProgramSetAndProjectVo.java
View file @
25477c28
...
...
@@ -3,6 +3,7 @@ package com.hungraim.ltc.pojo.vo.governance;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
public
class
ProgramSetAndProjectVo
{
...
...
@@ -72,4 +73,9 @@ public class ProgramSetAndProjectVo {
*/
private
Short
planningFrequencyType
=
1
;
private
String
itemWeek
;
private
List
<
String
>
itemWeeks
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SrvPlanInputVO.java
View file @
25477c28
...
...
@@ -53,7 +53,7 @@ public class SrvPlanInputVO {
private
Long
taskDetailId
;
@TableField
(
exist
=
false
)
private
List
<
ChFndAttach
>
fileDataList
;
private
List
<
ChFndAttach
>
fileDataList
;
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvProgramServiceImpl.java
View file @
25477c28
...
...
@@ -22,10 +22,14 @@ import com.hungraim.ltc.util.Result;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.sql.DATE
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -78,6 +82,19 @@ public class SrvProgramServiceImpl implements SrvProgramService {
List
<
ChFndAttach
>
data
=
listResult
.
getData
();
programDetail
.
setFileDataList
(
data
);
}
List
<
ProgramSetAndProjectVo
>
programSetAndProjectVos
=
programDetail
.
getProgramSetAndProjectVos
();
for
(
ProgramSetAndProjectVo
programSetAndProjectVo
:
programSetAndProjectVos
)
{
String
itemWeek
=
programSetAndProjectVo
.
getItemWeek
();
if
(
StringUtils
.
isNotEmpty
(
itemWeek
))
{
List
<
String
>
itemWeeks
=
new
ArrayList
<>();
List
<
String
>
list
=
Arrays
.
asList
(
itemWeek
.
split
(
","
));
for
(
String
s
:
list
)
{
itemWeeks
.
add
(
s
);
}
programSetAndProjectVo
.
setItemWeeks
(
itemWeeks
);
}
}
return
programDetail
;
}
...
...
@@ -134,6 +151,11 @@ public class SrvProgramServiceImpl implements SrvProgramService {
chSrvProgramSet
.
setPlanningFrequency
(
programSetAndProjectVo
.
getPlanningFrequency
());
chSrvProgramSet
.
setPlanningFrequencyType
(
programSetAndProjectVo
.
getPlanningFrequencyType
());
chSrvProgramSet
.
setRemark
(
programSetAndProjectVo
.
getRemark
());
List
<
String
>
itemWeeks
=
programSetAndProjectVo
.
getItemWeeks
();
if
(
CollectionUtils
.
isNotEmpty
(
itemWeeks
))
{
String
itemWeek
=
StringUtils
.
join
(
itemWeeks
,
","
);
chSrvProgramSet
.
setItemWeek
(
itemWeek
);
}
chSrvProgramSetMapper
.
updateById
(
chSrvProgramSet
);
}
else
{
if
(
isConf
.
intValue
()
==
0
)
{
...
...
@@ -197,6 +219,11 @@ public class SrvProgramServiceImpl implements SrvProgramService {
chSrvProgramSet
.
setPlanningFrequency
(
programSetAndProjectVo
.
getPlanningFrequency
());
chSrvProgramSet
.
setPlanningFrequencyType
(
programSetAndProjectVo
.
getPlanningFrequencyType
());
chSrvProgramSet
.
setRemark
(
programSetAndProjectVo
.
getRemark
());
List
<
String
>
itemWeeks
=
programSetAndProjectVo
.
getItemWeeks
();
if
(
CollectionUtils
.
isNotEmpty
(
itemWeeks
))
{
String
itemWeek
=
StringUtils
.
join
(
itemWeeks
,
","
);
chSrvProgramSet
.
setItemWeek
(
itemWeek
);
}
chSrvProgramSetMapper
.
insert
(
chSrvProgramSet
);
}
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
25477c28
...
...
@@ -26,10 +26,14 @@ import com.hungraim.ltc.util.Result;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.sql.DATE
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -161,7 +165,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情
Long
newSrvTaskId
=
chSrvTask
.
getSrvTaskId
();
this
.
insertTaskDetail
(
newSrvTaskId
,
taskDetails
);
saveSrvPlan
(
programId
,
null
);
saveSrvPlan
(
programId
,
taskDetails
.
get
(
0
)
);
//添加附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
}
else
{
...
...
@@ -196,10 +200,43 @@ public class SrvTaskServiceImpl implements SrvTaskService {
List
<
ChSrvPlan
>
chSrvPlans
=
chSrvPlanMapper
.
queryPlan
(
programId
,
srvPlanTime
);
for
(
ChSrvPlan
chSrvPlan
:
chSrvPlans
)
{
chSrvPlan
.
setCreationTime
(
new
Date
());
String
itemWeek
=
chSrvPlan
.
getItemWeek
();
String
planningFrequencyType
=
chSrvPlan
.
getPlanningFrequencyType
();
// 次周 3
if
(
StringUtils
.
isNotEmpty
(
itemWeek
)
&&
"3"
.
equals
(
planningFrequencyType
))
{
String
weekDay
=
getweekDay
(
srvPlanTime
);
if
(!
itemWeek
.
contains
(
weekDay
)){
continue
;
}
}
chSrvPlanMapper
.
insert
(
chSrvPlan
);
}
}
public
String
getweekDay
(
String
date
)
{
String
[]
weekDays
=
{
"7"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
};
//转换为Date类型
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date1
=
null
;
try
{
date1
=
sdf
.
parse
(
date
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
//判断日期是星期几
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
date1
);
int
w
=
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
-
1
;
if
(
w
<
0
)
{
w
=
0
;
}
System
.
out
.
println
(
weekDays
[
w
]);
return
weekDays
[
w
];
}
// mode_id 4
@Override
public
void
otherPlaceHandler
(
String
programId
)
{
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvOrganProjectMapper.xml
View file @
25477c28
...
...
@@ -38,6 +38,7 @@
<result
column=
"SRV_ORGAN_ID"
property=
"itemTimes"
/>
<result
column=
"ITEM_TIMES_TYPE"
property=
"itemTimesType"
/>
<result
column=
"ITEM_PRICE"
property=
"itemPrice"
/>
<result
column=
"ITEM_WEEK"
property=
"itemWeek"
/>
<result
column=
"IS_NEED"
property=
"isNeed"
/>
<result
column=
"PLANNING_FREQUENCY"
property=
"planningFrequency"
/>
<result
column=
"PLANNING_FREQUENCY_TYPE"
property=
"planningFrequencyType"
/>
...
...
@@ -63,6 +64,7 @@
PLANNING_FREQUENCY,
PLANNING_FREQUENCY_TYPE,
CH_SRV_PROGRAM_SET.REMARK,
CH_SRV_PROGRAM_SET.ITEM_WEEK,
NVL(CH_SRV_PROGRAM_SET.IS_CONF, '0') IS_CONF
</if>
FROM CH_SRV_ORGAN_PROJECT
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvPlanMapper.xml
View file @
25477c28
...
...
@@ -15,7 +15,9 @@
detail.TASK_DETAIL_ID taskDetailId,
d.SERVICE_TYPE_DETAILED_NAME itemName,
CSTFI.ITEM_ID itemId,
'0' isStatus
'0' isStatus,
CSTFI.PLANNING_FREQUENCY_TYPE planningFrequencyType,
CSTFI.item_week itemWeek
from ch_srv_task_detail detail --服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
...
...
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