Commit dd69b6e7 authored by zhangwanglin's avatar zhangwanglin

结算执行代码

parent 1bd725f3
...@@ -3,9 +3,7 @@ package com.hungraim.ltc.account.controller; ...@@ -3,9 +3,7 @@ package com.hungraim.ltc.account.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.account.service.AccountService; import com.hungraim.ltc.account.service.AccountService;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.FileUtils; import com.hungraim.ltc.util.FileUtils;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
...@@ -14,10 +12,7 @@ import lombok.AllArgsConstructor; ...@@ -14,10 +12,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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 javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
...@@ -114,6 +109,27 @@ public class AccountController { ...@@ -114,6 +109,27 @@ public class AccountController {
accountService.getAssessAccount(); accountService.getAssessAccount();
} }
// 执行
@PostMapping("/organAccountTaskExecute")
public Result organAccountTaskExecute(@RequestBody List<String> taskDetailIds){
accountService.organAccountTaskExecute(taskDetailIds);
return Result.success();
}
/**
* 任务列表
*
* @param srvTaskReqVO 请求参数对象
* @return 返回
*/
@GetMapping("/getSrvTaskList")
public Result<Page<SrvTaskRespVO>> getSrvTaskList(SrvTaskReqVO srvTaskReqVO) {
return Result.success(accountService.getSrvTaskList(srvTaskReqVO));
}
/** /**
* 查询机构结算列表 * 查询机构结算列表
* *
...@@ -166,12 +182,12 @@ public class AccountController { ...@@ -166,12 +182,12 @@ public class AccountController {
/** /**
* 评估人员结算列表明细 * 评估人员结算列表明细
* *
* @param id 结算id * @param assessAccountsId 评估结算id
* @return 返回雷彪 * @return 返回
*/ */
@GetMapping("/QueryDisabOrganAccountsDetail") @GetMapping("/queryAssessAccountsDetail")
public Result<List<ChAssessDetailAccounts>> QueryDisabOrganAccountsDetail(int id) { public Result<List<ChAssessDetailAccountsResp>> queryAssessAccountsDetail(String assessAccountsId) {
List<ChAssessDetailAccounts> chAssessDetailAccounts = accountService.queryDisabOrganAccountsDetail(id); List<ChAssessDetailAccountsResp> chAssessDetailAccounts = accountService.queryAssessAccountsDetail(assessAccountsId);
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
...@@ -179,11 +195,11 @@ public class AccountController { ...@@ -179,11 +195,11 @@ public class AccountController {
* 查询机构结算信息列表明细 * 查询机构结算信息列表明细
* *
* @param id 结算id * @param id 结算id
* @return 返回雷彪 * @return
*/ */
@GetMapping("/QuerySearchAssessAccounts") @GetMapping("/queryOrganAccountsDetail")
public Result<List<ChDisabDetailAccounts>> QuerySearchAssessAccounts(int id) { public Result<List<ChDisabDetailAccountsResp>> queryOrganAccountsDetail(String id) {
List<ChDisabDetailAccounts> chAssessDetailAccounts = accountService.querySearchAssessAccounts(id); List<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(id);
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
......
...@@ -2,13 +2,18 @@ package com.hungraim.ltc.account.dao; ...@@ -2,13 +2,18 @@ package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccountsResp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author mq * @author mq
*/ */
@Mapper @Mapper
@Repository @Repository
public interface ChAssessDetailAccountsMapper extends BaseMapper<ChAssessDetailAccounts> { public interface ChAssessDetailAccountsMapper extends BaseMapper<ChAssessDetailAccounts> {
List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
} }
...@@ -2,13 +2,17 @@ package com.hungraim.ltc.account.dao; ...@@ -2,13 +2,17 @@ package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts; import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author mq * @author mq
*/ */
@Mapper @Mapper
@Repository @Repository
public interface ChDisabDetailAccountsMapper extends BaseMapper<ChDisabDetailAccounts> { public interface ChDisabDetailAccountsMapper extends BaseMapper<ChDisabDetailAccounts> {
List<ChDisabDetailAccountsResp> queryOrganAccountsDetail(String accountsId);
} }
...@@ -3,7 +3,9 @@ package com.hungraim.ltc.account.dao; ...@@ -3,7 +3,9 @@ package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List; import java.util.List;
...@@ -15,6 +17,9 @@ public interface ChOrganAccountsMapper { ...@@ -15,6 +17,9 @@ public interface ChOrganAccountsMapper {
List<OrganAccountsVO> getOrganAccountsList(String lastMonth); List<OrganAccountsVO> getOrganAccountsList(String lastMonth);
List<OrganAccountsVO> getOrganAccountsList22(@Param("taskDetailIds") List<String> taskDetailIds);
Page<SrvOrganAccountListResp> searchSrvOrganAccountList(Page page, List<Long> organIds, SrvOrganListReq req); Page<SrvOrganAccountListResp> searchSrvOrganAccountList(Page page, List<Long> organIds, SrvOrganListReq req);
......
package com.hungraim.ltc.account.dao; package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Mapper @Mapper
@Repository @Repository
public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req);
} }
\ No newline at end of file
...@@ -2,9 +2,7 @@ package com.hungraim.ltc.account.service; ...@@ -2,9 +2,7 @@ package com.hungraim.ltc.account.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts; import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
...@@ -22,6 +20,8 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -22,6 +20,8 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page<SrvOrganAccountListResp> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq); Page<SrvOrganAccountListResp> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq);
Page<SrvTaskRespVO> getSrvTaskList(SrvTaskReqVO srvTaskReqVO);
AccountOperVo getSrvOrganDetail(Long accountsId); AccountOperVo getSrvOrganDetail(Long accountsId);
ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException; ExpenseVo expenseSettlement(ExpenseSettlementReq req) throws ParseException;
...@@ -38,14 +38,16 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -38,14 +38,16 @@ public interface AccountService extends IService<ChDisabAccounts> {
/** /**
* 列表明细 * 列表明细
* @param id * @param assessAccountsId
* @return * @return
*/ */
List<ChAssessDetailAccounts> queryDisabOrganAccountsDetail(int id); List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
List<ChDisabDetailAccounts> querySearchAssessAccounts(int id); List<ChDisabDetailAccountsResp> queryOrganAccountsDetail(String id);
int updateChDisabAccounts(int id); int updateChDisabAccounts(int id);
int updateChAssessAccounts(int id); int updateChAssessAccounts(int id);
void organAccountTaskExecute(List<String> taskDetailIds);
} }
...@@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; ...@@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.account.dao.*; import com.hungraim.ltc.account.dao.*;
...@@ -16,10 +15,7 @@ import com.hungraim.ltc.api.AttachFeignService; ...@@ -16,10 +15,7 @@ import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCareService; import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCareService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard; import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.account.ChAssessAccounts; import com.hungraim.ltc.pojo.entity.account.*;
import com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.*; import com.hungraim.ltc.util.*;
...@@ -60,6 +56,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -60,6 +56,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
private final ChAssessDetailAccountsMapper chAssessDetailAccountsMapper; private final ChAssessDetailAccountsMapper chAssessDetailAccountsMapper;
private final ChDisabDetailAccountsMapper chDisabDetailAccountsMapper; private final ChDisabDetailAccountsMapper chDisabDetailAccountsMapper;
private final ChSrvTaskDetailMapper chSrvTaskDetailMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -84,6 +83,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -84,6 +83,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
return chOrganAccountsMapper.searchSrvOrganAccountList(new Page<>(srvOrganListReq.getPageNum(), srvOrganListReq.getPageSize()), organIds, srvOrganListReq); return chOrganAccountsMapper.searchSrvOrganAccountList(new Page<>(srvOrganListReq.getPageNum(), srvOrganListReq.getPageSize()), organIds, srvOrganListReq);
} }
@Override
public Page<SrvTaskRespVO> getSrvTaskList(SrvTaskReqVO srvTaskReqVO){
return taskDetailMapper.getSrvTaskList(new Page<>(srvTaskReqVO.getPageNum(), srvTaskReqVO.getPageSize()),srvTaskReqVO);
}
@Override @Override
public AccountOperVo getSrvOrganDetail(Long accountsId) { public AccountOperVo getSrvOrganDetail(Long accountsId) {
AccountOperVo accountOperVo = disabAccountsMapper.getDetailById(accountsId); AccountOperVo accountOperVo = disabAccountsMapper.getDetailById(accountsId);
...@@ -425,7 +431,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -425,7 +431,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override @Override
public void organAccount() { public void organAccount() {
List<OrganAccountsVO> accountsList = chOrganAccountsMapper.getOrganAccountsList(lastMonth); List<OrganAccountsVO> accountsList = chOrganAccountsMapper.getOrganAccountsList(lastMonth);
// 根据护理机构分组 // 根据护理机构分组
Map<String, List<OrganAccountsVO>> organAccountMap = accountsList.stream().collect(Collectors.groupingBy(OrganAccountsVO::getSrvOrganId)); Map<String, List<OrganAccountsVO>> organAccountMap = accountsList.stream().collect(Collectors.groupingBy(OrganAccountsVO::getSrvOrganId));
...@@ -653,17 +658,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -653,17 +658,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
} }
@Override @Override
public List<ChAssessDetailAccounts> queryDisabOrganAccountsDetail(int id) { public List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId) {
QueryWrapper<ChAssessDetailAccounts> queryWrapper = new QueryWrapper<>(); return chAssessDetailAccountsMapper.queryAssessAccountsDetail(assessAccountsId);
queryWrapper.eq("ASSESS_ACCOUNTS_ID",id);
return chAssessDetailAccountsMapper.selectList(queryWrapper);
} }
@Override @Override
public List<ChDisabDetailAccounts> querySearchAssessAccounts(int id) { public List<ChDisabDetailAccountsResp> queryOrganAccountsDetail(String id) {
QueryWrapper<ChDisabDetailAccounts> queryWrapper = new QueryWrapper<>(); return chDisabDetailAccountsMapper.queryOrganAccountsDetail(id);
queryWrapper.eq("ACCOUNTS_ID",id);
return chDisabDetailAccountsMapper.selectList(queryWrapper);
} }
@Override @Override
...@@ -694,4 +695,48 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -694,4 +695,48 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
public void organAccountTaskExecute(List<String> taskDetailIds) {
List<OrganAccountsVO> accountsList = chOrganAccountsMapper.getOrganAccountsList22(taskDetailIds);
// 根据护理机构分组
Map<String, List<OrganAccountsVO>> organAccountMap = accountsList.stream().collect(Collectors.groupingBy(OrganAccountsVO::getSrvOrganId));
for(Map.Entry<String, List<OrganAccountsVO>> entry:organAccountMap.entrySet()){
String organId = entry.getKey();
List<OrganAccountsVO> organAccountsList = entry.getValue();
if (CollectionUtil.isNotEmpty(organAccountsList)) {
List<OrganAccountsVO> growOldOrganAccountList = organAccountsList.stream().filter(s -> "养老".equals(s.getSrvModeName())).collect(Collectors.toList());
// 养老机构护理,其限额为 50 元/人/天 由长期护理保险基金支付 70% 个人支付 30%
computeCostAndSave(organId,growOldOrganAccountList, 50, 0.7, 0.3);
// 医疗机构护理,原则上收治医疗护理需求为主的重度失能人员一级及以下医疗机构其限额为 80 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
List<OrganAccountsVO> oneLevelList = organAccountsList.stream()
.filter(s -> "医疗".equals(s.getSrvModeName()) && "1".equals(s.getLevelCode()) && s.getDisableLevelName().contains("重度"))
.collect(Collectors.toList());
OrganAccountsVO organAccountsVO1 = computeCostAndSave(organId,oneLevelList, 80, 0.7, 0.3);
// 二级及以上医疗机构其限额为 100 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
List<OrganAccountsVO> aboveLevel2List = organAccountsList.stream()
.filter(s -> "医疗".equals(s.getSrvModeName()) && (!"1".equals(s.getLevelCode())) && s.getDisableLevelName().contains("重度"))
.collect(Collectors.toList());
OrganAccountsVO organAccountsVO2 = computeCostAndSave(organId,aboveLevel2List, 100, 0.7, 0.3);
BigDecimal allCost = organAccountsVO1.getAllCost().add(organAccountsVO2.getAllCost());
BigDecimal overallCost = organAccountsVO1.getOverallCost().add(organAccountsVO2.getOverallCost());
BigDecimal personalCost = organAccountsVO1.getPersonalCost().add(organAccountsVO2.getPersonalCost());
Long accountsId = saveOrganAccount(organId, aboveLevel2List, allCost, overallCost, personalCost);
saveorganAccountDetail(oneLevelList, BigDecimal.valueOf(80), organAccountsVO1.getOverallCost(), organAccountsVO1.getPersonalCost(),accountsId);
saveorganAccountDetail(aboveLevel2List, BigDecimal.valueOf(100), organAccountsVO2.getOverallCost(), organAccountsVO2.getPersonalCost(),accountsId);
for (String taskDetailId : taskDetailIds) {
ChSrvTaskDetail ca = new ChSrvTaskDetail();
ca.setStatus((short)4);
ca.setTaskDetailId(Long.valueOf(taskDetailId));
chSrvTaskDetailMapper.updateById(ca);
}
}
}
}
} }
<?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">
<select id="queryAssessAccountsDetail" resultType="com.hungraim.ltc.pojo.entity.account.ChAssessDetailAccountsResp">
select
d.ASSESS_ALL_COST assessAllCost,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
to_char(d.ASSESS_START_TIME,'yyyy-MM-dd HH24:mi:ss') accountsStartTime,
to_char(d.ASSESS_END_TIME,'yyyy-MM-dd HH24:mi:ss') accountsEndTime,
apply.MEDICAL_AREA medicalArea
from CH_ASSESS_ACCOUNTS_DETAIL d left join CH_DISABLE_INFO info on
d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
where d.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
</mapper>
<?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.ChDisabDetailAccountsMapper">
<select id="queryOrganAccountsDetail" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp">
select
d.MODE_NAME modeName,
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd HH24:mi:ss') accountsStartTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd HH24:mi:ss') accountsEndTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
apply.MEDICAL_AREA medicalArea,
o.SRV_ORGAN_NAME srvOrganName
from CH_DISAB_ACCOUNTS_DETAIL d
left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where d.ACCOUNTS_ID = #{accountsId}
</select>
</mapper>
\ No newline at end of file
...@@ -46,6 +46,55 @@ ...@@ -46,6 +46,55 @@
</select> </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'
<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>
</select>
<!--查询评估信息--> <!--查询评估信息-->
<select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"> <select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO">
select select
......
<?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.ChSrvTaskDetailMapper">
<select id="getSrvTaskList" parameterType="com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO" resultType="com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO">
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>
srvModeName 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 != ''">
and detail.status = #{req.status}
</if>
</where>
</select>
</mapper>
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;
@Data
public class ChAssessDetailAccountsResp implements Serializable {
/**
* 结算月份
*/
private String accountsTime;
private String assessAllCost;
/**
* 费用开始日期
*/
private String accountsStartTime;
/**
* 费用结束日期
*/
private String accountsEndTime;
private String medicalArea;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
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;
@Data
public class ChDisabDetailAccountsResp implements Serializable {
/**
* 结算月份
*/
private String accountsTime;
/**
* 应拨总费用
*/
private String accountsAllCost;
private String accountsOverallCost;
private String accountsPersonalCost;
/**
* 服务方式
*/
private String modeName;
/**
* 费用开始日期
*/
private String accountsStartTime;
/**
* 费用结束日期
*/
private String accountsEndTime;
private String medicalArea;
private String srvOrganName;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -60,6 +60,8 @@ public class AssessAccountsListResp { ...@@ -60,6 +60,8 @@ public class AssessAccountsListResp {
*/ */
private String assessStartTime; private String assessStartTime;
private String assessAllCost;
/** /**
* 费用结束时间 * 费用结束时间
*/ */
......
...@@ -74,4 +74,6 @@ public class SrvOrganAccountListResp { ...@@ -74,4 +74,6 @@ public class SrvOrganAccountListResp {
private String svrEndTime; private String svrEndTime;
} }
package com.hungraim.ltc.pojo.vo.account;
import com.hungraim.ltc.pojo.vo.BaseReq;
import lombok.Data;
/**
* @author zwl
**/
@Data
public class SrvTaskReqVO extends BaseReq {
//失能人员姓名
private String realName;
// 任务时间
private String srvDate;
private String status;
}
package com.hungraim.ltc.pojo.vo.account;
import lombok.Data;
/**
* @author zwl
**/
@Data
public class SrvTaskRespVO {
// 任务id
private String taskDetailId;
// 失能人员姓名
private String realName;
// 护理机构
private String srvOrganName;
// 护理人员
private String empName;
// 任务时间
private String srvDate;
}
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