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
7a83fb60
Commit
7a83fb60
authored
May 06, 2022
by
蔡镇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用结算
parent
7af024ff
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
35 deletions
+38
-35
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+3
-2
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+3
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+17
-11
ChCfgCostStandard.java
...hungraim/ltc/pojo/entity/SysConfig/ChCfgCostStandard.java
+1
-1
ExpenseSettlementInfoBo.java
...hungraim/ltc/pojo/vo/account/ExpenseSettlementInfoBo.java
+1
-1
ExpenseSettlementReq.java
...om/hungraim/ltc/pojo/vo/account/ExpenseSettlementReq.java
+1
-7
ExpenseSettlementVo.java
...com/hungraim/ltc/pojo/vo/account/ExpenseSettlementVo.java
+2
-12
CfgSrvLevel.java
...core/src/main/java/com/hungraim/ltc/util/CfgSrvLevel.java
+10
-0
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
7a83fb60
...
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping;
...
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -83,8 +84,8 @@ public class AccountController {
...
@@ -83,8 +84,8 @@ public class AccountController {
* @return 返回机构结当月算详情
* @return 返回机构结当月算详情
*/
*/
@GetMapping
(
"/expenseSettlement"
)
@GetMapping
(
"/expenseSettlement"
)
public
Result
<
ExpenseVo
>
expenseSettlement
(
ExpenseSettlementReq
req
)
{
public
Result
<
ExpenseVo
>
expenseSettlement
(
ExpenseSettlementReq
req
)
throws
ParseException
{
if
(
null
==
req
.
getSrvOrganId
()
||
null
==
req
.
getAccountsTime
(
))
{
if
(
null
==
req
.
getSrvOrganId
()
||
StringUtils
.
isBlank
(
req
.
getAccountsTime
()
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
if
(
req
.
getPageNum
()
==
null
)
{
if
(
req
.
getPageNum
()
==
null
)
{
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
7a83fb60
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
java.text.ParseException
;
public
interface
AccountService
extends
IService
<
ChDisabAccounts
>
{
public
interface
AccountService
extends
IService
<
ChDisabAccounts
>
{
/**
/**
...
@@ -16,5 +18,5 @@ public interface AccountService extends IService<ChDisabAccounts> {
...
@@ -16,5 +18,5 @@ public interface AccountService extends IService<ChDisabAccounts> {
AccountOperVo
getSrvOrganDetail
(
Long
accountsId
);
AccountOperVo
getSrvOrganDetail
(
Long
accountsId
);
ExpenseVo
expenseSettlement
(
ExpenseSettlementReq
req
);
ExpenseVo
expenseSettlement
(
ExpenseSettlementReq
req
)
throws
ParseException
;
}
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
7a83fb60
...
@@ -22,6 +22,8 @@ import org.springframework.stereotype.Service;
...
@@ -22,6 +22,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Calendar
;
...
@@ -79,7 +81,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -79,7 +81,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
}
@Override
@Override
public
ExpenseVo
expenseSettlement
(
ExpenseSettlementReq
req
)
{
public
ExpenseVo
expenseSettlement
(
ExpenseSettlementReq
req
)
throws
ParseException
{
Page
<
ExpenseSettlementInfoBo
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
Page
<
ExpenseSettlementInfoBo
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
Page
<
ExpenseSettlementInfoBo
>
expenseSettlementInfo
=
srvTaskMapper
.
getExpenseSettlementInfo
(
page
,
req
);
Page
<
ExpenseSettlementInfoBo
>
expenseSettlementInfo
=
srvTaskMapper
.
getExpenseSettlementInfo
(
page
,
req
);
List
<
ExpenseSettlementVo
>
vos
=
new
ArrayList
<>();
List
<
ExpenseSettlementVo
>
vos
=
new
ArrayList
<>();
...
@@ -87,17 +89,21 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -87,17 +89,21 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
for
(
ExpenseSettlementInfoBo
bo
:
expenseSettlementInfo
.
getRecords
())
{
for
(
ExpenseSettlementInfoBo
bo
:
expenseSettlementInfo
.
getRecords
())
{
ExpenseSettlementVo
vo
=
new
ExpenseSettlementVo
();
ExpenseSettlementVo
vo
=
new
ExpenseSettlementVo
();
BeanUtil
.
copyProperties
(
bo
,
vo
);
BeanUtil
.
copyProperties
(
bo
,
vo
);
//护理等级
vo
.
setNursingGrade
(
CfgSrvLevel
.
getMsg
(
bo
.
getSrvLevelId
()));
//服务开始时间
//服务开始时间
DateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM"
);
Date
parse
=
df
.
parse
(
req
.
getAccountsTime
());
if
(
bo
.
getSrvStartTime
()
!=
null
)
{
if
(
bo
.
getSrvStartTime
()
!=
null
)
{
if
(
bo
.
getSrvStartTime
().
getTime
()
>
req
.
getAccountsTime
()
.
getTime
())
{
if
(
bo
.
getSrvStartTime
().
getTime
()
>
parse
.
getTime
())
{
vo
.
setSrvStartTime
(
bo
.
getSrvStartTime
());
vo
.
setSrvStartTime
(
bo
.
getSrvStartTime
());
}
else
{
}
else
{
vo
.
setSrvStartTime
(
req
.
getAccountsTime
()
);
vo
.
setSrvStartTime
(
parse
);
}
}
}
}
//服务结束时间
//服务结束时间
if
(
bo
.
getSrvEndTime
()
!=
null
)
{
if
(
bo
.
getSrvEndTime
()
!=
null
)
{
Date
lastDayOfMonth
=
getLastDayOfMonth
(
req
.
getAccountsTime
()
);
Date
lastDayOfMonth
=
getLastDayOfMonth
(
parse
);
if
(
bo
.
getSrvEndTime
().
getTime
()
>
lastDayOfMonth
.
getTime
())
{
if
(
bo
.
getSrvEndTime
().
getTime
()
>
lastDayOfMonth
.
getTime
())
{
vo
.
setSrvEndTime
(
lastDayOfMonth
);
vo
.
setSrvEndTime
(
lastDayOfMonth
);
}
else
{
}
else
{
...
@@ -112,7 +118,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -112,7 +118,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
Integer
effectiveSettlementDate
=
vo
.
getEffectiveSettlementDate
();
//有效结算日
Integer
effectiveSettlementDate
=
vo
.
getEffectiveSettlementDate
();
//有效结算日
ChCfgCostStandard
costStandard
=
chCfgCostStandardMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ChCfgCostStandard
>()
ChCfgCostStandard
costStandard
=
chCfgCostStandardMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ChCfgCostStandard
>()
.
eq
(
ChCfgCostStandard:
:
getOrganId
,
bo
.
getOrganId
())
.
eq
(
ChCfgCostStandard:
:
getOrganId
,
bo
.
getOrganId
())
.
eq
(
ChCfgCostStandard:
:
getSrv
l
evelId
,
bo
.
getSrvLevelId
())
.
eq
(
ChCfgCostStandard:
:
getSrv
L
evelId
,
bo
.
getSrvLevelId
())
.
eq
(
ChCfgCostStandard:
:
getSrvModeId
,
bo
.
getSrvModeId
()));
//基护费用标准(可配置)
.
eq
(
ChCfgCostStandard:
:
getSrvModeId
,
bo
.
getSrvModeId
()));
//基护费用标准(可配置)
BigDecimal
foundation
=
BigDecimal
.
valueOf
(
costStandard
.
getCost
()).
multiply
(
BigDecimal
.
valueOf
(
effectiveSettlementDate
));
BigDecimal
foundation
=
BigDecimal
.
valueOf
(
costStandard
.
getCost
()).
multiply
(
BigDecimal
.
valueOf
(
effectiveSettlementDate
));
vo
.
setFoundationProtectionCost
(
foundation
.
doubleValue
());
vo
.
setFoundationProtectionCost
(
foundation
.
doubleValue
());
...
@@ -314,15 +320,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -314,15 +320,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
//合计
//合计
ExpenseSettlementTotalVo
totalVo
=
new
ExpenseSettlementTotalVo
();
ExpenseSettlementTotalVo
totalVo
=
new
ExpenseSettlementTotalVo
();
BigDecimal
foundationProtectionCost
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
foundationProtectionCost
=
BigDecimal
.
valueOf
(
0
);
totalVo
.
setFoundationProtectionCost
(
foundationProtectionCost
.
doubleValue
());
BigDecimal
expensesPayableFoundationProtection
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
expensesPayableFoundationProtection
=
BigDecimal
.
valueOf
(
0
);
totalVo
.
setExpensesPayableFoundationProtection
(
foundationProtectionCost
.
doubleValue
());
BigDecimal
careCosts
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
careCosts
=
BigDecimal
.
valueOf
(
0
);
totalVo
.
setCareCosts
(
foundationProtectionCost
.
doubleValue
());
BigDecimal
carePayable
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
carePayable
=
BigDecimal
.
valueOf
(
0
);
totalVo
.
setCarePayable
(
foundationProtectionCost
.
doubleValue
());
BigDecimal
totalAmountDue
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
totalAmountDue
=
BigDecimal
.
valueOf
(
0
);
totalVo
.
setTotalAmountDue
(
foundationProtectionCost
.
doubleValue
());
for
(
ExpenseSettlementVo
vo
:
vos
)
{
for
(
ExpenseSettlementVo
vo
:
vos
)
{
//基护费用
//基护费用
foundationProtectionCost
=
foundationProtectionCost
.
add
(
BigDecimal
.
valueOf
(
vo
.
getFoundationProtectionCost
()));
foundationProtectionCost
=
foundationProtectionCost
.
add
(
BigDecimal
.
valueOf
(
vo
.
getFoundationProtectionCost
()));
...
@@ -335,6 +336,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -335,6 +336,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
//应拨付总金额
//应拨付总金额
totalAmountDue
=
totalAmountDue
.
add
(
BigDecimal
.
valueOf
(
vo
.
getTotalAmountDue
()));
totalAmountDue
=
totalAmountDue
.
add
(
BigDecimal
.
valueOf
(
vo
.
getTotalAmountDue
()));
}
}
totalVo
.
setFoundationProtectionCost
(
foundationProtectionCost
.
doubleValue
());
totalVo
.
setExpensesPayableFoundationProtection
(
foundationProtectionCost
.
doubleValue
());
totalVo
.
setCareCosts
(
foundationProtectionCost
.
doubleValue
());
totalVo
.
setCarePayable
(
foundationProtectionCost
.
doubleValue
());
totalVo
.
setTotalAmountDue
(
foundationProtectionCost
.
doubleValue
());
ExpenseVo
expenseVo
=
new
ExpenseVo
();
ExpenseVo
expenseVo
=
new
ExpenseVo
();
expenseVo
.
setExpenseSettlements
(
vos
);
expenseVo
.
setExpenseSettlements
(
vos
);
expenseVo
.
setTotal
(
totalVo
);
expenseVo
.
setTotal
(
totalVo
);
...
@@ -357,7 +363,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -357,7 +363,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
private
int
getDay
(
Date
date
)
{
private
int
getDay
(
Date
date
)
{
Calendar
cale
=
Calendar
.
getInstance
();
Calendar
cale
=
Calendar
.
getInstance
();
cale
.
setTime
(
date
);
cale
.
setTime
(
date
);
return
cale
.
get
(
Calendar
.
DAY_OF_
WEEK
);
return
cale
.
get
(
Calendar
.
DAY_OF_
MONTH
);
}
}
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/SysConfig/ChCfgCostStandard.java
View file @
7a83fb60
...
@@ -36,7 +36,7 @@ public class ChCfgCostStandard implements Serializable {
...
@@ -36,7 +36,7 @@ public class ChCfgCostStandard implements Serializable {
/**
/**
* 服务等级id
* 服务等级id
*/
*/
private
Integer
srv
l
evelId
;
private
Integer
srv
L
evelId
;
/**
/**
* 费用(元/人/天)
* 费用(元/人/天)
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/ExpenseSettlementInfoBo.java
View file @
7a83fb60
...
@@ -27,7 +27,7 @@ public class ExpenseSettlementInfoBo {
...
@@ -27,7 +27,7 @@ public class ExpenseSettlementInfoBo {
/**
/**
* 失能人员身份证号
* 失能人员身份证号
*/
*/
private
Lo
ng
certiCode
;
private
Stri
ng
certiCode
;
/**
/**
* 服务方式id
* 服务方式id
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/ExpenseSettlementReq.java
View file @
7a83fb60
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
@Data
public
class
ExpenseSettlementReq
extends
BaseReq
{
public
class
ExpenseSettlementReq
extends
BaseReq
{
...
@@ -18,8 +14,6 @@ public class ExpenseSettlementReq extends BaseReq {
...
@@ -18,8 +14,6 @@ public class ExpenseSettlementReq extends BaseReq {
/**
/**
* 结算月份
* 结算月份
*/
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
private
String
accountsTime
;
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/ExpenseSettlementVo.java
View file @
7a83fb60
...
@@ -15,12 +15,12 @@ public class ExpenseSettlementVo {
...
@@ -15,12 +15,12 @@ public class ExpenseSettlementVo {
/**
/**
* 失能人员身份证号
* 失能人员身份证号
*/
*/
private
Lo
ng
certiCode
;
private
Stri
ng
certiCode
;
/**
/**
* 护理等级
* 护理等级
*/
*/
private
Lo
ng
nursingGrade
;
private
Stri
ng
nursingGrade
;
/**
/**
* 服务方式名称
* 服务方式名称
...
@@ -43,11 +43,6 @@ public class ExpenseSettlementVo {
...
@@ -43,11 +43,6 @@ public class ExpenseSettlementVo {
private
Integer
effectiveSettlementDate
;
private
Integer
effectiveSettlementDate
;
/**
/**
* 基护费用标准
*/
private
String
costStandardOfFoundationProtection
;
/**
* 基护费用
* 基护费用
*/
*/
private
Double
foundationProtectionCost
;
private
Double
foundationProtectionCost
;
...
@@ -97,9 +92,4 @@ public class ExpenseSettlementVo {
...
@@ -97,9 +92,4 @@ public class ExpenseSettlementVo {
*/
*/
private
Double
totalAmountDue
;
private
Double
totalAmountDue
;
/**
* 合计
*/
private
ExpenseSettlementTotalVo
total
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/util/CfgSrvLevel.java
View file @
7a83fb60
...
@@ -25,4 +25,14 @@ public enum CfgSrvLevel {
...
@@ -25,4 +25,14 @@ public enum CfgSrvLevel {
public
String
getMsg
()
{
public
String
getMsg
()
{
return
msg
;
return
msg
;
}
}
public
static
String
getMsg
(
String
code
)
{
CfgSrvLevel
[]
enums
=
values
();
for
(
CfgSrvLevel
state
:
enums
)
{
if
(
state
.
getCode
().
equals
(
code
))
{
return
state
.
getMsg
();
}
}
return
""
;
}
}
}
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