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
0b8de90a
Commit
0b8de90a
authored
Feb 28, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算
parent
53b3350e
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
183 additions
and
18 deletions
+183
-18
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+4
-3
ChDisabFreeRdInfoMapper.java
...com/hungraim/ltc/account/dao/ChDisabFreeRdInfoMapper.java
+23
-0
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+3
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+52
-10
ChDisabFreeRdInfoMapper.xml
...ice/src/main/resources/mapper/ChDisabFreeRdInfoMapper.xml
+49
-0
ChDisabFreeRdInfo.java
...m/hungraim/ltc/pojo/entity/account/ChDisabFreeRdInfo.java
+43
-0
OverallCostListRespVO.java
...ngraim/ltc/pojo/entity/account/OverallCostListRespVO.java
+4
-0
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+1
-1
ChSrvTaskDetailMapper.xml
.../hungraim/ltc/governance/mapper/ChSrvTaskDetailMapper.xml
+3
-2
SrvTaskScheduledController.java
...raim/ltc/system/Scheduled/SrvTaskScheduledController.java
+1
-1
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
0b8de90a
...
...
@@ -299,11 +299,11 @@ public class AccountController {
* @param accountsDetailId 结算详情id
*/
@DeleteMapping
(
"/deleteAccountsDetail"
)
public
Result
deleteAccountsDetail
(
Long
accountsDetailId
)
{
public
Result
deleteAccountsDetail
(
Long
accountsDetailId
,
Long
freeRdId
)
{
if
(
null
==
accountsDetailId
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
int
result
=
accountService
.
deleteAccountsDetail
(
accountsDetailId
);
int
result
=
accountService
.
deleteAccountsDetail
(
accountsDetailId
,
freeRdId
);
if
(
result
>
0
){
return
Result
.
success
();
}
else
{
...
...
@@ -313,7 +313,8 @@ public class AccountController {
@GetMapping
(
"/queryOverallCostList"
)
public
Result
<
Page
<
OverallCostListRespVO
>>
queryOverallCostList
(
OverallCostReqVO
req
)
{
Page
<
OverallCostListRespVO
>
overallCostRecords
=
accountService
.
queryOverallCostList
(
req
);
// Page<OverallCostListRespVO> overallCostRecords = accountService.queryOverallCostList(req);
Page
<
OverallCostListRespVO
>
overallCostRecords
=
accountService
.
queryFreeRdInfo
(
req
);
return
Result
.
success
(
overallCostRecords
);
}
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabFreeRdInfoMapper.java
0 → 100644
View file @
0b8de90a
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.ChDisabFreeRdInfo
;
import
com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO
;
import
com.hungraim.ltc.pojo.entity.account.OverallCostReqVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
/**
* @author zwl
* @ClassName ChDisabFreeRdInfoMapper
* @description
* @date 2023/2/27 20:59
**/
@Repository
@Mapper
public
interface
ChDisabFreeRdInfoMapper
extends
BaseMapper
<
ChDisabFreeRdInfo
>
{
Page
<
OverallCostListRespVO
>
queryFreeRdInfo
(
Page
page
,
OverallCostReqVO
req
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
0b8de90a
...
...
@@ -39,6 +39,8 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
OverallCostReqVO
req
);
Page
<
OverallCostListRespVO
>
queryFreeRdInfo
(
OverallCostReqVO
req
);
int
overallCostSubmit
(
OverallCostSubmitReqVO
req
);
int
updateChDisabAccounts
(
int
id
);
...
...
@@ -48,7 +50,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
void
otherPlaceHandler
(
String
programId
);
int
deleteAccountsDetail
(
Long
accountsDetailId
);
int
deleteAccountsDetail
(
Long
accountsDetailId
,
Long
freeRdId
);
int
accountsFreeCommit
(
Long
accountsDetailId
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
0b8de90a
...
...
@@ -50,6 +50,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
private
final
ChCfgCareServiceMapper
chCfgCareServiceMapper
;
private
final
ChCfgCostStandardMapper
chCfgCostStandardMapper
;
private
final
ChDisabAccountsDetailMapper
chDisabAccountsDetailMapper
;
private
final
ChDisabFreeRdInfoMapper
chDisabFreeRdInfoMapper
;
...
...
@@ -75,6 +76,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts
.
setPersonalCost
(
BigDecimal
.
valueOf
(
0
));
chDisabAccounts
.
setReissueAmountTotal
(
BigDecimal
.
valueOf
(
0
));
chDisabAccounts
.
setDeductionAmountTotal
(
BigDecimal
.
valueOf
(
0
));
HashMap
map
=
new
HashMap
();
map
.
put
(
"ACCOUNTS_ID"
,
accountsId
);
chDisabFreeRdInfoMapper
.
deleteByMap
(
map
);
}
//待审核
if
(
accountsStatus
==
1
)
{
...
...
@@ -492,12 +496,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
@Override
public
Page
<
OverallCostListRespVO
>
queryFreeRdInfo
(
OverallCostReqVO
req
)
{
req
.
setDealType
((
null
==
req
.
getDealType
()
||
0
==
req
.
getDealType
())
?
null
:
req
.
getDealType
());
Page
<
OverallCostListRespVO
>
overallCostListRespVOPage
=
chDisabFreeRdInfoMapper
.
queryFreeRdInfo
(
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
()),
req
);
return
overallCostListRespVOPage
;
}
@Override
public
int
overallCostSubmit
(
OverallCostSubmitReqVO
req
){
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
int
dealType
=
req
.
getDealType
();
chDisabDetailAccounts
.
setAccountsDetailId
(
req
.
getAccountsDetailId
());
Long
accountsDetailId
=
req
.
getAccountsDetailId
();
chDisabDetailAccounts
.
setAccountsDetailId
(
accountsDetailId
);
Long
accountsId
=
req
.
getAccountsId
();
ChDisabAccounts
chDisabAccounts
=
disabAccountsMapper
.
selectById
(
accountsId
);
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
BigDecimal
deductionAmount
=
chDisabDetailAccountsDTO
.
getDeductionAmount
();
BigDecimal
reissueAmount
=
chDisabDetailAccountsDTO
.
getReissueAmount
();
BigDecimal
deductionAmountTotal
=
chDisabAccounts
.
getDeductionAmountTotal
();
BigDecimal
reissueAmountTotal
=
chDisabAccounts
.
getReissueAmountTotal
();
chDisabDetailAccounts
.
setDealType
(
dealType
);
...
...
@@ -505,11 +520,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
BigDecimal
amountOfMoney
=
new
BigDecimal
(
amountOfMoneyStr
);
if
(
dealType
==
1
){
// 补发
chDisabDetailAccounts
.
setReissueAmount
(
amountOfMoney
);
chDisabDetailAccounts
.
setReissueAmount
(
reissueAmount
.
add
(
amountOfMoney
)
);
reissueAmountTotal
=
reissueAmountTotal
.
add
(
amountOfMoney
);
}
else
if
(
dealType
==
2
){
// 扣减
chDisabDetailAccounts
.
setDeductionAmount
(
amountOfMoney
);
chDisabDetailAccounts
.
setDeductionAmount
(
deductionAmount
.
add
(
amountOfMoney
)
);
deductionAmountTotal
=
deductionAmountTotal
.
add
(
amountOfMoney
);
}
chDisabDetailAccounts
.
setRemarks
(
req
.
getRemarks
());
...
...
@@ -517,6 +532,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts
.
setReissueAmountTotal
(
reissueAmountTotal
);
chDisabAccounts
.
setDeductionAmountTotal
(
deductionAmountTotal
);
disabAccountsMapper
.
updateById
(
chDisabAccounts
);
ChDisabFreeRdInfo
chDisabFreeRdInfo
=
new
ChDisabFreeRdInfo
();
chDisabFreeRdInfo
.
setDealType
(
dealType
);
chDisabFreeRdInfo
.
setAmountOfMoney
(
amountOfMoney
);
chDisabFreeRdInfo
.
setAccountsDetailId
(
accountsDetailId
);
chDisabFreeRdInfo
.
setAccountsId
(
accountsId
);
chDisabFreeRdInfo
.
setCreationTime
(
new
Date
());
chDisabFreeRdInfoMapper
.
insert
(
chDisabFreeRdInfo
);
return
result
;
}
...
...
@@ -682,13 +704,33 @@ 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
);
public
int
deleteAccountsDetail
(
Long
accountsDetailId
,
Long
freeRdId
){
ChDisabFreeRdInfo
chDisabFreeRdInfo
=
chDisabFreeRdInfoMapper
.
selectById
(
freeRdId
);
BigDecimal
amountOfMoney
=
chDisabFreeRdInfo
.
getAmountOfMoney
();
int
freeDealType
=
chDisabFreeRdInfo
.
getDealType
();
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
selectById
(
accountsDetailId
);
BigDecimal
deductionAmount
=
chDisabDetailAccountsDTO
.
getDeductionAmount
();
BigDecimal
reissueAmount
=
chDisabDetailAccountsDTO
.
getReissueAmount
();
Long
accountsId
=
chDisabDetailAccountsDTO
.
getAccountsId
();
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountsId
);
BigDecimal
reissueAmountTotal
=
chDisabAccountDTO
.
getReissueAmountTotal
();
BigDecimal
deductionAmountTotal
=
chDisabAccountDTO
.
getDeductionAmountTotal
();
if
(
freeDealType
==
1
)
{
// 删除减掉补发
BigDecimal
reissueAmountSubtract
=
reissueAmountTotal
.
subtract
(
amountOfMoney
);
chDisabAccountDTO
.
setReissueAmountTotal
(
reissueAmountSubtract
);
BigDecimal
subtract
=
reissueAmount
.
subtract
(
amountOfMoney
);
chDisabDetailAccountsDTO
.
setReissueAmount
(
subtract
);
}
else
if
(
freeDealType
==
2
)
{
// 删除减掉扣减
BigDecimal
deductionAmountSubtract
=
deductionAmountTotal
.
subtract
(
amountOfMoney
);
chDisabAccountDTO
.
setDeductionAmountTotal
(
deductionAmountSubtract
);
BigDecimal
subtract
=
deductionAmount
.
subtract
(
amountOfMoney
);
chDisabDetailAccountsDTO
.
setDeductionAmount
(
subtract
);
}
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
int
result
=
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccountsDTO
);
chDisabFreeRdInfoMapper
.
deleteById
(
freeRdId
);
return
result
;
}
...
...
account/account-service/src/main/resources/mapper/ChDisabFreeRdInfoMapper.xml
0 → 100644
View file @
0b8de90a
<?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.ChDisabFreeRdInfoMapper"
>
<select
id=
"queryFreeRdInfo"
resultType=
"com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO"
>
select
info.REAL_NAME realName,
info.CERTI_CODE certiCode,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
detail.ACCOUNTS_DETAIL_ID accountsDetailId,
detail.ACCOUNTS_START_TIME svrStartTime,
detail.ACCOUNTS_END_TIME svrEndTime,
rd.DEAL_TYPE dealType,
organ.SRV_ORGAN_NAME srvOrganName,
rd.AMOUNT_OF_MONEY amountOfMoney,
rd.FREE_RD_ID freeRdId,
d.ACCOUNTS_STATUS accountsStatus
from CH_DISAB_FREE_RD_INFO rd left join
CH_DISAB_ACCOUNTS_DETAIL detail on
rd.ACCOUNTS_DETAIL_ID = detail.ACCOUNTS_DETAIL_ID
left join CH_DISAB_ACCOUNTS d on d.ACCOUNTS_ID = detail.ACCOUNTS_ID
left join CH_DISABLE_INFO info on info.DISAB_INFO_ID = detail.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on apply.APPLY_ID = info.APPLY_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
<where>
<if
test=
"req.realName != null and req.realName != ''"
>
and info.REAL_NAME = #{req.realName}
</if>
<if
test=
"req.accountsTime != null and req.accountsTime != ''"
>
and to_char(detail.accounts_time,'yyyy-MM-dd') = #{req.accountsTime}
</if>
<if
test=
"req.srvOrganName != null and req.srvOrganName != ''"
>
and organ.SRV_ORGAN_NAME = #{req.srvOrganName}
</if>
<if
test=
"req.certiCode != null and req.certiCode != ''"
>
and info.certi_Code = #{req.certiCode}
</if>
<if
test=
"req.dealType != null"
>
and rd.DEAL_TYPE = #{req.dealType}
</if>
</where>
order by rd.CREATION_TIME desc
</select>
</mapper>
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabFreeRdInfo.java
0 → 100644
View file @
0b8de90a
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @author zwl
* @ClassName ChDisabFreeRdInfo
* @description
* @date 2023/2/28 8:43
**/
@Data
@TableName
(
"CH_DISAB_FREE_RD_INFO"
)
@KeySequence
(
"SEQ_CH_DISAB_FREE_RD_INFO"
)
public
class
ChDisabFreeRdInfo
implements
Serializable
{
@TableId
(
value
=
"FREE_RD_ID"
,
type
=
IdType
.
INPUT
)
private
Long
freeRdId
;
private
Long
accountsDetailId
;
private
Long
accountsId
;
private
Date
creationTime
;
private
int
dealType
;
private
BigDecimal
amountOfMoney
;
private
String
remarks
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/OverallCostListRespVO.java
View file @
0b8de90a
...
...
@@ -17,6 +17,8 @@ public class OverallCostListRespVO {
*/
private
String
realName
;
private
Long
freeRdId
;
/**
*身份证号
...
...
@@ -61,4 +63,6 @@ public class OverallCostListRespVO {
private
String
accountsOverallCost
;
private
String
srvOrganName
;
private
String
accountsStatus
;
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
0b8de90a
...
...
@@ -219,7 +219,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
}
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
chSrvTaskDetail
.
setSrvTaskId
(
srvTaskId
);
//taskId
chSrvTaskDetail
.
setSrvDate
(
new
Date
(
));
//服务开始时间
chSrvTaskDetail
.
setSrvDate
(
DateUtils
.
strToDate
(
nextDay
));
//服务开始时间
chSrvTaskDetail
.
setStatus
((
short
)
0
);
//状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
}
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvTaskDetailMapper.xml
View file @
0b8de90a
...
...
@@ -57,8 +57,8 @@
ILLEGALRE_NAME, ILLEGALRE_TIME, ACCOUNT_SIGN, TASK_DETAIL_TYPE
</sql>
<select
id=
"getSrvTaskDetail"
>
select count(
*
) from CH_SRV_TASK_DETAIL t where t.SRV_TASK_ID = #{srvTaskId}
<select
id=
"getSrvTaskDetail"
resultType=
"java.lang.Integer"
>
select count(
0
) from CH_SRV_TASK_DETAIL t where t.SRV_TASK_ID = #{srvTaskId}
and to_char(t.SRV_DATE,'yyyy-MM-dd') = #{srvDate}
</select>
</mapper>
\ No newline at end of file
system/system-admin-service/src/main/java/com/hungraim/ltc/system/Scheduled/SrvTaskScheduledController.java
View file @
0b8de90a
...
...
@@ -21,7 +21,7 @@ public class SrvTaskScheduledController {
private
final
SrvTaskFeignService
srvTaskFeignService
;
// 表示每天3点5分执行
@Scheduled
(
cron
=
"30
41 17
* * ?"
)
@Scheduled
(
cron
=
"30
32 19
* * ?"
)
public
void
timeAllocationSrvTask
()
{
Result
result
=
srvTaskFeignService
.
timeAllocationSrvTask
();
System
.
out
.
println
();
...
...
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