|
|
@@ -1583,37 +1583,7 @@ public class SiQueryService {
|
|
|
}
|
|
|
|
|
|
public ResultVo<List<SetlStatisticResult>> selectSetlinfoStatistics(SetlCondition condition) {
|
|
|
- String begntime = condition.getMonth() + "-01 00:00:00.000";
|
|
|
- String endtime = DateUtil.getMonthEndtime(condition.getMonth());
|
|
|
- String insutype = condition.getInsutype();
|
|
|
- if (StringUtil.isBlank(insutype)) {
|
|
|
- insutype = "%%";
|
|
|
- }
|
|
|
- List<BaseSetlStatistics> baseStatistics;
|
|
|
- switch (condition.getAdmdvsType()) {
|
|
|
- case 1:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsInProvinceLevel(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsInChangshaCity(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsInProvinceOtherCities(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsOutProvince(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsInChangshaCounty(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsInLiuYangCity(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- default:
|
|
|
- baseStatistics = dao.selectBaseSetlStatisticsInAllPlaces(begntime, endtime, insutype, condition.getSetlType());
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
+ List<BaseSetlStatistics> baseStatistics = getBaseStatistics(condition);
|
|
|
if (null == baseStatistics || baseStatistics.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
|
|
|
}
|
|
|
@@ -1621,7 +1591,7 @@ public class SiQueryService {
|
|
|
Map<String, String> regionMap = new HashMap<>();
|
|
|
Map<String, List<BaseSetlStatistics>> admdvsSetldataMap = new HashMap<>();
|
|
|
|
|
|
- List<BaseSetlStatistics> shangChuanJieSuanDan = new ArrayList<>();
|
|
|
+ List<BaseSetlStatistics> setlListUpload = new ArrayList<>();
|
|
|
|
|
|
baseStatistics.forEach(itm -> {
|
|
|
itm.setInsutypeName(Insutype.getName(itm.getInsutype()));
|
|
|
@@ -1653,7 +1623,7 @@ public class SiQueryService {
|
|
|
admdvsSetldataMap.put(admdvsName, tempList);
|
|
|
}
|
|
|
itm.setMedTypeName(MedType.getName(itm.getMedType()));
|
|
|
- shangChuanJieSuanDan.add(itm);
|
|
|
+ setlListUpload.add(itm);
|
|
|
});
|
|
|
|
|
|
List<SetlStatisticResult> resultList = new ArrayList<>();
|
|
|
@@ -1709,10 +1679,35 @@ public class SiQueryService {
|
|
|
resultItem.setChildren(children);
|
|
|
}
|
|
|
}
|
|
|
- resultList.get(0).setShangChuanJieSuanDan(shangChuanJieSuanDan);
|
|
|
+ resultList.get(0).setShangChuanJieSuanDan(setlListUpload);
|
|
|
return ResultVoUtil.success(resultList);
|
|
|
}
|
|
|
|
|
|
+ private List<BaseSetlStatistics> getBaseStatistics(SetlCondition condition) {
|
|
|
+ String begntime = condition.getMonth() + "-01 00:00:00.000";
|
|
|
+ String endtime = DateUtil.getMonthEndtime(condition.getMonth());
|
|
|
+ String insutype = condition.getInsutype();
|
|
|
+ if (StringUtil.isBlank(insutype)) {
|
|
|
+ insutype = "%%";
|
|
|
+ }
|
|
|
+ switch (condition.getAdmdvsType()) {
|
|
|
+ case 1:
|
|
|
+ return dao.selectBaseSetlStatisticsInProvinceLevel(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ case 2:
|
|
|
+ return dao.selectBaseSetlStatisticsInChangshaCity(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ case 3:
|
|
|
+ return dao.selectBaseSetlStatisticsInProvinceOtherCities(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ case 4:
|
|
|
+ return dao.selectBaseSetlStatisticsOutProvince(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ case 5:
|
|
|
+ return dao.selectBaseSetlStatisticsInChangshaCounty(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ case 6:
|
|
|
+ return dao.selectBaseSetlStatisticsInLiuYangCity(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ default:
|
|
|
+ return dao.selectBaseSetlStatisticsInAllPlaces(begntime, endtime, insutype, condition.getSetlType());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void fillSetlStatisticResult(List<SetlStatisticResult> resultList, List<BaseSetlStatistics> admdvsSetldataList, SetlStatisticResult resultItem) {
|
|
|
String medfeeSumamt = "0";
|
|
|
String baseMedFundpaySumamt = "0";
|
|
|
@@ -1744,37 +1739,12 @@ public class SiQueryService {
|
|
|
public ResultVo<List<SiSetlinfo>> selectSetldetailStatistics(SetlCondition condition) {
|
|
|
String begntime = condition.getMonth() + "-01 00:00:00.000";
|
|
|
String endtime = DateUtil.getMonthEndtime(condition.getMonth());
|
|
|
- String admdvsCondition;
|
|
|
-
|
|
|
- switch (condition.getAdmdvsType()) {
|
|
|
- case 1:
|
|
|
- admdvsCondition = " and insuplc_admdvs='439900' ";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- admdvsCondition = " and insuplc_admdvs like '4301%' and insuplc_admdvs not in ('430121','430181') ";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- admdvsCondition = " and insuplc_admdvs like '43%' and insuplc_admdvs not like '4301%' ";
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- admdvsCondition = " and insuplc_admdvs not like '43%' ";
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- admdvsCondition = " and insuplc_admdvs='430121' ";
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- admdvsCondition = " and insuplc_admdvs='430181' ";
|
|
|
- break;
|
|
|
- default:
|
|
|
- admdvsCondition = "";
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
+ String admdvsStatement = getAdmdvsStatement(condition.getAdmdvsType());
|
|
|
String insutype = condition.getInsutype();
|
|
|
if (StringUtil.isBlank(insutype)) {
|
|
|
insutype = "%%";
|
|
|
}
|
|
|
- List<SiSetlinfo> list = setlinfoDao.selectMyList(condition.getSetlType(), insutype, admdvsCondition, begntime, endtime);
|
|
|
+ List<SiSetlinfo> list = setlinfoDao.selectMyList(condition.getSetlType(), insutype, admdvsStatement, begntime, endtime);
|
|
|
list.forEach(item -> {
|
|
|
if (null != item.getHospPartAmt()) {
|
|
|
item.setFundPaySumamt(DecimalUtil.minusDouble(item.getFundPaySumamt(), item.getHospPartAmt()));
|
|
|
@@ -1785,6 +1755,25 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.success(list);
|
|
|
}
|
|
|
|
|
|
+ private String getAdmdvsStatement(int admdvstype) {
|
|
|
+ switch (admdvstype) {
|
|
|
+ case 1:
|
|
|
+ return " and insuplc_admdvs='439900' ";
|
|
|
+ case 2:
|
|
|
+ return " and insuplc_admdvs like '4301%' and insuplc_admdvs not in ('430121','430181') ";
|
|
|
+ case 3:
|
|
|
+ return " and insuplc_admdvs like '43%' and insuplc_admdvs not like '4301%' ";
|
|
|
+ case 4:
|
|
|
+ return " and insuplc_admdvs not like '43%' ";
|
|
|
+ case 5:
|
|
|
+ return " and insuplc_admdvs='430121' ";
|
|
|
+ case 6:
|
|
|
+ return " and insuplc_admdvs='430181' ";
|
|
|
+ default:
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<List<ZyActpatient>> weiJieSuanZaiYuanHuanZhe(String patNo, String startTime, String endTime, String name, String certno) {
|
|
|
List<ZyActpatient> actpatients = dao.zaiYuanHuanZheXinXi(patNo, startTime, endTime, StringUtil.isContainChinese(name), certno);
|
|
|
Map<String, String> insuplcAdmdvs = new HashMap<>();
|