Commit cbdc7167 authored by 蔡镇泽's avatar 蔡镇泽

基护费用标准(可配置)

parent a2963b16
package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ChCfgCostStandardMapper extends BaseMapper<ChCfgCostStandard> {
}
......@@ -23,13 +23,14 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
" t5.srv_mode_name, " +//服务方式名称
" t2.srv_start_time, " +//服务开始时间
" t2.srv_end_time, " +//服务结束时间
" t4.srv_organ_id " +//护理机构id
" t6.disable_level_id " +//失能等级id
" t7.item_id " +//服务项目id
" t7.item_times " +//服务频次
" t7.planning_frequency " +//计划频次
" t7.planning_frequency_type " +//计划频次类型
" t8.srv_level_id " +//服务等级id
" t4.srv_organ_id, " +//护理机构id
" t6.disable_level_id, " +//失能等级id
" t7.item_id, " +//服务项目id
" t7.item_times, " +//服务频次
" t7.planning_frequency, " +//计划频次
" t7.planning_frequency_type, " +//计划频次类型
" t8.srv_level_id, " +//服务等级id
" t9.organ_id " +//分支机构id
"FROM " +
" ch_srv_task t1 " +
" LEFT JOIN ch_srv_task_detail t2 ON t1.srv_task_id = t2.srv_task_id " +
......@@ -39,6 +40,7 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
" LEFT JOIN ch_apr_report t6 ON t5.task_id = t1.srv_task_id" +
" LEFT JOIN ch_srv_program_set t7 ON t7.set_id = t4.program_id and t7.is_conf = 1" +
" LEFT JOIN ch_cfg_srv_item t8 ON t8.item_id = t7.item_id" +
" LEFT JOIN ch_srv_organ t9 ON t9.srv_organ_id = t4.srv_organ_id" +
"<where> " +
" t4.srv_organ_id = #{req.srvOrganId} AND t4.PROG_STATUS = '1' AND t2.srv_start_time &lt;= #{req.accountsTime} AND t2.srv_end_time &gt;= #{req.accountsTime}" +
"</where></script>")
......
......@@ -9,6 +9,7 @@ import com.hungraim.ltc.account.service.AccountService;
import com.hungraim.ltc.account.service.BaseAccountService;
import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCareService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
......@@ -41,6 +42,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
private final ChSrvProgramMapper programMapper;
private final ChSrvProgramSetMapper programSetMapper;
private final ChCfgCareServiceMapper chCfgCareServiceMapper;
private final ChCfgCostStandardMapper chCfgCostStandardMapper;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -108,8 +110,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
vo.setEffectiveSettlementDate(endDay - startDay + 1);
//基护费用
Integer effectiveSettlementDate = vo.getEffectiveSettlementDate();//有效结算日
int costStandardOfFoundationProtection = 30;//基护费用标准(可配置)
BigDecimal foundation = BigDecimal.valueOf(costStandardOfFoundationProtection).multiply(BigDecimal.valueOf(effectiveSettlementDate));
ChCfgCostStandard costStandard = chCfgCostStandardMapper.selectOne(new LambdaQueryWrapper<ChCfgCostStandard>()
.eq(ChCfgCostStandard::getOrganId, bo.getOrganId())
.eq(ChCfgCostStandard::getSrvlevelId, bo.getSrvLevelId())
.eq(ChCfgCostStandard::getSrvModeId, bo.getSrvModeId()));//基护费用标准(可配置)
BigDecimal foundation = BigDecimal.valueOf(costStandard.getCost()).multiply(BigDecimal.valueOf(effectiveSettlementDate));
vo.setFoundationProtectionCost(foundation.doubleValue());
//基护完成率
Integer srvTaskId = bo.getSrvTaskId();
......
package com.hungraim.ltc.pojo.entity.SysConfig;
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.io.Serializable;
/**
* CH_CFG_COST_STANDARD
*
* @author
*/
@Data
@TableName("CH_CFG_COST_STANDARD")
@KeySequence("SEQ_CH_CFG_COST_STANDARD")
public class ChCfgCostStandard implements Serializable {
/**
* 基护费用标准配置id
*/
@TableId(type = IdType.INPUT)
private Long costStandardId;
/**
* 中支机构id
*/
private Integer organId;
/**
* 服务方式id
*/
private Integer srvModeId;
/**
* 服务等级id
*/
private Integer srvlevelId;
/**
* 费用(元/人/天)
*/
private Integer cost;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -78,4 +78,9 @@ public class ExpenseSettlementInfoBo {
*/
private String srvLevelId;
/**
* 分支机构id
*/
private String organId;
}
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