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
1e8babd4
Commit
1e8babd4
authored
Apr 26, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务方案服务分配修改
parent
db2c539d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
55 deletions
+96
-55
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+17
-1
DisableInfoMapper.xml
...y-service/src/main/resources/mapper/DisableInfoMapper.xml
+25
-38
ChSrvProgram.java
.../hungraim/ltc/pojo/entity/serviceManage/ChSrvProgram.java
+2
-0
DisableInfoListVo.java
...a/com/hungraim/ltc/pojo/vo/disable/DisableInfoListVo.java
+3
-8
ProgramDetailVo.java
.../com/hungraim/ltc/pojo/vo/governance/ProgramDetailVo.java
+5
-0
BuildBedController.java
...ungraim/ltc/governance/controller/BuildBedController.java
+43
-8
SrvProgramServiceImpl.java
...im/ltc/governance/service/impl/SrvProgramServiceImpl.java
+1
-0
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
1e8babd4
...
...
@@ -579,7 +579,23 @@ public class DisableServiceImpl implements DisableService {
@Override
public
Page
<
DisableInfoListVo
>
getDisableInfoList
(
Page
<
DisableInfoListVo
>
page
,
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
)
{
return
disableInfoMapper
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
Page
<
DisableInfoListVo
>
disableInfoList
=
disableInfoMapper
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
List
<
DisableInfoListVo
>
records
=
disableInfoList
.
getRecords
();
for
(
DisableInfoListVo
record
:
records
)
{
if
(
record
.
getExitReasonId
()!=
null
&&
4
==
record
.
getExitReasonId
()){
Long
disabInfoId
=
record
.
getDisabInfoId
();
Long
srvOrganId1
=
record
.
getSrvOrganId
();
List
<
ProgramRespDTO
>
programRespDTOS
=
disableInfoMapper
.
selectProgram
(
String
.
valueOf
(
disabInfoId
),
String
.
valueOf
(
srvOrganId1
));
if
(
CollectionUtil
.
isNotEmpty
(
programRespDTOS
))
{
record
.
setExitFlag
(
null
);
record
.
setExitReasonId
(
null
);
record
.
setExitTime
(
null
);
}
}
}
return
disableInfoList
;
}
...
...
apply/apply-service/src/main/resources/mapper/DisableInfoMapper.xml
View file @
1e8babd4
...
...
@@ -2,52 +2,39 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hungraim.ltc.dao.DisableInfoMapper"
>
<select
id=
"getDisableInfoList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
SELECT distinct T2.DISAB_INFO_ID disabInfoId,
T1.PROGRAM_ID programId,
T1.SRV_ORGAN_ID srvOrganId,
T5.DISTRICT_PROVINCIAL districtProvincial,
T5.DISTRICT_CITY districtCity,
T2.REAL_NAME realName,
T2.TEL realTel,
T2.BIRTHDAY birthday,
T2.GENDER gender,
T2.ACPT_PROVINCIAL acptProvincial,
T2.ACPT_CITY acptCity,
T2.ACPT_AREA acptArea,
T2.ACPT_STREET acptStreet,
T2.ACPT_ADDRESS acptAddress,
-- T7.MODE_NAME svrModelName,
DECODE(T1.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
T5.SRV_ORGAN_NAME svrOrganName,
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime,
T2.CERTI_CODE certiCode,
T2.APPLY_ID applyId,
to_char(T2.EXIT_TIME,'yyyy-MM-dd') exitTime,
--服务方案起始日
--服务方案终止日
to_char(T1.PROGRAM_DATE,'yyyy-MM-dd HH24:mi:ss') programDate,
to_char(T1.PROGRAM_EDN_DATE,'yyyy-MM-dd HH24:mi:ss') programEdnDate,
T2.EXIT_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2
-- inner join (select * from CH_SRV_SEND where STATUS in(1,3)) T6 on T6.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_SRV_PROGRAM T1 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
-- LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
<where>
with bb as (
SELECT T2.DISAB_INFO_ID disabInfoId,
max(T6.SRV_ORGAN_ID) srvOrganId,
T2.REAL_NAME realName,
DECODE(max(T2.SRV_MODE_ID), '1','医疗','2', '养老','3','上门', '4', '异地') svrModelName,
max(T5.SRV_ORGAN_NAME) svrOrganName,
to_char(max(e.EXIT_TIME),'yyyy-MM-dd') exitTime,
max(T2.CERTI_CODE) CERTI_CODE,
max(e.EXIT_REASON_ID) exitReasonId,
max(T6.FCD) fcd,
to_char(max(apply.apply_time),'yyyy-MM-dd HH24:mi:ss') applyTime,
max(apply.apply_id) applyId
FROM CH_SRV_SEND T6
LEFT join CH_DISABLE_INFO T2 on T6.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T6.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
left join CH_DISABLE_APPLY apply on apply.APPLY_ID = T2.APPLY_ID
left join CH_DISABLE_EXIT
e on e.DISAB_INFO_ID = T2.DISAB_INFO_ID
group by T2.DISAB_INFO_ID,T2.REAL_NAME)
select t.*, ( case when t.exitReasonId is null then null else 1 end ) exitFlag from bb t
<where>
1=1
<if
test=
"srvOrganId != null and srvOrganId != '' and srvOrganId!=0"
>
and
T1.SRV_ORGAN_ID
= #{srvOrganId}
and
t.srvOrganId
= #{srvOrganId}
</if>
<if
test=
"certiCode != null and certiCode != ''"
>
and
T2
.CERTI_CODE = #{certiCode}
and
t
.CERTI_CODE = #{certiCode}
</if>
<if
test=
"realName != null and realName != ''"
>
and
T2.real_n
ame like CONCAT(CONCAT('%',#{realName}) ,'%')
and
t.realN
ame like CONCAT(CONCAT('%',#{realName}) ,'%')
</if>
<if
test=
"svrModelId != null and svrModelId != ''"
>
and
T1.SRV_MODE_ID
= #{svrModelId}
and
t.svrModelId
= #{svrModelId}
</if>
</where>
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/serviceManage/ChSrvProgram.java
View file @
1e8babd4
...
...
@@ -54,6 +54,8 @@ public class ChSrvProgram {
*/
private
Long
endEmp
;
private
Long
srvSendId
;
/**
* 终止时间
*/
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/DisableInfoListVo.java
View file @
1e8babd4
...
...
@@ -57,14 +57,7 @@ public class DisableInfoListVo {
*/
private
String
gender
;
/**
* 接收服务省市区
*/
private
String
acptProvincial
;
private
String
acptCity
;
private
String
acptArea
;
private
String
acptStreet
;
private
String
acptAddress
;
/**
* 失能等级
...
...
@@ -119,4 +112,6 @@ public class DisableInfoListVo {
private
String
exitTime
;
private
String
applyTime
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/ProgramDetailVo.java
View file @
1e8babd4
...
...
@@ -81,6 +81,9 @@ public class ProgramDetailVo {
*/
private
Long
diseTypeS
;
private
Long
srvSendId
;
/**
* 家庭住址
*/
...
...
@@ -147,4 +150,6 @@ public class ProgramDetailVo {
*/
private
List
<
ChFndAttach
>
fileDataList
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/BuildBedController.java
View file @
1e8babd4
package
com
.
hungraim
.
ltc
.
governance
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.dao.ChSrvProgramMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvSendMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvTaskMapper
;
import
com.hungraim.ltc.governance.service.*
;
import
com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo
;
import
com.hungraim.ltc.pojo.vo.disable.ChrSrvVo
;
import
com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO
;
import
com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
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.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -52,7 +55,11 @@ public class BuildBedController {
@Autowired
private
ChSrvSendMapper
chSrvSendMapper
;
@Autowired
private
ChSrvProgramMapper
chSrvProgramMapper
;
@Autowired
private
ChSrvTaskMapper
chSrvTaskMapper
;
/**
* 建床管理列表
...
...
@@ -259,9 +266,9 @@ public class BuildBedController {
List
<
ChSrvSend
>
chSrvSendsList
=
chSrvSendMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvSend
>()
.
eq
(
ChSrvSend:
:
getDisabInfoId
,
disabInfoId
)
.
eq
(
ChSrvSend:
:
getStatus
,
(
short
)
1
));
/*
if (chSrvSendsList.size() > 0) {
return Result.failed("已分配护理机构,请先终止
或退出
再操作");
}
*/
if
(
chSrvSendsList
.
size
()
>
0
)
{
return
Result
.
failed
(
"已分配护理机构,请先终止再操作"
);
}
Long
srvModeId1
=
chSrvSend
.
getSrvModeId
();
if
(
srvModeId
!=
srvModeId1
.
intValue
()){
...
...
@@ -280,10 +287,10 @@ public class BuildBedController {
chSrvSend
.
setStatus
(
Short
.
valueOf
(
"1"
));
if
(
chrSrvVo
.
getSrvSendId
()
==
null
)
{
sendService
.
insertSrvSend
(
chSrvSend
);
}
else
{
}
else
{
chSrvSend
.
setSrvSendId
(
chrSrvVo
.
getSrvSendId
());
chSrvSendMapper
.
updateSrvSendById
(
chSrvSend
);
}
chSrvSendMapper
.
updateSrvSendById
(
chSrvSend
);
}
}
}
else
{
...
...
@@ -305,6 +312,34 @@ public class BuildBedController {
chSrvSend
.
setStopTime
(
saveStopTime
.
getStopTime
());
chSrvSend
.
setStatus
((
short
)
2
);
sendService
.
updateById
(
chSrvSend
);
//终止方案 终止计划
Long
srvSendId
=
saveStopTime
.
getSrvSendId
();
UpdateWrapper
updateWrapper1
=
new
UpdateWrapper
();
updateWrapper1
.
eq
(
"srv_send_id"
,
srvSendId
);
updateWrapper1
.
set
(
"prog_status"
,
2
);
updateWrapper1
.
set
(
"LCD"
,
new
DATE
());
updateWrapper1
.
set
(
"end_reason"
,
"服务分配终止"
);
chSrvProgramMapper
.
update
(
null
,
updateWrapper1
);
List
<
ChSrvProgram
>
chSrvPrograms
=
chSrvProgramMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvProgram
>()
.
eq
(
ChSrvProgram:
:
getSrvSendId
,
srvSendId
));
if
(
CollectionUtil
.
isNotEmpty
(
chSrvPrograms
)){
Long
programId
=
chSrvPrograms
.
get
(
0
).
getProgramId
();
UpdateWrapper
updateWrapper2
=
new
UpdateWrapper
();
updateWrapper2
.
eq
(
"program_id"
,
programId
);
updateWrapper2
.
set
(
"status"
,
2
);
updateWrapper2
.
set
(
"LCD"
,
new
DATE
());
updateWrapper2
.
set
(
"end_reason"
,
"服务分配终止"
);
chSrvTaskMapper
.
update
(
null
,
updateWrapper2
);
}
// 终止时插入一条未分配记录
ChSrvSend
chSrvSend1
=
new
ChSrvSend
();
chSrvSend1
.
setStatus
((
short
)
0
);
chSrvSend1
.
setDisabInfoId
(
Long
.
valueOf
(
chSrvSend
.
getDisabInfoId
()));
chSrvSend1
.
setFcd
(
new
Date
());
sendService
.
insertSrvSend
(
chSrvSend1
);
return
Result
.
success
(
true
);
}
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvProgramServiceImpl.java
View file @
1e8babd4
...
...
@@ -97,6 +97,7 @@ public class SrvProgramServiceImpl implements SrvProgramService {
chSrvProgram
.
setProgStatus
(
0
);
chSrvProgram
.
setChargeType
(
0L
);
chSrvProgram
.
setEffTime
(
date
);
chSrvProgram
.
setSrvSendId
(
programDetailVo
.
getSrvSendId
());
chSrvProgramMapper
.
insert
(
chSrvProgram
);
programId
=
chSrvProgram
.
getProgramId
();
// 2.使用服务方案记录的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