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
33aab16f
Commit
33aab16f
authored
Mar 09, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_nursing_records_20230214' into dev_ch_master
parents
7209008c
51e4721e
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
115 additions
and
222 deletions
+115
-222
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+19
-6
ChDisabAccountsDetailMapper.java
...hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
+2
-4
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+0
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+31
-153
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+24
-49
ChDisabAccountsMapper.xml
...rvice/src/main/resources/mapper/ChDisabAccountsMapper.xml
+1
-1
ChDisabFreeRdInfoMapper.xml
...ice/src/main/resources/mapper/ChDisabFreeRdInfoMapper.xml
+4
-0
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+3
-0
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+3
-1
DisableInfoMapper.xml
...y-service/src/main/resources/mapper/DisableInfoMapper.xml
+5
-2
ChAssessDetailAccountsMapper.xml
...rc/main/resources/mapper/ChAssessDetailAccountsMapper.xml
+3
-3
NursingReqVO.java
...va/com/hungraim/ltc/pojo/entity/account/NursingReqVO.java
+2
-1
OverallCostListRespVO.java
...ngraim/ltc/pojo/entity/account/OverallCostListRespVO.java
+2
-0
OverallCostReqVO.java
...om/hungraim/ltc/pojo/entity/account/OverallCostReqVO.java
+2
-0
ChAssessDetailAccountsResp.java
...tc/pojo/entity/assessment/ChAssessDetailAccountsResp.java
+6
-0
AssessAccountsExportResp.java
...ungraim/ltc/pojo/vo/account/AssessAccountsExportResp.java
+3
-0
SrvOrganListReq.java
...ava/com/hungraim/ltc/pojo/vo/account/SrvOrganListReq.java
+2
-0
SrvTaskReqVO.java
...n/java/com/hungraim/ltc/pojo/vo/account/SrvTaskReqVO.java
+2
-0
SrvTaskScheduledServiceImpl.java
...m/ltc/governance/service/SrvTaskScheduledServiceImpl.java
+1
-1
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
33aab16f
...
@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.vo.account.*;
...
@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.vo.account.*;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.FileUtils
;
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
com.hungraim.ltc.util.TokenParsingUtil
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -129,7 +130,9 @@ public class AccountController {
...
@@ -129,7 +130,9 @@ public class AccountController {
* @return 返回
* @return 返回
*/
*/
@GetMapping
(
"/getSrvTaskList"
)
@GetMapping
(
"/getSrvTaskList"
)
public
Result
<
Page
<
SrvTaskRespVO
>>
getSrvTaskList
(
SrvTaskReqVO
srvTaskReqVO
)
{
public
Result
<
Page
<
SrvTaskRespVO
>>
getSrvTaskList
(
@RequestHeader
(
"Authorization"
)
String
token
,
SrvTaskReqVO
srvTaskReqVO
)
{
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
srvTaskReqVO
.
setSrvOrganId
(
srvOrganId
);
return
Result
.
success
(
accountService
.
getSrvTaskList
(
srvTaskReqVO
));
return
Result
.
success
(
accountService
.
getSrvTaskList
(
srvTaskReqVO
));
}
}
...
@@ -141,9 +144,11 @@ public class AccountController {
...
@@ -141,9 +144,11 @@ public class AccountController {
* @return 返回
* @return 返回
*/
*/
@GetMapping
(
"/searchSrvOrganAccountList"
)
@GetMapping
(
"/searchSrvOrganAccountList"
)
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganAccountList
(
SrvOrganListReq
srvOrganListReq
)
{
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganAccountList
(
@RequestHeader
(
"Authorization"
)
String
token
,
SrvOrganListReq
srvOrganListReq
)
{
List
<
String
>
list
=
Arrays
.
asList
(
"1"
);
List
<
String
>
list
=
Arrays
.
asList
(
"1"
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
srvOrganListReq
.
setSrvOrganId
(
srvOrganId
);
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
}
}
...
@@ -154,9 +159,11 @@ public class AccountController {
...
@@ -154,9 +159,11 @@ public class AccountController {
* @return 返回
* @return 返回
*/
*/
@GetMapping
(
"/searchSrvOrganReviewList"
)
@GetMapping
(
"/searchSrvOrganReviewList"
)
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganReviewList
(
SrvOrganListReq
srvOrganListReq
)
{
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganReviewList
(
@RequestHeader
(
"Authorization"
)
String
token
,
SrvOrganListReq
srvOrganListReq
)
{
List
<
String
>
list
=
Arrays
.
asList
(
"2"
,
"3"
,
"4"
);
List
<
String
>
list
=
Arrays
.
asList
(
"2"
,
"3"
,
"4"
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
srvOrganListReq
.
setSrvOrganId
(
srvOrganId
);
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
}
}
...
@@ -203,9 +210,11 @@ public class AccountController {
...
@@ -203,9 +210,11 @@ public class AccountController {
* @return
* @return
*/
*/
@GetMapping
(
"/queryAccountsDeclareList"
)
@GetMapping
(
"/queryAccountsDeclareList"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryAccountsDeclareList
(
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryAccountsDeclareList
(
@RequestHeader
(
"Authorization"
)
String
token
,
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
List
<
String
>
accountsStatusList
=
Arrays
.
asList
(
"0"
,
"1"
);
List
<
String
>
accountsStatusList
=
Arrays
.
asList
(
"0"
,
"1"
);
srvOrganListReq
.
setAccountsStatusList
(
accountsStatusList
);
srvOrganListReq
.
setAccountsStatusList
(
accountsStatusList
);
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
srvOrganListReq
.
setSrvOrganId
(
srvOrganId
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
return
Result
.
success
(
chAssessDetailAccounts
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
}
...
@@ -216,9 +225,11 @@ public class AccountController {
...
@@ -216,9 +225,11 @@ public class AccountController {
* @return
* @return
*/
*/
@GetMapping
(
"/queryDelayAccountList"
)
@GetMapping
(
"/queryDelayAccountList"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryDelayAccountList
(
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryDelayAccountList
(
@RequestHeader
(
"Authorization"
)
String
token
,
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
List
<
String
>
list
=
Arrays
.
asList
(
"1"
,
"2"
);
List
<
String
>
list
=
Arrays
.
asList
(
"1"
,
"2"
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
srvOrganListReq
.
setSrvOrganId
(
srvOrganId
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
return
Result
.
success
(
chAssessDetailAccounts
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
}
...
@@ -320,7 +331,9 @@ public class AccountController {
...
@@ -320,7 +331,9 @@ public class AccountController {
}
}
@GetMapping
(
"/queryOverallCostList"
)
@GetMapping
(
"/queryOverallCostList"
)
public
Result
<
Page
<
OverallCostListRespVO
>>
queryOverallCostList
(
OverallCostReqVO
req
)
{
public
Result
<
Page
<
OverallCostListRespVO
>>
queryOverallCostList
(
@RequestHeader
(
"Authorization"
)
String
token
,
OverallCostReqVO
req
)
{
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
req
.
setSrvOrganId
(
srvOrganId
);
Page
<
OverallCostListRespVO
>
overallCostRecords
=
accountService
.
queryFreeRdInfo
(
req
);
Page
<
OverallCostListRespVO
>
overallCostRecords
=
accountService
.
queryFreeRdInfo
(
req
);
return
Result
.
success
(
overallCostRecords
);
return
Result
.
success
(
overallCostRecords
);
}
}
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
View file @
33aab16f
...
@@ -17,12 +17,8 @@ import java.util.List;
...
@@ -17,12 +17,8 @@ import java.util.List;
@Repository
@Repository
public
interface
ChDisabAccountsDetailMapper
extends
BaseMapper
<
ChDisabDetailAccounts
>
{
public
interface
ChDisabAccountsDetailMapper
extends
BaseMapper
<
ChDisabDetailAccounts
>
{
List
<
OrganAccountsVO
>
getOrganAccountsList
(
String
taskDetailId
);
List
<
AccountExportDetailListResp
>
searchSrvOrganAccountDetailExport
(
SrvOrganListReq
req
);
List
<
AccountExportDetailListResp
>
searchSrvOrganAccountDetailExport
(
SrvOrganListReq
req
);
List
<
ChDisabDetailAccounts
>
queryAccountByCondition
(
@Param
(
"taskDetailIds"
)
List
<
String
>
taskDetailIds
);
List
<
OrganAccountsVO
>
getOtherPlaceList
(
String
programId
);
List
<
OrganAccountsVO
>
getOtherPlaceList
(
String
programId
);
...
@@ -30,6 +26,8 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
...
@@ -30,6 +26,8 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
NursingReqVO
req
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
NursingReqVO
req
);
Page
<
NursingRecordsRespVO
>
queryNursingRecordsGoDoor
(
Page
page
,
NursingReqVO
req
);
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
);
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
33aab16f
...
@@ -47,7 +47,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
...
@@ -47,7 +47,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
int
updateChDisabAccounts
(
int
id
);
int
updateChDisabAccounts
(
int
id
);
Result
organAccountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
Result
accountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
Result
accountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
33aab16f
...
@@ -17,7 +17,6 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard;
...
@@ -17,7 +17,6 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskFinishItem
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
com.hungraim.ltc.util.*
;
import
com.hungraim.ltc.util.*
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -476,18 +475,14 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -476,18 +475,14 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
@Override
public
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
NursingReqVO
nursingReqVO
)
{
public
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
NursingReqVO
nursingReqVO
)
{
String
modeName
=
nursingReqVO
.
getModeName
();
String
modeName
=
nursingReqVO
.
getModeName
();
String
modeId
=
""
;
Page
<
NursingRecordsRespVO
>
nursingRecordsRespVOPage
=
null
;
if
(
"医疗"
.
equals
(
modeName
)){
if
(
"上门"
.
equals
(
modeName
)){
modeId
=
"1"
;
nursingRecordsRespVOPage
=
chDisabAccountsDetailMapper
.
queryNursingRecordsGoDoor
(
new
Page
<>(
nursingReqVO
.
getPageNum
(),
nursingReqVO
.
getPageSize
()),
nursingReqVO
);
}
else
if
(
"养老"
.
equals
(
modeName
))
{
}
else
{
modeId
=
"2"
;
nursingReqVO
.
setModeId
(
"医疗"
.
equals
(
modeName
)
?
"1"
:
"2"
);
}
else
if
(
"上门"
.
equals
(
modeName
)){
nursingRecordsRespVOPage
=
chDisabAccountsDetailMapper
.
queryNursingRecords
(
new
Page
<>(
nursingReqVO
.
getPageNum
(),
nursingReqVO
.
getPageSize
()),
nursingReqVO
);
modeId
=
"3"
;
}
else
if
(
"异地"
.
equals
(
modeName
)){
modeId
=
"4"
;
}
}
nursingReqVO
.
setModeId
(
modeId
);
return
nursingRecordsRespVOPage
;
return
chDisabAccountsDetailMapper
.
queryNursingRecords
(
new
Page
<>(
nursingReqVO
.
getPageNum
(),
nursingReqVO
.
getPageSize
()),
nursingReqVO
);
}
}
@Override
@Override
...
@@ -528,7 +523,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -528,7 +523,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts
.
setDeductionAmount
(
deductionAmount
.
add
(
amountOfMoney
));
chDisabDetailAccounts
.
setDeductionAmount
(
deductionAmount
.
add
(
amountOfMoney
));
deductionAmountTotal
=
deductionAmountTotal
.
add
(
amountOfMoney
);
deductionAmountTotal
=
deductionAmountTotal
.
add
(
amountOfMoney
);
}
}
chDisabDetailAccounts
.
setRemarks
(
req
.
getRemarks
());
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
chDisabAccounts
.
setReissueAmountTotal
(
reissueAmountTotal
);
chDisabAccounts
.
setReissueAmountTotal
(
reissueAmountTotal
);
chDisabAccounts
.
setDeductionAmountTotal
(
deductionAmountTotal
);
chDisabAccounts
.
setDeductionAmountTotal
(
deductionAmountTotal
);
...
@@ -539,6 +533,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -539,6 +533,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabFreeRdInfo
.
setAccountsDetailId
(
accountsDetailId
);
chDisabFreeRdInfo
.
setAccountsDetailId
(
accountsDetailId
);
chDisabFreeRdInfo
.
setAccountsId
(
accountsId
);
chDisabFreeRdInfo
.
setAccountsId
(
accountsId
);
chDisabFreeRdInfo
.
setCreationTime
(
new
Date
());
chDisabFreeRdInfo
.
setCreationTime
(
new
Date
());
chDisabFreeRdInfo
.
setRemarks
(
req
.
getRemarks
());
chDisabFreeRdInfoMapper
.
insert
(
chDisabFreeRdInfo
);
chDisabFreeRdInfoMapper
.
insert
(
chDisabFreeRdInfo
);
return
result
;
return
result
;
}
}
...
@@ -660,8 +655,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -660,8 +655,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
String
planId
=
accountsVO
.
getPlanId
();
String
planId
=
accountsVO
.
getPlanId
();
// 更新
// 更新
chDisabAccountsDetailMapper
.
updateByPlanId
(
planId
);
chDisabAccountsDetailMapper
.
updateByPlanId
(
planId
);
}
else
{
}
else
{
BigDecimal
accountsAllCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
accountsAllCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
...
@@ -675,119 +668,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -675,119 +668,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
organAccountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
)
{
log
.
info
(
"organAccountTaskExecute.accountTaskExecuteReqVOS:{}"
,
accountTaskExecuteReqVOS
);
if
(
CollectionUtil
.
isEmpty
(
accountTaskExecuteReqVOS
))
{
return
Result
.
failed
(
"参数不能为空"
);
}
List
<
String
>
taskDetailIds
=
accountTaskExecuteReqVOS
.
stream
().
map
(
AccountTaskExecuteReqVO:
:
getTaskDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
// 根据任务id查找结算详情,还没有对应的任务数据说明还未发生过结算,进行插入详情表和结算表
List
<
ChDisabDetailAccounts
>
chDisabDetailList
=
chDisabAccountsDetailMapper
.
queryAccountByCondition
(
taskDetailIds
);
// 根据任务id分组,一个任务下会有多个项目,任务id相同
Map
<
String
,
List
<
AccountTaskExecuteReqVO
>>
accountTaskMap
=
accountTaskExecuteReqVOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
AccountTaskExecuteReqVO:
:
getTaskDetailId
));
for
(
Map
.
Entry
<
String
,
List
<
AccountTaskExecuteReqVO
>>
entry:
accountTaskMap
.
entrySet
())
{
String
taskDetailId
=
entry
.
getKey
();
// 已完成的任务,一个任务下有服务完成就产生结算,多个服务完成算一条服务的结算(实际上结算详情有一条记录就产生结算费用)
List
<
ChSrvTaskFinishItem
>
chSrvTaskFinishItems
=
chSrvTaskFinishItemMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvTaskFinishItem
>()
.
eq
(
ChSrvTaskFinishItem:
:
getTaskDetailId
,
taskDetailId
));
List
<
AccountTaskExecuteReqVO
>
accountTaskList
=
entry
.
getValue
();
// 处理具体的服务项目
try
{
for
(
AccountTaskExecuteReqVO
accountTaskExecuteReqVO
:
accountTaskList
)
{
// 已完成的任务更新ch_srv_plan状态
String
planId
=
accountTaskExecuteReqVO
.
getPlanId
();
Integer
integer
=
chSrvTaskDetailMapper
.
updateSrvPlanById
(
planId
);
if
(
integer
==
0
){
log
.
info
(
"更新任务计划表失败"
);
}
if
(
CollectionUtil
.
isNotEmpty
(
chSrvTaskFinishItems
))
{
List
<
ChSrvTaskFinishItem
>
chSrvTaskFinishItemStream
=
chSrvTaskFinishItems
.
stream
()
.
filter
(
s
->
s
.
getItemId
().
equals
(
Long
.
valueOf
(
accountTaskExecuteReqVO
.
getItemId
()))).
collect
(
Collectors
.
toList
());
// 如果存在就不插入了
if
(
CollectionUtil
.
isNotEmpty
(
chSrvTaskFinishItemStream
))
{
log
.
info
(
"chSrvTaskFinishItemStream is totEmpty:{}"
,
chSrvTaskFinishItemStream
);
return
Result
.
success
();
}
}
ChSrvTaskFinishItem
chSrvTaskFinishItem
=
new
ChSrvTaskFinishItem
();
chSrvTaskFinishItem
.
setTaskDetailId
(
Long
.
valueOf
(
accountTaskExecuteReqVO
.
getTaskDetailId
()));
chSrvTaskFinishItem
.
setItemId
(
Long
.
valueOf
(
accountTaskExecuteReqVO
.
getItemId
()));
chSrvTaskFinishItemMapper
.
insert
(
chSrvTaskFinishItem
);
ChSrvTaskDetail
ca
=
new
ChSrvTaskDetail
();
ca
.
setStatus
((
short
)
4
);
ca
.
setTaskDetailId
(
Long
.
valueOf
(
accountTaskExecuteReqVO
.
getTaskDetailId
()));
chSrvTaskDetailMapper
.
updateById
(
ca
);
}
accountSave
(
taskDetailId
,
chDisabDetailList
);
}
catch
(
Exception
e
)
{
log
.
info
(
"=====accountSave error:{}"
,
e
);
return
Result
.
failed
(
"服务异常"
);
}
}
return
Result
.
success
();
}
private
void
accountSave
(
String
taskDetailId
,
List
<
ChDisabDetailAccounts
>
chDisabDetailList
)
{
if
(
CollectionUtil
.
isEmpty
(
chDisabDetailList
))
{
List
<
OrganAccountsVO
>
accountsList
=
chDisabAccountsDetailMapper
.
getOrganAccountsList
(
taskDetailId
);
for
(
OrganAccountsVO
accountsVO
:
accountsList
)
{
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
String
srvOrganId
=
accountsVO
.
getSrvOrganId
();
// 结算时间为任务时间
Date
accountsTime
=
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
());
String
disabInfoId
=
accountsVO
.
getDisabInfoId
();
//要判断是养老还是医疗,因为费用不一样
BigDecimal
limit
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
overallPercent
=
BigDecimal
.
valueOf
(
0.7
);
BigDecimal
personalPercent
=
BigDecimal
.
valueOf
(
0.3
);
String
srvModeName
=
accountsVO
.
getSrvModeName
();
// 养老机构护理,其限额为 50 元/人/天 由长期护理保险基金支付 70% 个人支付 30%
if
(
"养老"
.
equals
(
srvModeName
))
{
limit
=
BigDecimal
.
valueOf
(
50
);
// 医疗机构护理,原则上收治医疗护理需求为主的重度失能人员一级及以下医疗机构其限额为 80 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
}
else
if
(
"医疗"
.
equals
(
srvModeName
)
&&
"1"
.
equals
(
accountsVO
.
getLevelCode
()))
{
limit
=
BigDecimal
.
valueOf
(
80
);
// 二级及以上医疗机构其限额为 100 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
}
else
if
(
"医疗"
.
equals
(
srvModeName
)
&&
(!
"1"
.
equals
(
accountsVO
.
getLevelCode
())))
{
limit
=
BigDecimal
.
valueOf
(
100
);
}
else
{
break
;
}
// 根据护理机构、结算月份、失能人员id和服务方式查询表里是否有值
// ChDisabDetailAccounts chDisabDetailAccountsDTO = chDisabAccountsDetailMapper.queryDisabDetailAccounts(srvOrganId, DateUtils.dateToStrYm(accountsTime), disabInfoId, srvModeName);
chDisabDetailAccounts
.
setAccountsAllCost
(
limit
);
BigDecimal
overallCost
=
limit
.
multiply
(
overallPercent
);
chDisabDetailAccounts
.
setAccountsOverallCost
(
overallCost
);
BigDecimal
personalCost
=
limit
.
multiply
(
personalPercent
);
chDisabDetailAccounts
.
setAccountsPersonalCost
(
personalCost
);
chDisabDetailAccounts
.
setModeName
(
accountsVO
.
getSrvModeName
());
chDisabDetailAccounts
.
setSrvOrganId
(
srvOrganId
);
chDisabDetailAccounts
.
setEmpId
(
accountsVO
.
getEmpId
());
chDisabDetailAccounts
.
setCreationTime
(
new
Date
());
chDisabDetailAccounts
.
setAccountsTime
(
accountsTime
);
chDisabDetailAccounts
.
setAccountsStartTime
(
DateUtils
.
getFirstDayOfMonth
(
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
())));
chDisabDetailAccounts
.
setAccountsEndTime
(
DateUtils
.
getlastDayOfMonth
(
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
())));
// chDisabDetailAccounts.setTaskDetailId(accountsVO.getTaskDetailId());
chDisabDetailAccounts
.
setMedicalArea
(
accountsVO
.
getMedicalArea
());
chDisabDetailAccounts
.
setDisabInfoId
(
disabInfoId
);
chDisabDetailAccounts
.
setStatus
((
short
)
0
);
chDisabDetailAccounts
.
setReissueAmount
(
BigDecimal
.
valueOf
(
0
));
chDisabDetailAccounts
.
setDeductionAmount
(
BigDecimal
.
valueOf
(
0
));
ChDisabAccounts
chDisabAccounts
=
getChDisabAccounts
(
accountsVO
,
limit
,
overallCost
,
personalCost
);
chDisabDetailAccounts
.
setAccountsId
(
chDisabAccounts
.
getAccountsId
());
chDisabAccountsDetailMapper
.
insert
(
chDisabDetailAccounts
);
}
}
}
private
ChDisabAccounts
getChDisabAccounts1
(
AccountTaskExecuteReqVO
accountsVO
)
{
private
ChDisabAccounts
getChDisabAccounts1
(
AccountTaskExecuteReqVO
accountsVO
)
{
// 结算表 根据机构和结算时间 服务方式
// 结算表 根据机构和结算时间 服务方式
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
queryAccountByCondition
(
DateUtils
.
dateToStrYm
(
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
())),
accountsVO
.
getSrvModeName
(),
accountsVO
.
getSrvOrganId
(),
null
);
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
queryAccountByCondition
(
DateUtils
.
dateToStrYm
(
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
())),
accountsVO
.
getSrvModeName
(),
accountsVO
.
getSrvOrganId
(),
null
);
...
@@ -810,30 +690,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -810,30 +690,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
}
private
ChDisabAccounts
getChDisabAccounts
(
OrganAccountsVO
accountsVO
,
BigDecimal
limit
,
BigDecimal
overallCost
,
BigDecimal
personalCost
)
{
// 结算表 根据机构和结算时间 服务方式
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
queryAccountByCondition
(
DateUtils
.
dateToStrYm
(
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
())),
accountsVO
.
getSrvModeName
(),
accountsVO
.
getSrvOrganId
(),
null
);
if
(
chDisabAccounts
==
null
)
{
chDisabAccounts
=
new
ChDisabAccounts
();
chDisabAccounts
.
setModeName
(
accountsVO
.
getSrvModeName
());
chDisabAccounts
.
setAccountsTime
(
DateUtils
.
strToTime
(
accountsVO
.
getSrvDate
()));
chDisabAccounts
.
setSrvOrganId
(
Long
.
valueOf
(
accountsVO
.
getSrvOrganId
()));
chDisabAccounts
.
setCreationTime
(
new
Date
());
chDisabAccounts
.
setAccountsStatus
((
short
)
0
);
BigDecimal
zero
=
BigDecimal
.
valueOf
(
0
);
chDisabAccounts
.
setAllCost
(
zero
);
chDisabAccounts
.
setOverallCost
(
zero
);
chDisabAccounts
.
setPersonalCost
(
zero
);
chDisabAccounts
.
setReissueAmountTotal
(
zero
);
chDisabAccounts
.
setDeductionAmountTotal
(
zero
);
disabAccountsMapper
.
insert
(
chDisabAccounts
);
}
return
chDisabAccounts
;
}
@Override
@Override
public
void
otherPlaceHandler
(
String
programId
){
public
void
otherPlaceHandler
(
String
programId
){
List
<
OrganAccountsVO
>
accountsList
=
chDisabAccountsDetailMapper
.
getOtherPlaceList
(
programId
);
/*
List<OrganAccountsVO> accountsList = chDisabAccountsDetailMapper.getOtherPlaceList(programId);
for (OrganAccountsVO accountsVO : accountsList) {
for (OrganAccountsVO accountsVO : accountsList) {
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
chDisabDetailAccounts.setSrvOrganId(accountsVO.getSrvOrganId());
chDisabDetailAccounts.setSrvOrganId(accountsVO.getSrvOrganId());
...
@@ -854,10 +713,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -854,10 +713,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts.setTaskDetailId(accountsVO.getTaskDetailId());
chDisabDetailAccounts.setTaskDetailId(accountsVO.getTaskDetailId());
chDisabDetailAccounts.setMedicalArea(accountsVO.getMedicalArea());
chDisabDetailAccounts.setMedicalArea(accountsVO.getMedicalArea());
chDisabDetailAccounts.setDisabInfoId(accountsVO.getDisabInfoId());
chDisabDetailAccounts.setDisabInfoId(accountsVO.getDisabInfoId());
ChDisabAccounts
chDisabAccounts
=
getChDisabAccounts
(
accountsVO
,
limit
,
zero
,
zero
);
ChDisabAccounts chDisabAccounts = getChDisabAccounts
1(accountsVO
);
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
}
}
*/
}
}
@Override
@Override
...
@@ -934,10 +793,14 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -934,10 +793,14 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal
accountsAllCost
=
chDisabDetailAccountDTO
.
getAccountsAllCost
();
BigDecimal
accountsAllCost
=
chDisabDetailAccountDTO
.
getAccountsAllCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountDTO
.
getAccountsOverallCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountDTO
.
getAccountsOverallCost
();
BigDecimal
accountsPersonalCost
=
chDisabDetailAccountDTO
.
getAccountsPersonalCost
();
BigDecimal
accountsPersonalCost
=
chDisabDetailAccountDTO
.
getAccountsPersonalCost
();
BigDecimal
deductionAmount
=
chDisabDetailAccountDTO
.
getDeductionAmount
();
BigDecimal
reissueAmount
=
chDisabDetailAccountDTO
.
getReissueAmount
();
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
BigDecimal
allCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
allCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
overallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
overallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
personalCost
=
chDisabAccountDTO
.
getPersonalCost
();
BigDecimal
personalCost
=
chDisabAccountDTO
.
getPersonalCost
();
BigDecimal
deductionAmountTotal
=
chDisabAccountDTO
.
getDeductionAmountTotal
();
BigDecimal
reissueAmountTotal
=
chDisabAccountDTO
.
getReissueAmountTotal
();
Short
accountsStatus
=
chDisabAccountDTO
.
getAccountsStatus
();
Short
accountsStatus
=
chDisabAccountDTO
.
getAccountsStatus
();
if
(
accountsStatus
>
1
)
{
if
(
accountsStatus
>
1
)
{
log
.
info
(
"{},已完成审核"
,
accountsDetailId
);
log
.
info
(
"{},已完成审核"
,
accountsDetailId
);
...
@@ -948,11 +811,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -948,11 +811,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
allCost
=
allCost
.
subtract
(
accountsAllCost
);
allCost
=
allCost
.
subtract
(
accountsAllCost
);
overallCost
=
overallCost
.
subtract
(
accountsOverallCost
);
overallCost
=
overallCost
.
subtract
(
accountsOverallCost
);
personalCost
=
personalCost
.
subtract
(
accountsPersonalCost
);
personalCost
=
personalCost
.
subtract
(
accountsPersonalCost
);
BigDecimal
deductionAmountTotalSub
=
deductionAmountTotal
.
subtract
(
deductionAmount
);
BigDecimal
reissueAmountTotalSub
=
reissueAmountTotal
.
subtract
(
reissueAmount
);
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
chDisabAccount
.
setAllCost
(
allCost
);
chDisabAccount
.
setAllCost
(
allCost
);
chDisabAccount
.
setOverallCost
(
overallCost
);
chDisabAccount
.
setOverallCost
(
overallCost
);
chDisabAccount
.
setPersonalCost
(
personalCost
);
chDisabAccount
.
setPersonalCost
(
personalCost
);
chDisabAccount
.
setAccountsId
(
accountsId
);
chDisabAccount
.
setAccountsId
(
accountsId
);
chDisabAccount
.
setDeductionAmountTotal
(
deductionAmountTotalSub
);
chDisabAccount
.
setReissueAmountTotal
(
reissueAmountTotalSub
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
// 恢复
// 恢复
}
else
if
(
status
==
1
){
}
else
if
(
status
==
1
){
...
@@ -960,18 +827,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -960,18 +827,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
//结算记录
//结算记录
Date
accountsTime
=
chDisabDetailAccountDTO
.
getAccountsTime
();
Date
accountsTime
=
chDisabDetailAccountDTO
.
getAccountsTime
();
Boolean
aBoolean
=
DateUtils
.
inCurrentMonth
(
accountsTime
);
Boolean
aBoolean
=
DateUtils
.
inCurrentMonth
(
accountsTime
);
// 同一个月
if
(
aBoolean
){
if
(
aBoolean
){
allCost
=
allCost
.
add
(
accountsAllCost
);
allCost
=
allCost
.
add
(
accountsAllCost
);
overallCost
=
overallCost
.
add
(
accountsOverallCost
);
overallCost
=
overallCost
.
add
(
accountsOverallCost
);
personalCost
=
personalCost
.
add
(
accountsPersonalCost
);
personalCost
=
personalCost
.
add
(
accountsPersonalCost
);
BigDecimal
reissueAmountAdd
=
reissueAmountTotal
.
add
(
reissueAmount
);
BigDecimal
deductionAmountAdd
=
deductionAmountTotal
.
add
(
deductionAmount
);
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
chDisabAccount
.
setAllCost
(
allCost
);
chDisabAccount
.
setAllCost
(
allCost
);
chDisabAccount
.
setOverallCost
(
overallCost
);
chDisabAccount
.
setOverallCost
(
overallCost
);
chDisabAccount
.
setPersonalCost
(
personalCost
);
chDisabAccount
.
setPersonalCost
(
personalCost
);
chDisabAccount
.
setAccountsId
(
accountsId
);
chDisabAccount
.
setAccountsId
(
accountsId
);
chDisabAccount
.
setReissueAmountTotal
(
reissueAmountAdd
);
chDisabAccount
.
setDeductionAmountTotal
(
deductionAmountAdd
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
}
else
{
}
else
{
// 结算
表加一个是否暂缓字段 1
暂缓
// 结算
到其他月份 结算表加一个是否暂缓字段 2
暂缓
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
queryAccountByCondition
(
DateUtils
.
dateToStrYm
(
new
Date
()),
chDisabDetailAccountDTO
.
getModeName
(),
chDisabDetailAccountDTO
.
getSrvOrganId
(),
2
);
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
queryAccountByCondition
(
DateUtils
.
dateToStrYm
(
new
Date
()),
chDisabDetailAccountDTO
.
getModeName
(),
chDisabDetailAccountDTO
.
getSrvOrganId
(),
2
);
if
(
chDisabAccounts
==
null
)
{
if
(
chDisabAccounts
==
null
)
{
chDisabAccounts
=
new
ChDisabAccounts
();
chDisabAccounts
=
new
ChDisabAccounts
();
...
@@ -995,6 +867,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -995,6 +867,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal
allCost1
=
chDisabAccounts
.
getAllCost
();
BigDecimal
allCost1
=
chDisabAccounts
.
getAllCost
();
BigDecimal
overallCost1
=
chDisabAccounts
.
getOverallCost
();
BigDecimal
overallCost1
=
chDisabAccounts
.
getOverallCost
();
BigDecimal
personalCost1
=
chDisabAccounts
.
getPersonalCost
();
BigDecimal
personalCost1
=
chDisabAccounts
.
getPersonalCost
();
BigDecimal
deductionAmountTotal1
=
chDisabAccounts
.
getDeductionAmountTotal
();
BigDecimal
reissueAmountTotal1
=
chDisabAccounts
.
getReissueAmountTotal
();
BigDecimal
deduction
=
deductionAmountTotal1
.
add
(
deductionAmount
);
BigDecimal
reissue
=
reissueAmountTotal1
.
add
(
reissueAmount
);
allCost1
=
allCost1
.
add
(
accountsAllCost
);
allCost1
=
allCost1
.
add
(
accountsAllCost
);
overallCost1
=
overallCost1
.
add
(
accountsOverallCost
);
overallCost1
=
overallCost1
.
add
(
accountsOverallCost
);
personalCost1
=
personalCost1
.
add
(
accountsPersonalCost
);
personalCost1
=
personalCost1
.
add
(
accountsPersonalCost
);
...
@@ -1003,6 +879,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -1003,6 +879,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccount
.
setOverallCost
(
overallCost1
);
chDisabAccount
.
setOverallCost
(
overallCost1
);
chDisabAccount
.
setPersonalCost
(
personalCost1
);
chDisabAccount
.
setPersonalCost
(
personalCost1
);
chDisabAccount
.
setAccountsId
(
accountsId
);
chDisabAccount
.
setAccountsId
(
accountsId
);
chDisabAccount
.
setReissueAmountTotal
(
reissue
);
chDisabAccount
.
setDeductionAmountTotal
(
deduction
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
}
}
}
}
...
...
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
33aab16f
...
@@ -31,10 +31,13 @@
...
@@ -31,10 +31,13 @@
<if
test=
"req.accountsId != null and req.accountsId != ''"
>
<if
test=
"req.accountsId != null and req.accountsId != ''"
>
and d.ACCOUNTS_ID = #{req.accountsId}
and d.ACCOUNTS_ID = #{req.accountsId}
</if>
</if>
<if
test=
"req.modeId != null and req.modeId != ''"
>
and DECODE(d.mode_name, '医疗','1','养老', '2','上门','3', '异地', '4') = #{req.modeId}
</if>
<if
test=
"req.accountsStatus != null and req.accountsStatus != ''"
>
<if
test=
"req.accountsStatus != null and req.accountsStatus != ''"
>
and d.status = #{req.accountsStatus}
and d.status = #{req.accountsStatus}
</if>
</if>
<if
test=
"req.srvOrganId != null and req.srvOrganId != ''"
>
<if
test=
"req.srvOrganId != null and req.srvOrganId != ''
and req.srvOrganId!=0
"
>
and d.SRV_ORGAN_ID = #{req.srvOrganId}
and d.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</if>
...
@@ -54,7 +57,7 @@
...
@@ -54,7 +57,7 @@
<select
id=
"queryNursingRecords"
resultType=
"com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"
>
<select
id=
"queryNursingRecords"
resultType=
"com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"
>
select organ.SRV_ORGAN_NAME srvOrganName,
select organ.SRV_ORGAN_NAME srvOrganName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门'
, '4', '异地'
) modeName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门') modeName,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
plan.item_name itemName
plan.item_name itemName
from CH_SRV_PLAN plan
from CH_SRV_PLAN plan
...
@@ -65,6 +68,24 @@
...
@@ -65,6 +68,24 @@
and plan.IS_STATUS ='4'
and plan.IS_STATUS ='4'
</select>
</select>
<select
id=
"queryNursingRecordsGoDoor"
resultType=
"com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"
>
select
organ.SRV_ORGAN_NAME srvOrganName,
to_char(detail.SRV_DATE,'yyyy-MM-dd') srvPlanTime,
'上门' modeName,
to_char(item.FCD,'yyyy-MM-dd HH24:mi:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName
from CH_SRV_TASK_FINISH_ITEM item
left join CH_SRV_TASK_DETAIL detail on detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
left join CH_SRV_TASK task on task.SRV_TASK_ID = detail.SRV_TASK_ID
LEFT JOIN CH_SRV_ORGAN_EMP m ON m.EMP_ID = task.SRV_EMP_ID
LEFT JOIN CH_SRV_ORGAN organ ON organ.SRV_ORGAN_ID = m.SRV_ORGAN_ID
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}
</select>
...
@@ -104,44 +125,7 @@
...
@@ -104,44 +125,7 @@
</where>
</where>
</select>
</select>
<select
id=
"getOrganAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
detail.TASK_DETAIL_ID taskDetailId,
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
program.SRV_MODE_ID modeId,
--服务方式
DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
--护理机构名称
organ.srv_organ_id srvOrganId,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员 Id
emp.EMP_ID empId,
--任务时间
detail.SRV_DATE srvDate,
-- 机构等级
organ.LEVEL_CODE levelCode
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--失能人员
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
<where>
detail.STATUS = '4'
<if
test=
"taskDetailId != null and taskDetailId != ''"
>
AND detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
</where>
</select>
<select
id=
"queryPlanInfoByDetailId"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
<select
id=
"queryPlanInfoByDetailId"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
select
...
@@ -173,16 +157,7 @@
...
@@ -173,16 +157,7 @@
where plan.IS_STATUS = '4' and plan.IS_BILL = 1 and plan.TASK_DETAIL_ID = #{taskDetailId}
where plan.IS_STATUS = '4' and plan.IS_BILL = 1 and plan.TASK_DETAIL_ID = #{taskDetailId}
</select>
</select>
<select
id=
"queryAccountByCondition"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts"
>
select * from CH_DISAB_ACCOUNTS_DETAIL t where t.MODE_NAME in ('养老','医疗')
<if
test=
"taskDetailIds != null and taskDetailIds.size() > 0"
>
AND t.TASK_DETAIL_ID IN
<foreach
collection=
"taskDetailIds"
separator=
","
open=
"("
close=
")"
item=
"taskDetailId"
>
#{taskDetailId}
</foreach>
</if>
</select>
<!--查询评估信息-->
<!--查询评估信息-->
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
...
...
account/account-service/src/main/resources/mapper/ChDisabAccountsMapper.xml
View file @
33aab16f
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
#{organId}
#{organId}
</foreach>
</foreach>
</if>
</if>
<if
test=
'req.srvOrganId != null'
>
<if
test=
"req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"
>
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</if>
<if
test=
"req.accountsTime != null and req.accountsTime != ''"
>
<if
test=
"req.accountsTime != null and req.accountsTime != ''"
>
...
...
account/account-service/src/main/resources/mapper/ChDisabFreeRdInfoMapper.xml
View file @
33aab16f
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
organ.SRV_ORGAN_NAME srvOrganName,
organ.SRV_ORGAN_NAME srvOrganName,
rd.AMOUNT_OF_MONEY amountOfMoney,
rd.AMOUNT_OF_MONEY amountOfMoney,
rd.FREE_RD_ID freeRdId,
rd.FREE_RD_ID freeRdId,
rd.REMARKS remarks,
d.ACCOUNTS_STATUS accountsStatus
d.ACCOUNTS_STATUS accountsStatus
from CH_DISAB_FREE_RD_INFO rd left join
from CH_DISAB_FREE_RD_INFO rd left join
CH_DISAB_ACCOUNTS_DETAIL detail on
CH_DISAB_ACCOUNTS_DETAIL detail on
...
@@ -32,6 +33,9 @@
...
@@ -32,6 +33,9 @@
<if
test=
"req.srvOrganName != null and req.srvOrganName != ''"
>
<if
test=
"req.srvOrganName != null and req.srvOrganName != ''"
>
and organ.SRV_ORGAN_NAME = #{req.srvOrganName}
and organ.SRV_ORGAN_NAME = #{req.srvOrganName}
</if>
</if>
<if
test=
"req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"
>
AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<if
test=
"req.certiCode != null and req.certiCode != ''"
>
<if
test=
"req.certiCode != null and req.certiCode != ''"
>
and info.certi_Code = #{req.certiCode}
and info.certi_Code = #{req.certiCode}
</if>
</if>
...
...
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
33aab16f
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
<if
test=
"req.srvDate != null and req.srvDate != ''"
>
<if
test=
"req.srvDate != null and req.srvDate != ''"
>
AND to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') = #{req.srvDate}
AND to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') = #{req.srvDate}
</if>
</if>
<if
test=
"req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"
>
AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</where>
</where>
</select>
</select>
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
33aab16f
...
@@ -506,13 +506,15 @@ public class DisableController {
...
@@ -506,13 +506,15 @@ public class DisableController {
* @return 失能人员信息列表
* @return 失能人员信息列表
*/
*/
@RequestMapping
(
"/disableInfoList"
)
@RequestMapping
(
"/disableInfoList"
)
public
Result
<
Page
<
DisableInfoListVo
>>
disableInfoList
(
Integer
pageNum
,
Integer
pageSize
,
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
)
{
public
Result
<
Page
<
DisableInfoListVo
>>
disableInfoList
(
@RequestHeader
(
"Authorization"
)
String
token
,
Integer
pageNum
,
Integer
pageSize
,
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
)
{
if
(
pageNum
==
null
||
pageNum
<
1
||
srvOrganId
==
null
||
srvOrganId
==
0
)
{
if
(
pageNum
==
null
||
pageNum
<
1
||
srvOrganId
==
null
||
srvOrganId
==
0
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
if
(
pageSize
==
null
||
pageSize
<
1
)
{
if
(
pageSize
==
null
||
pageSize
<
1
)
{
pageSize
=
10
;
pageSize
=
10
;
}
}
long
srvOrganIdL
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
srvOrganId
=
new
Long
(
srvOrganIdL
);
Page
<
DisableInfoListVo
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
DisableInfoListVo
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
page
=
disableService
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
page
=
disableService
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
return
Result
.
success
(
page
);
return
Result
.
success
(
page
);
...
...
apply/apply-service/src/main/resources/mapper/DisableInfoMapper.xml
View file @
33aab16f
...
@@ -38,8 +38,10 @@
...
@@ -38,8 +38,10 @@
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
WHERE
<where>
T1.SRV_ORGAN_ID = #{srvOrganId}
<if
test=
"srvOrganId != null and srvOrganId != '' and srvOrganId!=0"
>
and T1.SRV_ORGAN_ID = #{srvOrganId}
</if>
<if
test=
"certiCode != null and certiCode != ''"
>
<if
test=
"certiCode != null and certiCode != ''"
>
and T2.CERTI_CODE = #{certiCode}
and T2.CERTI_CODE = #{certiCode}
</if>
</if>
...
@@ -49,6 +51,7 @@
...
@@ -49,6 +51,7 @@
<if
test=
"svrModelId != null and svrModelId != ''"
>
<if
test=
"svrModelId != null and svrModelId != ''"
>
and T7.MODE_ID = #{svrModelId}
and T7.MODE_ID = #{svrModelId}
</if>
</if>
</where>
</select>
</select>
<update
id=
"updateChSrvProgram"
>
<update
id=
"updateChSrvProgram"
>
...
...
assessment/assessment-service/src/main/resources/mapper/ChAssessDetailAccountsMapper.xml
View file @
33aab16f
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
organ.organ_name assessOrganName,
organ.organ_name assessOrganName,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
(select type.APREMP_NAME from CH_CFG_APREMP_TYPE type where type.APREMP_TYPE_ID = emp.APREMP_TYPE_ID_S) aprempTypeS,
to_char(d.assess_time,'yyyy-MM-dd') assessTime,
to_char(d.assess_time,'yyyy-MM-dd') assessTime,
emp.REAL_NAME empName
emp.REAL_NAME empName
from CH_ASSESS_ACCOUNTS_DETAIL d
from CH_ASSESS_ACCOUNTS_DETAIL d
...
@@ -23,12 +24,13 @@ from CH_ASSESS_ACCOUNTS_DETAIL d
...
@@ -23,12 +24,13 @@ from CH_ASSESS_ACCOUNTS_DETAIL d
<select
id=
"assessAccountDetailExport"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp"
>
<select
id=
"assessAccountDetailExport"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp"
>
SELECT
SELECT
t2.REAL_NAME realName,
t2.REAL_NAME realName,
(select type.APREMP_NAME from CH_CFG_APREMP_TYPE type where type.APREMP_TYPE_ID = t4.APREMP_TYPE_ID_S) aprempTypeS,
t3.ORGAN_NAME organName,
t3.ORGAN_NAME organName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ASSESS_COST assessCost,
t1.ASSESS_COST assessCost,
to_char(t1.assess_time,'yyyy-MM-dd') assessTime,
to_char(t1.assess_time,'yyyy-MM-dd') assessTime,
t4.REAL_NAME empName,
t4.REAL_NAME empName,
(select district_name from ch_fnd_district dis where t2.MEDICAL_AREA = dis.district_code) medicalArea
,
(select district_name from ch_fnd_district dis where t2.MEDICAL_AREA = dis.district_code) medicalArea
FROM
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
CH_ASSESS_ACCOUNTS_DETAIL t1
left join CH_DISABLE_APPLY t2 on t1.APPLY_ID = t2.APPLY_ID
left join CH_DISABLE_APPLY t2 on t1.APPLY_ID = t2.APPLY_ID
...
@@ -36,7 +38,5 @@ FROM
...
@@ -36,7 +38,5 @@ FROM
left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID
left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
</select>
</mapper>
</mapper>
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/NursingReqVO.java
View file @
33aab16f
...
@@ -16,10 +16,11 @@ public class NursingReqVO extends BaseReq {
...
@@ -16,10 +16,11 @@ public class NursingReqVO extends BaseReq {
private
String
disabInfoId
;
private
String
disabInfoId
;
private
String
modeId
;
private
String
modeName
;
private
String
modeName
;
private
String
modeId
;
private
String
srvOrganId
;
private
String
srvOrganId
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallCostListRespVO.java
View file @
33aab16f
...
@@ -65,4 +65,6 @@ public class OverallCostListRespVO {
...
@@ -65,4 +65,6 @@ public class OverallCostListRespVO {
private
String
srvOrganName
;
private
String
srvOrganName
;
private
String
accountsStatus
;
private
String
accountsStatus
;
private
String
remarks
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallCostReqVO.java
View file @
33aab16f
...
@@ -32,4 +32,6 @@ public class OverallCostReqVO extends BaseReq {
...
@@ -32,4 +32,6 @@ public class OverallCostReqVO extends BaseReq {
private
Integer
dealType
;
private
Integer
dealType
;
private
Long
srvOrganId
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/assessment/ChAssessDetailAccountsResp.java
View file @
33aab16f
...
@@ -37,6 +37,11 @@ public class ChAssessDetailAccountsResp implements Serializable {
...
@@ -37,6 +37,11 @@ public class ChAssessDetailAccountsResp implements Serializable {
*/
*/
private
String
medicalArea
;
private
String
medicalArea
;
/**
* 评定资质
*/
private
String
aprempTypeS
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AssessAccountsExportResp.java
View file @
33aab16f
...
@@ -24,6 +24,9 @@ public class AssessAccountsExportResp {
...
@@ -24,6 +24,9 @@ public class AssessAccountsExportResp {
@Excel
(
name
=
"评定人员姓名"
,
width
=
20
)
@Excel
(
name
=
"评定人员姓名"
,
width
=
20
)
private
String
empName
;
private
String
empName
;
@Excel
(
name
=
"评定资质"
,
width
=
20
)
private
String
aprempTypeS
;
@Excel
(
name
=
"评估时间"
,
width
=
20
)
@Excel
(
name
=
"评估时间"
,
width
=
20
)
private
String
assessTime
;
private
String
assessTime
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvOrganListReq.java
View file @
33aab16f
...
@@ -24,6 +24,8 @@ public class SrvOrganListReq extends BaseReq {
...
@@ -24,6 +24,8 @@ public class SrvOrganListReq extends BaseReq {
*/
*/
private
Long
srvOrganId
;
private
Long
srvOrganId
;
private
String
modeId
;
/**
/**
* 护理机构id
* 护理机构id
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvTaskReqVO.java
View file @
33aab16f
...
@@ -18,4 +18,6 @@ public class SrvTaskReqVO extends BaseReq {
...
@@ -18,4 +18,6 @@ public class SrvTaskReqVO extends BaseReq {
private
String
status
;
private
String
status
;
private
String
srvOrganName
;
private
String
srvOrganName
;
private
Long
srvOrganId
;
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/SrvTaskScheduledServiceImpl.java
View file @
33aab16f
...
@@ -18,7 +18,7 @@ public class SrvTaskScheduledServiceImpl {
...
@@ -18,7 +18,7 @@ public class SrvTaskScheduledServiceImpl {
@Autowired
@Autowired
private
SrvTaskService
srvTaskService
;
private
SrvTaskService
srvTaskService
;
@Scheduled
(
cron
=
"30
30 23
* * ?"
)
@Scheduled
(
cron
=
"30
20 11
* * ?"
)
public
void
timeAllocationSrvTask
()
{
public
void
timeAllocationSrvTask
()
{
log
.
info
(
"timeAllocationSrvTask========start"
);
log
.
info
(
"timeAllocationSrvTask========start"
);
srvTaskService
.
timeAllocationSrvTask
();
srvTaskService
.
timeAllocationSrvTask
();
...
...
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