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
1e3f8ee5
Commit
1e3f8ee5
authored
May 01, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_nursing_records_20230214' into dev_ch_master
# Conflicts: # apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvTaskDetailMapper.java
parents
ce8123f5
05056064
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
61 deletions
+96
-61
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+1
-8
ChSrvTaskDetailMapper.java
...main/java/com/hungraim/ltc/dao/ChSrvTaskDetailMapper.java
+1
-1
ChSrvTaskMapper.java
...e/src/main/java/com/hungraim/ltc/dao/ChSrvTaskMapper.java
+12
-0
DisableInfoMapper.java
...src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
+3
-0
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+1
-1
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+38
-19
SrvOrganEmpServiceImpl.java
...com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
+7
-4
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+1
-1
DisableInfoMapper.xml
...y-service/src/main/resources/mapper/DisableInfoMapper.xml
+17
-26
SrvProgramServiceImpl.java
...im/ltc/governance/service/impl/SrvProgramServiceImpl.java
+15
-1
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
1e3f8ee5
...
@@ -531,14 +531,7 @@ public class DisableController {
...
@@ -531,14 +531,7 @@ public class DisableController {
if
(
disableExitVO
.
getDisableInfoId
()
==
null
||
disableExitVO
.
getExitReasonId
()
==
null
||
disableExitVO
.
getApplyId
()
==
null
)
{
if
(
disableExitVO
.
getDisableInfoId
()
==
null
||
disableExitVO
.
getExitReasonId
()
==
null
||
disableExitVO
.
getApplyId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
int
i
=
disableService
.
disableInfoExit
(
disableExitVO
);
return
disableService
.
disableInfoExit
(
disableExitVO
);
if
(
i
>
0
)
{
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
}
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvTaskDetailMapper.java
View file @
1e3f8ee5
...
@@ -37,11 +37,11 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
...
@@ -37,11 +37,11 @@ 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
);
List
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailExportList
(
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
);
List
<
ChSrvTaskDetail2Vo
>
chSrvTaskDetailExportList
(
Long
empId
,
String
empName
,
String
status
,
String
sevrTime
);
void
updateChDisabDetailAccounts
(
Long
accountsDetailId
,
BigDecimal
accountsAllCostsub
,
BigDecimal
accountsOverallCostsub
,
BigDecimal
accountsPersonalCostsub
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/ChSrvTaskMapper.java
0 → 100644
View file @
1e3f8ee5
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Mapper
@Repository
public
interface
ChSrvTaskMapper
extends
BaseMapper
<
ChSrvTask
>
{
}
\ No newline at end of file
apply/apply-service/src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
View file @
1e3f8ee5
...
@@ -38,6 +38,9 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
...
@@ -38,6 +38,9 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
List
<
ProgramRespDTO
>
selectProgram
(
String
disabInfoId
,
String
srvOrganId
);
List
<
ProgramRespDTO
>
selectProgram
(
String
disabInfoId
,
String
srvOrganId
);
int
selectSrvSend
(
String
disabInfoId
);
int
updateSrvProgramById
(
ChSrvProgram
chSrvProgram
);
int
updateSrvProgramById
(
ChSrvProgram
chSrvProgram
);
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
1e3f8ee5
...
@@ -185,7 +185,7 @@ public interface DisableService {
...
@@ -185,7 +185,7 @@ public interface DisableService {
Integer
applyMethod
);
Integer
applyMethod
);
in
t
disableInfoExit
(
DisableExitVO
disableExitVO
);
Resul
t
disableInfoExit
(
DisableExitVO
disableExitVO
);
void
disableExitHanlder
(
Integer
exitReasonId
,
Integer
srvOrganId
,
Integer
disableInfoId
,
Date
date
);
void
disableExitHanlder
(
Integer
exitReasonId
,
Integer
srvOrganId
,
Integer
disableInfoId
,
Date
date
);
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
1e3f8ee5
...
@@ -8,6 +8,7 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -8,6 +8,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.api.AttachFeignService
;
...
@@ -30,8 +31,8 @@ import com.hungraim.ltc.util.Result;
...
@@ -30,8 +31,8 @@ import com.hungraim.ltc.util.Result;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.sql.DATE
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.hssf.record.common.FeatSmartTag
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -64,12 +65,15 @@ public class DisableServiceImpl implements DisableService {
...
@@ -64,12 +65,15 @@ public class DisableServiceImpl implements DisableService {
private
final
OrganService
organService
;
private
final
OrganService
organService
;
private
final
ChSrvSendInfoMapper
chSrvSendInfoMapper
;
private
final
ChSrvSendInfoMapper
chSrvSendInfoMapper
;
private
final
ChSrvTaskMapper
chSrvTaskMapper
;
@Autowired
@Autowired
private
ChDisableRiskLevelMapper
chDisableRiskLevelMapper
;
private
ChDisableRiskLevelMapper
chDisableRiskLevelMapper
;
/**
/**
* 获取机构ids
* 获取机构ids
*
*
...
@@ -582,11 +586,10 @@ public class DisableServiceImpl implements DisableService {
...
@@ -582,11 +586,10 @@ public class DisableServiceImpl implements DisableService {
Page
<
DisableInfoListVo
>
disableInfoList
=
disableInfoMapper
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
Page
<
DisableInfoListVo
>
disableInfoList
=
disableInfoMapper
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
List
<
DisableInfoListVo
>
records
=
disableInfoList
.
getRecords
();
List
<
DisableInfoListVo
>
records
=
disableInfoList
.
getRecords
();
for
(
DisableInfoListVo
record
:
records
)
{
for
(
DisableInfoListVo
record
:
records
)
{
if
(
record
.
getExitReasonId
()!=
null
&&
4
==
record
.
getExitReasonId
()
){
if
(
record
.
getExitReasonId
()!=
null
){
Long
disabInfoId
=
record
.
getDisabInfoId
();
Long
disabInfoId
=
record
.
getDisabInfoId
();
Long
srvOrganId1
=
record
.
getSrvOrganId
();
int
count
=
disableInfoMapper
.
selectSrvSend
(
String
.
valueOf
(
disabInfoId
));
List
<
ProgramRespDTO
>
programRespDTOS
=
disableInfoMapper
.
selectProgram
(
String
.
valueOf
(
disabInfoId
),
String
.
valueOf
(
srvOrganId1
));
if
(
count
>
0
)
{
if
(
CollectionUtil
.
isNotEmpty
(
programRespDTOS
))
{
record
.
setExitFlag
(
null
);
record
.
setExitFlag
(
null
);
record
.
setExitReasonId
(
null
);
record
.
setExitReasonId
(
null
);
record
.
setExitTime
(
null
);
record
.
setExitTime
(
null
);
...
@@ -634,7 +637,7 @@ public class DisableServiceImpl implements DisableService {
...
@@ -634,7 +637,7 @@ public class DisableServiceImpl implements DisableService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
in
t
disableInfoExit
(
DisableExitVO
disableExitVO
)
{
public
Resul
t
disableInfoExit
(
DisableExitVO
disableExitVO
)
{
String
exitTime
=
disableExitVO
.
getExitTime
();
String
exitTime
=
disableExitVO
.
getExitTime
();
Integer
applyId
=
disableExitVO
.
getApplyId
();
Integer
applyId
=
disableExitVO
.
getApplyId
();
Integer
exitReasonId
=
disableExitVO
.
getExitReasonId
();
Integer
exitReasonId
=
disableExitVO
.
getExitReasonId
();
...
@@ -660,9 +663,21 @@ public class DisableServiceImpl implements DisableService {
...
@@ -660,9 +663,21 @@ public class DisableServiceImpl implements DisableService {
boolean
now
=
DateUtils
.
isNow
(
date
);
boolean
now
=
DateUtils
.
isNow
(
date
);
if
(
now
)
{
if
(
now
)
{
disableExitHanlder
(
exitReasonId
,
srvOrganId
,
disableInfoId
,
date
);
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
{
return
Result
.
failed
();
}
}
return
result
;
}
}
/**
/**
...
@@ -682,22 +697,23 @@ public class DisableServiceImpl implements DisableService {
...
@@ -682,22 +697,23 @@ public class DisableServiceImpl implements DisableService {
chSrvProgram
.
setEndReason
(
"失能人员退出,终止方案"
);
chSrvProgram
.
setEndReason
(
"失能人员退出,终止方案"
);
disableInfoMapper
.
updateSrvProgramById
(
chSrvProgram
);
disableInfoMapper
.
updateSrvProgramById
(
chSrvProgram
);
UpdateWrapper
updateWrapper2
=
new
UpdateWrapper
();
updateWrapper2
.
eq
(
"DISAB_INFO_ID"
,
Long
.
valueOf
(
disableInfoId
));
updateWrapper2
.
notIn
(
"status"
,
2
);
updateWrapper2
.
set
(
"status"
,
2
);
updateWrapper2
.
set
(
"LCD"
,
new
DATE
());
updateWrapper2
.
set
(
"end_reason"
,
"失能人员退出,计划终止"
);
chSrvTaskMapper
.
update
(
null
,
updateWrapper2
);
ChSrvSend
chSrvSend
=
new
ChSrvSend
();
ChSrvSend
chSrvSend
=
new
ChSrvSend
();
chSrvSend
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvSend
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvSend
.
setEndTime
(
date
);
chSrvSend
.
setEndTime
(
date
);
//4,转入医保 5, 异地 选择原因转入医保和异地,保留原服务机构分配数据,状态为已分配,只终止方案和计划,保留终止后的方案和计划历史数据
if
(
exitReasonId
==
4
||
exitReasonId
==
5
){
// chSrvSend.setStatus((short)3);
// disableInfoMapper.updateSrvSendById(chSrvSend);
// 1, 死亡
}
else
if
(
exitReasonId
==
1
){
// 更新已分配为已退出
// 更新已分配为已退出
chSrvSend
.
setStatus
((
short
)
3
);
chSrvSend
.
setStatus
((
short
)
3
);
disableInfoMapper
.
updateSrvSendById
(
chSrvSend
);
disableInfoMapper
.
updateSrvSendById
(
chSrvSend
);
}
else
{
//4,转入医保 5, 异地 选择原因转入医保和异地,保留原服务机构分配数据,状态为已分配,只终止方案和计划,保留终止后的方案和计划历史数据
chSrvSend
.
setStatus
((
short
)
3
);
if
(
exitReasonId
!=
1
){
// 更新为已退出
disableInfoMapper
.
updateSrvSendById
(
chSrvSend
);
// 插入一条未分配的记录
// 插入一条未分配的记录
ChSrvSend
chSrvSend1
=
new
ChSrvSend
();
ChSrvSend
chSrvSend1
=
new
ChSrvSend
();
chSrvSend1
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvSend1
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
...
@@ -705,6 +721,7 @@ public class DisableServiceImpl implements DisableService {
...
@@ -705,6 +721,7 @@ public class DisableServiceImpl implements DisableService {
chSrvSend1
.
setStatus
((
short
)
0
);
chSrvSend1
.
setStatus
((
short
)
0
);
chSrvSendInfoMapper
.
insert
(
chSrvSend1
);
chSrvSendInfoMapper
.
insert
(
chSrvSend1
);
}
}
if
(
srvOrganId
!=
null
)
{
// 插入历史记录
// 插入历史记录
ChDisableExit
chDisableExit
=
new
ChDisableExit
();
ChDisableExit
chDisableExit
=
new
ChDisableExit
();
chDisableExit
.
setDisabInfoId
(
disableInfoId
);
chDisableExit
.
setDisabInfoId
(
disableInfoId
);
...
@@ -712,6 +729,8 @@ public class DisableServiceImpl implements DisableService {
...
@@ -712,6 +729,8 @@ public class DisableServiceImpl implements DisableService {
chDisableExit
.
setExitTime
(
date
);
chDisableExit
.
setExitTime
(
date
);
chDisableExit
.
setSrvOrganId
(
srvOrganId
);
chDisableExit
.
setSrvOrganId
(
srvOrganId
);
disableExitMapper
.
insert
(
chDisableExit
);
disableExitMapper
.
insert
(
chDisableExit
);
}
}
}
@Override
@Override
...
@@ -742,7 +761,7 @@ public class DisableServiceImpl implements DisableService {
...
@@ -742,7 +761,7 @@ public class DisableServiceImpl implements DisableService {
Long
disabInfoId
=
disableInfoListVo
.
getDisabInfoId
();
Long
disabInfoId
=
disableInfoListVo
.
getDisabInfoId
();
String
exitTime
=
disableInfoListVo
.
getExitTime
();
String
exitTime
=
disableInfoListVo
.
getExitTime
();
Date
date
=
DateUtils
.
strToDate
(
exitTime
);
Date
date
=
DateUtils
.
strToDate
(
exitTime
);
disableExitHanlder
(
exitReasonId
,
srvOrganId
.
intValue
()
,
disabInfoId
.
intValue
(),
date
);
disableExitHanlder
(
exitReasonId
,
null
,
disabInfoId
.
intValue
(),
date
);
}
}
}
}
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/SrvOrganEmpServiceImpl.java
View file @
1e3f8ee5
...
@@ -44,6 +44,7 @@ import java.text.ParseException;
...
@@ -44,6 +44,7 @@ import java.text.ParseException;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
@Service
...
@@ -218,14 +219,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -218,14 +219,15 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
Date
srvEndTime
=
chSrvTaskDetail
.
getSrvEndTime
();
Date
srvEndTime
=
chSrvTaskDetail
.
getSrvEndTime
();
String
srvEndTimeStr
=
DateUtils
.
dateTimeToStr
(
srvEndTime
);
String
srvEndTimeStr
=
DateUtils
.
dateTimeToStr
(
srvEndTime
);
Long
min
=
dateDiff
(
srvStartTimeStr
,
srvEndTimeStr
,
"yyyy-MM-dd HH:mm:ss"
,
"min"
);
Long
min
=
dateDiff
(
srvStartTimeStr
,
srvEndTimeStr
,
"yyyy-MM-dd HH:mm:ss"
,
"min"
);
if
(
min
>=
90
){
if
(
min
>=
90
)
{
Date
srvDate
=
chSrvTaskDetail
.
getSrvDate
();
Date
srvDate
=
chSrvTaskDetail
.
getSrvDate
();
String
srvDateStr
=
DateUtils
.
dateToStrYm
(
srvDate
);
String
srvDateStr
=
DateUtils
.
dateToStrYm
(
srvDate
);
Long
srvTaskId
=
chSrvTaskDetail
.
getSrvTaskId
();
Long
srvTaskId
=
chSrvTaskDetail
.
getSrvTaskId
();
String
disabInfoId
=
chSrvTaskDetailMapper
.
selectBySrvTaskId
(
String
.
valueOf
(
srvTaskId
));
String
disabInfoId
=
chSrvTaskDetailMapper
.
selectBySrvTaskId
(
String
.
valueOf
(
srvTaskId
));
ChDisabDetailAccounts
chDisabDetailAccounts
=
chSrvTaskDetailMapper
.
selectAccountsDetail
(
disabInfoId
,
srvDateStr
);
ChDisabDetailAccounts
chDisabDetailAccounts
=
chSrvTaskDetailMapper
.
selectAccountsDetail
(
disabInfoId
,
srvDateStr
);
if
(
Objects
.
nonNull
(
chDisabDetailAccounts
))
{
Short
status
=
chDisabDetailAccounts
.
getStatus
();
Short
status
=
chDisabDetailAccounts
.
getStatus
();
if
(
status
!=
0
)
{
if
(
status
!=
0
)
{
// 已申报不能进行删除
// 已申报不能进行删除
return
Result
.
failed
(
"已申报不能进行删除"
);
return
Result
.
failed
(
"已申报不能进行删除"
);
}
}
...
@@ -235,8 +237,9 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
...
@@ -235,8 +237,9 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
BigDecimal
accountsAllCostsub
=
accountsAllCost
.
subtract
(
new
BigDecimal
(
75
));
BigDecimal
accountsAllCostsub
=
accountsAllCost
.
subtract
(
new
BigDecimal
(
75
));
BigDecimal
accountsOverallCostsub
=
accountsOverallCost
.
subtract
(
new
BigDecimal
(
60
));
BigDecimal
accountsOverallCostsub
=
accountsOverallCost
.
subtract
(
new
BigDecimal
(
60
));
BigDecimal
accountsPersonalCostsub
=
accountsPersonalCost
.
subtract
(
new
BigDecimal
(
15
));
BigDecimal
accountsPersonalCostsub
=
accountsPersonalCost
.
subtract
(
new
BigDecimal
(
15
));
Long
accountsId
=
chDisabDetailAccounts
.
getAccountsId
();
Long
accountsDetailId
=
chDisabDetailAccounts
.
getAccountsDetailId
();
chSrvTaskDetailMapper
.
updateChDisabDetailAccounts
(
accountsId
,
accountsAllCostsub
,
accountsOverallCostsub
,
accountsPersonalCostsub
);
chSrvTaskDetailMapper
.
updateChDisabDetailAccounts
(
accountsDetailId
,
accountsAllCostsub
,
accountsOverallCostsub
,
accountsPersonalCostsub
);
}
}
}
}
}
chSrvTaskDetailMapper
.
deleteFinshItem
(
taskDetailId
);
chSrvTaskDetailMapper
.
deleteFinshItem
(
taskDetailId
);
...
...
apply/apply-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
1e3f8ee5
...
@@ -128,7 +128,7 @@ WHERE TASK_DETAIL_ID = #{taskDetailId}
...
@@ -128,7 +128,7 @@ WHERE TASK_DETAIL_ID = #{taskDetailId}
<update
id =
"updateChDisabDetailAccounts"
>
<update
id =
"updateChDisabDetailAccounts"
>
UPDATE CH_DISAB_ACCOUNTS_DETAIL d SET d.ACCOUNTS_ALL_COST = #{accountsAllCostsub}, d.ACCOUNTS_OVERALL_COST = #{accountsOverallCostsub},
UPDATE CH_DISAB_ACCOUNTS_DETAIL d SET d.ACCOUNTS_ALL_COST = #{accountsAllCostsub}, d.ACCOUNTS_OVERALL_COST = #{accountsOverallCostsub},
d.ACCOUNTS_PERSONAL_COST = #{accountsPersonalCostsub}
d.ACCOUNTS_PERSONAL_COST = #{accountsPersonalCostsub}
WHERE d.ACCOUNTS_
ID = #{accounts
Id}
WHERE d.ACCOUNTS_
DETAIL_ID = #{accountsDetail
Id}
</update>
</update>
<select
id=
"selectBySrvTaskId"
resultType=
"java.lang.String"
>
<select
id=
"selectBySrvTaskId"
resultType=
"java.lang.String"
>
...
...
apply/apply-service/src/main/resources/mapper/DisableInfoMapper.xml
View file @
1e3f8ee5
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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"
>
<mapper
namespace=
"com.hungraim.ltc.dao.DisableInfoMapper"
>
<select
id=
"getDisableInfoList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
<select
id=
"getDisableInfoList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
with bb as (
with bb as (
SELECT
T2.DISAB_INFO_ID disabInfo
Id,
SELECT
max(T6.SRV_SEND_ID) srvSend
Id,
max(T6.SRV_ORGAN_ID) srvOrgan
Id,
T2.DISAB_INFO_ID disabInfo
Id,
T2.REAL_NAME realName,
T2.REAL_NAME realName,
DECODE(max(T2.SRV_MODE_ID), '1','医疗','2', '养老','3','上门', '4', '异地') svrModelName,
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,
to_char(max(e.EXIT_TIME),'yyyy-MM-dd') exitTime,
max(T2.CERTI_CODE) CERTI_CODE,
max(T2.CERTI_CODE) CERTI_CODE,
max(e.EXIT_REASON_ID) exitReasonId,
max(e.EXIT_REASON_ID) exitReasonId,
...
@@ -16,16 +16,17 @@
...
@@ -16,16 +16,17 @@
max(apply.apply_id) applyId
max(apply.apply_id) applyId
FROM CH_SRV_SEND T6
FROM CH_SRV_SEND T6
LEFT join CH_DISABLE_INFO T2 on T6.DISAB_INFO_ID = T2.DISAB_INFO_ID
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_APPLY apply on apply.APPLY_ID = T2.APPLY_ID
left join CH_DISABLE_EXIT
left join CH_DISABLE_EXIT
e on e.DISAB_INFO_ID = T2.DISAB_INFO_ID
e on e.DISAB_INFO_ID = T2.DISAB_INFO_ID
group by T2.DISAB_INFO_ID,T2.REAL_NAME)
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
select t.*,o.SRV_ORGAN_ID srvOrganId,o.SRV_ORGAN_NAME svrOrganName, ( case when t.exitReasonId is null then null else 1 end ) exitFlag from bb t
left join CH_SRV_SEND s on t.srvSendId = s.SRV_SEND_ID
LEFT JOIN CH_SRV_ORGAN o ON o.SRV_ORGAN_ID = s.SRV_ORGAN_ID
<where>
<where>
1=1
1=1
<if
test=
"srvOrganId != null and srvOrganId != '' and srvOrganId!=0"
>
<if
test=
"srvOrganId != null and srvOrganId != '' and srvOrganId!=0"
>
and
t.srvOrganId
= #{srvOrganId}
and
o.SRV_ORGAN_ID
= #{srvOrganId}
</if>
</if>
<if
test=
"certiCode != null and certiCode != ''"
>
<if
test=
"certiCode != null and certiCode != ''"
>
and t.CERTI_CODE = #{certiCode}
and t.CERTI_CODE = #{certiCode}
...
@@ -44,31 +45,14 @@
...
@@ -44,31 +45,14 @@
<select
id=
"getDisableExitList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
<select
id=
"getDisableExitList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
SELECT distinct T2.DISAB_INFO_ID disabInfoId,
SELECT distinct T2.DISAB_INFO_ID disabInfoId,
T1.PROGRAM_ID programId,
T6.SRV_ORGAN_ID srvOrganId,
T5.DISTRICT_PROVINCIAL districtProvincial,
T5.DISTRICT_CITY districtCity,
T2.REAL_NAME realName,
T7.MODE_NAME svrModelName,
T5.SRV_ORGAN_NAME svrOrganName,
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime,
T2.CERTI_CODE certiCode,
T2.CERTI_CODE certiCode,
T2.APPLY_ID applyId,
T2.APPLY_ID applyId,
to_char(T2.EXIT_TIME,'yyyy-MM-dd') exitTime,
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_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId
T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2
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
where T2.EXIT_TIME is not null
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 T6.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
where T2.EXIT_TIME is not null
and T2.EXIT_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd')
and T2.EXIT_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd')
</select>
</select>
...
@@ -85,6 +69,7 @@
...
@@ -85,6 +69,7 @@
<update
id=
"updateSrvProgramById"
parameterType=
"com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram"
>
<update
id=
"updateSrvProgramById"
parameterType=
"com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram"
>
update CH_SRV_PROGRAM g set g.PROG_STATUS ='2',g.END_REASON = #{endReason} where
update CH_SRV_PROGRAM g set g.PROG_STATUS ='2',g.END_REASON = #{endReason} where
g.DISAB_INFO_ID =#{disabInfoId} and g.PROGRAM_DATE
<![CDATA[ < ]]>
sysdate
g.DISAB_INFO_ID =#{disabInfoId} and g.PROGRAM_DATE
<![CDATA[ < ]]>
sysdate
and g.PROG_STATUS
<![CDATA[ <> ]]>
'2'
</update>
</update>
<update
id=
"updateSrvSendById"
parameterType=
"com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend"
>
<update
id=
"updateSrvSendById"
parameterType=
"com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend"
>
...
@@ -102,5 +87,10 @@
...
@@ -102,5 +87,10 @@
<![CDATA[ t.PROG_STATUS<> 2 ]]>
order by t.FCD desc
<![CDATA[ t.PROG_STATUS<> 2 ]]>
order by t.FCD desc
</select>
</select>
<select
id=
"selectSrvSend"
resultType=
"java.lang.Integer"
>
select count(*) from CH_SRV_SEND t where t.DISAB_INFO_ID = #{disabInfoId} and
t.STATUS = 1
</select>
</mapper>
</mapper>
\ No newline at end of file
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvProgramServiceImpl.java
View file @
1e3f8ee5
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.governance.dao.ChSrvProgramMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvProgramMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvProgramSetMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvProgramSetMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvSendMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvSendMapper
;
import
com.hungraim.ltc.governance.dao.ChSrvTaskMapper
;
import
com.hungraim.ltc.governance.service.SrvProgramService
;
import
com.hungraim.ltc.governance.service.SrvProgramService
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
...
@@ -19,6 +21,7 @@ import com.hungraim.ltc.util.AttachType;
...
@@ -19,6 +21,7 @@ import com.hungraim.ltc.util.AttachType;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
oracle.sql.DATE
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -43,6 +46,9 @@ public class SrvProgramServiceImpl implements SrvProgramService {
...
@@ -43,6 +46,9 @@ public class SrvProgramServiceImpl implements SrvProgramService {
@Autowired
@Autowired
private
AttachFeignService
attachFeignService
;
private
AttachFeignService
attachFeignService
;
@Autowired
private
ChSrvTaskMapper
chSrvTaskMapper
;
@Override
@Override
public
Page
<
SvrSendListVo
>
getProgramList
(
Page
<
SvrSendListVo
>
page
,
Long
srvOrganId
,
String
realName
,
String
realTel
,
String
programStatus
)
{
public
Page
<
SvrSendListVo
>
getProgramList
(
Page
<
SvrSendListVo
>
page
,
Long
srvOrganId
,
String
realName
,
String
realTel
,
String
programStatus
)
{
return
chSrvSendMapper
.
selectSrvSendList
(
page
,
srvOrganId
,
realName
,
realTel
,
programStatus
);
return
chSrvSendMapper
.
selectSrvSendList
(
page
,
srvOrganId
,
realName
,
realTel
,
programStatus
);
...
@@ -151,7 +157,15 @@ public class SrvProgramServiceImpl implements SrvProgramService {
...
@@ -151,7 +157,15 @@ public class SrvProgramServiceImpl implements SrvProgramService {
chSrvProgram
.
setProgramId
(
programId
);
chSrvProgram
.
setProgramId
(
programId
);
chSrvProgram
.
setEndReason
(
endReason
);
chSrvProgram
.
setEndReason
(
endReason
);
chSrvProgram
.
setProgStatus
(
2
);
chSrvProgram
.
setProgStatus
(
2
);
chSrvProgramMapper
.
updateById
(
chSrvProgram
);
int
updateCount
=
chSrvProgramMapper
.
updateById
(
chSrvProgram
);
if
(
updateCount
>
0
)
{
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
);
}
}
}
@Override
@Override
...
...
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