|
|
@@ -11,6 +11,7 @@ import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
import thyyxxk.webserver.entity.reports.illegalchargesanalysis.IllegalChargeData;
|
|
|
import thyyxxk.webserver.entity.reports.illegalchargesanalysis.IllegalChargeTemplate;
|
|
|
import thyyxxk.webserver.entity.reports.illegalchargesanalysis.SearchChargeItem;
|
|
|
+import thyyxxk.webserver.utils.ListUtil;
|
|
|
import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
import thyyxxk.webserver.utils.TokenUtil;
|
|
|
@@ -164,17 +165,6 @@ public class IllegalChargesAnalysisService {
|
|
|
public ResultVo<List<IllegalChargeData>> analyzeTargetData(IllegalChargeTemplate template) {
|
|
|
template.setStart(template.getStart() + " 00:00:00");
|
|
|
template.setEnd(template.getEnd() + " 23:59:59");
|
|
|
- if (null == template.getResponces()) {
|
|
|
- template.setResponces(new ArrayList<>());
|
|
|
- }
|
|
|
- if (template.getResponces().isEmpty()) {
|
|
|
- // TODO: 2021/11/12 违规收费分析查询所有医保数据
|
|
|
-// template.getResponces().add(ResponceType.HUNAN_PROVINCIAL_MEDICAL_INSURANCE);
|
|
|
-// template.getResponces().add(ResponceType.HUNAN_PROVINCE_REMOTE_MEDICAL_INSURANCE);
|
|
|
-// template.getResponces().add(ResponceType.CHANGSHA_CITY_RESIDENTS_MEDICAL_INSURANCE);
|
|
|
-// template.getResponces().add(ResponceType.CHANGSHA_CITY_WORKERS_MEDICAL_INSURANCE);
|
|
|
-// template.getResponces().add(ResponceType.NEW_RURAL_COOPERATIVE_MEDICAL_INSURANCE);
|
|
|
- }
|
|
|
log.info("违规收费分析:{}", template);
|
|
|
if (template.getAttribute() == 1) {
|
|
|
return sameTimeCharge(template);
|
|
|
@@ -187,11 +177,15 @@ public class IllegalChargesAnalysisService {
|
|
|
for (PureCodeName main : template.getMainCharges()) {
|
|
|
List<IllegalChargeData> mainList = dao.selectChargeDataForSameTime(template.getStart(),
|
|
|
template.getEnd(), main.getCode());
|
|
|
- mainList.removeIf(item -> !template.getResponces().contains(item.getResponceType()));
|
|
|
+ if (ListUtil.notBlank(template.getMedtypes())) {
|
|
|
+ mainList.removeIf(item -> !template.getMedtypes().contains(item.getMedtype()));
|
|
|
+ }
|
|
|
for (PureCodeName cflct : template.getConflictCharges()) {
|
|
|
List<IllegalChargeData> cflctList = dao.selectChargeDataForSameTime(template.getStart(),
|
|
|
template.getEnd(), cflct.getCode());
|
|
|
- cflctList.removeIf(item -> !template.getResponces().contains(item.getResponceType()));
|
|
|
+ if (ListUtil.notBlank(template.getMedtypes())) {
|
|
|
+ cflctList.removeIf(item -> !template.getMedtypes().contains(item.getMedtype()));
|
|
|
+ }
|
|
|
Map<String, IllegalChargeData> map = new HashMap<>(mainList.size());
|
|
|
for (IllegalChargeData item : mainList) {
|
|
|
String key = item.getInpatientNo() + "_" + item.getChargeDay();
|
|
|
@@ -247,7 +241,7 @@ public class IllegalChargesAnalysisService {
|
|
|
}
|
|
|
|
|
|
public ResultVo<List<IllegalChargeData>> queryHuanZheLiangCiRuYuanRiQi(IllegalChargeTemplate param) {
|
|
|
- List<IllegalChargeData> list = dao.queryHuanZheLiangCiRuYuanRiQi(param.getStart(), param.getEnd(), param.getResponces());
|
|
|
+ List<IllegalChargeData> list = dao.queryHuanZheLiangCiRuYuanRiQi(param.getStart(), param.getEnd(), param.getMedtypes());
|
|
|
if (list.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
|
|
|
}
|