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
c09eff5e
Commit
c09eff5e
authored
Mar 07, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算
parent
5b82c8d8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
315 additions
and
21 deletions
+315
-21
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+10
-4
ChDisabAccountsDetailMapper.java
...hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
+8
-2
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+3
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+152
-2
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+48
-3
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+7
-1
ChDisabDetailAccountsResp.java
...im/ltc/pojo/entity/account/ChDisabDetailAccountsResp.java
+3
-1
NursingRecordsRespVO.java
...ungraim/ltc/pojo/entity/account/NursingRecordsRespVO.java
+4
-0
NursingReqVO.java
...va/com/hungraim/ltc/pojo/entity/account/NursingReqVO.java
+26
-0
AccountTaskExecuteReqVO.java
...hungraim/ltc/pojo/vo/account/AccountTaskExecuteReqVO.java
+11
-0
OrganAccountsVO.java
...ava/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
+2
-0
SrvTaskRespVO.java
.../java/com/hungraim/ltc/pojo/vo/account/SrvTaskRespVO.java
+10
-0
AllocationSrvTaskVO.java
.../hungraim/ltc/pojo/vo/governance/AllocationSrvTaskVO.java
+1
-0
DateUtils.java
...n-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
+16
-1
ChSrvPlanMapper.java
...java/com/hungraim/ltc/governance/dao/ChSrvPlanMapper.java
+1
-1
SrvTaskScheduledServiceImpl.java
...m/ltc/governance/service/SrvTaskScheduledServiceImpl.java
+1
-1
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+8
-3
ChSrvPlanMapper.xml
...es/com/hungraim/ltc/governance/mapper/ChSrvPlanMapper.xml
+3
-0
SrvTaskMapper.xml
...rces/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
+1
-1
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
c09eff5e
...
...
@@ -109,7 +109,7 @@ public class AccountController {
@PostMapping
(
"/organAccountTaskExecute"
)
public
Result
organAccountTaskExecute
(
AccountTaskReqVO
accountTaskReqVO
){
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
=
accountTaskReqVO
.
getAccountTaskList
();
Result
result
=
accountService
.
organA
ccountTaskExecute
(
accountTaskExecuteReqVOS
);
Result
result
=
accountService
.
a
ccountTaskExecute
(
accountTaskExecuteReqVOS
);
return
result
;
}
...
...
@@ -257,12 +257,18 @@ public class AccountController {
/**
* 查询护理记录
*
* @param
taskDetailId 结算详情id
* @param
nursingReqVO
* @return
*/
@GetMapping
(
"/queryNursingRecords"
)
public
Result
<
Page
<
NursingRecordsRespVO
>>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
)
{
Page
<
NursingRecordsRespVO
>
nursingRecordsRespVOList
=
accountService
.
queryNursingRecords
(
pageNum
,
pageSize
,
taskDetailId
);
public
Result
<
Page
<
NursingRecordsRespVO
>>
queryNursingRecords
(
NursingReqVO
nursingReqVO
)
{
if
(
StringUtils
.
isBlank
(
nursingReqVO
.
getModeName
())
||
StringUtils
.
isBlank
(
nursingReqVO
.
getAccountsTime
())
||
StringUtils
.
isBlank
(
nursingReqVO
.
getDisabInfoId
())
||
StringUtils
.
isBlank
(
nursingReqVO
.
getSrvOrganId
()))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
Page
<
NursingRecordsRespVO
>
nursingRecordsRespVOList
=
accountService
.
queryNursingRecords
(
nursingReqVO
);
return
Result
.
success
(
nursingRecordsRespVOList
);
}
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
View file @
c09eff5e
...
...
@@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp
;
import
com.hungraim.ltc.pojo.vo.account.AccountTaskExecuteReqVO
;
import
com.hungraim.ltc.pojo.vo.account.OrganAccountsVO
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListReq
;
import
com.hungraim.ltc.util.DateUtils
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -28,7 +28,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Page
page
,
SrvOrganListReq
req
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
String
taskDetailId
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
NursingReqVO
req
);
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
);
...
...
@@ -39,6 +39,11 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
ChDisabDetailAccounts
queryDisabDetailAccounts
(
String
srvOrganId
,
String
accountsTime
,
String
disabInfoId
,
String
srvModeName
);
List
<
OrganAccountsVO
>
queryPlanInfoByDetailId
(
String
taskDetailId
);
int
updateByPlanId
(
String
planId
);
int
selectByCondition
(
AccountTaskExecuteReqVO
accountTaskExecuteReqVO
);
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
c09eff5e
...
...
@@ -35,7 +35,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
NursingReqVO
nursingReqVO
);
OverallEduceDecreaseCostRespVO
queryOverallCostRecords
(
OverallCostReqVO
req
);
...
...
@@ -49,6 +49,8 @@ public interface AccountService extends IService<ChDisabAccounts> {
Result
organAccountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
Result
accountTaskExecute
(
List
<
AccountTaskExecuteReqVO
>
accountTaskExecuteReqVOS
);
void
otherPlaceHandler
(
String
programId
);
int
deleteAccountsDetail
(
Long
accountsDetailId
,
Long
freeRdId
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
c09eff5e
This diff is collapsed.
Click to expand it.
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
c09eff5e
...
...
@@ -14,7 +14,9 @@
d.TASK_DETAIL_ID taskDetailId,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
o.SRV_ORGAN_NAME srvOrganName,
o.SRV_ORGAN_ID srvOrganId,
info.REAL_NAME realName,
info.DISAB_INFO_ID disabInfoId,
d.DEDUCTION_AMOUNT deductionAmount,
d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId,
...
...
@@ -51,12 +53,16 @@
<select
id=
"queryNursingRecords"
resultType=
"com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"
>
select organ.SRV_ORGAN_NAME srvOrganName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') modeName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') modeName,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
plan.item_name itemName
from CH_SRV_PLAN plan
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
where plan.TASK_DETAIL_ID = #{taskDetailId} and plan.IS_STATUS ='4'
where plan.DISAB_INFO_ID = #{req.disabInfoId}
and plan.SRV_ORGAN_ID = #{req.srvOrganId}
and plan.MODE_ID = #{req.modeId}
and plan.IS_STATUS ='4'
</select>
...
...
@@ -86,7 +92,7 @@
and info.REAL_NAME = #{realName}
</if>
<if
test=
"accountsTime != null and accountsTime != ''"
>
and to_char(detail.accounts_time,'yyyy-MM
-dd
') = #{accountsTime}
and to_char(detail.accounts_time,'yyyy-MM') = #{accountsTime}
</if>
<if
test=
"srvOrganName != null and srvOrganName != ''"
>
and organ.SRV_ORGAN_NAME = #{srvOrganName}
...
...
@@ -137,6 +143,35 @@
</where>
</select>
<select
id=
"queryPlanInfoByDetailId"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
plan.TASK_DETAIL_ID taskDetailId,
plan.PLAN_ID planId,
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
--服务方式
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
--护理机构名称
plan.srv_organ_id srvOrganId,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员 Id
plan.EMP_ID empId,
--任务时间
plan.SRV_PLAN_TIME srvDate,
-- 机构等级
organ.LEVEL_CODE levelCode
from CH_SRV_PLAN plan
left join ch_srv_organ organ on plan.srv_organ_id = organ.srv_organ_id
left join ch_disable_info disable on plan.disab_info_id = disable.disab_info_id--失能人员
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
where plan.IS_STATUS = '4' and plan.IS_BILL = 1 and plan.TASK_DETAIL_ID = #{taskDetailId}
</select>
<select
id=
"queryAccountByCondition"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts"
>
select * from CH_DISAB_ACCOUNTS_DETAIL t where t.MODE_NAME in ('养老','医疗')
...
...
@@ -281,6 +316,16 @@
and d.MODE_NAME = #{srvModeName}
</select>
<update
id=
"updateByPlanId"
>
update CH_SRV_PLAN set IS_BILL =1 where PLAN_ID = #{planId}
</update>
<select
id=
"selectByCondition"
parameterType=
"com.hungraim.ltc.pojo.vo.account.AccountTaskExecuteReqVO"
resultType=
"java.lang.Integer"
>
select count(1) from CH_DISAB_ACCOUNTS_DETAIL detail where detail.STATUS = 1 and
detail.SRV_ORGAN_ID = #{srvOrganId} and detail.MODE_NAME=#{srvModeName} and detail.DISAB_INFO_ID = #{disabInfoId}
and to_char(detail.ACCOUNTS_TIME,'yyyy-MM')=#{srvDateYm}
</select>
</mapper>
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
c09eff5e
...
...
@@ -9,12 +9,18 @@
plan.TASK_DETAIL_ID taskDetailId,
plan.ITEM_NAME itemName,
emp.emp_name empName,
emp.emp_id empId,
info.DISAB_INFO_ID disabInfoId,
organ.SRV_ORGAN_NAME srvOrganName,
organ.SRV_ORGAN_ID srvOrganId,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate,
plan.IS_STATUS status
plan.IS_STATUS status,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
organ.LEVEL_CODE levelCode
from ch_srv_plan plan
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on apply.APPLY_ID = info.APPLY_ID
left join ch_srv_organ_emp emp on plan.emp_id = emp.emp_id
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
<where>
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/ChDisabDetailAccountsResp.java
View file @
c09eff5e
...
...
@@ -19,7 +19,6 @@ public class ChDisabDetailAccountsResp implements Serializable {
/**
* 结算月份
*/
private
String
accountsTime
;
/**
...
...
@@ -50,6 +49,7 @@ public class ChDisabDetailAccountsResp implements Serializable {
private
String
srvOrganName
;
private
String
srvOrganId
;
private
String
realName
;
...
...
@@ -61,6 +61,8 @@ public class ChDisabDetailAccountsResp implements Serializable {
private
String
accountsDetailId
;
private
String
disabInfoId
;
private
Integer
status
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/NursingRecordsRespVO.java
View file @
c09eff5e
...
...
@@ -23,6 +23,10 @@ public class NursingRecordsRespVO {
/**
*执行日期
**/
private
String
srvPlanTime
;
/**
*执行日期
**/
private
String
executionTime
;
/**
*任务名称
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/account/NursingReqVO.java
0 → 100644
View file @
c09eff5e
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
account
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
lombok.Data
;
/**
* @author zwl
* @ClassName NursingReqVO
* @description
* @date 2023/3/6 18:00
**/
@Data
public
class
NursingReqVO
extends
BaseReq
{
private
String
accountsTime
;
private
String
disabInfoId
;
private
String
modeId
;
private
String
modeName
;
private
String
srvOrganId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/AccountTaskExecuteReqVO.java
View file @
c09eff5e
...
...
@@ -12,6 +12,17 @@ public class AccountTaskExecuteReqVO {
private
String
itemId
;
private
String
srvOrganId
;
private
String
srvDate
;
private
String
disabInfoId
;
private
String
srvModeName
;
private
String
levelCode
;
private
Long
empId
;
private
String
medicalArea
;
private
String
srvDateYm
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/OrganAccountsVO.java
View file @
c09eff5e
...
...
@@ -86,4 +86,6 @@ public class OrganAccountsVO {
private
String
itemName
;
private
String
planId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvTaskRespVO.java
View file @
c09eff5e
...
...
@@ -21,6 +21,8 @@ public class SrvTaskRespVO {
// 护理人员
private
String
empName
;
private
String
empId
;
// 任务时间
private
String
srvDate
;
...
...
@@ -34,4 +36,12 @@ public class SrvTaskRespVO {
private
String
srvModeName
;
private
String
srvOrganId
;
private
String
disabInfoId
;
private
String
levelCode
;
private
String
medicalArea
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/AllocationSrvTaskVO.java
View file @
c09eff5e
...
...
@@ -12,4 +12,5 @@ public class AllocationSrvTaskVO {
private
String
exitTime
;
private
String
srvDate
;
private
Long
srvTaskId
;
private
String
programId
;
}
common/common-core/src/main/java/com/hungraim/ltc/util/DateUtils.java
View file @
c09eff5e
...
...
@@ -189,7 +189,22 @@ public class DateUtils {
return
null
;
}
}
/**
* 将短时间格式字符串转换为时间 yyyy-MM-dd HH:mm:ss
*
* @param strDate
* @return
*/
public
static
Date
strToDateMd
(
String
strDate
)
{
try
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
DATE_PATTERN_yyyy_MM_dd
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
Date
strtodate
=
formatter
.
parse
(
strDate
,
pos
);
return
strtodate
;
}
catch
(
Throwable
e
)
{
return
null
;
}
}
/**
* 字符串时间戳转日期
*
...
...
governance/src/main/java/com/hungraim/ltc/governance/dao/ChSrvPlanMapper.java
View file @
c09eff5e
...
...
@@ -11,6 +11,6 @@ import java.util.List;
@Repository
@Mapper
public
interface
ChSrvPlanMapper
extends
BaseMapper
<
ChSrvPlan
>
{
List
<
ChSrvPlan
>
queryPlan
(
String
programId
);
List
<
ChSrvPlan
>
queryPlan
(
String
programId
,
String
srvPlanTime
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/SrvTaskScheduledServiceImpl.java
View file @
c09eff5e
...
...
@@ -18,7 +18,7 @@ public class SrvTaskScheduledServiceImpl {
@Autowired
private
SrvTaskService
srvTaskService
;
@Scheduled
(
cron
=
"30
30 23
* * ?"
)
@Scheduled
(
cron
=
"30
05 19
* * ?"
)
public
void
timeAllocationSrvTask
()
{
log
.
info
(
"timeAllocationSrvTask========start"
);
srvTaskService
.
timeAllocationSrvTask
();
...
...
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
c09eff5e
...
...
@@ -146,7 +146,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情
Long
newSrvTaskId
=
chSrvTask
.
getSrvTaskId
();
this
.
insertTaskDetail
(
newSrvTaskId
,
taskDetails
);
saveSrvPlan
(
programId
);
saveSrvPlan
(
programId
,
null
);
//添加附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
}
else
{
...
...
@@ -169,9 +169,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
}
public
void
saveSrvPlan
(
String
programId
){
List
<
ChSrvPlan
>
chSrvPlans
=
chSrvPlanMapper
.
queryPlan
(
programId
);
public
void
saveSrvPlan
(
String
programId
,
String
srvPlanTime
){
List
<
ChSrvPlan
>
chSrvPlans
=
chSrvPlanMapper
.
queryPlan
(
programId
,
srvPlanTime
);
for
(
ChSrvPlan
chSrvPlan
:
chSrvPlans
)
{
chSrvPlan
.
setCreationTime
(
new
Date
());
chSrvPlanMapper
.
insert
(
chSrvPlan
);
}
}
...
...
@@ -223,6 +224,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvTaskDetail
.
setSrvDate
(
DateUtils
.
strToDate
(
nextDay
));
//服务开始时间
chSrvTaskDetail
.
setStatus
((
short
)
0
);
//状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
// ch_srv_plan
String
programId
=
chSrvTask
.
getProgramId
();
saveSrvPlan
(
programId
,
nextDay
);
}
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvPlanMapper.xml
View file @
c09eff5e
...
...
@@ -28,6 +28,9 @@
LEFT JOIN CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CSOP.item_name
<where>
disable.SRV_MODE_ID in ('1','2') and program.program_id =#{programId}
<if
test=
"srvPlanTime != null"
>
and to_char(detail.SRV_DATE,'yyyy-MM-dd') = #{srvPlanTime}
</if>
</where>
order by detail.SRV_DATE desc
</select>
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
View file @
c09eff5e
...
...
@@ -216,7 +216,7 @@
</where>
</select>
<select
id=
"getAllocationSrvTask"
resultType=
"com.hungraim.ltc.pojo.vo.governance.AllocationSrvTaskVO"
>
select t.SRV_TASK_ID,t.SRV_DATE,info.EXIT_TIME,info.EXIT_FLAG,info.EXIT_REASON_ID from CH_SRV_TASK t
select t.SRV_TASK_ID,t.SRV_DATE,info.EXIT_TIME,info.EXIT_FLAG,info.EXIT_REASON_ID
,t.program_id programId
from CH_SRV_TASK t
left join CH_DISABLE_INFO info on t.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_apr_task aprtask on info.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
...
...
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