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
7392734e
Commit
7392734e
authored
Feb 20, 2023
by
董天德
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_nursing_records_20230214' into dev_ch_master
# Conflicts: # account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
parents
c80f0408
a559fd3b
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
803 additions
and
141 deletions
+803
-141
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+129
-7
ChDisabAccountsDetailMapper.java
...hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
+13
-7
ChDisabAccountsMapper.java
...a/com/hungraim/ltc/account/dao/ChDisabAccountsMapper.java
+8
-1
ChDisabDetailAccountsMapper.java
...hungraim/ltc/account/dao/ChDisabDetailAccountsMapper.java
+0
-18
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+16
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+220
-45
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+3
-3
ChDisabAccountsMapper.xml
...rvice/src/main/resources/mapper/ChDisabAccountsMapper.xml
+48
-3
ChDisabDetailAccountsMapper.xml
...src/main/resources/mapper/ChDisabDetailAccountsMapper.xml
+0
-24
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+3
-3
ChDisabAccounts.java
...com/hungraim/ltc/pojo/entity/account/ChDisabAccounts.java
+24
-6
ChDisabDetailAccounts.java
...ngraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
+42
-1
ChDisabDetailAccountsResp.java
...im/ltc/pojo/entity/account/ChDisabDetailAccountsResp.java
+13
-0
NursingRecordsRespVO.java
...ungraim/ltc/pojo/entity/account/NursingRecordsRespVO.java
+33
-0
OverallCostListRespVO.java
...ngraim/ltc/pojo/entity/account/OverallCostListRespVO.java
+64
-0
OverallCostReqVO.java
...om/hungraim/ltc/pojo/entity/account/OverallCostReqVO.java
+35
-0
OverallCostSubmitReqVO.java
...graim/ltc/pojo/entity/account/OverallCostSubmitReqVO.java
+37
-0
OverallEduceDecreaseCostRespVO.java
...c/pojo/entity/account/OverallEduceDecreaseCostRespVO.java
+69
-0
OrganAccountsVO.java
...ava/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
+3
-6
SrvOrganAccountListResp.java
...hungraim/ltc/pojo/vo/account/SrvOrganAccountListResp.java
+11
-0
SrvOrganListReq.java
...ava/com/hungraim/ltc/pojo/vo/account/SrvOrganListReq.java
+2
-0
DateUtils.java
...n-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
+30
-16
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
7392734e
...
...
@@ -3,8 +3,7 @@ package com.hungraim.ltc.account.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.account.service.AccountService
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp
;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
...
...
@@ -100,8 +99,12 @@ public class AccountController {
@RequestMapping
(
"/organAccountTaskExecute"
)
/**
* 任务执行
*
* @return
*/
@PostMapping
(
"/organAccountTaskExecute"
)
public
Result
organAccountTaskExecute
(
AccountTaskReqVO
accountTaskReqVO
){
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
=
accountTaskReqVO
.
getAccountTaskList
();
accountService
.
organAccountTaskExecute
(
accountTaskExecuteReqVOS
);
...
...
@@ -164,17 +167,136 @@ public class AccountController {
/**
* 查询机构结算信息列表明细
*
* @param
i
d 结算id
* @param
accountsI
d 结算id
* @return
*/
@GetMapping
(
"/queryOrganAccountsDetail"
)
public
Result
<
List
<
ChDisabDetailAccountsResp
>>
queryOrganAccountsDetail
(
String
id
)
{
List
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
id
);
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
String
accountsId
)
{
if
(
StringUtils
.
isBlank
(
accountsId
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
accountsId
,
null
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
/**
* 基金申报列表查询
* @param
* @return
*/
@GetMapping
(
"/queryAccountsDeclareList"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryAccountsDeclareList
(
Integer
pageNum
,
Integer
pageSize
)
{
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
null
,
0
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
/**
* 暂缓列表查询
* @param
* @return
*/
@GetMapping
(
"/queryDelayAccountList"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryDelayAccountList
(
Integer
pageNum
,
Integer
pageSize
)
{
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
null
,
2
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
/**
* 暂缓
* @param status 1 恢复 2 暂缓
* @return
*/
@PostMapping
(
"/delayAccountCommit"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
)
{
int
result
=
accountService
.
delayAccountCommit
(
accountsDetailId
,
status
);
if
(
result
>
0
)
{
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
/**
* 基金申报提交
* @param
* @return
*/
@PostMapping
(
"/accountsFreeCommit"
)
public
Result
accountsFreeCommit
(
Long
accountsDetailId
)
{
int
result
=
accountService
.
accountsFreeCommit
(
accountsDetailId
);
if
(
result
>
0
)
{
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
/**
* 查询护理记录
*
* @param taskDetailId 结算详情id
* @return
*/
@GetMapping
(
"/queryNursingRecords"
)
public
Result
<
Page
<
NursingRecordsRespVO
>>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
)
{
Page
<
NursingRecordsRespVO
>
nursingRecordsRespVOList
=
accountService
.
queryNursingRecords
(
pageNum
,
pageSize
,
taskDetailId
);
return
Result
.
success
(
nursingRecordsRespVOList
);
}
@GetMapping
(
"/queryOverallCostRecords"
)
public
Result
<
OverallEduceDecreaseCostRespVO
>
queryOverallCostRecords
(
OverallCostReqVO
req
)
{
String
certiCode
=
req
.
getCertiCode
();
if
(
StringUtils
.
isBlank
(
certiCode
))
{
return
Result
.
failed
(
"查询条件证件号不能为空"
);
}
OverallEduceDecreaseCostRespVO
overallCostRecords
=
accountService
.
queryOverallCostRecords
(
req
);
return
Result
.
success
(
overallCostRecords
);
}
/**
* 费用扣减提交
*
* @param req
* @return
*/
@PostMapping
(
"/overallCostSubmit"
)
public
Result
overallCostSubmit
(
OverallCostSubmitReqVO
req
)
{
int
result
=
accountService
.
overallCostSubmit
(
req
);
if
(
result
>
0
){
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
/**
* 删除护理机构
*
* @param accountsDetailId 结算详情id
*/
@DeleteMapping
(
"/deleteAccountsDetail"
)
public
Result
deleteAccountsDetail
(
Long
accountsDetailId
)
{
if
(
null
==
accountsDetailId
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
int
result
=
accountService
.
deleteAccountsDetail
(
accountsDetailId
);
if
(
result
>
0
){
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
@GetMapping
(
"/queryOverallCostList"
)
public
Result
<
Page
<
OverallCostListRespVO
>>
queryOverallCostList
(
OverallCostReqVO
req
)
{
Page
<
OverallCostListRespVO
>
overallCostRecords
=
accountService
.
queryOverallCostList
(
req
);
return
Result
.
success
(
overallCostRecords
);
}
/**
* 机构结算管理提交复核
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
View file @
7392734e
...
...
@@ -2,12 +2,11 @@ package com.hungraim.ltc.account.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.account.
ChDisabAccounts
;
import
com.hungraim.ltc.pojo.
entity.account.ChDisabDetailAccounts
;
import
com.hungraim.ltc.pojo.vo.account.
*
;
import
com.hungraim.ltc.pojo.entity.account.
*
;
import
com.hungraim.ltc.pojo.
vo.account.AccountExportDetailListResp
;
import
com.hungraim.ltc.pojo.vo.account.
OrganAccountsVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -19,15 +18,22 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
List
<
OrganAccountsVO
>
getOrganAccountsList
(
String
taskDetailId
);
Page
<
SrvOrganAccountListResp
>
searchSrvOrganAccountList
(
Page
page
,
List
<
Long
>
organIds
,
SrvOrganListReq
req
);
List
<
AccountExportDetailListResp
>
searchSrvOrganAccountDetailExport
(
String
accountsId
);
List
<
ChDisabDetailAccounts
>
queryAccountByCondition
(
@Param
(
"taskDetailIds"
)
List
<
String
>
taskDetailIds
);
List
<
OrganAccountsVO
>
getOtherPlaceList
(
String
programId
);
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Page
page
,
String
accountsId
,
Integer
status
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
String
taskDetailId
);
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
);
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
Page
page
,
OverallCostReqVO
req
);
int
updateByAccountsId
(
String
accountsId
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsMapper.java
View file @
7392734e
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.vo.account.AccountOperVo
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganAccountListResp
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListReq
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListResp
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -52,5 +53,10 @@ public interface ChDisabAccountsMapper extends BaseMapper<ChDisabAccounts> {
ChDisabAccounts
queryAccountByCondition
(
String
accountsTime
,
String
modeName
,
String
srvOrganId
);
ChDisabAccounts
queryAccountByCondition
(
String
accountsTime
,
String
modeName
,
String
srvOrganId
,
Integer
isDelay
);
Page
<
SrvOrganAccountListResp
>
searchSrvOrganAccountList
(
Page
page
,
List
<
Long
>
organIds
,
SrvOrganListReq
req
);
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabDetailAccountsMapper.java
deleted
100644 → 0
View file @
c80f0408
package
com
.
hungraim
.
ltc
.
account
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* @author mq
*/
@Mapper
@Repository
public
interface
ChDisabDetailAccountsMapper
extends
BaseMapper
<
ChDisabDetailAccounts
>
{
List
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
String
accountsId
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
7392734e
...
...
@@ -31,7 +31,16 @@ public interface AccountService extends IService<ChDisabAccounts> {
List
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
String
id
);
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
String
accountsId
,
Integer
status
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
);
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
);
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
OverallCostReqVO
req
);
int
overallCostSubmit
(
OverallCostSubmitReqVO
req
);
int
updateChDisabAccounts
(
int
id
);
...
...
@@ -39,4 +48,10 @@ public interface AccountService extends IService<ChDisabAccounts> {
void
organAccountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
void
otherPlaceHandler
(
String
programId
);
int
deleteAccountsDetail
(
Long
accountsDetailId
);
int
accountsFreeCommit
(
Long
accountsDetailId
);
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
7392734e
...
...
@@ -15,9 +15,7 @@ import com.hungraim.ltc.api.AttachFeignService;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCareService
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp
;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskFinishItem
;
import
com.hungraim.ltc.pojo.vo.account.*
;
...
...
@@ -53,12 +51,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
private
final
ChCfgCostStandardMapper
chCfgCostStandardMapper
;
private
final
ChDisabAccountsDetailMapper
chDisabAccountsDetailMapper
;
/*
private final ChAssessDetailAccountsMapper chAssessDetailAccountsMapper;
*/
private
final
ChDisabDetailAccountsMapper
chDisabDetailAccountsMapper
;
private
final
ChSrvTaskDetailMapper
chSrvTaskDetailMapper
;
private
final
ChSrvTaskFinishItemMapper
chSrvTaskFinishItemMapper
;;
...
...
@@ -72,6 +66,19 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BeanUtils
.
copyProperties
(
accountOperVo
,
chDisabAccounts
);
chDisabAccounts
.
setChooseSettle
((
short
)
0
);
// 是否结算(0未结算,1已结算)
this
.
saveOrUpdate
(
chDisabAccounts
);
Short
accountsStatus
=
accountOperVo
.
getAccountsStatus
();
String
accountsId
=
String
.
valueOf
(
accountOperVo
.
getAccountsId
());
if
(
accountsStatus
==
2
)
{
chDisabAccountsDetailMapper
.
updateByAccountsId
(
accountsId
);
}
if
(
accountsStatus
==
3
)
{
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountOperVo
.
getAccountsId
());
BigDecimal
reissueAmountTotal
=
chDisabAccountDTO
.
getReissueAmountTotal
();
BigDecimal
deductionAmountTotal
=
chDisabAccountDTO
.
getDeductionAmountTotal
();
BigDecimal
totalAllocatedExpenses
=
chDisabAccountDTO
.
getAllCost
().
add
(
reissueAmountTotal
).
subtract
(
deductionAmountTotal
);
chDisabAccountDTO
.
setTotalAllocatedExpenses
(
totalAllocatedExpenses
);
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
}
accountOperVo
.
setAccountsId
(
chDisabAccounts
.
getAccountsId
());
baseAccountService
.
updateAttachs
(
chDisabAccounts
.
getAccountsId
(),
accountOperVo
.
getFileDataList
(),
AttachType
.
SRV_ORGAN_ACCOUNT
);
}
...
...
@@ -85,7 +92,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
public
Page
<
SrvOrganAccountListResp
>
searchSrvOrganAccountList
(
SrvOrganListReq
srvOrganListReq
)
{
List
<
Long
>
organIds
=
baseAccountService
.
getOrganIds
(
srvOrganListReq
.
getOrganId
(),
srvOrganListReq
.
getIsInvolveChild
());
return
chDisabAccountsDetail
Mapper
.
searchSrvOrganAccountList
(
new
Page
<>(
srvOrganListReq
.
getPageNum
(),
srvOrganListReq
.
getPageSize
()),
organIds
,
srvOrganListReq
);
return
disabAccounts
Mapper
.
searchSrvOrganAccountList
(
new
Page
<>(
srvOrganListReq
.
getPageNum
(),
srvOrganListReq
.
getPageSize
()),
organIds
,
srvOrganListReq
);
}
...
...
@@ -400,24 +407,14 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
//求当月最后一天
private
Date
getLastDayOfMonth
(
Date
date
)
{
Calendar
cale
=
Calendar
.
getInstance
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
cale
.
setTime
(
date
);
cale
.
add
(
Calendar
.
MONTH
,
1
);
cale
.
set
(
Calendar
.
DAY_OF_MONTH
,
0
);
return
cale
.
getTime
();
}
private
Date
getFirstDayOfMonth
(
Date
date
)
{
Calendar
cale
=
Calendar
.
getInstance
();
cale
.
setTime
(
date
);
cale
=
Calendar
.
getInstance
();
cale
.
add
(
Calendar
.
MONTH
,
-
1
);
cale
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
return
cale
.
getTime
();
}
//求年月日中的日
private
int
getDay
(
Date
date
)
{
...
...
@@ -449,8 +446,65 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
public
List
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
String
id
)
{
return
chDisabDetailAccountsMapper
.
queryOrganAccountsDetail
(
id
);
public
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
String
accountsId
,
Integer
status
)
{
return
chDisabAccountsDetailMapper
.
queryOrganAccountsDetail
(
new
Page
<>(
pageNum
,
pageSize
),
accountsId
,
status
);
}
@Override
public
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
)
{
return
chDisabAccountsDetailMapper
.
queryNursingRecords
(
new
Page
<>(
pageNum
,
pageSize
),
taskDetailId
);
}
@Override
public
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
)
{
return
chDisabAccountsDetailMapper
.
queryOverallCostRecords
(
req
);
}
@Override
public
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
OverallCostReqVO
req
)
{
req
.
setDealType
((
null
==
req
.
getDealType
()||
0
==
req
.
getDealType
())?
null
:
req
.
getDealType
());
Page
<
OverallCostListRespVO
>
overallCostListRespVOPage
=
chDisabAccountsDetailMapper
.
queryOverallCostList
(
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
()),
req
);
List
<
OverallCostListRespVO
>
records
=
overallCostListRespVOPage
.
getRecords
();
for
(
OverallCostListRespVO
record
:
records
)
{
int
dealType
=
record
.
getDealType
();
if
(
dealType
==
1
)
{
record
.
setAmountOfMoney
(
record
.
getReissueAmount
());
}
else
if
(
dealType
==
2
)
{
record
.
setAmountOfMoney
(
record
.
getDeductionAmount
());
}
}
return
overallCostListRespVOPage
;
}
@Override
public
int
overallCostSubmit
(
OverallCostSubmitReqVO
req
){
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
int
dealType
=
req
.
getDealType
();
chDisabDetailAccounts
.
setAccountsDetailId
(
req
.
getAccountsDetailId
());
Long
accountsId
=
req
.
getAccountsId
();
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
selectById
(
accountsId
);
BigDecimal
deductionAmountTotal
=
chDisabAccounts
.
getDeductionAmountTotal
();
BigDecimal
reissueAmountTotal
=
chDisabAccounts
.
getReissueAmountTotal
();
chDisabDetailAccounts
.
setDealType
(
dealType
);
String
amountOfMoneyStr
=
req
.
getAmountOfMoney
();
BigDecimal
amountOfMoney
=
new
BigDecimal
(
amountOfMoneyStr
);
if
(
dealType
==
1
){
// 补发
chDisabDetailAccounts
.
setReissueAmount
(
amountOfMoney
);
reissueAmountTotal
=
reissueAmountTotal
.
add
(
amountOfMoney
);
}
else
if
(
dealType
==
2
){
// 扣减
chDisabDetailAccounts
.
setDeductionAmount
(
amountOfMoney
);
deductionAmountTotal
=
deductionAmountTotal
.
add
(
amountOfMoney
);
}
chDisabDetailAccounts
.
setRemarks
(
req
.
getRemarks
());
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
chDisabAccounts
.
setReissueAmountTotal
(
reissueAmountTotal
);
chDisabAccounts
.
setDeductionAmountTotal
(
deductionAmountTotal
);
disabAccountsMapper
.
updateById
(
chDisabAccounts
);
return
result
;
}
@Override
...
...
@@ -473,11 +527,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
organAccountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
)
{
if
(
CollectionUtil
.
isEmpty
(
accountTaskExecuteReqVOS
))
{
return
;
}
List
<
String
>
taskDetailIds
=
accountTaskExecuteReqVOS
.
stream
().
map
(
AccountTaskExecuteReqVO:
:
getTaskDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
// 根据任务id查找结算详情,还没有对应的任务数据说明还未发生过结算,进行插入详情表和结算表
List
<
ChDisabDetailAccounts
>
chDisabDetailList
=
chDisabAccountsDetailMapper
.
queryAccountByCondition
(
taskDetailIds
);
...
...
@@ -544,15 +598,18 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal
personalCost
=
limit
.
multiply
(
personalPercent
);
chDisabDetailAccounts
.
setAccountsPersonalCost
(
personalCost
);
chDisabDetailAccounts
.
setModeName
(
accountsVO
.
getSrvModeName
());
chDisabDetailAccounts
.
setEmpId
(
accountsVO
.
getEmpId
());
chDisabDetailAccounts
.
setCreationTime
(
new
Date
());
// 结算时间为任务时间
chDisabDetailAccounts
.
setAccountsTime
(
DateUtils
.
strTo
Tim
e
(
accountsVO
.
getSrvDate
()));
//chDisabDetailAccounts.setAccountsStartTime(DateUtils.strToTime(accountsVO.getSrvStartTime(
)));
//chDisabDetailAccounts.setAccountsEndTime(DateUtils.strToTime(accountsVO.getSrvEndTime(
)));
chDisabDetailAccounts
.
setAccountsTime
(
DateUtils
.
strTo
Dat
e
(
accountsVO
.
getSrvDate
()));
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
.
setItemIds
(
accountsVO
.
getItemId
());
chDisabDetailAccounts
.
setDisabInfoId
(
accountsVO
.
getDisabInfoId
());
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
);
...
...
@@ -562,29 +619,21 @@ 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
());
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
)
1
);
chDisabAccounts
.
setAllCost
(
String
.
valueOf
(
limit
));
chDisabAccounts
.
setOverallCost
(
String
.
valueOf
(
overallCost
));
chDisabAccounts
.
setPersonalCost
(
String
.
valueOf
(
personalCost
));
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
);
}
else
{
String
allCostStr
=
chDisabAccounts
.
getAllCost
();
String
overallCostStr
=
chDisabAccounts
.
getOverallCost
();
String
personalCostStr
=
chDisabAccounts
.
getPersonalCost
();
BigDecimal
allCostBig
=
new
BigDecimal
(
allCostStr
).
add
(
limit
);
BigDecimal
overallCostBig
=
new
BigDecimal
(
overallCostStr
).
add
(
overallCost
);
BigDecimal
personalCostBig
=
new
BigDecimal
(
personalCostStr
).
add
(
personalCost
);
chDisabAccounts
.
setAllCost
(
allCostBig
.
toString
());
chDisabAccounts
.
setOverallCost
(
String
.
valueOf
(
overallCostBig
));
chDisabAccounts
.
setPersonalCost
(
String
.
valueOf
(
personalCostBig
));
disabAccountsMapper
.
updateById
(
chDisabAccounts
);
}
return
chDisabAccounts
;
}
...
...
@@ -595,20 +644,22 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
for
(
OrganAccountsVO
accountsVO
:
accountsList
)
{
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
chDisabDetailAccounts
.
setSrvOrganId
(
accountsVO
.
getSrvOrganId
());
//
要判断是养老还是医疗,因为费用不一样
//
异地
BigDecimal
limit
=
BigDecimal
.
valueOf
(
20
);
BigDecimal
zero
=
BigDecimal
.
valueOf
(
0
);
chDisabDetailAccounts
.
setAccountsAllCost
(
limit
);
chDisabDetailAccounts
.
setAccountsPersonalCost
(
zero
);
chDisabDetailAccounts
.
setAccountsOverallCost
(
zero
);
chDisabDetailAccounts
.
setReissueAmount
(
zero
);
chDisabDetailAccounts
.
setDeductionAmount
(
zero
);
chDisabDetailAccounts
.
setStatus
((
short
)
0
);
chDisabDetailAccounts
.
setModeName
(
accountsVO
.
getSrvModeName
());
chDisabDetailAccounts
.
setCreationTime
(
new
Date
());
chDisabDetailAccounts
.
setAccountsTime
(
DateUtils
.
strToDate
(
accountsVO
.
getSrvDate
()));
chDisabDetailAccounts
.
setAccountsStartTime
(
DateUtils
.
strToTime
(
accountsVO
.
getSrvStartTime
(
)));
chDisabDetailAccounts
.
setAccountsEndTime
(
DateUtils
.
strToTime
(
accountsVO
.
getSrvEndTime
(
)));
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
.
setItemIds
(
accountsVO
.
getItemId
());
chDisabDetailAccounts
.
setDisabInfoId
(
accountsVO
.
getDisabInfoId
());
ChDisabAccounts
chDisabAccounts
=
getChDisabAccounts
(
accountsVO
,
limit
,
zero
,
zero
);
chDisabDetailAccounts
.
setAccountsId
(
chDisabAccounts
.
getAccountsId
());
...
...
@@ -616,4 +667,128 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
deleteAccountsDetail
(
Long
accountsDetailId
){
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
chDisabDetailAccounts
.
setDeductionAmount
(
BigDecimal
.
valueOf
(
0
));
chDisabDetailAccounts
.
setReissueAmount
(
BigDecimal
.
valueOf
(
0
));
chDisabDetailAccounts
.
setDealType
(
0
);
chDisabDetailAccounts
.
setAccountsDetailId
(
accountsDetailId
);
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
return
result
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
accountsFreeCommit
(
Long
accountsDetailId
){
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
BigDecimal
allCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
overallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
BigDecimal
personalCost
=
chDisabDetailAccountsDTO
.
getAccountsPersonalCost
();
Long
accountsId
=
chDisabDetailAccountsDTO
.
getAccountsId
();
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
if
(
chDisabAccountDTO
!=
null
){
BigDecimal
accountAllCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
accountOverallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
accountPersonalCost
=
chDisabAccountDTO
.
getPersonalCost
();
chDisabAccountDTO
.
setAllCost
(
accountAllCost
.
add
(
allCost
));
chDisabAccountDTO
.
setOverallCost
(
accountOverallCost
.
add
(
overallCost
));
chDisabAccountDTO
.
setPersonalCost
(
accountPersonalCost
.
add
(
personalCost
));
chDisabAccountDTO
.
setAccountsStatus
((
short
)
1
);
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
}
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
chDisabDetailAccounts
.
setAccountsDetailId
(
accountsDetailId
);
chDisabDetailAccounts
.
setStatus
(((
short
)
1
));
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
return
result
;
}
@Override
public
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
){
// 暂缓需要将当月的钱减掉
ChDisabDetailAccounts
chDisabDetailAccountDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
Long
accountsId
=
chDisabDetailAccountDTO
.
getAccountsId
();
BigDecimal
accountsAllCost
=
chDisabDetailAccountDTO
.
getAccountsAllCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountDTO
.
getAccountsOverallCost
();
BigDecimal
accountsPersonalCost
=
chDisabDetailAccountDTO
.
getAccountsPersonalCost
();
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
BigDecimal
allCost
=
chDisabAccountDTO
.
getAllCost
();
BigDecimal
overallCost
=
chDisabAccountDTO
.
getOverallCost
();
BigDecimal
personalCost
=
chDisabAccountDTO
.
getPersonalCost
();
// 暂缓
if
(
status
==
2
){
allCost
=
allCost
.
subtract
(
accountsAllCost
);
overallCost
=
overallCost
.
subtract
(
accountsOverallCost
);
personalCost
=
personalCost
.
subtract
(
accountsPersonalCost
);
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
chDisabAccount
.
setAllCost
(
allCost
);
chDisabAccount
.
setOverallCost
(
overallCost
);
chDisabAccount
.
setPersonalCost
(
personalCost
);
chDisabAccount
.
setAccountsId
(
accountsId
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
// 恢复
}
else
if
(
status
==
1
){
// 判断恢复时间是否和之前结算时间在同一个月,如果在同一个月把金额加回来,如果不在同一个月,改变结算月份,恢复的时候重新插入一条
//结算记录
Date
accountsTime
=
chDisabDetailAccountDTO
.
getAccountsTime
();
Boolean
aBoolean
=
DateUtils
.
inCurrentMonth
(
accountsTime
);
if
(
aBoolean
){
allCost
=
allCost
.
add
(
accountsAllCost
);
overallCost
=
overallCost
.
add
(
accountsOverallCost
);
personalCost
=
personalCost
.
add
(
accountsPersonalCost
);
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
chDisabAccount
.
setAllCost
(
allCost
);
chDisabAccount
.
setOverallCost
(
overallCost
);
chDisabAccount
.
setPersonalCost
(
personalCost
);
chDisabAccount
.
setAccountsId
(
accountsId
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
}
else
{
// 结算表加一个是否暂缓字段 1 暂缓
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
queryAccountByCondition
(
DateUtils
.
dateToStrYm
(
new
Date
()),
chDisabDetailAccountDTO
.
getModeName
(),
chDisabDetailAccountDTO
.
getSrvOrganId
(),
2
);
if
(
chDisabAccounts
==
null
)
{
chDisabAccounts
=
new
ChDisabAccounts
();
chDisabAccounts
.
setIsDelay
((
short
)
2
);
chDisabAccounts
.
setAccountsStatus
((
short
)
1
);
chDisabAccounts
.
setSrvOrganId
(
Long
.
valueOf
(
chDisabDetailAccountDTO
.
getSrvOrganId
()));
chDisabAccounts
.
setCreationTime
(
new
Date
());
chDisabAccounts
.
setAccountsTime
(
new
Date
());
chDisabAccounts
.
setModeName
(
chDisabDetailAccountDTO
.
getModeName
());
chDisabAccounts
.
setDeductionAmountTotal
(
chDisabDetailAccountDTO
.
getDeductionAmount
());
chDisabAccounts
.
setReissueAmountTotal
(
chDisabDetailAccountDTO
.
getReissueAmount
());
chDisabAccounts
.
setAllCost
(
chDisabDetailAccountDTO
.
getAccountsAllCost
());
chDisabAccounts
.
setOverallCost
(
chDisabDetailAccountDTO
.
getAccountsOverallCost
());
chDisabAccounts
.
setPersonalCost
(
chDisabDetailAccountDTO
.
getAccountsPersonalCost
());
chDisabAccounts
.
setSvrStartTime
(
chDisabDetailAccountDTO
.
getAccountsStartTime
());
chDisabAccounts
.
setSvrEndTime
(
chDisabDetailAccountDTO
.
getAccountsEndTime
());
chDisabAccounts
.
setTotalAllocatedExpenses
(
BigDecimal
.
valueOf
(
0
));
disabAccountsMapper
.
insert
(
chDisabAccounts
);
accountsId
=
chDisabAccounts
.
getAccountsId
();
}
else
{
BigDecimal
allCost1
=
chDisabAccounts
.
getAllCost
();
BigDecimal
overallCost1
=
chDisabAccounts
.
getOverallCost
();
BigDecimal
personalCost1
=
chDisabAccounts
.
getPersonalCost
();
allCost1
=
allCost1
.
add
(
accountsAllCost
);
overallCost1
=
overallCost1
.
add
(
accountsOverallCost
);
personalCost1
=
personalCost1
.
add
(
accountsPersonalCost
);
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
chDisabAccount
.
setAllCost
(
allCost1
);
chDisabAccount
.
setOverallCost
(
overallCost1
);
chDisabAccount
.
setPersonalCost
(
personalCost1
);
chDisabAccount
.
setAccountsId
(
accountsId
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
}
}
}
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
chDisabDetailAccounts
.
setAccountsDetailId
(
accountsDetailId
);
chDisabDetailAccounts
.
setStatus
(
status
);
chDisabDetailAccounts
.
setAccountsId
(
accountsId
);
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccounts
);
return
result
;
}
}
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
7392734e
...
...
@@ -141,7 +141,7 @@
</select>
<select
id=
"getOtherPlaceList"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
select
detail.TASK_DETAIL_ID taskDetailId,
--失能人员姓名
disable.real_name realName,
...
...
@@ -167,7 +167,7 @@ select
organ.LEVEL_CODE levelCode,
-- 失能等级
level1.DISABLE_LEVEL_NAME disableLevelName
from ch_srv_task_detail detail--服务计划
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
...
...
@@ -179,7 +179,7 @@ from ch_srv_task_detail detail--服务计划
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
-- 失能等级
left join ch_cfg_srv_disable_level level1 on report.disable_level_id = level1.disable_level_id
where mode1.MODE_ID = '4' and level1.DISABLE_LEVEL_NAME like '重度%' and program.program_id = #{programId}
where mode1.MODE_ID = '4' and level1.DISABLE_LEVEL_NAME like '重度%' and program.program_id = #{programId}
</select>
</mapper>
account/account-service/src/main/resources/mapper/ChDisabAccountsMapper.xml
View file @
7392734e
...
...
@@ -17,15 +17,59 @@
</sql>
<select
id=
"queryAccountByCondition"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabAccounts"
>
select * from CH_DISAB_ACCOUNTS t where t.MODE_NAME = #{modeName}
and to_char(t.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
and t.SRV_ORGAN_ID = #{srvOrganId}
<if
test=
"isDelay !=null"
>
and t.IS_DELAY = 2
</if>
</select>
<select
id=
"searchSrvOrganAccountList"
resultType=
"com.hungraim.ltc.pojo.vo.account.SrvOrganAccountListResp"
>
SELECT
t1.ACCOUNTS_ID,
t3.ORGAN_ID,
t3.ORGAN_NAME,
t2.SRV_ORGAN_ID,
t2.SRV_ORGAN_NAME,
t1.ACCOUNTS_TIME,
t1.ACCOUNTS_STATUS,
t1.ALL_COST,
t1.OVERALL_COST,
t1.PERSONAL_COST,
t1.SVR_START_TIME,
t1.MODE_NAME,
to_char(t1.SVR_START_TIME,'yyyy-MM-dd') svrStartTime,
to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime,
t1.TOTAL_ALLOCATED_EXPENSES totalAllocatedExpenses,
t1.REISSUE_AMOUNT_TOTAL reissueAmountTotal,
t1.DEDUCTION_AMOUNT_TOTAL deductionAmountTotal
FROM
CH_DISAB_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.SRV_ORGAN_ID = t2.SRV_ORGAN_ID
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID
<where>
t1.ACCOUNTS_STATUS !=0
<if
test=
'organIds != null and organIds.size()>0'
>
AND t3.ORGAN_ID IN
<foreach
collection=
"organIds"
open=
"("
close=
")"
item=
"organId"
separator=
","
>
#{organId}
</foreach>
</if>
<if
test=
'req.srvOrganId != null'
>
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<if
test=
'req.accountsTime != null'
>
AND t1.ACCOUNTS_TIME = #{req.accountsTime}
</if>
<if
test=
"req.accountsStatus != null and req.accountsStatus != ''"
>
and t1.ACCOUNTS_STATUS = #{req.accountsStatus}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
account/account-service/src/main/resources/mapper/ChDisabDetailAccountsMapper.xml
deleted
100644 → 0
View file @
c80f0408
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hungraim.ltc.account.dao.ChDisabDetailAccountsMapper"
>
<select
id=
"queryOrganAccountsDetail"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp"
>
select
d.MODE_NAME modeName,
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd HH24:mi:ss') accountsStartTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd HH24:mi:ss') accountsEndTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
o.SRV_ORGAN_NAME srvOrganName,
info.REAL_NAME realName
from CH_DISAB_ACCOUNTS_DETAIL d
left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where d.ACCOUNTS_ID = #{accountsId}
</select>
</mapper>
\ No newline at end of file
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
7392734e
...
...
@@ -18,13 +18,13 @@
left join ch_srv_organ_emp emp on plan.emp_id = emp.emp_id
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
<where>
<if
test=
"req.status != null"
>
<if
test=
"req.status != null
and req.status != ''
"
>
and plan.IS_STATUS = #{req.status}
</if>
<if
test=
"req.realName != null"
>
<if
test=
"req.realName != null
and req.realName != ''
"
>
AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%'))
</if>
<if
test=
"req.srvOrganName != null"
>
<if
test=
"req.srvOrganName != null
and req.srvOrganName != ''
"
>
AND organ.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.srvOrganName},'%'))
</if>
</where>
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabAccounts.java
View file @
7392734e
...
...
@@ -9,6 +9,7 @@ import lombok.Data;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -33,7 +34,7 @@ public class ChDisabAccounts implements Serializable {
/**
* 实拨总费用
*/
private
String
totalAllocatedExpenses
;
private
BigDecimal
totalAllocatedExpenses
;
/**
* 创建时间
...
...
@@ -52,7 +53,7 @@ public class ChDisabAccounts implements Serializable {
/**
* 应拨总费用
*/
private
String
totalExpensesPayable
;
private
BigDecimal
totalExpensesPayable
;
/**
* 是否结算(0未结算,1已结算)
...
...
@@ -60,7 +61,7 @@ public class ChDisabAccounts implements Serializable {
private
Short
chooseSettle
;
/**
* 状态(
0-待提交;1-待审核;2-已审核;3-已失效;
)
* 状态(
1 待审核 2 已审核 3 已结算
)
*/
private
Short
accountsStatus
;
...
...
@@ -90,17 +91,33 @@ public class ChDisabAccounts implements Serializable {
/**
* 总费用合计
*/
private
String
allCost
;
private
BigDecimal
allCost
;
/**
* 统筹支出
*/
private
String
overallCost
;
private
BigDecimal
overallCost
;
/**
* 个人支出
*/
private
String
personalCost
;
private
BigDecimal
personalCost
;
/**
*扣减金额合计
*/
private
BigDecimal
deductionAmountTotal
;
/**
*补发金额
*/
private
BigDecimal
reissueAmountTotal
;
/**
* 是否暂缓 2 暂缓
*/
private
Short
isDelay
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
View file @
7392734e
...
...
@@ -52,9 +52,16 @@ public class ChDisabDetailAccounts implements Serializable {
*/
private
BigDecimal
accountsAllCost
;
/**
* 统筹费用
*/
private
BigDecimal
accountsOverallCost
;
/**
* 个人支付
*/
private
BigDecimal
accountsPersonalCost
;
/**
* 服务方式
*/
...
...
@@ -64,16 +71,50 @@ public class ChDisabDetailAccounts implements Serializable {
* 费用开始日期
*/
private
Date
accountsStartTime
;
/**
* 费用结束日期
*/
private
Date
accountsEndTime
;
/**
* 任务详情id
*/
private
String
taskDetailId
;
/**
* 护理人员id
*/
private
Long
empId
;
/**
* 统筹区
*/
private
String
medicalArea
;
private
String
itemIds
;
/**
*交易类型 1、补发 2、扣减
*/
private
int
dealType
;
/**
*扣减金额
*/
private
BigDecimal
deductionAmount
;
/**
*补发金额
*/
private
BigDecimal
reissueAmount
;
/**
* 备注
*/
private
String
remarks
;
/**
* 状态(1 恢复状态 2 暂缓状态 3)
*/
private
Short
status
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabDetailAccountsResp.java
View file @
7392734e
...
...
@@ -35,6 +35,8 @@ public class ChDisabDetailAccountsResp implements Serializable {
*/
private
String
modeName
;
private
String
empName
;
/**
* 费用开始日期
*/
...
...
@@ -51,5 +53,15 @@ public class ChDisabDetailAccountsResp implements Serializable {
private
String
realName
;
private
String
taskDetailId
;
private
String
deductionAmount
;
private
String
reissueAmount
;
private
String
accountsDetailId
;
private
Integer
status
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/NursingRecordsRespVO.java
0 → 100644
View file @
7392734e
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName NursingRecordsRespVO
* @description
* @date 2023/2/14 10:10
**/
@Data
public
class
NursingRecordsRespVO
{
/**
* 护理机构
**/
private
String
srvOrganName
;
/**
* 服务方式
**/
private
String
modeName
;
/**
*执行日期
**/
private
String
executionTime
;
/**
*任务名称
**/
private
String
itemName
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallCostListRespVO.java
0 → 100644
View file @
7392734e
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName OverallCostListRespVO
* @description
* @date 2023/2/14 21:10
**/
@Data
public
class
OverallCostListRespVO
{
/**
*失能人员姓名
*/
private
String
realName
;
/**
*身份证号
*/
private
String
certiCode
;
/**
*医保统筹区
*/
private
String
medicalArea
;
/**
* 费用开始时间
*/
private
String
svrStartTime
;
/**
* 费用结束时间
*/
private
String
svrEndTime
;
/**
*交易类型 1、补发 2、扣减
*/
private
int
dealType
;
/**
*扣减金额
*/
private
String
deductionAmount
;
/**
*补发金额
*/
private
String
reissueAmount
;
private
String
amountOfMoney
;
private
String
accountsDetailId
;
private
String
accountsOverallCost
;
private
String
srvOrganName
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallCostReqVO.java
0 → 100644
View file @
7392734e
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName OverallCostReqVO
* @description
* @date 2023/2/14 15:11
**/
@Data
public
class
OverallCostReqVO
extends
BaseReq
{
/**
*失能人员姓名
*/
private
String
realName
;
/**
*身份证号
*/
private
String
certiCode
;
/**
* 护理机构名称
*/
private
String
srvOrganName
;
private
String
accountsTime
;
private
Integer
dealType
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallCostSubmitReqVO.java
0 → 100644
View file @
7392734e
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName OverallCostSubmitReqVO
* @description
* @date 2023/2/14 16:56
**/
@Data
public
class
OverallCostSubmitReqVO
{
/**
* 结算详情Id
*/
private
Long
accountsDetailId
;
private
Long
accountsId
;
/**
* 交易类型 1、补发 2、扣减
*/
private
int
dealType
;
/**
* 金额
*/
private
String
amountOfMoney
;
/**
* 备注
*/
private
String
remarks
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallEduceDecreaseCostRespVO.java
0 → 100644
View file @
7392734e
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName OverallEduceDecreaseCostRespVO
* @description
* @date 2023/2/14 15:11
**/
@Data
public
class
OverallEduceDecreaseCostRespVO
{
/**
*失能人员姓名
*/
private
String
realName
;
/**
*身份证号
*/
private
String
certiCode
;
/**
*医保统筹区
*/
private
String
medicalArea
;
/**
* 费用开始时间
*/
private
String
svrStartTime
;
/**
* 费用结束时间
*/
private
String
svrEndTime
;
/**
*交易类型 1、补发 2、扣减
*/
private
int
dealType
;
/**
*扣减金额
*/
private
String
deductionAmount
;
/**
*补发金额
*/
private
String
reissueAmount
;
private
String
accountsDetailId
;
private
String
accountsOverallCost
;
private
String
srvOrganName
;
private
Long
accountsId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
View file @
7392734e
...
...
@@ -49,9 +49,9 @@ public class OrganAccountsVO {
*/
private
String
medicalArea
;
/**
* 护理服务人员
* 护理服务人员
Id
*/
private
String
empName
;
private
Long
empId
;
/**
* 任务时间
*/
...
...
@@ -70,10 +70,7 @@ public class OrganAccountsVO {
* 机构等级
*/
private
String
levelCode
;
/**
* 失能等级
*/
private
String
disableLevelName
;
/**
* 总费用
*/
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvOrganAccountListResp.java
View file @
7392734e
...
...
@@ -5,6 +5,7 @@ import lombok.Data;
import
org.checkerframework.checker.units.qual.C
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
...
...
@@ -81,5 +82,15 @@ public class SrvOrganAccountListResp {
*/
private
String
totalAllocatedExpenses
;
/**
*扣减金额总合计
*/
private
String
deductionAmountTotal
;
/**
*补发总金额
*/
private
String
reissueAmountTotal
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvOrganListReq.java
View file @
7392734e
...
...
@@ -39,4 +39,6 @@ public class SrvOrganListReq extends BaseReq {
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
private
String
accountsStatus
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
View file @
7392734e
...
...
@@ -3,7 +3,6 @@ package com.hungraim.ltc.util;
import
cn.hutool.core.util.StrUtil
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
...
...
@@ -879,27 +878,42 @@ public class DateUtils {
*
* @return
*/
public
static
String
getlastMonth
(
){
SimpleDateFormat
ym
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM_dd
);
Calendar
calendar
=
Calendar
.
getInstance
(
);
cale
ndar
.
add
(
Calendar
.
MONTH
,-
1
);
String
lastMonth
=
ym
.
format
(
calendar
.
getTime
()
);
return
lastMonth
;
public
static
Date
getlastDayOfMonth
(
Date
date
){
Calendar
cale
=
Calendar
.
getInstance
(
);
cale
.
setTime
(
date
);
cale
.
add
(
Calendar
.
MONTH
,
1
);
cale
.
set
(
Calendar
.
DAY_OF_MONTH
,
0
);
return
cale
.
getTime
()
;
}
/**
* 获取
当前月份的上个月
* 获取
月份的第一天
*
* @return
*/
public
static
Date
getlastMonth
(
String
str
)
{
DateFormat
fmt
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM_dd
);
Date
date
=
null
;
try
{
date
=
fmt
.
parse
(
str
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
public
static
Date
getFirstDayOfMonth
(
Date
date
)
{
Calendar
cale
=
Calendar
.
getInstance
(
);
cale
.
setTime
(
date
)
;
cale
.
add
(
Calendar
.
MONTH
,
0
);
cale
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
return
cale
.
getTime
();
}
return
date
;
public
static
Boolean
inCurrentMonth
(
Date
date
)
{
Calendar
cal1
=
Calendar
.
getInstance
();
Calendar
cal2
=
Calendar
.
getInstance
();
//set the given date in date of the instance and current date in the other
cal1
.
setTime
(
date
);
cal2
.
setTime
(
new
Date
());
//now compare the dates using methods on Calendar
if
(
cal1
.
get
(
Calendar
.
YEAR
)
==
cal2
.
get
(
Calendar
.
YEAR
))
{
if
(
cal1
.
get
(
Calendar
.
MONTH
)
==
cal2
.
get
(
Calendar
.
MONTH
))
{
return
true
;
}
}
return
false
;
}
}
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