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
3a80948f
Commit
3a80948f
authored
Apr 11, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退回
parent
9ea85fa8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
24 deletions
+48
-24
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+2
-2
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+1
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+44
-21
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+1
-0
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
3a80948f
...
...
@@ -387,8 +387,8 @@ public class AccountController {
}
@RequestMapping
(
"/accountReturn"
)
public
Result
accountReturn
(
ChSrvPlan
chSrvPlan
)
{
Result
result
=
accountService
.
accountReturn
(
chSrvPlan
);
public
Result
accountReturn
(
SrvTaskRespVO
srvTaskRespVO
)
{
Result
result
=
accountService
.
accountReturn
(
srvTaskRespVO
);
return
result
;
}
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
3a80948f
...
...
@@ -70,5 +70,5 @@ public interface AccountService extends IService<ChDisabAccounts> {
void
placeOtherTaskQuery
();
//退回
Result
accountReturn
(
ChSrvPlan
chSrvPlan
);
Result
accountReturn
(
SrvTaskRespVO
srvTaskRespVO
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
3a80948f
...
...
@@ -992,13 +992,18 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
//退回
@Override
public
Result
accountReturn
(
ChSrvPlan
chSrvPlan
){
Long
taskDetailId
=
chSrvPlan
.
getTaskDetailId
();
Long
disabInfoId
=
chSrvPlan
.
getDisabInfoId
();
Long
modeId
=
chSrvPlan
.
getModeId
();
Date
srvPlanTime
=
chSrvPlan
.
getSrvPlanTime
();
String
srvPlanTimeStr
=
DateUtils
.
dateToStrYm
(
srvPlanTime
);
Long
srvOrganId
=
chSrvPlan
.
getSrvOrganId
();
public
Result
accountReturn
(
SrvTaskRespVO
srvTaskRespVO
){
Long
taskDetailId
=
srvTaskRespVO
.
getTaskDetailId
();
String
disabInfoId
=
srvTaskRespVO
.
getDisabInfoId
();
String
srvModeName
=
srvTaskRespVO
.
getSrvModeName
();
String
srvPlanTime
=
srvTaskRespVO
.
getSrvDate
();
Date
date
=
DateUtils
.
strToDate
(
srvPlanTime
);
String
srvOrganId
=
srvTaskRespVO
.
getSrvOrganId
();
ChDisabDetailAccounts
chDisabDetailAccounts
=
chDisabAccountsDetailMapper
.
queryDisabDetailAccounts
(
String
.
valueOf
(
srvOrganId
),
DateUtils
.
dateToStrYm
(
date
),
disabInfoId
,
srvModeName
);
Short
status
=
chDisabDetailAccounts
.
getStatus
();
if
(
status
!=
0
){
return
Result
.
failed
(
"此任务已提交申报,不可再操作,请联系管理员"
);
}
LambdaQueryWrapper
<
ChSrvPlan
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
ChSrvPlan:
:
getTaskDetailId
,
taskDetailId
);
queryWrapper
.
eq
(
ChSrvPlan:
:
getIsStatus
,
(
short
)
4
);
...
...
@@ -1006,21 +1011,39 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
int
size
=
srvPlanList
.
size
();
// 大于1说明还有已完成的任务,不退回,只更新状态 等于1结算退回费用
try
{
if
(
size
>
1
){
chSrvPlan
.
setIsStatus
(
0L
);
chSrvPlanMapper
.
updateById
(
chSrvPlan
);
}
else
{
String
srvModeName
=
null
;
if
(
modeId
==
1
){
srvModeName
=
"医疗"
;
}
else
if
(
modeId
==
2
){
srvModeName
=
"养老"
;
}
else
if
(
modeId
==
3
){
srvModeName
=
"上门"
;
ChSrvPlan
chSrvPlan
=
new
ChSrvPlan
();
chSrvPlan
.
setIsStatus
(
0L
);
chSrvPlan
.
setPlanID
(
srvTaskRespVO
.
getPlanId
());
chSrvPlanMapper
.
updateById
(
chSrvPlan
);
if
(
size
==
1
){
BigDecimal
accountsAllCost
=
chDisabDetailAccounts
.
getAccountsAllCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccounts
.
getAccountsOverallCost
();
BigDecimal
accountsPersonalCost
=
chDisabDetailAccounts
.
getAccountsPersonalCost
();
BigDecimal
allCost
=
new
BigDecimal
(
0
);
BigDecimal
overCost
=
new
BigDecimal
(
0
);
BigDecimal
personCost
=
new
BigDecimal
(
0
);
if
(
"养老"
.
equals
(
srvModeName
))
{
allCost
=
BigDecimal
.
valueOf
(
50
);
overCost
=
BigDecimal
.
valueOf
(
35
);
personCost
=
BigDecimal
.
valueOf
(
15
);
// 医疗机构护理,原则上收治医疗护理需求为主的重度失能人员一级及以下医疗机构其限额为 80 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
}
else
if
(
"医疗"
.
equals
(
srvModeName
)
&&
"1"
.
equals
(
srvTaskRespVO
.
getLevelCode
()))
{
allCost
=
BigDecimal
.
valueOf
(
80
);
overCost
=
BigDecimal
.
valueOf
(
56
);
personCost
=
BigDecimal
.
valueOf
(
24
);
// 二级及以上医疗机构其限额为 100 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
}
else
if
(
"医疗"
.
equals
(
srvModeName
)
&&
(!
"1"
.
equals
(
srvTaskRespVO
.
getLevelCode
())))
{
allCost
=
BigDecimal
.
valueOf
(
100
);
overCost
=
BigDecimal
.
valueOf
(
70
);
personCost
=
BigDecimal
.
valueOf
(
30
);
}
chDisabAccountsDetailMapper
.
queryDisabDetailAccounts
(
String
.
valueOf
(
srvOrganId
),
srvPlanTimeStr
,
String
.
valueOf
(
disabInfoId
),
srvModeName
);
BigDecimal
allCostSubtract
=
accountsAllCost
.
subtract
(
allCost
);
BigDecimal
overCostSubtract
=
accountsOverallCost
.
subtract
(
overCost
);
BigDecimal
personCostSubtract
=
accountsPersonalCost
.
subtract
(
personCost
);
chDisabDetailAccounts
.
setAccountsAllCost
(
allCostSubtract
);
chDisabDetailAccounts
.
setAccountsOverallCost
(
overCostSubtract
);
chDisabDetailAccounts
.
setAccountsPersonalCost
(
personCostSubtract
);
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"==============accountReturn error:{}"
,
e
);
...
...
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
3a80948f
...
...
@@ -73,6 +73,7 @@
where plan.DISAB_INFO_ID = #{req.disabInfoId}
and plan.SRV_ORGAN_ID = #{req.srvOrganId}
and plan.MODE_ID = #{req.modeId}
and to_char(plan.SRV_PLAN_TIME,'yyyy-MM') = #{req.accountsTime}
and plan.IS_STATUS ='4'
order by plan.SRV_PLAN_TIME desc
</select>
...
...
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