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
9b736296
Commit
9b736296
authored
Jan 28, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算功能代码
parent
b0b035ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1100 additions
and
2 deletions
+1100
-2
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+65
-2
ChAssessAccountsDetailMapper.java
...ungraim/ltc/account/dao/ChAssessAccountsDetailMapper.java
+14
-0
ChAssessAccountsMapper.java
.../com/hungraim/ltc/account/dao/ChAssessAccountsMapper.java
+25
-0
ChDisabAccountsDetailMapper.java
...hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
+22
-0
ChOrganAccountsMapper.java
...a/com/hungraim/ltc/account/dao/ChOrganAccountsMapper.java
+23
-0
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+13
-0
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+0
-0
ChAssessAccountsMapper.xml
...vice/src/main/resources/mapper/ChAssessAccountsMapper.xml
+120
-0
ChOrganAccountsMapper.xml
...rvice/src/main/resources/mapper/ChOrganAccountsMapper.xml
+131
-0
ChAssessAccounts.java
...om/hungraim/ltc/pojo/entity/account/ChAssessAccounts.java
+102
-0
ChAssessDetailAccounts.java
...graim/ltc/pojo/entity/account/ChAssessDetailAccounts.java
+73
-0
ChDisabAccounts.java
...com/hungraim/ltc/pojo/entity/account/ChDisabAccounts.java
+29
-0
ChDisabDetailAccounts.java
...ngraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
+81
-0
AccountExportDetailListResp.java
...raim/ltc/pojo/vo/account/AccountExportDetailListResp.java
+71
-0
AssessAccountsExportResp.java
...ungraim/ltc/pojo/vo/account/AssessAccountsExportResp.java
+56
-0
AssessAccountsListResp.java
.../hungraim/ltc/pojo/vo/account/AssessAccountsListResp.java
+72
-0
AssessAccountsVO.java
...va/com/hungraim/ltc/pojo/vo/account/AssessAccountsVO.java
+17
-0
OrganAccountsVO.java
...ava/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
+77
-0
SrvOrganAccountListResp.java
...hungraim/ltc/pojo/vo/account/SrvOrganAccountListResp.java
+77
-0
DateUtils.java
...n-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
+32
-0
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
9b736296
...
...
@@ -5,16 +5,19 @@ 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.vo.account.*
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -81,7 +84,7 @@ public class AccountController {
/**
* 费用结算
*
* @return 返回机构结当月算详情
* @return
返回机构结当月算详情
*/
@GetMapping
(
"/expenseSettlement"
)
public
Result
<
ExpenseVo
>
expenseSettlement
(
ExpenseSettlementReq
req
)
throws
ParseException
{
...
...
@@ -96,4 +99,64 @@ public class AccountController {
}
return
Result
.
success
(
accountService
.
expenseSettlement
(
req
));
}
}
// todo 后续改成每月定时
@GetMapping
(
"/organAccount"
)
public
void
organAccount
(){
accountService
.
organAccount
();
}
// todo 后续改成每月定时
@GetMapping
(
"/assessAccount"
)
public
void
getAssessAccount
(){
accountService
.
getAssessAccount
();
}
/**
* 查询机构结算列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping
(
"/searchSrvOrganAccountList"
)
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganAccountList
(
SrvOrganListReq
srvOrganListReq
)
{
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
}
/**
* 机构结算明细导出
*
*/
@GetMapping
(
"/srvOrganAccountExport"
)
public
void
srvOrganAccountExport
(
String
accountsId
,
HttpServletResponse
response
){
Workbook
workbook
=
accountService
.
srvOrganAccountExport
(
accountsId
);
// 命名表格
String
fileName
=
"srvOrganAccount.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
/**
* 查询评估结算列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping
(
"/searchAssessAccountsList"
)
public
Result
<
Page
<
AssessAccountsListResp
>>
searchAssessAccountsList
(
SrvOrganListReq
srvOrganListReq
)
{
return
Result
.
success
(
accountService
.
searchAssessAccountsList
(
srvOrganListReq
));
}
/**
* 评估结算导出明细
*
*/
@GetMapping
(
"/assessAccountExport"
)
public
void
assessAccountExport
(
String
assessAccountsId
,
HttpServletResponse
response
){
Workbook
workbook
=
accountService
.
assessAccountExport
(
assessAccountsId
);
// 命名表格
String
fileName
=
"assessAccount.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}}
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChAssessAccountsDetailMapper.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
account
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
@Mapper
@Repository
public
interface
ChAssessAccountsDetailMapper
extends
BaseMapper
<
ChAssessDetailAccounts
>
{
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChAssessAccountsMapper.java
0 → 100644
View file @
9b736296
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.ChAssessAccounts
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsVO
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListReq
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Mapper
@Repository
public
interface
ChAssessAccountsMapper
extends
BaseMapper
<
ChAssessAccounts
>
{
List
<
AssessAccountsVO
>
getAssessAccountsList
();
Page
<
AssessAccountsListResp
>
searchAssessAccountList
(
Page
page
,
List
<
Long
>
organIds
,
SrvOrganListReq
req
);
List
<
AssessAccountsExportResp
>
assessAccountDetailExport
(
String
assessAccountsId
);
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
0 → 100644
View file @
9b736296
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.AccountOperVo
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListReq
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListResp
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Mapper
@Repository
public
interface
ChDisabAccountsDetailMapper
extends
BaseMapper
<
ChDisabDetailAccounts
>
{
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChOrganAccountsMapper.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
account
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
@Mapper
public
interface
ChOrganAccountsMapper
{
List
<
OrganAccountsVO
>
getOrganAccountsList
(
String
lastMonth
);
Page
<
SrvOrganAccountListResp
>
searchSrvOrganAccountList
(
Page
page
,
List
<
Long
>
organIds
,
SrvOrganListReq
req
);
List
<
AccountExportDetailListResp
>
searchSrvOrganAccountDetailExport
(
String
accountsId
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
9b736296
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
java.text.ParseException
;
...
...
@@ -16,7 +17,19 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page
<
SrvOrganListResp
>
searchSrvOrganList
(
SrvOrganListReq
srvOrganListReq
);
Page
<
SrvOrganAccountListResp
>
searchSrvOrganAccountList
(
SrvOrganListReq
srvOrganListReq
);
AccountOperVo
getSrvOrganDetail
(
Long
accountsId
);
ExpenseVo
expenseSettlement
(
ExpenseSettlementReq
req
)
throws
ParseException
;
void
organAccount
();
void
getAssessAccount
();
Workbook
srvOrganAccountExport
(
String
accountsId
);
Page
<
AssessAccountsListResp
>
searchAssessAccountsList
(
SrvOrganListReq
srvOrganListReq
);
Workbook
assessAccountExport
(
String
assessAccountsId
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
9b736296
This diff is collapsed.
Click to expand it.
account/account-service/src/main/resources/mapper/ChAssessAccountsMapper.xml
0 → 100644
View file @
9b736296
<?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.ChAssessAccountsMapper"
>
<!--查询评估信息-->
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
select
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.finish_time finishTime,
emp.APREMP_TYPE_NAME_F aprempTypeName
from CH_APR_TASK task
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
where task.task_status = 2 and emp.APREMP_TYPE_NAME_F is not null
</select>
<select
id=
"searchAssessAccountList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp"
>
SELECT
t1.ASSESS_ACCOUNTS_ID,
t3.ORGAN_ID,
t3.ORGAN_NAME,
t2.SRV_ORGAN_ID,
t2.SRV_ORGAN_NAME,
t1.ACCOUNTS_TIME,
t1.ACCOUNTS_STATUS,
t1.ASSESS_ALL_COST,
t1.ASSESS_START_TIME,
t1.ASSESS_END_TIME
FROM
CH_ASSESS_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.APR_ORGAN_ID = t2.SRV_ORGAN_ID
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID
<where>
<if
test=
'organIds != null and organIds.size()>0'
>
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>
</where>
</select>
<select
id=
"searchAssessAccountExportList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp"
>
SELECT
t1.ASSESS_ACCOUNTS_ID,
t3.ORGAN_ID,
t3.ORGAN_NAME,
t2.SRV_ORGAN_ID,
t2.SRV_ORGAN_NAME,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
DECODE(t1.ACCOUNTS_STATUS, '0','待提交','1', '待审核','2', '已审核','3', '已失效') accountsStatus,
t1.ASSESS_ALL_COST,
to_char(t1.ASSESS_START_TIME,'yyyy-MM-dd') assessStartTime,
to_char(t1.ASSESS_END_TIME,'yyyy-MM-dd') assessEndTime
FROM
CH_ASSESS_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.APR_ORGAN_ID = t2.SRV_ORGAN_ID
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID
<where>
<if
test=
'organIds != null and organIds.size()>0'
>
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>
</where>
</select>
<select
id=
"assessAccountDetailExport"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp"
>
SELECT
t3.SRV_ORGAN_NAME,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ASSESS_ALL_COST assessCost,
to_char(t1.ASSESS_START_TIME,'yyyy-MM-dd') assessStartTime,
to_char(t1.ASSESS_END_TIME,'yyyy-MM-dd') assessEndTime
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
left join ch_disable_info t2 on t1.disab_info_id = t2.disab_info_id
LEFT JOIN CH_SRV_ORGAN t3 ON t1.SRV_ORGAN_ID = t3.SRV_ORGAN_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
</mapper>
account/account-service/src/main/resources/mapper/ChOrganAccountsMapper.xml
0 → 100644
View file @
9b736296
<?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.ChOrganAccountsMapper"
>
<!--查询机构失能人员信息-->
<select
id=
"getOrganAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
disable.district_provincial districtProvincial,
disable.district_city districtCity,
disable.DISTRICT_AREA districtArea,
mode1.MODE_ID modeId,
--服务方式
mode1.mode_name srvModeName,
--护理机构名称
organ.srv_organ_id srvOrganId,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员
emp.emp_name empName,
--任务时间
detail.SRV_DATE srvDate,
--机构等级
organ.LEVEL_CODE levelCode,
--失能等级
level1.DISABLE_LEVEL_NAME disableLevelName
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_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--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_cfg_srv_mode mode1 on program.srv_mode_id = mode1.mode_id--服务方式
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 detail.STATUS=4 and organ.LEVEL_CODE is not null
</select>
<!--查询评估信息-->
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
select
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.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.finish_time finishTime,
emp.APREMP_TYPE_NAME_F aprempTypeName
from CH_APR_TASK task
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
where task.task_status = 2 and emp.APREMP_TYPE_NAME_F is not null
</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.SVR_END_TIME
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>
<if
test=
'organIds != null and organIds.size()>0'
>
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>
</where>
</select>
<select
id=
"searchSrvOrganAccountDetailExport"
resultType=
"com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp"
>
select
t3.SRV_ORGAN_NAME srvOrganName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ACCOUNTS_ALL_COST accountsAllCost,
t1.ACCOUNTS_OVERALL_COST accountsOverallCost,
t1.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
to_char(t1.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(t1.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime
from CH_DISAB_ACCOUNTS_DETAIL t1
left join ch_disable_info t2 on t1.disab_info_id = t2.disab_info_id
LEFT JOIN CH_SRV_ORGAN t3 ON t1.SRV_ORGAN_ID = t3.SRV_ORGAN_ID
where t1.ACCOUNTS_ID = #{accountsId}
</select>
</mapper>
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChAssessAccounts.java
0 → 100644
View file @
9b736296
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
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* CH_DISAB_ACCOUNTS
* @author zwl
*/
@Data
@TableName
(
"CH_ASSESS_ACCOUNTS"
)
@KeySequence
(
"SEQ_CH_ASSESS_ACCOUNTS"
)
public
class
ChAssessAccounts
implements
Serializable
{
/**
* 评估结算id
*/
@TableId
(
value
=
"ASSESS_ACCOUNTS_ID"
,
type
=
IdType
.
INPUT
)
private
Long
assessAccountsId
;
/**
* 机构id
*/
private
Long
aprOrganId
;
/**
* 创建时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
creationTime
;
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
/**
* 是否结算(0未结算,1已结算)
*/
private
Short
chooseSettle
;
/**
* 状态(0-待提交;1-待审核;2-已审核;3-已失效;)
*/
private
Short
accountsStatus
;
/**
* 审核人姓名
*/
private
String
checkName
;
/**
* 审核备注
*/
private
String
checkRemark
;
/**
* 省
*/
private
String
districtProvincial
;
/**
* 市
*/
private
String
districtCity
;
/**
* 区
*/
private
String
districtArea
;
/**
* 费用开始日期
*/
private
Date
assessStartTime
;
/**
* 费用结束日期
*/
private
Date
assessEndTime
;
/**
* 总费用合计
*/
private
String
assessAllCost
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChAssessDetailAccounts.java
0 → 100644
View file @
9b736296
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
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* CH_DISAB_ACCOUNTS_DETAIL
*/
@Data
@TableName
(
"CH_ASSESS_ACCOUNTS_DETAIL"
)
@KeySequence
(
"SEQ_CH_ASSESS_ACCOUNTS_DETAIL"
)
public
class
ChAssessDetailAccounts
implements
Serializable
{
/**
* 结算id
*/
@TableId
(
value
=
"ASSESS_ACCOUNTS_DETAIL_ID"
,
type
=
IdType
.
INPUT
)
private
Long
assessAccountsDetailId
;
private
Long
assessAccountsId
;
private
String
disabInfoId
;
/**
* 护理机构id
*/
private
String
srvOrganId
;
/**
* 创建时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
creationTime
;
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
private
String
assessAllCost
;
private
String
assessOverallCost
;
private
String
assessPersonalCost
;
/**
* 费用开始日期
*/
private
Date
accountsStartTime
;
/**
* 费用结束日期
*/
private
Date
accountsEndTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabAccounts.java
View file @
9b736296
...
...
@@ -74,5 +74,33 @@ public class ChDisabAccounts implements Serializable {
*/
private
String
checkRemark
;
/**
* 服务方式
*/
private
String
modeName
;
/**
* 费用开始日期
*/
private
Date
svrStartTime
;
/**
* 费用结束日期
*/
private
Date
svrEndTime
;
/**
* 总费用合计
*/
private
String
allCost
;
/**
* 统筹支出
*/
private
String
overallCost
;
/**
* 个人支出
*/
private
String
personalCost
;
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
0 → 100644
View file @
9b736296
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
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* CH_DISAB_ACCOUNTS_DETAIL
*/
@Data
@TableName
(
"CH_DISAB_ACCOUNTS_DETAIL"
)
@KeySequence
(
"SEQ_CH_DISAB_DETAIL_ACCOUNTS"
)
public
class
ChDisabDetailAccounts
implements
Serializable
{
/**
* 结算id
*/
@TableId
(
value
=
"ACCOUNTS_DETAIL_ID"
,
type
=
IdType
.
INPUT
)
private
Long
accountsDetailId
;
private
Long
accountsId
;
private
String
disabInfoId
;
/**
* 护理机构id
*/
private
String
srvOrganId
;
/**
* 创建时间
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
creationTime
;
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
/**
* 应拨总费用
*/
private
BigDecimal
accountsAllCost
;
private
BigDecimal
accountsOverallCost
;
private
BigDecimal
accountsPersonalCost
;
/**
* 服务方式
*/
private
String
modeName
;
/**
* 费用开始日期
*/
private
Date
accountsStartTime
;
/**
* 费用结束日期
*/
private
Date
accountsEndTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AccountExportDetailListResp.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
AccountExportDetailListResp
{
/**
* 适用机构名称
*/
@Excel
(
name
=
"适用机构名称"
,
width
=
20
)
private
String
organName
;
/**
* 护理机构名称
*/
@Excel
(
name
=
"护理机构名称"
,
width
=
20
)
private
String
srvOrganName
;
/**
* 结算月份
*/
@Excel
(
name
=
"结算月份"
,
width
=
20
)
private
String
accountsTime
;
/**
* 费用开始时间
*/
@Excel
(
name
=
"费用开始时间"
,
width
=
20
)
private
String
accountsStartTime
;
/**
* 费用结束时间
*/
@Excel
(
name
=
"费用结束时间"
,
width
=
20
)
private
String
accountsEndTime
;
/**
* 总费用
*/
@Excel
(
name
=
"总费用"
)
private
String
accountsAllCost
;
/**
* 统筹费用
*/
@Excel
(
name
=
"统筹支出"
)
private
String
accountsOverallCost
;
/**
* 个人支付
*/
@Excel
(
name
=
"个人支付"
)
private
String
accountsPersonalCost
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AssessAccountsExportResp.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
AssessAccountsExportResp
{
@Excel
(
name
=
"适用机构名称"
,
width
=
20
)
private
String
organName
;
/**
* 护理机构名称
*/
@Excel
(
name
=
"护理机构名称"
,
width
=
20
)
private
String
srvOrganName
;
/**
* 结算月份
*/
@Excel
(
name
=
"结算月份"
,
width
=
20
)
private
String
accountsTime
;
/**
* 总费用
*/
@Excel
(
name
=
"总费用"
)
private
String
assessCost
;
/**
* 费用开始时间
*/
@Excel
(
name
=
"费用开始时间"
,
width
=
20
)
private
String
assessStartTime
;
/**
* 费用结束时间
*/
@Excel
(
name
=
"费用结束时间"
,
width
=
20
)
private
String
assessEndTime
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AssessAccountsListResp.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
AssessAccountsListResp
{
/**
* 结算id
*/
private
Long
assessAccountsId
;
/**
* 适用机构id
*/
private
Long
organId
;
/**
* 适用机构名称
*/
private
String
organName
;
/**
* 护理机构id
*/
private
String
srvOrganId
;
private
String
disabInfoId
;
/**
* 护理机构名称
*/
private
String
srvOrganName
;
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
/**
* 状态(0-待提交;1-待审核;2-已审核;3-已失效;)
*/
private
Short
accountsStatus
;
/**
* 总费用
*/
private
String
assessCost
;
/**
* 费用开始时间
*/
private
String
assessStartTime
;
/**
* 费用结束时间
*/
private
String
assessEndTime
;
private
String
aprempTypeName
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AssessAccountsVO.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
lombok.Data
;
/**
* 评估结算VO
*/
@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
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* 机构结算VO
*/
@Data
public
class
OrganAccountsVO
{
private
String
disabInfoId
;
/**
* 失能人员姓名
*/
private
String
realName
;
/**
* 身份证号
*/
private
String
certiCode
;
/**
* 服务方式id
*/
private
String
modeId
;
/**
* 服务方式
*/
private
String
srvModeName
;
/**
* 护理机构id
*/
private
String
srvOrganId
;
/**
* 护理机构名称
*/
private
String
srvOrganName
;
/**
* 所在省市
*/
private
String
districtProvincial
;
private
String
districtCity
;
private
String
districtArea
;
/**
* 护理服务人员
*/
private
String
empName
;
/**
* 任务时间
*/
private
String
srvDate
;
/**
* 机构等级
*/
private
String
levelCode
;
/**
* 失能等级
*/
private
String
disableLevelName
;
/**
* 总费用
*/
private
BigDecimal
allCost
;
/**
* 统筹支出
*/
private
BigDecimal
overallCost
;
/**
* 个人支出
*/
private
BigDecimal
personalCost
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvOrganAccountListResp.java
0 → 100644
View file @
9b736296
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.checkerframework.checker.units.qual.C
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
SrvOrganAccountListResp
{
/**
* 结算id
*/
private
Long
accountsId
;
/**
* 适用机构id
*/
private
Long
organId
;
/**
* 适用机构名称
*/
private
String
organName
;
/**
* 护理机构id
*/
private
Long
srvOrganId
;
/**
* 护理机构名称
*/
private
String
srvOrganName
;
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
/**
* 状态(0-待提交;1-待审核;2-已审核;3-已失效;)
*/
private
Short
accountsStatus
;
/**
* 总费用
*/
private
String
allCost
;
/**
* 统筹费用
*/
private
String
overallCost
;
/**
* 个人支付
*/
private
String
personalCost
;
/**
* 费用开始时间
*/
private
String
svrStartTime
;
/**
* 费用结束时间
*/
private
String
svrEndTime
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
View file @
9b736296
...
...
@@ -3,6 +3,7 @@ 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
;
...
...
@@ -32,6 +33,8 @@ 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"
;
/**
* MM-dd 12月25日
*/
...
...
@@ -854,4 +857,33 @@ public class DateUtils {
}
return
flag
;
}
/**
* 获取当前月份的上个月
*
* @return
*/
public
static
String
getlastMonth
(){
SimpleDateFormat
ym
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
MONTH
,-
1
);
String
lastMonth
=
ym
.
format
(
calendar
.
getTime
());
return
lastMonth
;
}
/**
* 获取当前月份的上个月
*
* @return
*/
public
static
Date
getlastMonth
(
String
str
){
DateFormat
fmt
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
);
Date
date
=
null
;
try
{
date
=
fmt
.
parse
(
str
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
date
;
}
}
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