Commit 2ef9e9f8 authored by zhangwanglin's avatar zhangwanglin

结算代码提交

parent 2221678a
package com.hungraim.ltc.api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient("LTC-ACCOUNT-SERVICE")
public interface AccountFeignService {
@GetMapping("/api.account/account/getOtherPlace")
void getOtherPlace(@RequestParam("programId") String programId);
}
......@@ -109,6 +109,13 @@ public class AccountController {
}
@GetMapping("/getOtherPlace")
public Result organAccountTaskExecute(String programId){
accountService.otherPlaceHandler(programId);
return Result.success();
}
/**
* 任务列表
......
......@@ -26,4 +26,9 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
List<ChDisabDetailAccounts> queryAccountByCondition(@Param("taskDetailIds") List<String> taskDetailIds,String accountsTime);
List<OrganAccountsVO> getOtherPlaceList(String programId);
}
\ No newline at end of file
......@@ -7,12 +7,16 @@ import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
@Mapper
@Repository
public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page<SrvTaskRespVO> getSrvTaskList(Page page,SrvTaskReqVO req);
Integer updateSrvPlanById(String palnId);
}
\ No newline at end of file
......@@ -37,4 +37,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
void organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
void otherPlaceHandler(String programId);
}
......@@ -33,11 +33,9 @@ import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Service
@AllArgsConstructor
......@@ -477,12 +475,20 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
public void organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS) {
List<String> collect = accountTaskExecuteReqVOS.stream().map(AccountTaskExecuteReqVO::getTaskDetailId).collect(Collectors.toList());
List<ChSrvTaskFinishItem> chSrvTaskFinishItems = chSrvTaskFinishItemMapper.selectList(new LambdaQueryWrapper<ChSrvTaskFinishItem>()
.in(ChSrvTaskFinishItem::getTaskDetailId, collect));
for (AccountTaskExecuteReqVO accountTaskExecuteReqVO : accountTaskExecuteReqVOS) {
List<ChSrvTaskFinishItem> chSrvTaskFinishItemStream = chSrvTaskFinishItems.stream().filter(s -> s.getItemId().equals(Long.valueOf(accountTaskExecuteReqVO.getItemId()))).collect(Collectors.toList());
String planId = accountTaskExecuteReqVO.getPlanId();
Integer integer = chSrvTaskDetailMapper.updateSrvPlanById(planId);
if (CollectionUtil.isNotEmpty(chSrvTaskFinishItemStream)) {
return;
}
ChSrvTaskFinishItem chSrvTaskFinishItem = new ChSrvTaskFinishItem();
chSrvTaskFinishItem.setTaskDetailId(Long.valueOf(accountTaskExecuteReqVO.getTaskDetailId()));
chSrvTaskFinishItem.setItemId(Long.valueOf(accountTaskExecuteReqVO.getItemId()));
chSrvTaskFinishItemMapper.insert(chSrvTaskFinishItem);
ChSrvTaskDetail ca = new ChSrvTaskDetail();
ca.setStatus((short)4);
ca.setTaskDetailId(Long.valueOf(accountTaskExecuteReqVO.getTaskDetailId()));
......@@ -570,4 +576,31 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
return chDisabAccounts;
}
@Override
public void otherPlaceHandler(String programId){
List<OrganAccountsVO> accountsList = chDisabAccountsDetailMapper.getOtherPlaceList(programId);
for (OrganAccountsVO accountsVO : accountsList) {
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
chDisabDetailAccounts.setSrvOrganId(accountsVO.getSrvOrganId());
// 要判断是养老还是医疗,因为费用不一样
BigDecimal limit = BigDecimal.valueOf(20);
BigDecimal zero = BigDecimal.valueOf(0);
chDisabDetailAccounts.setAccountsAllCost(limit);
chDisabDetailAccounts.setAccountsPersonalCost(zero);
chDisabDetailAccounts.setAccountsOverallCost(zero);
chDisabDetailAccounts.setModeName(accountsVO.getSrvModeName());
chDisabDetailAccounts.setCreationTime(new Date());
chDisabDetailAccounts.setAccountsTime(new Date());
chDisabDetailAccounts.setAccountsStartTime(DateUtils.strToTime(accountsVO.getSrvStartTime()));
chDisabDetailAccounts.setAccountsEndTime(DateUtils.strToTime(accountsVO.getSrvEndTime()));
chDisabDetailAccounts.setTaskDetailId(accountsVO.getTaskDetailId());
chDisabDetailAccounts.setMedicalArea(accountsVO.getMedicalArea());
chDisabDetailAccounts.setItemIds(accountsVO.getItemId());
chDisabDetailAccounts.setDisabInfoId(accountsVO.getDisabInfoId());
ChDisabAccounts chDisabAccounts = getChDisabAccounts(accountsVO, limit, zero, zero);
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
}
}
}
......@@ -118,7 +118,8 @@
t1.OVERALL_COST,
t1.PERSONAL_COST,
t1.SVR_START_TIME,
t1.SVR_END_TIME
to_char(t1.SVR_START_TIME,'yyyy-MM-dd') svrStartTime,
to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime
FROM
CH_DISAB_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.SRV_ORGAN_ID = t2.SRV_ORGAN_ID
......@@ -157,5 +158,47 @@
</select>
<select id="getOtherPlaceList" 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,
--所在省市
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 mode1.MODE_ID = '4' and program.program_id = #{programId}
</select>
</mapper>
......@@ -17,12 +17,7 @@
</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}
......
......@@ -12,7 +12,8 @@
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
apply.MEDICAL_AREA medicalArea,
o.SRV_ORGAN_NAME srvOrganName
o.SRV_ORGAN_NAME srvOrganName,
info.REAL_NAME realName
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
......
......@@ -2,60 +2,34 @@
<!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,
--护理服务人员
<select id="getSrvTaskList" resultType="com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO">
select info.REAL_NAME realName,
plan.PLAN_ID planId,
plan.ITEM_ID itemId,
plan.TASK_DETAIL_ID taskDetailId,
plan.ITEM_NAME itemName,
emp.emp_name empName,
--任务时间
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_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--护理人员
<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
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvDate,
plan.IS_STATUS status
from ch_srv_plan plan
left join ch_disable_info info on plan.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_srv_organ_emp emp on plan.emp_id = emp.emp_id
<where>
mode1.mode_name in ('医疗','养老')
<if test="req.realName != null and req.realName != ''">
and disable.real_name LIKE CONCAT(CONCAT('%',#{req.realName}),'%')
<if test="req.status != null">
and plan.IS_STATUS = #{req.status}
</if>
<if test='req.status != null and req.status != "" and req.status != "0"'>
and detail.status = #{req.status}
<if test="req.realName != null">
AND info.real_name LIKE CONCAT('%',CONCAT(#{req.realName},'%'))
</if>
</where>
order by detail.SRV_DATE desc
</select>
<update id="updateSrvPlanById">
update CH_SRV_PLAN plan set plan.is_status= '4' where plan.plan_id = #{planId}
</update>
......
......@@ -721,7 +721,7 @@ public class TaskController {
* 评估人员结算提交复核
*
* @param id 结算id
* @return 返回雷彪
* @return
*/
@PostMapping("/updateChAssessAccounts")
public Result updateChAssessAccounts(int id) {
......
......@@ -21,5 +21,4 @@ public interface ChAssessAccountsMapper extends BaseMapper<ChAssessAccounts> {
Page<AssessAccountsListResp> searchAssessAccountList(Page page, List<Long> organIds, SrvOrganListReq req);
List<AssessAccountsExportResp> assessAccountDetailExport(String assessAccountsId);
}
\ No newline at end of file
......@@ -3,6 +3,7 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccounts;
import com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp;
import com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
......@@ -16,4 +17,6 @@ import java.util.List;
public interface ChAssessDetailAccountsMapper extends BaseMapper<ChAssessDetailAccounts> {
List<ChAssessDetailAccountsResp> queryAssessAccountsDetail(String assessAccountsId);
List<AssessAccountsExportResp> assessAccountDetailExport(String assessAccountsId);
}
......@@ -829,7 +829,7 @@ public class TaskServiceImpl implements TaskService {
@Override
public Workbook assessAccountExport(String assessAccountsId) {
List<AssessAccountsExportResp> assessAccountExportList = chAssessAccountsMapper.assessAccountDetailExport(assessAccountsId);
List<AssessAccountsExportResp> assessAccountExportList = chAssessDetailAccountsMapper.assessAccountDetailExport(assessAccountsId);
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); //对应xlsx
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, AssessAccountsExportResp.class, assessAccountExportList);
......
......@@ -12,32 +12,22 @@
<select id="searchAssessAccountList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsListResp">
SELECT
t1.ASSESS_ACCOUNTS_ID,
t3.ORGAN_ID,
t3.ORGAN_NAME,
t2.SRV_ORGAN_ID,
t2.SRV_ORGAN_NAME,
t2.ORGAN_ID,
t2.ORGAN_NAME,
t1.ACCOUNTS_TIME,
t1.ACCOUNTS_STATUS,
t1.ASSESS_ALL_COST,
t1.ASSESS_START_TIME,
t1.ASSESS_END_TIME
t1.ASSESS_ALL_COST
FROM
CH_ASSESS_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.APR_ORGAN_ID = t2.SRV_ORGAN_ID
LEFT JOIN CH_APR_ORGAN t2 ON t1.APR_ORGAN_ID = t2.APR_ORGAN_ID
LEFT JOIN CH_FND_ORGAN t3 ON t2.ORGAN_ID = t3.ORGAN_ID
<where>
<if test='organIds != null and organIds.size()>0'>
t3.ORGAN_ID IN
<foreach collection="organIds" open="(" close=")" item="organId" separator=",">
#{organId}
</foreach>
</if>
<if test='req.srvOrganId != null'>
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<if test='req.accountsTime != null'>
AND t1.ACCOUNTS_TIME = #{req.accountsTime}
</if>
<if test='req.organName != null'>
AND t2.ORGAN_NAME = #{req.organName}
</if>
</where>
</select>
......@@ -74,19 +64,7 @@
</where>
</select>
<select id="assessAccountDetailExport" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp">
SELECT
t3.SRV_ORGAN_NAME,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ASSESS_ALL_COST assessCost,
to_char(t1.ASSESS_START_TIME,'yyyy-MM-dd') assessStartTime,
to_char(t1.ASSESS_END_TIME,'yyyy-MM-dd') assessEndTime
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
left join ch_disable_info t2 on t1.disab_info_id = t2.disab_info_id
LEFT JOIN CH_SRV_ORGAN t3 ON t1.SRV_ORGAN_ID = t3.SRV_ORGAN_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
<select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO">
......
......@@ -3,21 +3,39 @@
<mapper namespace="com.hungraim.ltc.dao.ChAssessDetailAccountsMapper">
<select id="queryAssessAccountsDetail" resultType="com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp">
<select id="queryAssessAccountsDetail"
resultType="com.hungraim.ltc.pojo.entity.assessment.ChAssessDetailAccountsResp">
select
d.ASSESS_ALL_COST assessAllCost,
apply.REAL_NAME realName,
d.ASSESS_COST assessAllCost,
organ.organ_name assessOrganName,
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
apply.MEDICAL_AREA medicalArea,
to_char(d.assess_time,'yyyy-MM-dd') assessTime,
emp.REAL_NAME empName
from CH_ASSESS_ACCOUNTS_DETAIL d
left join CH_DISABLE_APPLY apply on d.APPLY_ID=apply.APPLY_ID
left join CH_APR_ORGAN organ on organ.APR_ORGAN_ID = d.APR_ORGAN_ID
left join CH_APR_EMP emp on emp.EMP_ID = d.EMP_ID
where d.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
<select id="assessAccountDetailExport" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp">
SELECT
t2.REAL_NAME realName,
t3.ORGAN_NAME organName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ASSESS_COST assessCost,
to_char(t1.assess_time,'yyyy-MM-dd') assessTime,
t4.REAL_NAME empName,
t2.MEDICAL_AREA medicalArea
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
left join CH_DISABLE_APPLY t2 on t1.APPLY_ID = t2.APPLY_ID
LEFT JOIN CH_APR_ORGAN t3 ON t1.APR_ORGAN_ID = t3.APR_ORGAN_ID
left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
</mapper>
......
......@@ -16,6 +16,4 @@ public class AuthApplication {
public static void main(String[] args) {
SpringApplication.run(AuthApplication.class, args);
}
}
......@@ -49,5 +49,7 @@ public class ChDisabDetailAccountsResp implements Serializable {
private String srvOrganName;
private String realName;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -7,26 +7,34 @@ import java.io.Serializable;
@Data
public class ChAssessDetailAccountsResp implements Serializable {
private String realName;
private String empName;
/**
* 结算月份
*/
private String accountsTime;
private String assessAllCost;
/**
* 评估时间
*/
private String assessTime;
/**
* 费用开始日期
* 评估总费用
*/
private String accountsStartTime;
private String assessAllCost;
/**
* 费用结束日期
* 评估机构名称
*/
private String accountsEndTime;
private String assessOrganName;
/**
* 统筹区
*/
private String medicalArea;
......
package com.hungraim.ltc.pojo.entity.governance;
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 lombok.Data;
import java.util.Date;
@Data
@TableName("CH_SRV_PLAN")
@KeySequence("SEQ_CH_SRV_PLAN")
public class ChSrvPlan {
@TableId(value = "plan_ID", type = IdType.INPUT)
private Long planID;
private Long srvOrganId;
private Long disabInfoId;
private Long modeId;
private Long empId;
private Long taskDetailId;
private Long itemId;
private String itemName;
private Date creationTime;
private Date srvPlanTime;
private Long isStatus;
}
......@@ -6,6 +6,8 @@ import lombok.Data;
@Data
public class AccountTaskExecuteReqVO {
private String planId;
private String taskDetailId;
private String itemId;
......
......@@ -11,24 +11,22 @@ import java.util.Date;
public class AssessAccountsExportResp {
@Excel(name = "统筹区",width = 20)
private String medicalArea;
@Excel(name = "适用机构名称",width = 20)
private String organName;
@Excel(name = "失能人员姓名",width = 20)
private String realName;
@Excel(name = "评估机构名称",width = 20)
private String organName;
/**
* 护理机构名称
*/
@Excel(name = "护理机构名称",width = 20)
private String srvOrganName;
@Excel(name = "评定人员姓名",width = 20)
private String empName;
/**
* 结算月份
*/
@Excel(name = "结算月份",width = 20)
private String accountsTime;
@Excel(name = "评估时间",width = 20)
private String assessTime;
/**
......@@ -38,19 +36,4 @@ public class AssessAccountsExportResp {
private String assessCost;
/**
* 费用开始时间
*/
@Excel(name = "费用开始时间",width = 20)
private String assessStartTime;
/**
* 费用结束时间
*/
@Excel(name = "费用结束时间",width = 20)
private String assessEndTime;
}
......@@ -15,26 +15,17 @@ public class AssessAccountsListResp {
private Long assessAccountsId;
/**
* 适用机构id
* 评估机构id
*/
private Long organId;
/**
* 适用机构名称
* 评估机构名称
*/
private String organName;
/**
* 护理机构id
*/
private String srvOrganId;
private String disabInfoId;
/**
* 护理机构名称
*/
private String srvOrganName;
/**
* 结算月份
......@@ -48,26 +39,11 @@ public class AssessAccountsListResp {
*/
private Short accountsStatus;
/**
* 总费用
*/
private String assessCost;
/**
* 费用开始时间
*/
private String assessStartTime;
private String assessAllCost;
/**
* 费用结束时间
*/
private String assessEndTime;
private String aprempTypeName;
// private String aprempTypeName;
......
......@@ -66,12 +66,12 @@ public class SrvOrganAccountListResp {
/**
* 费用开始时间
*/
private Date svrStartTime;
private String svrStartTime;
/**
* 费用结束时间
*/
private Date svrEndTime;
private String svrEndTime;
......
......@@ -8,6 +8,7 @@ import lombok.Data;
@Data
public class SrvTaskRespVO {
private Long planId;
// 任务id
private Long taskDetailId;
......@@ -29,6 +30,8 @@ public class SrvTaskRespVO {
// 任务名称
private Long itemId;
private Long status;
}
......@@ -16,15 +16,16 @@ public class SrvOrganListReq extends BaseReq {
private Long organId;
private Long organName;
/**
* 是否包含下级机构
*/
private Boolean isInvolveChild;
// private Boolean isInvolveChild;
/**
* 护理机构id
*/
private Long srvOrganId;
// private Long srvOrganId;
/**
* 结算月份
......
......@@ -96,6 +96,12 @@
<artifactId>apply-api</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.hungraim.ltc</groupId>
<artifactId>account-api</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
......@@ -2,6 +2,8 @@ package com.hungraim.ltc.governance.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import com.hungraim.ltc.pojo.vo.governance.*;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
......@@ -9,10 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
......@@ -138,4 +137,10 @@ public class SrvTaskController {
return Result.success();
}
@GetMapping("otherPlaceHandler")
public void otherPlaceHandler(String programId){
srvTaskService.otherPlaceHandler(programId);
}
}
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.governance.ChSrvPlan;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Mapper
public interface ChSrvPlanMapper extends BaseMapper<ChSrvPlan> {
List<ChSrvPlan> queryPlan(String programId);
}
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.account.SrvTaskReqVO;
import com.hungraim.ltc.pojo.vo.account.SrvTaskRespVO;
import com.hungraim.ltc.pojo.vo.governance.*;
import org.springframework.stereotype.Service;
......@@ -18,6 +20,9 @@ public interface SrvTaskService {
List<SrvTaskInfoVO> getSrvTaskInfoList(String programId);
// mode_id 4
void otherPlaceHandler(String programId);
Page<OrganEmpVO> getSrvOrganEmpList(Page<OrganEmpVO> page, String organId, String name, String certiType, String certifNum);
Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, Date startTime, Date endTime, String status, String modeId);
......@@ -26,4 +31,5 @@ public interface SrvTaskService {
* 新增或者修改服务计划
*/
void addOrUpdateSrvTask(SrvTaskInfoListVO param);
}
......@@ -3,19 +3,20 @@ package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.AccountFeignService;
import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.governance.dao.ChSrvPlanMapper;
import com.hungraim.ltc.governance.dao.ChSrvTaskDetailMapper;
import com.hungraim.ltc.governance.dao.SrvTaskMapper;
import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.governance.ChSrvPlan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.governance.*;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.util.AttachType;
import com.hungraim.ltc.util.DateUtils;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
......@@ -35,6 +36,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
private final SrvTaskMapper srvTaskMapper;
private final ChSrvTaskDetailMapper chSrvTaskDetailMapper;
private final AttachFeignService attachFeignService;
private final ChSrvPlanMapper chSrvPlanMapper;
private final AccountFeignService accountFeignService;
/**
* 服务计划制定列表
......@@ -137,6 +142,10 @@ public class SrvTaskServiceImpl implements SrvTaskService {
//添加服务计划详情
Long newSrvTaskId = chSrvTask.getSrvTaskId();
this.insertTaskDetail(newSrvTaskId, taskDetails);
saveSrvPlan(programId);
// 异地结算
otherPlaceHandler(programId);
//添加附件
// this.updateAttachs(srvTaskInfoVO.getListAttach(), chSrvTask.getSrvTaskId());
} else {
......@@ -149,6 +158,22 @@ public class SrvTaskServiceImpl implements SrvTaskService {
}
}
public void saveSrvPlan(String programId){
List<ChSrvPlan> chSrvPlans = chSrvPlanMapper.queryPlan(programId);
for (ChSrvPlan chSrvPlan : chSrvPlans) {
chSrvPlanMapper.insert(chSrvPlan);
}
}
// mode_id 4
@Override
public void otherPlaceHandler(String programId){
accountFeignService.getOtherPlace(programId);
}
/**
* 插入服务计划详情数据
*
......
<?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.governance.dao.ChSrvPlanMapper">
<select id="queryPlan" resultType="com.hungraim.ltc.pojo.entity.governance.ChSrvPlan">
select
disable.DISAB_INFO_ID disabInfoId,
mode1.MODE_ID modeId,
--护理机构名称
organ.srv_organ_id srvOrganId,
emp.emp_id empId,
--任务时间
detail.SRV_DATE srvPlanTime,
detail.TASK_DETAIL_ID taskDetailId,
d.SERVICE_TYPE_DETAILED_NAME itemName,
CSTFI.ITEM_ID itemId,
'0' isStatus
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_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_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
LEFT JOIN CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = CSOP.item_name
<where>
mode1.mode_name in ('医疗','养老') and program.program_id =#{programId}
</where>
order by detail.SRV_DATE desc
</select>
</mapper>
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