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
5b7282cf
Commit
5b7282cf
authored
Apr 18, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_nursing_records_20230214' into dev_ch_master
parents
b7e78d91
10c07a40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+15
-2
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
5b7282cf
...
@@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
...
@@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
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.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hungraim.ltc.account.dao.*
;
import
com.hungraim.ltc.account.dao.*
;
...
@@ -27,7 +26,6 @@ import lombok.AllArgsConstructor;
...
@@ -27,7 +26,6 @@ import lombok.AllArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
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.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -992,6 +990,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -992,6 +990,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
//退回
//退回
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
accountReturn
(
SrvTaskRespVO
srvTaskRespVO
){
public
Result
accountReturn
(
SrvTaskRespVO
srvTaskRespVO
){
Long
taskDetailId
=
srvTaskRespVO
.
getTaskDetailId
();
Long
taskDetailId
=
srvTaskRespVO
.
getTaskDetailId
();
String
disabInfoId
=
srvTaskRespVO
.
getDisabInfoId
();
String
disabInfoId
=
srvTaskRespVO
.
getDisabInfoId
();
...
@@ -999,11 +998,17 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -999,11 +998,17 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
String
srvPlanTime
=
srvTaskRespVO
.
getSrvDate
();
String
srvPlanTime
=
srvTaskRespVO
.
getSrvDate
();
Date
date
=
DateUtils
.
strToDate
(
srvPlanTime
);
Date
date
=
DateUtils
.
strToDate
(
srvPlanTime
);
String
srvOrganId
=
srvTaskRespVO
.
getSrvOrganId
();
String
srvOrganId
=
srvTaskRespVO
.
getSrvOrganId
();
Long
itemId
=
srvTaskRespVO
.
getItemId
();
ChDisabDetailAccounts
chDisabDetailAccounts
=
chDisabAccountsDetailMapper
.
queryDisabDetailAccounts
(
String
.
valueOf
(
srvOrganId
),
DateUtils
.
dateToStrYm
(
date
),
disabInfoId
,
srvModeName
);
ChDisabDetailAccounts
chDisabDetailAccounts
=
chDisabAccountsDetailMapper
.
queryDisabDetailAccounts
(
String
.
valueOf
(
srvOrganId
),
DateUtils
.
dateToStrYm
(
date
),
disabInfoId
,
srvModeName
);
Short
status
=
chDisabDetailAccounts
.
getStatus
();
Short
status
=
chDisabDetailAccounts
.
getStatus
();
if
(
status
!=
0
){
if
(
status
!=
0
){
return
Result
.
failed
(
"此任务已提交申报,不可再操作,请联系管理员"
);
return
Result
.
failed
(
"此任务已提交申报,不可再操作,请联系管理员"
);
}
}
// 删除 chSrvTaskFinishItemStream
LambdaQueryWrapper
<
ChSrvTaskFinishItem
>
chSrvTaskFinishItem
=
new
LambdaQueryWrapper
<
ChSrvTaskFinishItem
>()
.
eq
(
ChSrvTaskFinishItem:
:
getTaskDetailId
,
taskDetailId
)
.
eq
(
ChSrvTaskFinishItem:
:
getItemId
,
itemId
);
int
delete
=
chSrvTaskFinishItemMapper
.
delete
(
chSrvTaskFinishItem
);
LambdaQueryWrapper
<
ChSrvPlan
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ChSrvPlan
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
ChSrvPlan:
:
getTaskDetailId
,
taskDetailId
);
queryWrapper
.
eq
(
ChSrvPlan:
:
getTaskDetailId
,
taskDetailId
);
queryWrapper
.
eq
(
ChSrvPlan:
:
getIsStatus
,
(
short
)
4
);
queryWrapper
.
eq
(
ChSrvPlan:
:
getIsStatus
,
(
short
)
4
);
...
@@ -1015,8 +1020,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -1015,8 +1020,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chSrvPlan
.
setIsStatus
(
0L
);
chSrvPlan
.
setIsStatus
(
0L
);
chSrvPlan
.
setPlanID
(
srvTaskRespVO
.
getPlanId
());
chSrvPlan
.
setPlanID
(
srvTaskRespVO
.
getPlanId
());
chSrvPlanMapper
.
updateById
(
chSrvPlan
);
chSrvPlanMapper
.
updateById
(
chSrvPlan
);
ChSrvTaskDetail
ca
=
new
ChSrvTaskDetail
();
ca
.
setStatus
((
short
)
0
);
ca
.
setTaskDetailId
(
Long
.
valueOf
(
taskDetailId
));
chSrvTaskDetailMapper
.
updateById
(
ca
);
if
(
size
==
1
){
if
(
size
==
1
){
BigDecimal
accountsAllCost
=
chDisabDetailAccounts
.
getAccountsAllCost
();
BigDecimal
accountsAllCost
=
chDisabDetailAccounts
.
getAccountsAllCost
();
if
(
accountsAllCost
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
return
Result
.
success
(
"当前费用为0,不再进行费用退回"
);
}
BigDecimal
accountsOverallCost
=
chDisabDetailAccounts
.
getAccountsOverallCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccounts
.
getAccountsOverallCost
();
BigDecimal
accountsPersonalCost
=
chDisabDetailAccounts
.
getAccountsPersonalCost
();
BigDecimal
accountsPersonalCost
=
chDisabDetailAccounts
.
getAccountsPersonalCost
();
BigDecimal
allCost
=
new
BigDecimal
(
0
);
BigDecimal
allCost
=
new
BigDecimal
(
0
);
...
@@ -1044,6 +1056,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -1044,6 +1056,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts
.
setAccountsOverallCost
(
overCostSubtract
);
chDisabDetailAccounts
.
setAccountsOverallCost
(
overCostSubtract
);
chDisabDetailAccounts
.
setAccountsPersonalCost
(
personCostSubtract
);
chDisabDetailAccounts
.
setAccountsPersonalCost
(
personCostSubtract
);
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"==============accountReturn error:{}"
,
e
);
log
.
error
(
"==============accountReturn error:{}"
,
e
);
...
...
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