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
91d1b532
Commit
91d1b532
authored
Jan 30, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算功能代码
parent
7531e8ab
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
53 deletions
+63
-53
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+29
-12
ChAssessAccountsMapper.xml
...vice/src/main/resources/mapper/ChAssessAccountsMapper.xml
+1
-12
ChOrganAccountsMapper.xml
...rvice/src/main/resources/mapper/ChOrganAccountsMapper.xml
+5
-4
ChDisableApplyMapper.xml
...ervice/src/main/resources/mapper/ChDisableApplyMapper.xml
+2
-1
ChAssessAccounts.java
...om/hungraim/ltc/pojo/entity/account/ChAssessAccounts.java
+1
-12
ChAssessDetailAccounts.java
...graim/ltc/pojo/entity/account/ChAssessDetailAccounts.java
+2
-2
ChDisabDetailAccounts.java
...ngraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
+3
-0
AssessAccountsVO.java
...va/com/hungraim/ltc/pojo/vo/account/AssessAccountsVO.java
+2
-3
OrganAccountsVO.java
...ava/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
+13
-4
DisableExamineInfoVO.java
...om/hungraim/ltc/pojo/vo/disable/DisableExamineInfoVO.java
+2
-0
DateUtils.java
...n-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
+3
-3
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
91d1b532
...
...
@@ -395,6 +395,20 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
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
)
{
Calendar
cale
=
Calendar
.
getInstance
();
...
...
@@ -487,7 +501,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
String
srvModeName
=
organAccountList
.
get
(
0
).
getSrvModeName
();
if
(!
"医疗"
.
equals
(
srvModeName
))
{
Long
accountsId
=
saveOrganAccount
(
organId
,
organAccountList
,
allCost
,
overallCost
,
personalCost
);
saveorganAccountDetail
(
organAccountList
,
limit
,
overallCost
,
personalCos
t
,
accountsId
);
saveorganAccountDetail
(
organAccountList
,
limit
,
overallCost
Percent
,
personalCostPercen
t
,
accountsId
);
}
return
organAccountsVO
;
...
...
@@ -496,13 +510,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
/**
* @param limit 限额
* @param overall
Cost 统筹支付
* @param personal
Cost 个人支付
* @param overall
Percent 统筹支付百分比
* @param personal
Percent 个人支付百分比
* @param accountsId 机构结算id
* @return void
* @desc 保存机构结算明细
**/
public
void
saveorganAccountDetail
(
List
<
OrganAccountsVO
>
organAccountList
,
BigDecimal
limit
,
BigDecimal
overall
Cost
,
BigDecimal
personalCos
t
,
Long
accountsId
){
public
void
saveorganAccountDetail
(
List
<
OrganAccountsVO
>
organAccountList
,
BigDecimal
limit
,
BigDecimal
overall
Percent
,
BigDecimal
personalPercen
t
,
Long
accountsId
){
if
(
CollectionUtil
.
isEmpty
(
organAccountList
)){
return
;
}
...
...
@@ -510,13 +524,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
chDisabDetailAccounts
.
setSrvOrganId
(
accountsVO
.
getSrvOrganId
());
chDisabDetailAccounts
.
setAccountsAllCost
(
limit
);
chDisabDetailAccounts
.
setAccountsOverallCost
(
limit
.
multiply
(
overall
Cos
t
));
chDisabDetailAccounts
.
setAccountsPersonalCost
(
limit
.
multiply
(
personal
Cos
t
));
chDisabDetailAccounts
.
setAccountsOverallCost
(
limit
.
multiply
(
overall
Percen
t
));
chDisabDetailAccounts
.
setAccountsPersonalCost
(
limit
.
multiply
(
personal
Percen
t
));
chDisabDetailAccounts
.
setModeName
(
accountsVO
.
getSrvModeName
());
chDisabDetailAccounts
.
setCreationTime
(
new
Date
());
chDisabDetailAccounts
.
setAccountsTime
(
DateUtils
.
getlastMonth
(
lastMonth
));
chDisabDetailAccounts
.
setAccountsEndTime
(
DateUtils
.
strToTime
(
accountsVO
.
getSrvDate
()));
chDisabDetailAccounts
.
setAccountsStartTime
(
DateUtils
.
strToTime
(
accountsVO
.
getSrvStartTime
()));
chDisabDetailAccounts
.
setAccountsEndTime
(
DateUtils
.
strToTime
(
accountsVO
.
getSrvEndTime
()));
chDisabDetailAccounts
.
setAccountsId
(
accountsId
);
chDisabDetailAccounts
.
setMedicalArea
(
accountsVO
.
getMedicalArea
());
chDisabDetailAccounts
.
setDisabInfoId
(
accountsVO
.
getDisabInfoId
());
chDisabAccountsDetailMapper
.
insert
(
chDisabDetailAccounts
);
}
...
...
@@ -540,12 +556,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts
.
setOverallCost
(
overallCost
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
chDisabAccounts
.
setPersonalCost
(
personalCost
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
Date
date
=
DateUtils
.
getlastMonth
(
lastMonth
);
chDisabAccounts
.
setAccountsTime
(
DateUtils
.
getlastMonth
(
lastMonth
)
);
chDisabAccounts
.
setAccountsTime
(
date
);
chDisabAccounts
.
setAccountsStatus
((
short
)
1
);
chDisabAccounts
.
setCreationTime
(
new
Date
());
chDisabAccounts
.
setSrvOrganId
(
Long
.
valueOf
(
organId
));
chDisabAccounts
.
setModeName
(
organAccountList
.
get
(
0
).
getSrvModeName
());
// chDisabAccounts.setSvrStartTime(
);
chDisabAccounts
.
setSvrStartTime
(
getFirstDayOfMonth
(
date
)
);
chDisabAccounts
.
setSvrEndTime
(
getLastDayOfMonth
(
date
));
disabAccountsMapper
.
insert
(
chDisabAccounts
);
Long
accountsId
=
chDisabAccounts
.
getAccountsId
();
...
...
@@ -590,11 +606,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
Date
date
=
DateUtils
.
getlastMonth
(
lastMonth
);
chAssessAccounts
.
setAccountsTime
(
DateUtils
.
getlastMonth
(
lastMonth
));
chAssessAccounts
.
setAprOrganId
(
Long
.
valueOf
(
accountList
.
get
(
0
).
getAprOrganId
()));
chAssessAccounts
.
setAssessStartTime
(
getFirstDayOfMonth
(
date
));
chAssessAccounts
.
setAssessEndTime
(
getLastDayOfMonth
(
date
));
chAssessAccounts
.
setChooseSettle
((
short
)
1
);
chAssessAccounts
.
setDistrictProvincial
(
accountList
.
get
(
0
).
getDistrictProvincial
());
chAssessAccounts
.
setDistrictCity
(
accountList
.
get
(
0
).
getDistrictCity
());
chAssessAccounts
.
setDistrictArea
(
accountList
.
get
(
0
).
getDistrictArea
());
chAssessAccounts
.
setCreationTime
(
new
Date
());
chAssessAccountsMapper
.
insert
(
chAssessAccounts
);
Long
assessAccountsId
=
chAssessAccounts
.
getAssessAccountsId
();
for
(
AssessAccountsVO
assessAccountsVO
:
accountList
)
{
...
...
@@ -604,6 +619,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chAssessDetailAccounts
.
setCreationTime
(
new
Date
());
chAssessDetailAccounts
.
setDisabInfoId
(
assessAccountsVO
.
getDisabInfoId
());
chAssessDetailAccounts
.
setAssessAllCost
(
allCost
);
chAssessDetailAccounts
.
setAccountsStartTime
(
assessAccountsVO
.
getAcceptTime
());
chAssessDetailAccounts
.
setAccountsEndTime
(
assessAccountsVO
.
getFinishTime
());
chAssessDetailAccounts
.
setAccountsTime
(
DateUtils
.
getlastMonth
(
lastMonth
));
chAssessAccountsDetailMapper
.
insert
(
chAssessDetailAccounts
);
}
...
...
account/account-service/src/main/resources/mapper/ChAssessAccountsMapper.xml
View file @
91d1b532
...
...
@@ -10,19 +10,8 @@
DISTINCT task.task_id taskId,
fndOrgan.ORGAN_NAME organName,
task.ORGAN_ID aprOrganId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
disable.DISAB_INFO_ID disabInfoId,
disable.real_name realName,
disable.certi_code certiCode,
disable.BIRTHDAY birthday,
disable.tel tel,
disable.gender gender,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) disDistrictProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_city = dis.DISTRICT_CODE) disDistrictCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_area = dis.DISTRICT_CODE) disDistrictArea,
disable.end_time endTime,
task.ACCEPT_TIME acceptTime,
task.finish_time finishTime,
emp.APREMP_TYPE_NAME_F aprempTypeName
from CH_APR_TASK task
...
...
account/account-service/src/main/resources/mapper/ChOrganAccountsMapper.xml
View file @
91d1b532
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.hungraim.ltc.account.dao.ChOrganAccountsMapper"
>
<!--查询机构失能人员信息-->
<!--查询机构失能人员信息
-->
<select
id=
"getOrganAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
--失能人员姓名
...
...
@@ -12,9 +12,7 @@
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
disable.district_provincial districtProvincial,
disable.district_city districtCity,
disable.DISTRICT_AREA districtArea,
apply.MEDICAL_AREA medicalArea,
mode1.MODE_ID modeId,
--服务方式
mode1.mode_name srvModeName,
...
...
@@ -26,6 +24,8 @@
emp.emp_name empName,
--任务时间
detail.SRV_DATE srvDate,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
--机构等级
organ.LEVEL_CODE levelCode,
--失能等级
...
...
@@ -33,6 +33,7 @@
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_DEV.CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_apr_task aprtask on disable.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
left join ch_srv_program program on task.program_id = program.program_id--服务方案
...
...
apply/apply-service/src/main/resources/mapper/ChDisableApplyMapper.xml
View file @
91d1b532
...
...
@@ -119,7 +119,8 @@
a.APPLY_STATUS applyStatus,
a.CHECK_REMARK checkRemark,
a.REASONS_REVIEW reasonsReview,
a.REASONS_REMARK reasonsRemark
a.REASONS_REMARK reasonsRemark,
a.MEDICAL_AREA medicalArea
from CH_DISABLE_APPLY a
LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where a.APPLY_ID = #{applyId}
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChAssessAccounts.java
View file @
91d1b532
...
...
@@ -66,18 +66,7 @@ public class ChAssessAccounts implements Serializable {
*/
private
String
checkRemark
;
/**
* 省
*/
private
String
districtProvincial
;
/**
* 市
*/
private
String
districtCity
;
/**
* 区
*/
private
String
districtArea
;
/**
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChAssessDetailAccounts.java
View file @
91d1b532
...
...
@@ -61,11 +61,11 @@ public class ChAssessDetailAccounts implements Serializable {
/**
* 费用开始日期
*/
private
Date
accountsStartTime
;
private
String
accountsStartTime
;
/**
* 费用结束日期
*/
private
Date
accountsEndTime
;
private
String
accountsEndTime
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
View file @
91d1b532
...
...
@@ -75,6 +75,8 @@ public class ChDisabDetailAccounts implements Serializable {
*/
private
Date
accountsEndTime
;
private
String
medicalArea
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AssessAccountsVO.java
View file @
91d1b532
...
...
@@ -9,9 +9,8 @@ import lombok.Data;
public
class
AssessAccountsVO
{
private
String
organName
;
private
String
aprOrganId
;
private
String
districtProvincial
;
private
String
districtCity
;
private
String
districtArea
;
private
String
aprempTypeName
;
private
String
disabInfoId
;
private
String
acceptTime
;
private
String
finishTime
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
View file @
91d1b532
...
...
@@ -39,12 +39,11 @@ public class OrganAccountsVO {
* 护理机构名称
*/
private
String
srvOrganName
;
/**
*
所在省市
*
医保统筹区
*/
private
String
districtProvincial
;
private
String
districtCity
;
private
String
districtArea
;
private
String
medicalArea
;
/**
* 护理服务人员
*/
...
...
@@ -53,6 +52,16 @@ public class OrganAccountsVO {
* 任务时间
*/
private
String
srvDate
;
/**
* 任务开始时间
*/
private
String
srvStartTime
;
/**
* 任务结束时间
*/
private
String
srvEndTime
;
/**
* 机构等级
*/
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/DisableExamineInfoVO.java
View file @
91d1b532
...
...
@@ -110,6 +110,8 @@ public class DisableExamineInfoVO {
private
String
reasonsReview
;
// 复评备注
private
String
reasonsRemark
;
// 医保统筹区
private
String
medicalArea
;
private
List
<
ChFndAttach
>
fileDataList
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
View file @
91d1b532
...
...
@@ -33,7 +33,7 @@ public class DateUtils {
*/
public
static
final
String
DATE_PATTERN_yyyy_MM_dd
=
"yyyy-MM-dd"
;
public
static
final
String
DATE_PATTERN_yyyy_MM
=
"yyyy-MM"
;
public
static
final
String
DATE_PATTERN_yyyy_MM
=
"yyyy-MM
-dd
"
;
/**
* MM-dd 12月25日
...
...
@@ -864,7 +864,7 @@ public class DateUtils {
* @return
*/
public
static
String
getlastMonth
(){
SimpleDateFormat
ym
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
);
SimpleDateFormat
ym
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
_dd
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
MONTH
,-
1
);
String
lastMonth
=
ym
.
format
(
calendar
.
getTime
());
...
...
@@ -876,7 +876,7 @@ public class DateUtils {
* @return
*/
public
static
Date
getlastMonth
(
String
str
){
DateFormat
fmt
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
);
DateFormat
fmt
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
_dd
);
Date
date
=
null
;
try
{
date
=
fmt
.
parse
(
str
);
...
...
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