Commit ef57cbbb authored by zhangwanglin's avatar zhangwanglin

结算

parent 9adf0859
......@@ -17,12 +17,8 @@ import java.util.List;
@Repository
public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAccounts> {
List<OrganAccountsVO> getOrganAccountsList(String taskDetailId);
List<AccountExportDetailListResp> searchSrvOrganAccountDetailExport(SrvOrganListReq req);
List<ChDisabDetailAccounts> queryAccountByCondition(@Param("taskDetailIds") List<String> taskDetailIds);
List<OrganAccountsVO> getOtherPlaceList(String programId);
......@@ -30,6 +26,8 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
Page<NursingRecordsRespVO> queryNursingRecords(Page page, NursingReqVO req);
Page<NursingRecordsRespVO> queryNursingRecordsGoDoor(Page page, NursingReqVO req);
OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req);
......
......@@ -47,7 +47,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
int updateChDisabAccounts(int id);
Result organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
Result accountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
......
......@@ -31,6 +31,9 @@
<if test="req.accountsId != null and req.accountsId != ''">
and d.ACCOUNTS_ID = #{req.accountsId}
</if>
<if test="req.modeId != null and req.modeId != ''">
and DECODE(d.mode_name, '医疗','1','养老', '2','上门','3', '异地', '4') = #{req.modeId}
</if>
<if test="req.accountsStatus != null and req.accountsStatus != ''">
and d.status = #{req.accountsStatus}
</if>
......@@ -54,7 +57,7 @@
<select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
select organ.SRV_ORGAN_NAME srvOrganName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') modeName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门') modeName,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
plan.item_name itemName
from CH_SRV_PLAN plan
......@@ -65,6 +68,22 @@
and plan.IS_STATUS ='4'
</select>
<select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
select organ.SRV_ORGAN_NAME srvOrganName,
to_char(task.SRV_DATE,'yyyy-MM-dd') srvPlanTime,
detail.MODE_NAME modeName,
to_char(item.FCD,'yyyy-MM-dd HH:mm:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName
from CH_DISAB_ACCOUNTS_DETAIL detail
left join CH_SRV_TASK_DETAIL task on task.TASK_DETAIL_ID = detail.TASK_DETAIL_ID
left join CH_SRV_TASK_FINISH_ITEM item on detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where detail.DISAB_INFO_ID = #{req.disabInfoId}
and detail.SRV_ORGAN_ID = #{req.srvOrganId} and detail.MODE_NAME = '上门'
</select>
......@@ -104,44 +123,7 @@
</where>
</select>
<select id="getOrganAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
select
detail.TASK_DETAIL_ID taskDetailId,
--失能人员姓名
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,
program.SRV_MODE_ID modeId,
--服务方式
DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
--护理机构名称
organ.srv_organ_id srvOrganId,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员 Id
emp.EMP_ID empId,
--任务时间
detail.SRV_DATE srvDate,
-- 机构等级
organ.LEVEL_CODE levelCode
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_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_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_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
<where>
detail.STATUS = '4'
<if test="taskDetailId != null and taskDetailId != ''">
AND detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
</where>
</select>
<select id="queryPlanInfoByDetailId" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
select
......@@ -173,16 +155,7 @@
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 ('养老','医疗')
<if test="taskDetailIds != null and taskDetailIds.size() > 0">
AND t.TASK_DETAIL_ID IN
<foreach collection="taskDetailIds" separator="," open="(" close=")" item="taskDetailId">
#{taskDetailId}
</foreach>
</if>
</select>
<!--查询评估信息-->
<select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO">
......
......@@ -14,6 +14,7 @@
organ.SRV_ORGAN_NAME srvOrganName,
rd.AMOUNT_OF_MONEY amountOfMoney,
rd.FREE_RD_ID freeRdId,
rd.REMARKS remarks,
d.ACCOUNTS_STATUS accountsStatus
from CH_DISAB_FREE_RD_INFO rd left join
CH_DISAB_ACCOUNTS_DETAIL detail on
......
......@@ -16,10 +16,11 @@ public class NursingReqVO extends BaseReq {
private String disabInfoId;
private String modeId;
private String modeName;
private String modeId;
private String srvOrganId;
......
......@@ -65,4 +65,6 @@ public class OverallCostListRespVO {
private String srvOrganName;
private String accountsStatus;
private String remarks;
}
......@@ -24,6 +24,8 @@ public class SrvOrganListReq extends BaseReq {
*/
private Long srvOrganId;
private String modeId;
/**
* 护理机构id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment