提交merge1.3

This commit is contained in:
2025-12-27 15:31:06 +08:00
parent cbd3e7f981
commit 79ea4ed4f7
148 changed files with 6722 additions and 10861 deletions

View File

@@ -12,12 +12,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
<<<<<<< HEAD
import com.core.common.enums.DeleteFlag;
import com.openhis.common.enums.DelFlag;
=======
import com.core.common.enums.DelFlag;
>>>>>>> v1.3
import com.openhis.common.enums.GfRatioType;
import com.openhis.common.enums.ItemType;
import com.openhis.common.enums.ybenums.YbChrgitmLv;
@@ -40,7 +35,7 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
/**
* 查询自付比例(按照小项查询自付比例,如果没有的话,返回值不一定会有自付比例,还要查大项)
*
*
* @param itemType
* @param paymentItemList
* @return
@@ -49,18 +44,18 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
ArrayList<StudentPaymentItemModel> list = new ArrayList<>();
List<Long> serviceIdList =
paymentItemList.stream().map(PaymentedItemModel::getServiceId).collect(Collectors.toList());
List<Long> serviceIdList
= paymentItemList.stream().map(PaymentedItemModel::getServiceId).collect(Collectors.toList());
Date date = new Date();
// 查询自付比例
List<GfRatio> gfRatios =
baseMapper.selectList(new LambdaQueryWrapper<GfRatio>().in(GfRatio::getDefinitionId, serviceIdList)
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()).eq(GfRatio::getItemType, itemType.getValue())
.ge(GfRatio::getStartDate, date).le(GfRatio::getEndDate, date));
List<GfRatio> gfRatios
= baseMapper.selectList(new LambdaQueryWrapper<GfRatio>().in(GfRatio::getDefinitionId, serviceIdList)
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()).eq(GfRatio::getItemType, itemType.getValue())
.ge(GfRatio::getStartDate, date).le(GfRatio::getEndDate, date));
Map<Long, List<GfRatio>> gfRatiosMap =
gfRatios.stream().collect(Collectors.groupingBy(GfRatio::getDefinitionId));
Map<Long, List<GfRatio>> gfRatiosMap
= gfRatios.stream().collect(Collectors.groupingBy(GfRatio::getDefinitionId));
StudentPaymentItemModel studentPaymentItemModel;
for (PaymentedItemModel paymentedItemModel : paymentItemList) {
@@ -89,23 +84,19 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
@Override
public List<GfTypeRatioDto> getTypeRatioList() {
// 查询DB中的所有大项比例
List<GfRatio> gfRatioList =
this.list(new LambdaQueryWrapper<GfRatio>().eq(GfRatio::getRatioType, GfRatioType.TYPE_RATIO.getValue())
<<<<<<< HEAD
.eq(GfRatio::getDeleteFlag, DeleteFlag.NOT_DELETED.getCode()));
=======
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()));
>>>>>>> v1.3
List<GfRatio> gfRatioList
= this.list(new LambdaQueryWrapper<GfRatio>().eq(GfRatio::getRatioType, GfRatioType.TYPE_RATIO.getValue())
.eq(GfRatio::getDeleteFlag, DelFlag.NO.getCode()));
// 做成医保分项+医保等级拼接的Map
Map<String, GfRatio> gfRatioMap =
gfRatioList.stream().collect(Collectors.toMap(e -> e.getYbClass() + e.getYbLv(), Function.identity()));
Map<String, GfRatio> gfRatioMap
= gfRatioList.stream().collect(Collectors.toMap(e -> e.getYbClass() + e.getYbLv(), Function.identity()));
List<GfTypeRatioDto> gfTypeRatioDtoList = new ArrayList<>();
// 遍历所有医疗收费项目类别
for (YbMedChrgItmType ybMedChrgItmType : YbMedChrgItmType.values()) {
// 甲类
GfTypeRatioDto gfTypeRatioDtoA =
new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
.setYbLv(YbChrgitmLv.CATEGORY_A.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_A.getInfo());
GfTypeRatioDto gfTypeRatioDtoA
= new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
.setYbLv(YbChrgitmLv.CATEGORY_A.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_A.getInfo());
GfRatio gfRatioA = gfRatioMap.get(ybMedChrgItmType.getValue() + YbChrgitmLv.CATEGORY_A.getCode());
if (gfRatioA != null) {
// DB存在则取DB的值
@@ -113,9 +104,9 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
}
gfTypeRatioDtoList.add(gfTypeRatioDtoA);
// 乙类
GfTypeRatioDto gfTypeRatioDtoB =
new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
.setYbLv(YbChrgitmLv.CATEGORY_B.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_B.getInfo());
GfTypeRatioDto gfTypeRatioDtoB
= new GfTypeRatioDto().setYbClass(ybMedChrgItmType.getValue()).setYbClassName(ybMedChrgItmType.getInfo())
.setYbLv(YbChrgitmLv.CATEGORY_B.getCode()).setYbLvName(YbChrgitmLv.CATEGORY_B.getInfo());
GfRatio gfRatioB = gfRatioMap.get(ybMedChrgItmType.getValue() + YbChrgitmLv.CATEGORY_B.getCode());
if (gfRatioB != null) {
// DB存在则取DB的值
@@ -126,4 +117,4 @@ public class GfRatioServiceImpl extends ServiceImpl<GfRatioMapper, GfRatio> impl
// 返回列表
return gfTypeRatioDtoList;
}
}
}