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
3d59a414
Commit
3d59a414
authored
Feb 06, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算及评估代码
parent
53347a2e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
496 additions
and
305 deletions
+496
-305
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+13
-62
ChDisabAccountsDetailMapper.java
...hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
+12
-3
ChDisabAccountsMapper.java
...a/com/hungraim/ltc/account/dao/ChDisabAccountsMapper.java
+5
-0
ChOrganAccountsMapper.java
...a/com/hungraim/ltc/account/dao/ChOrganAccountsMapper.java
+0
-28
ChSrvTaskDetailMapper.java
...a/com/hungraim/ltc/account/dao/ChSrvTaskDetailMapper.java
+4
-0
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+2
-15
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+0
-0
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+63
-83
ChDisabAccountsMapper.xml
...rvice/src/main/resources/mapper/ChDisabAccountsMapper.xml
+19
-0
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+18
-15
TaskController.java
...main/java/com/hungraim/ltc/controller/TaskController.java
+56
-1
ChAssessAccountsDetailMapper.java
...va/com/hungraim/ltc/dao/ChAssessAccountsDetailMapper.java
+2
-2
ChAssessAccountsMapper.java
...ain/java/com/hungraim/ltc/dao/ChAssessAccountsMapper.java
+6
-5
ChAssessDetailAccountsMapper.java
...va/com/hungraim/ltc/dao/ChAssessDetailAccountsMapper.java
+4
-4
TaskService.java
...e/src/main/java/com/hungraim/ltc/service/TaskService.java
+16
-0
TaskServiceImpl.java
...n/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
+132
-8
ChAssessAccountsMapper.xml
...vice/src/main/resources/mapper/ChAssessAccountsMapper.xml
+12
-22
ChAssessDetailAccountsMapper.xml
...rc/main/resources/mapper/ChAssessDetailAccountsMapper.xml
+2
-2
ChDisabDetailAccounts.java
...ngraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
+5
-0
ChAssessAccounts.java
...hungraim/ltc/pojo/entity/assessment/ChAssessAccounts.java
+4
-17
ChAssessDetailAccounts.java
...im/ltc/pojo/entity/assessment/ChAssessDetailAccounts.java
+11
-24
ChAssessDetailAccountsResp.java
...tc/pojo/entity/assessment/ChAssessDetailAccountsResp.java
+1
-8
AccountTaskExecuteReqVO.java
...hungraim/ltc/pojo/vo/account/AccountTaskExecuteReqVO.java
+13
-0
AccountTaskReqVO.java
...va/com/hungraim/ltc/pojo/vo/account/AccountTaskReqVO.java
+10
-0
OrganAccountsVO.java
...ava/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
+6
-0
SrvOrganAccountListResp.java
...hungraim/ltc/pojo/vo/account/SrvOrganAccountListResp.java
+2
-2
SrvTaskRespVO.java
.../java/com/hungraim/ltc/pojo/vo/account/SrvTaskRespVO.java
+7
-1
AssessIdAndCostVO.java
...om/hungraim/ltc/pojo/vo/assessment/AssessIdAndCostVO.java
+13
-0
ReportDetailVO.java
...a/com/hungraim/ltc/pojo/vo/assessment/ReportDetailVO.java
+1
-0
SrvOrganListReq.java
.../com/hungraim/ltc/pojo/vo/assessment/SrvOrganListReq.java
+36
-0
DateUtils.java
...n-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
+17
-1
ChSrvOrganProjectMapper.xml
...ungraim/ltc/governance/mapper/ChSrvOrganProjectMapper.xml
+4
-2
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
3d59a414
...
...
@@ -3,7 +3,8 @@ 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.*
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabAccounts
;
import
com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
...
...
@@ -97,22 +98,13 @@ 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
();
}
// 执行
@PostMapping
(
"/organAccountTaskExecute"
)
public
Result
organAccountTaskExecute
(
@RequestBody
List
<
String
>
taskDetailIds
){
accountService
.
organAccountTaskExecute
(
taskDetailIds
);
@RequestMapping
(
"/organAccountTaskExecute"
)
public
Result
organAccountTaskExecute
(
AccountTaskReqVO
accountTaskReqVO
){
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
=
accountTaskReqVO
.
getAccountTaskList
();
accountService
.
organAccountTaskExecute
(
accountTaskExecuteReqVOS
);
return
Result
.
success
();
}
...
...
@@ -155,41 +147,12 @@ public class AccountController {
}
/**
* 查询评估结算列表
*
* @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
);
}
/**
* 评估人员结算列表明细
*
* @param assessAccountsId 评估结算id
* @return 返回
*/
@GetMapping
(
"/queryAssessAccountsDetail"
)
public
Result
<
List
<
ChAssessDetailAccountsResp
>>
queryAssessAccountsDetail
(
String
assessAccountsId
)
{
List
<
ChAssessDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryAssessAccountsDetail
(
assessAccountsId
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
/**
* 查询机构结算信息列表明细
...
...
@@ -203,6 +166,9 @@ public class AccountController {
return
Result
.
success
(
chAssessDetailAccounts
);
}
/**
* 机构结算管理提交复核
*
...
...
@@ -220,22 +186,7 @@ public class AccountController {
}
/**
* 评估人员结算提交复核
*
* @param id 结算id
* @return 返回雷彪
*/
@PostMapping
(
"/updateChAssessAccounts"
)
public
Result
updateChAssessAccounts
(
int
id
)
{
int
bl
=
accountService
.
updateChAssessAccounts
(
id
);
if
(
bl
>
0
){
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
}
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
View file @
3d59a414
...
...
@@ -4,10 +4,9 @@ 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
com.hungraim.ltc.pojo.vo.account.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -17,5 +16,14 @@ import java.util.List;
@Repository
public
interface
ChDisabAccountsDetailMapper
extends
BaseMapper
<
ChDisabDetailAccounts
>
{
List
<
OrganAccountsVO
>
getOrganAccountsList
(
@Param
(
"taskDetailIds"
)
List
<
String
>
taskDetailIds
,
String
status
);
Page
<
SrvOrganAccountListResp
>
searchSrvOrganAccountList
(
Page
page
,
List
<
Long
>
organIds
,
SrvOrganListReq
req
);
List
<
AccountExportDetailListResp
>
searchSrvOrganAccountDetailExport
(
String
accountsId
);
List
<
ChDisabDetailAccounts
>
queryAccountByCondition
(
@Param
(
"taskDetailIds"
)
List
<
String
>
taskDetailIds
,
String
accountsTime
);
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsMapper.java
View file @
3d59a414
...
...
@@ -49,4 +49,8 @@ public interface ChDisabAccountsMapper extends BaseMapper<ChDisabAccounts> {
"WHERE "
+
" t1.ACCOUNTS_ID = #{accountsId}"
)
AccountOperVo
getDetailById
(
Long
accountsId
);
ChDisabAccounts
queryAccountByCondition
(
String
accountsTime
,
String
modeName
,
String
srvOrganId
);
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChOrganAccountsMapper.java
deleted
100644 → 0
View file @
53347a2e
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.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.List
;
@Repository
@Mapper
public
interface
ChOrganAccountsMapper
{
List
<
OrganAccountsVO
>
getOrganAccountsList
(
String
lastMonth
);
List
<
OrganAccountsVO
>
getOrganAccountsList22
(
@Param
(
"taskDetailIds"
)
List
<
String
>
taskDetailIds
);
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/dao/ChSrvTaskDetailMapper.java
View file @
3d59a414
...
...
@@ -8,8 +8,11 @@ import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Mapper
@Repository
public
interface
ChSrvTaskDetailMapper
extends
BaseMapper
<
ChSrvTaskDetail
>
{
Page
<
SrvTaskRespVO
>
getSrvTaskList
(
Page
page
,
SrvTaskReqVO
req
);
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
3d59a414
...
...
@@ -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.*
;
import
com.hungraim.ltc.pojo.vo.account.*
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
java.text.ParseException
;
...
...
@@ -26,28 +27,14 @@ public interface AccountService extends IService<ChDisabAccounts> {
ExpenseVo
expenseSettlement
(
ExpenseSettlementReq
req
)
throws
ParseException
;
void
organAccount
();
void
getAssessAccount
();
Workbook
srvOrganAccountExport
(
String
accountsId
);
Page
<
AssessAccountsListResp
>
searchAssessAccountsList
(
SrvOrganListReq
srvOrganListReq
);
Workbook
assessAccountExport
(
String
assessAccountsId
);
/**
* 列表明细
* @param assessAccountsId
* @return
*/
List
<
ChAssessDetailAccountsResp
>
queryAssessAccountsDetail
(
String
assessAccountsId
);
List
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
String
id
);
int
updateChDisabAccounts
(
int
id
);
int
updateChAssessAccounts
(
int
id
);
void
organAccountTaskExecute
(
List
<
String
>
taskDetailIds
);
void
organAccountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
3d59a414
This diff is collapsed.
Click to expand it.
account/account-service/src/main/resources/mapper/Ch
OrganAccounts
Mapper.xml
→
account/account-service/src/main/resources/mapper/Ch
DisabAccountsDetail
Mapper.xml
View file @
3d59a414
<?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.Ch
OrganAccounts
Mapper"
>
<mapper
namespace=
"com.hungraim.ltc.account.dao.Ch
DisabAccountsDetail
Mapper"
>
<!--查询机构失能人员信息 -->
<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,
--所在省市
apply.MEDICAL_AREA medicalArea,
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,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
--机构等级
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_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--服务方案
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
detail.TASK_DETAIL_ID taskDetailId,
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
apply.MEDICAL_AREA medicalArea,
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,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
-- 机构等级
organ.LEVEL_CODE levelCode,
-- 失能等级
level1.DISABLE_LEVEL_NAME disableLevelName,
d.service_type_detailed_name itemName
,d.PARA_ID,
CSOP.ITEM_TIMES,
CSOP.ITEM_TIMES_TYPE,
CSTFI.ITEM_ID itemId
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--服务方案
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
LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = CSTFI.ITEM_ID
LEFT JOIN CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CSOP.item_name
<where>
<if
test=
"status != null and status != ''"
>
AND detail.STATUS = #{status}
</if>
<if
test=
"taskDetailIds != null and taskDetailIds.size() > 0"
>
AND detail.TASK_DETAIL_ID IN
<foreach
collection=
"taskDetailIds"
separator=
","
open=
"("
close=
")"
item=
"taskDetailId"
>
#{taskDetailId}
</foreach>
</if>
</where>
</select>
<select
id=
"getOrganAccountsList22"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
apply.MEDICAL_AREA medicalArea,
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,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
-- 机构等级
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_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--服务方案
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 = '0'
<select
id=
"queryAccountByCondition"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts"
>
select * from CH_DISAB_ACCOUNTS_DETAIL t where t.MODE_NAME in ('养老','医疗')
and to_char(t.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
<if
test=
"taskDetailIds != null and taskDetailIds.size() > 0"
>
AND
detail
.TASK_DETAIL_ID IN
AND
t
.TASK_DETAIL_ID IN
<foreach
collection=
"taskDetailIds"
separator=
","
open=
"("
close=
")"
item=
"taskDetailId"
>
#{taskDetailId}
</foreach>
</if>
</select>
<!--查询评估信息-->
...
...
account/account-service/src/main/resources/mapper/ChDisabAccountsMapper.xml
View file @
3d59a414
...
...
@@ -15,4 +15,22 @@
ACCOUNTS_ID, SRV_ORGAN_ID, TOTAL_ALLOCATED_EXPENSES, CREATION_TIME, ACCOUNTS_TIME,
TOTAL_EXPENSES_PAYABLE, CHOOSE_SETTLE, ACCOUNTS_STATUS
</sql>
<select
id=
"queryAccountByCondition"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts"
>
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}
</select>
<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}
</select>
</mapper>
\ No newline at end of file
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
3d59a414
...
...
@@ -21,35 +21,38 @@
--护理服务人员
emp.emp_name empName,
--任务时间
detail.SRV_DATE srvDate,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
--机构等级
organ.LEVEL_CODE levelCode,
--失能等级
level1.DISABLE_LEVEL_NAME disableLevelName
from ch_srv_task_detail detail--服务计划
to_char( detail.SRV_DATE,'yyyy-MM-dd') srvDate,
detail.TASK_DETAIL_ID taskDetailId,
d.SERVICE_TYPE_DETAILED_NAME itemName,
CSTFI.ITEM_ID itemId
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--服务方案
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
<if
test=
'req.status != null and req.status == "0"'
>
left join CH_SRV_PROGRAM_SET CSTFI on CSTFI.PROGRAM_ID = task.program_id
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = CSTFI.ITEM_ID
</if>
<if
test=
'req.status != null and req.status == "4"'
>
left join CH_SRV_TASK_FINISH_ITEM CSTFI on CSTFI.TASK_DETAIL_ID = detail.TASK_DETAIL_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = CSTFI.ITEM_ID
</if>
LEFT JOIN CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CSOP.item_name
<where>
srvModeName
in ('医疗','养老')
mode1.mode_name
in ('医疗','养老')
<if
test=
"req.realName != null and req.realName != ''"
>
and disable.real_name LIKE CONCAT(CONCAT('%',#{req.realName}),'%')
</if>
<if
test=
"req.status != null and req.status != ''"
>
<if
test=
'req.status != null and req.status != "" and req.status != "0"'
>
and detail.status = #{req.status}
</if>
</where>
order by detail.SRV_DATE desc
</select>
...
...
assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
View file @
3d59a414
...
...
@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import
com.hungraim.ltc.pojo.entity.assessment.*
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.ReportUpdateVO
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TppesApiException
;
...
...
@@ -22,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -182,6 +182,8 @@ public class TaskController {
//失败
return
Result
.
failed
(
objectResult
.
getMsg
());
}
// 评估结算
taskService
.
assessAccount
(
reportDetailVo
);
return
Result
.
success
();
}
...
...
@@ -678,4 +680,57 @@ public class TaskController {
String
fileName
=
"aprEmp.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
/**
* 查询评估结算列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping
(
"/searchAssessAccountsList"
)
public
Result
<
Page
<
AssessAccountsListResp
>>
searchAssessAccountsList
(
SrvOrganListReq
srvOrganListReq
)
{
return
Result
.
success
(
taskService
.
searchAssessAccountsList
(
srvOrganListReq
));
}
/**
* 评估结算导出明细
*
*/
@GetMapping
(
"/assessAccountExport"
)
public
void
assessAccountExport
(
String
assessAccountsId
,
HttpServletResponse
response
){
Workbook
workbook
=
taskService
.
assessAccountExport
(
assessAccountsId
);
// 命名表格
String
fileName
=
"assessAccount.xlsx"
;
FileUtils
.
exportResponse
(
workbook
,
fileName
,
response
);
}
/**
* 评估人员结算列表明细
*
* @param assessAccountsId 评估结算id
* @return 返回
*/
@GetMapping
(
"/queryAssessAccountsDetail"
)
public
Result
<
List
<
ChAssessDetailAccountsResp
>>
queryAssessAccountsDetail
(
String
assessAccountsId
)
{
List
<
ChAssessDetailAccountsResp
>
chAssessDetailAccounts
=
taskService
.
queryAssessAccountsDetail
(
assessAccountsId
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
/**
* 评估人员结算提交复核
*
* @param id 结算id
* @return 返回雷彪
*/
@PostMapping
(
"/updateChAssessAccounts"
)
public
Result
updateChAssessAccounts
(
int
id
)
{
int
bl
=
taskService
.
updateChAssessAccounts
(
id
);
if
(
bl
>
0
){
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
}
a
ccount/account-service/src/main/java/com/hungraim/ltc/account
/dao/ChAssessAccountsDetailMapper.java
→
a
ssessment/assessment-service/src/main/java/com/hungraim/ltc
/dao/ChAssessAccountsDetailMapper.java
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
account
.
dao
;
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.a
ccou
nt.ChAssessDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.a
ssessme
nt.ChAssessDetailAccounts
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
...
...
a
ccount/account-service/src/main/java/com/hungraim/ltc/account
/dao/ChAssessAccountsMapper.java
→
a
ssessment/assessment-service/src/main/java/com/hungraim/ltc
/dao/ChAssessAccountsMapper.java
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
account
.
dao
;
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.a
ccou
nt.ChAssessAccounts
;
import
com.hungraim.ltc.pojo.entity.a
ssessme
nt.ChAssessAccounts
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp
;
import
com.hungraim.ltc.pojo.vo.a
ccount.AssessAccounts
VO
;
import
com.hungraim.ltc.pojo.vo.a
ccou
nt.SrvOrganListReq
;
import
com.hungraim.ltc.pojo.vo.a
ssessment.AssessIdAndCost
VO
;
import
com.hungraim.ltc.pojo.vo.a
ssessme
nt.SrvOrganListReq
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -16,7 +16,8 @@ import java.util.List;
@Repository
public
interface
ChAssessAccountsMapper
extends
BaseMapper
<
ChAssessAccounts
>
{
List
<
AssessAccountsVO
>
getAssessAccountsList
();
AssessIdAndCostVO
queryAssessByOrganIdAndTime
(
String
aprOrganId
,
String
accountsTime
);
Page
<
AssessAccountsListResp
>
searchAssessAccountList
(
Page
page
,
List
<
Long
>
organIds
,
SrvOrganListReq
req
);
...
...
a
ccount/account-service/src/main/java/com/hungraim/ltc/account
/dao/ChAssessDetailAccountsMapper.java
→
a
ssessment/assessment-service/src/main/java/com/hungraim/ltc
/dao/ChAssessDetailAccountsMapper.java
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
account
.
dao
;
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.hungraim.ltc.pojo.entity.a
ccou
nt.ChAssessDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.a
ccou
nt.ChAssessDetailAccountsResp
;
import
com.hungraim.ltc.pojo.entity.a
ssessme
nt.ChAssessDetailAccounts
;
import
com.hungraim.ltc.pojo.entity.a
ssessme
nt.ChAssessDetailAccountsResp
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -13,7 +13,7 @@ import java.util.List;
*/
@Mapper
@Repository
public
interface
ChAssessDetailAccountsMapper
extends
BaseMapper
<
ChAssessDetailAccounts
>
{
public
interface
ChAssessDetailAccountsMapper
extends
BaseMapper
<
ChAssessDetailAccounts
>
{
List
<
ChAssessDetailAccountsResp
>
queryAssessAccountsDetail
(
String
assessAccountsId
);
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/TaskService.java
View file @
3d59a414
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.assessment.*
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.util.Result
;
import
org.apache.poi.ss.usermodel.Workbook
;
...
...
@@ -87,4 +88,19 @@ public interface TaskService {
Map
taskReportFractionDtlQueryList
();
Workbook
aprEmpExport
(
String
provincial
,
String
city
,
String
area
,
String
organName
,
String
name
,
String
tel
,
String
groupLeader
);
void
assessAccount
(
ReportDetailVO
reportDetailVo
);
Page
<
AssessAccountsListResp
>
searchAssessAccountsList
(
SrvOrganListReq
srvOrganListReq
);
Workbook
assessAccountExport
(
String
assessAccountsId
);
/**
* 列表明细
* @param assessAccountsId
* @return
*/
List
<
ChAssessDetailAccountsResp
>
queryAssessAccountsDetail
(
String
assessAccountsId
);
int
updateChAssessAccounts
(
int
id
);
}
assessment/assessment-service/src/main/java/com/hungraim/ltc/service/impl/TaskServiceImpl.java
View file @
3d59a414
...
...
@@ -9,23 +9,20 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.dao.*
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.assessment.*
;
import
com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp
;
import
com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp
;
import
com.hungraim.ltc.pojo.vo.assessment.*
;
import
com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.service.ChAprReportFractionService
;
import
com.hungraim.ltc.service.TaskService
;
import
com.hungraim.ltc.service.TppesApiException
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.SerialNumberUtils
;
import
com.hungraim.ltc.util.*
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -34,9 +31,8 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.
awt.*
;
import
java.
math.BigDecimal
;
import
java.util.*
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -64,6 +60,14 @@ public class TaskServiceImpl implements TaskService {
private
final
ChTaskReportFractionDtlMapper
chTaskReportFractionDtlMapper
;
private
final
ChAssessAccountsDetailMapper
chAssessAccountsDetailMapper
;
private
final
ChAssessAccountsMapper
chAssessAccountsMapper
;
private
final
ChAssessDetailAccountsMapper
chAssessDetailAccountsMapper
;
/**
* 评定任务分配列表
*
...
...
@@ -200,6 +204,92 @@ public class TaskServiceImpl implements TaskService {
}
@Override
public
void
assessAccount
(
ReportDetailVO
reportDetailVo
){
Integer
person1
=
reportDetailVo
.
getPerson1
();
Integer
person2
=
reportDetailVo
.
getPerson2
();
Integer
person3
=
reportDetailVo
.
getPerson3
();
String
evaluateTime
=
reportDetailVo
.
getEvaluateTime
();
// 根据评定机构id和评估结算时间查找表里有没有数据,有数据直接累加费用
// 评定人员结算表插入
if
(
person1
!=
null
)
{
ChAssessDetailAccounts
chAssessDetailAccounts
=
new
ChAssessDetailAccounts
();
chAssessDetailAccounts
.
setEmpId
(
String
.
valueOf
(
person1
));
ChAprEmp
chAprEmp
=
aprEmpMapper
.
selectById
(
person1
);
Integer
aprOrganId
=
chAprEmp
.
getAprOrganId
();
chAssessDetailAccounts
.
setAprOrganId
(
String
.
valueOf
(
aprOrganId
));
chAssessDetailAccounts
.
setApplyId
(
reportDetailVo
.
getApplyId
());
chAssessDetailAccounts
.
setCreationTime
(
new
Date
());
chAssessDetailAccounts
.
setAccountsTime
(
new
Date
());
chAssessDetailAccounts
.
setAssessTime
(
DateUtils
.
strToDate
(
evaluateTime
));
Integer
aprempTypeIdS
=
chAprEmp
.
getAprempTypeIdS
();
// 1 评估员上门评估,每人次 100 元
// 5 评估专家上门评估,每人次 150 元
String
assessCost
=
aprempTypeIdS
==
1
?
"100"
:
"150"
;
chAssessDetailAccounts
.
setAssessCost
(
assessCost
);
Long
assessAccountsId
;
AssessIdAndCostVO
assessIdAndCostVO
=
chAssessAccountsMapper
.
queryAssessByOrganIdAndTime
(
String
.
valueOf
(
aprOrganId
),
DateUtils
.
dateToStrYm
(
new
Date
()));
if
(
assessIdAndCostVO
==
null
)
{
ChAssessAccounts
chAssessAccounts
=
new
ChAssessAccounts
();
chAssessAccounts
.
setAccountsTime
(
new
Date
());
chAssessAccounts
.
setAprOrganId
(
Long
.
valueOf
(
aprOrganId
));
chAssessAccounts
.
setCreationTime
(
new
Date
());
chAssessAccounts
.
setAccountsStatus
((
short
)
1
);
chAssessAccounts
.
setAssessAllCost
(
new
BigDecimal
(
assessCost
));
chAssessAccountsMapper
.
insert
(
chAssessAccounts
);
assessAccountsId
=
chAssessAccounts
.
getAssessAccountsId
();
}
else
{
assessAccountsId
=
assessIdAndCostVO
.
getAssessAccountsId
();
BigDecimal
assessAllCost
=
assessIdAndCostVO
.
getAssessAllCost
();
ChAssessAccounts
chAssessAccounts
=
new
ChAssessAccounts
();
chAssessAccounts
.
setAssessAccountsId
(
assessAccountsId
);
chAssessAccounts
.
setAssessAllCost
(
assessAllCost
.
add
(
new
BigDecimal
(
assessCost
)));
chAssessAccountsMapper
.
updateById
(
chAssessAccounts
);
}
chAssessDetailAccounts
.
setAssessAccountsId
(
assessAccountsId
);
chAssessAccountsDetailMapper
.
insert
(
chAssessDetailAccounts
);
}
if
(
person2
!=
null
)
{
ChAssessDetailAccounts
chAssessDetailAccounts
=
new
ChAssessDetailAccounts
();
chAssessDetailAccounts
.
setEmpId
(
String
.
valueOf
(
person2
));
ChAprEmp
chAprEmp
=
aprEmpMapper
.
selectById
(
person2
);
Integer
aprOrganId
=
chAprEmp
.
getAprOrganId
();
chAssessDetailAccounts
.
setAprOrganId
(
String
.
valueOf
(
aprOrganId
));
chAssessDetailAccounts
.
setApplyId
(
reportDetailVo
.
getApplyId
());
chAssessDetailAccounts
.
setCreationTime
(
new
Date
());
chAssessDetailAccounts
.
setAccountsTime
(
new
Date
());
chAssessDetailAccounts
.
setAssessTime
(
DateUtils
.
strToDate
(
evaluateTime
));
Integer
aprempTypeIdS
=
chAprEmp
.
getAprempTypeIdS
();
// 1 评估员上门评估,每人次 100 元
// 5 评估专家上门评估,每人次 150 元
String
assessCost
=
aprempTypeIdS
==
1
?
"100"
:
"150"
;
chAssessDetailAccounts
.
setAssessCost
(
assessCost
);
chAssessAccountsDetailMapper
.
insert
(
chAssessDetailAccounts
);
}
if
(
person3
!=
null
)
{
ChAssessDetailAccounts
chAssessDetailAccounts
=
new
ChAssessDetailAccounts
();
chAssessDetailAccounts
.
setEmpId
(
String
.
valueOf
(
person3
));
ChAprEmp
chAprEmp
=
aprEmpMapper
.
selectById
(
person3
);
Integer
aprOrganId
=
chAprEmp
.
getAprOrganId
();
chAssessDetailAccounts
.
setAprOrganId
(
String
.
valueOf
(
aprOrganId
));
chAssessDetailAccounts
.
setApplyId
(
reportDetailVo
.
getApplyId
());
chAssessDetailAccounts
.
setCreationTime
(
new
Date
());
chAssessDetailAccounts
.
setAccountsTime
(
new
Date
());
chAssessDetailAccounts
.
setAssessTime
(
DateUtils
.
strToDate
(
evaluateTime
));
Integer
aprempTypeIdS
=
chAprEmp
.
getAprempTypeIdS
();
// 1 评估员上门评估,每人次 100 元
// 5 评估专家上门评估,每人次 150 元
String
assessCost
=
aprempTypeIdS
==
1
?
"100"
:
"150"
;
chAssessDetailAccounts
.
setAssessCost
(
assessCost
);
chAssessAccountsDetailMapper
.
insert
(
chAssessDetailAccounts
);
}
}
@Override
public
TaskReportVO
getReportById
(
String
reportId
)
{
TaskReportVO
reportById
=
taskMapper
.
getReportById
(
reportId
);
List
<
ChAprReportFraction
>
chAprReportFractions
=
chAprReportFractionMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChAprReportFraction
>().
eq
(
ChAprReportFraction:
:
getReportId
,
reportId
));
...
...
@@ -736,4 +826,38 @@ public class TaskServiceImpl implements TaskService {
return
workbook
;
}
@Override
public
Workbook
assessAccountExport
(
String
assessAccountsId
)
{
List
<
AssessAccountsExportResp
>
assessAccountExportList
=
chAssessAccountsMapper
.
assessAccountDetailExport
(
assessAccountsId
);
ExportParams
exportParams
=
new
ExportParams
();
exportParams
.
setType
(
ExcelType
.
XSSF
);
//对应xlsx
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
exportParams
,
AssessAccountsExportResp
.
class
,
assessAccountExportList
);
return
workbook
;
}
@Override
public
List
<
ChAssessDetailAccountsResp
>
queryAssessAccountsDetail
(
String
assessAccountsId
)
{
return
chAssessDetailAccountsMapper
.
queryAssessAccountsDetail
(
assessAccountsId
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
updateChAssessAccounts
(
int
id
)
{
ChAssessAccounts
ca
=
new
ChAssessAccounts
();
ca
.
setAssessAccountsId
(
Long
.
valueOf
(
id
));
ca
.
setAccountsStatus
((
short
)
2
);
return
chAssessAccountsMapper
.
updateById
(
ca
);
}
@Override
public
Page
<
AssessAccountsListResp
>
searchAssessAccountsList
(
SrvOrganListReq
srvOrganListReq
)
{
// List<Long> organIds = baseAccountService.getOrganIds(srvOrganListReq.getOrganId(), srvOrganListReq.getIsInvolveChild());
return
chAssessAccountsMapper
.
searchAssessAccountList
(
new
Page
<>(
srvOrganListReq
.
getPageNum
(),
srvOrganListReq
.
getPageSize
()),
null
,
srvOrganListReq
);
}
}
a
ccount/accou
nt-service/src/main/resources/mapper/ChAssessAccountsMapper.xml
→
a
ssessment/assessme
nt-service/src/main/resources/mapper/ChAssessAccountsMapper.xml
View file @
3d59a414
<?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,
disable.DISAB_INFO_ID disabInfoId,
task.ACCEPT_TIME acceptTime,
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
<mapper
namespace=
"com.hungraim.ltc.dao.ChAssessAccountsMapper"
>
<select
id=
"queryAssessByOrganIdAndTime"
resultType=
"com.hungraim.ltc.pojo.vo.assessment.AssessIdAndCostVO"
>
select a.ASSESS_ACCOUNTS_ID assessAccountsId,a.ASSESS_ALL_COST assessAllCost from
CH_ASSESS_ACCOUNTS a where a.APR_ORGAN_ID = #{aprOrganId}
and to_char(a.ACCOUNTS_TIME,'yyyy-MM') = #{accountsTime}
</select>
<select
id=
"searchAssessAccountList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp"
>
SELECT
t1.ASSESS_ACCOUNTS_ID,
...
...
@@ -105,5 +88,12 @@
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
select * from CH_ASSESS_ACCOUNTS t1 where
</select>
</mapper>
a
ccount/accou
nt-service/src/main/resources/mapper/ChAssessDetailAccountsMapper.xml
→
a
ssessment/assessme
nt-service/src/main/resources/mapper/ChAssessDetailAccountsMapper.xml
View file @
3d59a414
<?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.ChAssessDetailAccountsMapper"
>
<mapper
namespace=
"com.hungraim.ltc.dao.ChAssessDetailAccountsMapper"
>
<select
id=
"queryAssessAccountsDetail"
resultType=
"com.hungraim.ltc.pojo.entity.a
ccou
nt.ChAssessDetailAccountsResp"
>
<select
id=
"queryAssessAccountsDetail"
resultType=
"com.hungraim.ltc.pojo.entity.a
ssessme
nt.ChAssessDetailAccountsResp"
>
select
d.ASSESS_ALL_COST assessAllCost,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabDetailAccounts.java
View file @
3d59a414
...
...
@@ -69,8 +69,12 @@ public class ChDisabDetailAccounts implements Serializable {
*/
private
Date
accountsEndTime
;
private
String
taskDetailId
;
private
String
medicalArea
;
private
String
itemIds
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/a
ccou
nt/ChAssessAccounts.java
→
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/a
ssessme
nt/ChAssessAccounts.java
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
a
ccou
nt
;
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
a
ssessme
nt
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
...
...
@@ -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
;
/**
...
...
@@ -26,7 +27,7 @@ public class ChAssessAccounts implements Serializable {
private
Long
assessAccountsId
;
/**
* 机构id
*
评定
机构id
*/
private
Long
aprOrganId
;
...
...
@@ -46,10 +47,6 @@ public class ChAssessAccounts implements Serializable {
private
Date
accountsTime
;
/**
* 是否结算(0未结算,1已结算)
*/
private
Short
chooseSettle
;
/**
* 状态(0-待提交;1-待审核;2-已审核;3-已失效;)
...
...
@@ -67,20 +64,10 @@ public class ChAssessAccounts implements Serializable {
private
String
checkRemark
;
/**
* 费用开始日期
*/
private
Date
assessStartTime
;
/**
* 费用结束日期
*/
private
Date
assessEndTime
;
/**
* 总费用合计
*/
private
String
assessAllCost
;
private
BigDecimal
assessAllCost
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/a
ccou
nt/ChAssessDetailAccounts.java
→
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/a
ssessme
nt/ChAssessDetailAccounts.java
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
a
ccou
nt
;
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
a
ssessme
nt
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.KeySequence
;
...
...
@@ -9,7 +9,6 @@ import lombok.Data;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -26,13 +25,18 @@ public class ChAssessDetailAccounts implements Serializable {
private
Long
assessAccountsDetailId
;
private
Long
assessAccountsId
;
private
String
disabInfoId
;
private
String
applyId
;
private
String
empId
;
/**
*
护理
机构id
*
评定
机构id
*/
private
String
srv
OrganId
;
private
String
apr
OrganId
;
/**
* 创建时间
...
...
@@ -44,28 +48,11 @@ public class ChAssessDetailAccounts implements Serializable {
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
private
Date
assessTime
;
private
String
assessAllCost
;
private
String
assessOverallCost
;
private
String
assessPersonalCost
;
/**
* 费用开始日期
*/
private
String
accountsStartTime
;
/**
* 费用结束日期
*/
private
String
accountsEndTime
;
private
String
assessCost
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/a
ccou
nt/ChAssessDetailAccountsResp.java
→
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/a
ssessme
nt/ChAssessDetailAccountsResp.java
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
a
ccou
nt
;
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
a
ssessme
nt
;
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
;
@Data
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AccountTaskExecuteReqVO.java
0 → 100644
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
lombok.Data
;
@Data
public
class
AccountTaskExecuteReqVO
{
private
String
taskDetailId
;
private
String
itemId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AccountTaskReqVO.java
0 → 100644
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AccountTaskReqVO
{
private
List
<
AccountTaskExecuteReqVO
>
accountTaskList
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
View file @
3d59a414
...
...
@@ -10,6 +10,10 @@ import java.math.BigDecimal;
@Data
public
class
OrganAccountsVO
{
private
String
taskDetailId
;
private
String
itemId
;
private
String
disabInfoId
;
/**
* 失能人员姓名
...
...
@@ -83,4 +87,6 @@ public class OrganAccountsVO {
*/
private
BigDecimal
personalCost
;
private
String
itemName
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvOrganAccountListResp.java
View file @
3d59a414
...
...
@@ -66,12 +66,12 @@ public class SrvOrganAccountListResp {
/**
* 费用开始时间
*/
private
String
svrStartTime
;
private
Date
svrStartTime
;
/**
* 费用结束时间
*/
private
String
svrEndTime
;
private
Date
svrEndTime
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvTaskRespVO.java
View file @
3d59a414
...
...
@@ -9,7 +9,7 @@ import lombok.Data;
@Data
public
class
SrvTaskRespVO
{
// 任务id
private
Stri
ng
taskDetailId
;
private
Lo
ng
taskDetailId
;
// 失能人员姓名
private
String
realName
;
...
...
@@ -23,6 +23,12 @@ public class SrvTaskRespVO {
// 任务时间
private
String
srvDate
;
// 任务名称
private
String
itemName
;
// 任务名称
private
Long
itemId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/AssessIdAndCostVO.java
0 → 100644
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
assessment
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
AssessIdAndCostVO
{
private
Long
assessAccountsId
;
private
BigDecimal
assessAllCost
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/ReportDetailVO.java
View file @
3d59a414
...
...
@@ -15,6 +15,7 @@ public class ReportDetailVO {
Integer
person3
;
String
evaluateTime
;
Integer
disableLevelId
;
String
applyId
;
String
polNo
;
String
remark
;
List
<
ChFndAttach
>
fileDataList
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/SrvOrganListReq.java
0 → 100644
View file @
3d59a414
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
assessment
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
SrvOrganListReq
extends
BaseReq
{
/**
* 适用机构id
*/
private
Long
organId
;
/**
* 是否包含下级机构
*/
private
Boolean
isInvolveChild
;
/**
* 护理机构id
*/
private
Long
srvOrganId
;
/**
* 结算月份
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
View file @
3d59a414
...
...
@@ -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
-dd
"
;
public
static
final
String
DATE_PATTERN_yyyy_MM
=
"yyyy-MM"
;
/**
* MM-dd 12月25日
...
...
@@ -229,6 +229,22 @@ public class DateUtils {
}
/**
* 将短时间格式时间转换为字符串 yyyy-MM
*
* @param dateDate
* @param
* @return
*/
public
static
String
dateToStrYm
(
Date
dateDate
)
{
if
(
dateDate
==
null
)
{
return
""
;
}
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM
);
String
dateString
=
formatter
.
format
(
dateDate
);
return
dateString
;
}
/**
* 将短时间格式时间转换为字符串 yyyyMMdd
*
* @param dateDate
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvOrganProjectMapper.xml
View file @
3d59a414
...
...
@@ -47,7 +47,8 @@
SELECT
PROJECT_ID,
SRV_ORGAN_ID,
ITEM_NAME,
-- ITEM_NAME,
d.service_type_detailed_name ITEM_NAME,
CATEGORY_TYPE,
CH_SRV_ORGAN_PROJECT.ITEM_TIMES,
ITEM_TIMES_TYPE,
...
...
@@ -64,7 +65,8 @@
<if
test=
"programId != null"
>
LEFT JOIN CH_SRV_PROGRAM_SET ON ITEM_ID = PROJECT_ID AND PROGRAM_ID = #{programId}
</if>
WHERE SRV_ORGAN_ID = #{srvOrganId} AND STATUS = 0
left join CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CH_SRV_ORGAN_PROJECT.item_name
WHERE SRV_ORGAN_ID = #{srvOrganId} and STATUS = 0
</select>
<select
id=
"organProjectList"
resultType=
"com.hungraim.ltc.pojo.vo.governance.OrganProjectVO"
>
...
...
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