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

费用结算

parent 43599d4f
package com.hungraim.ltc.account.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCareService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ChCfgCareServiceMapper extends BaseMapper<ChCfgCareService> {
}
......@@ -8,6 +8,7 @@ import com.hungraim.ltc.account.dao.*;
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.ChFndAttach;
import com.hungraim.ltc.pojo.entity.account.ChDisabAccounts;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
......@@ -39,6 +40,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
private final ChSrvTaskFinishItemMapper taskFinishItemMapper;
private final ChSrvProgramMapper programMapper;
private final ChSrvProgramSetMapper programSetMapper;
private final ChCfgCareServiceMapper chCfgCareServiceMapper;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -105,7 +107,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
int endDay = getDay(vo.getSrvEndTime());
vo.setEffectiveSettlementDate(endDay - startDay + 1);
//基护费用
Integer effectiveSettlementDate = vo.getEffectiveSettlementDate();
Integer effectiveSettlementDate = vo.getEffectiveSettlementDate();//有效结算日
int costStandardOfFoundationProtection = 30;//基护费用标准(可配置)
BigDecimal foundation = BigDecimal.valueOf(costStandardOfFoundationProtection).multiply(BigDecimal.valueOf(effectiveSettlementDate));
vo.setFoundationProtectionCost(foundation.doubleValue());
......@@ -221,17 +223,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
careCosts = BigDecimal.valueOf(standardCareCost).multiply(BigDecimal.valueOf(taskDetails2.size()));
}
if (FndSrvMode.PATROL.getCode().equals(bo.getSrvModeId())) {//巡护
if (CfgSrvLevel.ONE.getCode().equals(bo.getSrvLevelId())) {//服务等级
if (careCosts.intValue() > 600) {
careCosts = BigDecimal.valueOf(600);
}
} else if (CfgSrvLevel.TWO.getCode().equals(bo.getSrvLevelId())) {
if (careCosts.intValue() > 800) {
careCosts = BigDecimal.valueOf(800);
}
} else if (CfgSrvLevel.THREE.getCode().equals(bo.getSrvLevelId())) {
if (careCosts.intValue() > 1000) {
careCosts = BigDecimal.valueOf(1000);
ChCfgCareService chCfgCareService = chCfgCareServiceMapper.selectOne(new LambdaQueryWrapper<ChCfgCareService>()
.eq(ChCfgCareService::getSrvlevelId, bo.getSrvLevelId()));//根据服务等级查询照护服务费用限额配置表
if (chCfgCareService != null) {
if (careCosts.intValue() > chCfgCareService.getMonthlyPaymentLimit()) {
careCosts = BigDecimal.valueOf(chCfgCareService.getMonthlyPaymentLimit());
}
}
}
......
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_CARE_SERVICE
*
* @author
*/
@Data
@TableName("CH_CFG_CARE_SERVICE")
@KeySequence("SEQ_CH_CFG_CARE_SERVICE")
public class ChCfgCareService implements Serializable {
/**
* 照护服务费用限额配置id
*/
@TableId(type = IdType.INPUT)
private Long careServiceId;
/**
* 服务等级id
*/
private Integer srvlevelId;
/**
* 月支付限额(元/人)
*/
private Integer monthlyPaymentLimit;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
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