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
2c560143
Commit
2c560143
authored
Jun 06, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基金申报重复提交
parent
2e04f8f9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
12 deletions
+27
-12
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+1
-6
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+1
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+25
-5
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
2c560143
...
@@ -275,12 +275,7 @@ public class AccountController {
...
@@ -275,12 +275,7 @@ public class AccountController {
*/
*/
@PostMapping
(
"/accountsFreeCommit"
)
@PostMapping
(
"/accountsFreeCommit"
)
public
Result
accountsFreeCommit
(
Long
accountsDetailId
)
{
public
Result
accountsFreeCommit
(
Long
accountsDetailId
)
{
int
result
=
accountService
.
accountsFreeCommit
(
accountsDetailId
);
return
accountService
.
accountsFreeCommit
(
accountsDetailId
);
if
(
result
>
0
)
{
return
Result
.
success
();
}
else
{
return
Result
.
failed
(
"该记录已不可申报,请联系管理员"
);
}
}
}
/**
/**
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
2c560143
...
@@ -58,7 +58,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
...
@@ -58,7 +58,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
int
deleteAccountsDetail
(
Long
accountsDetailId
,
Long
freeRdId
);
int
deleteAccountsDetail
(
Long
accountsDetailId
,
Long
freeRdId
);
in
t
accountsFreeCommit
(
Long
accountsDetailId
);
Resul
t
accountsFreeCommit
(
Long
accountsDetailId
);
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
);
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
2c560143
...
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
...
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
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.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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
;
...
@@ -840,27 +841,37 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -840,27 +841,37 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
accountsFreeCommit
(
Long
accountsDetailId
){
public
Result
accountsFreeCommit
(
Long
accountsDetailId
){
log
.
info
(
"accountsFreeCommit=========accountsDetailId:{}"
,
accountsDetailId
);
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
log
.
info
(
"accountsFreeCommit=========chDisabDetailAccountsDTO:{}"
,
JSON
.
toJSONString
(
chDisabDetailAccountsDTO
));
BigDecimal
allCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
allCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
overallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
BigDecimal
overallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
BigDecimal
personalCost
=
chDisabDetailAccountsDTO
.
getAccountsPersonalCost
();
BigDecimal
personalCost
=
chDisabDetailAccountsDTO
.
getAccountsPersonalCost
();
Short
status
=
chDisabDetailAccountsDTO
.
getStatus
();
if
(
status
==
1
){
log
.
info
(
"{},已完成申报"
,
accountsDetailId
);
return
Result
.
failed
(
"已完成申报,请勿重复提交"
);
}
Long
accountsId
=
chDisabDetailAccountsDTO
.
getAccountsId
();
Long
accountsId
=
chDisabDetailAccountsDTO
.
getAccountsId
();
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
log
.
info
(
"accountsFreeCommit====before=====chDisabAccountDTO:{}"
,
JSON
.
toJSONString
(
chDisabAccountDTO
));
Short
accountsStatus
=
chDisabAccountDTO
.
getAccountsStatus
();
Short
accountsStatus
=
chDisabAccountDTO
.
getAccountsStatus
();
if
(
accountsStatus
>
1
){
if
(
accountsStatus
>
1
){
log
.
info
(
"{},已完成审核"
,
accountsDetailId
);
log
.
info
(
"{},已完成审核"
,
accountsDetailId
);
return
-
1
;
return
Result
.
failed
(
"机构已完成审核,不能再进行申报"
)
;
}
}
if
(
chDisabAccountDTO
!=
null
){
if
(
chDisabAccountDTO
!=
null
){
BigDecimal
accountAllCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
accountAllCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
accountOverallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
accountOverallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
accountPersonalCost
=
chDisabAccountDTO
.
getPersonalCost
();
BigDecimal
accountPersonalCost
=
chDisabAccountDTO
.
getPersonalCost
();
chDisabAccountDTO
.
setAllCost
(
accountAllCost
.
add
(
allCost
));
BigDecimal
addAllCost
=
accountAllCost
.
add
(
allCost
);
chDisabAccountDTO
.
setAllCost
(
addAllCost
);
chDisabAccountDTO
.
setOverallCost
(
accountOverallCost
.
add
(
overallCost
));
chDisabAccountDTO
.
setOverallCost
(
accountOverallCost
.
add
(
overallCost
));
chDisabAccountDTO
.
setPersonalCost
(
accountPersonalCost
.
add
(
personalCost
));
chDisabAccountDTO
.
setPersonalCost
(
accountPersonalCost
.
add
(
personalCost
));
chDisabAccountDTO
.
setAccountsStatus
((
short
)
1
);
chDisabAccountDTO
.
setAccountsStatus
((
short
)
1
);
log
.
info
(
"accountsFreeCommit====accountsDetailId:{},累加前费用:{},申报费用:{},累加后费用:{}"
,
accountsDetailId
,
accountAllCost
,
allCost
,
addAllCost
);
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
}
}
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
...
@@ -868,15 +879,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -868,15 +879,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts
.
setStatus
(((
short
)
1
));
chDisabDetailAccounts
.
setStatus
(((
short
)
1
));
chDisabDetailAccounts
.
setDeclarationTime
(
new
Date
());
chDisabDetailAccounts
.
setDeclarationTime
(
new
Date
());
chDisabDetailAccounts
.
setLcd
(
new
Date
());
chDisabDetailAccounts
.
setLcd
(
new
Date
());
log
.
info
(
"accountsFreeCommit=====after====chDisabDetailAccountsDTO:{}"
,
JSON
.
toJSONString
(
chDisabDetailAccounts
));
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
return
result
;
if
(
result
>
0
)
{
return
Result
.
success
();
}
else
{
return
Result
.
failed
(
"操作失败"
);
}
}
}
@Override
@Override
public
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
){
public
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
){
// 暂缓需要将当月的钱减掉
// 暂缓需要将当月的钱减掉
ChDisabDetailAccounts
chDisabDetailAccountDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
ChDisabDetailAccounts
chDisabDetailAccountDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
log
.
info
(
"delayAccountCommit====before=====chDisabDetailAccountDTO:{}"
,
JSON
.
toJSONString
(
chDisabDetailAccountDTO
));
Long
accountsId
=
chDisabDetailAccountDTO
.
getAccountsId
();
Long
accountsId
=
chDisabDetailAccountDTO
.
getAccountsId
();
BigDecimal
accountsAllCost
=
chDisabDetailAccountDTO
.
getAccountsAllCost
();
BigDecimal
accountsAllCost
=
chDisabDetailAccountDTO
.
getAccountsAllCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountDTO
.
getAccountsOverallCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountDTO
.
getAccountsOverallCost
();
...
@@ -884,6 +903,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -884,6 +903,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal
deductionAmount
=
chDisabDetailAccountDTO
.
getDeductionAmount
();
BigDecimal
deductionAmount
=
chDisabDetailAccountDTO
.
getDeductionAmount
();
BigDecimal
reissueAmount
=
chDisabDetailAccountDTO
.
getReissueAmount
();
BigDecimal
reissueAmount
=
chDisabDetailAccountDTO
.
getReissueAmount
();
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
log
.
info
(
"delayAccountCommit====before=====chDisabAccountDTO:{}"
,
JSON
.
toJSONString
(
chDisabAccountDTO
));
BigDecimal
allCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
allCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
overallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
overallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
personalCost
=
chDisabAccountDTO
.
getPersonalCost
();
BigDecimal
personalCost
=
chDisabAccountDTO
.
getPersonalCost
();
...
...
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