|
@@ -18,10 +18,7 @@ import thyyxxk.webserver.entity.medicalinsurance.query.*;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SiSetldetail;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SiSetlinfo;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setlinfo.TimesList;
|
|
|
-import thyyxxk.webserver.entity.medicalinsurance.setllist.BrfChrgitm;
|
|
|
-import thyyxxk.webserver.entity.medicalinsurance.setllist.CuminfoInYear;
|
|
|
-import thyyxxk.webserver.entity.medicalinsurance.setllist.InptntSetlmtLst;
|
|
|
-import thyyxxk.webserver.entity.medicalinsurance.setllist.OtptntSetlmtLst;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.setllist.*;
|
|
|
import thyyxxk.webserver.entity.inpatient.ZyActpatient;
|
|
|
import thyyxxk.webserver.service.redislike.RedisLikeService;
|
|
|
import thyyxxk.webserver.service.wxapi.SendWxInfoService;
|
|
@@ -847,7 +844,7 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.success(dao.selectInsuplcAdmdvsByMdtrtId(mdtrtId));
|
|
|
}
|
|
|
|
|
|
- public ResultVo querySiSetlList(SetlIndex index) {
|
|
|
+ public ResultVo<InptntSetlmtLst> queryInpatientSetlList(SetlIndex index) {
|
|
|
if (null == index.getTimes() && StringUtil.isBlank(index.getLabel())) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "结算条目不能为空!");
|
|
|
}
|
|
@@ -855,11 +852,7 @@ public class SiQueryService {
|
|
|
String[] arr = index.getLabel().split("_");
|
|
|
index.setSetlId(arr[0]);
|
|
|
index.setTimes(Integer.parseInt(arr[1]));
|
|
|
- if (index.getType() == SetlType.INPATIENT.getCode()) {
|
|
|
- index.setLedgerSn(Integer.parseInt(arr[2]));
|
|
|
- } else {
|
|
|
- index.setLedgerSn(0);
|
|
|
- }
|
|
|
+ index.setLedgerSn(Integer.parseInt(arr[2]));
|
|
|
} else {
|
|
|
index.setLedgerSn(0);
|
|
|
index.setSetlId(dao.selectSetlId(index.getPatNo(), index.getTimes(), index.getLedgerSn()));
|
|
@@ -872,78 +865,105 @@ public class SiQueryService {
|
|
|
if (cuminfo.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, cuminfo.getMessage());
|
|
|
}
|
|
|
- if (index.getType() == SetlType.INPATIENT.getCode()) {
|
|
|
- InptntSetlmtLst lst = dao.selectZySetlinfo(index.getSetlId(), "zy_inactpatient");
|
|
|
+ InptntSetlmtLst lst = dao.selectZySetlinfo(index.getSetlId(), "zy_inactpatient");
|
|
|
+ if (null == lst) {
|
|
|
+ lst = dao.selectZySetlinfo(index.getSetlId(), "zy_actpatient");
|
|
|
if (null == lst) {
|
|
|
- lst = dao.selectZySetlinfo(index.getSetlId(), "zy_actpatient");
|
|
|
- if (null == lst) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到此患者的结算信息!");
|
|
|
- }
|
|
|
- }
|
|
|
- lst.setInHospdays(DateUtil.daysBetween(lst.getEndtime(), lst.getBegntime()));
|
|
|
- PsnIdetType psnIdetType = PsnIdetType.get(lst.getPsnIdetType());
|
|
|
- if (null != psnIdetType) {
|
|
|
- lst.setPsnIdetTypeName(psnIdetType.getName());
|
|
|
- }
|
|
|
- Admdvs admdvs = Admdvs.get(lst.getInsuplcAdmdvs());
|
|
|
- if (null == admdvs) {
|
|
|
- lst.setInsuplcAdmdvsName(redis.getRegionName(lst.getInsuplcAdmdvs()));
|
|
|
- } else {
|
|
|
- lst.setInsuplcAdmdvsName(admdvs.getName());
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到此患者的结算信息!");
|
|
|
}
|
|
|
- lst.setFixmedinsName(SiUtil.INSTITUTION_NAME);
|
|
|
- lst.setGendName(Gend.get(lst.getGend()).getName());
|
|
|
- SiEnumReflectUtil.inptntSetlmtLstReflect(lst);
|
|
|
- ResultVo<List<SiSetlFeeDetl>> chrgrsvo = getChrgitems(lst.getPsnNo(), lst.getSetlId(), lst.getMdtrtId(), lst.getInsuplcAdmdvs());
|
|
|
- if (!chrgrsvo.getCode().equals(ExceptionEnum.SUCCESS.getCode())) {
|
|
|
- return chrgrsvo;
|
|
|
- }
|
|
|
- analyzeZyChrgitm(lst, chrgrsvo.getData());
|
|
|
- lst.setYrAdmtimes(cuminfo.getYearAdmtimesZy());
|
|
|
- lst.setYrAcmltvExpsClted(cuminfo.getYearPeriodfeeSumamtZy());
|
|
|
- lst.setYrMedfeeSumamt(cuminfo.getYearMedfeesumZy());
|
|
|
- lst.setYrPayedBegnLine(cuminfo.getYearPayedBegnlineZy());
|
|
|
- lst.setYrFundPaySumamt(cuminfo.getYearBaseFundPayAmtZy());
|
|
|
- lst.setYrBigAmtFundPay(cuminfo.getYearBigAmtpaysZy());
|
|
|
- lst.setYrBigDssInsPay(cuminfo.getYearBigdssFundPayAmtZy());
|
|
|
- lst.setYrMafPay(cuminfo.getYearMafPayAmtZy());
|
|
|
- lst.setYrPolicySelfPay(cuminfo.getYearPolicySelfPayZy());
|
|
|
- lst.setYrPreSelfPay(cuminfo.getYearPreSelfPayZy());
|
|
|
- lst.setYrBigDssFee(cuminfo.getYearBigDssLegalFee());
|
|
|
- return listPolItemCodePayInfo(lst);
|
|
|
+ }
|
|
|
+ lst.setInHospdays(DateUtil.daysBetween(lst.getEndtime(), lst.getBegntime()));
|
|
|
+ PsnIdetType psnIdetType = PsnIdetType.get(lst.getPsnIdetType());
|
|
|
+ if (null != psnIdetType) {
|
|
|
+ lst.setPsnIdetTypeName(psnIdetType.getName());
|
|
|
+ }
|
|
|
+ Admdvs admdvs = Admdvs.get(lst.getInsuplcAdmdvs());
|
|
|
+ if (null == admdvs) {
|
|
|
+ lst.setInsuplcAdmdvsName(redis.getRegionName(lst.getInsuplcAdmdvs()));
|
|
|
} else {
|
|
|
+ lst.setInsuplcAdmdvsName(admdvs.getName());
|
|
|
+ }
|
|
|
+ lst.setFixmedinsName(SiUtil.INSTITUTION_NAME);
|
|
|
+ lst.setGendName(Gend.get(lst.getGend()).getName());
|
|
|
+ SiEnumReflectUtil.inptntSetlmtLstReflect(lst);
|
|
|
+ ResultVo<List<SiSetlFeeDetl>> chrgrsvo = getChrgitems(lst.getPsnNo(), lst.getSetlId(), lst.getMdtrtId(), lst.getInsuplcAdmdvs());
|
|
|
+ if (!chrgrsvo.getCode().equals(ExceptionEnum.SUCCESS.getCode())) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, chrgrsvo.getMessage());
|
|
|
+ }
|
|
|
+ ChrgItemLvInfo chrgItemLvInfo = analyzeParticularChrgitmLv(chrgrsvo.getData());
|
|
|
+ lst.setChrgItemLvInfo(chrgItemLvInfo);
|
|
|
+ lst.setCuminfo(cuminfo);
|
|
|
+ ResultVo<PolItemInfo> polItemRes = listPolItemCodePayInfo(lst.getPsnNo(), lst.getMdtrtId(), lst.getSetlId(), lst.getInsuplcAdmdvs());
|
|
|
+ if (polItemRes.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, polItemRes.getMessage());
|
|
|
+ }
|
|
|
+ lst.setPolItemInfo(polItemRes.getData());
|
|
|
+ return ResultVoUtil.success(lst);
|
|
|
+ }
|
|
|
+
|
|
|
+ public ResultVo<OtptntSetlmtLst> queryOutpatientSetlList(SetlIndex index) {
|
|
|
+ if (null == index.getTimes() && StringUtil.isBlank(index.getLabel())) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "结算条目不能为空!");
|
|
|
+ }
|
|
|
+ if (StringUtil.notBlank(index.getLabel())) {
|
|
|
+ String[] arr = index.getLabel().split("_");
|
|
|
+ index.setSetlId(arr[0]);
|
|
|
+ index.setTimes(Integer.parseInt(arr[1]));
|
|
|
index.setLedgerSn(0);
|
|
|
- OtptntSetlmtLst lst = dao.selectMzSetlifo(index.getPatNo(), index.getTimes());
|
|
|
- if (null == lst) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到此患者的结算信息!");
|
|
|
+ } else {
|
|
|
+ index.setLedgerSn(0);
|
|
|
+ index.setSetlId(dao.selectSetlId(index.getPatNo(), index.getTimes(), index.getLedgerSn()));
|
|
|
+ }
|
|
|
+ SiPatInfo siPatInfo = dao.selectSiPatInfo(index.getPatNo(), index.getTimes(), index.getLedgerSn());
|
|
|
+ if (null == siPatInfo) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到此患者的结算信息!");
|
|
|
+ }
|
|
|
+ CuminfoInYear cuminfo = getYearCuminfo(siPatInfo.getPsnNo(), siPatInfo.getInsuplcAdmdvs());
|
|
|
+ if (cuminfo.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, cuminfo.getMessage());
|
|
|
+ }
|
|
|
+ index.setLedgerSn(0);
|
|
|
+ OtptntSetlmtLst lst = dao.selectMzSetlifo(index.getPatNo(), index.getTimes());
|
|
|
+ if (null == lst) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到此患者的结算信息!");
|
|
|
+ }
|
|
|
+ lst.setPsnCertTypeName(PsnCertType.get(lst.getPsnCertType()).getName());
|
|
|
+ lst.setPsnIdetTypeName(PsnIdetType.getName(lst.getPsnIdetType()));
|
|
|
+ Admdvs admdvs = Admdvs.get(lst.getInsuplcAdmdvs());
|
|
|
+ if (null == admdvs) {
|
|
|
+ lst.setInsuplcAdmdvsName(redis.getRegionName(lst.getInsuplcAdmdvs()));
|
|
|
+ } else {
|
|
|
+ lst.setInsuplcAdmdvsName(admdvs.getName());
|
|
|
+ }
|
|
|
+ SiEnumReflectUtil.outptntSetlmtLstReflect(lst);
|
|
|
+ List<BrfChrgitm> chrgitms = dao.selectMzBrfChrgitms(index.getPatNo(), index.getTimes());
|
|
|
+ lst.setCuminfo(cuminfo);
|
|
|
+ lst.setFixmedinsName(SiUtil.INSTITUTION_NAME);
|
|
|
+ Insutype insutype = Insutype.get(lst.getInsutype());
|
|
|
+ if (insutype == Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES) {
|
|
|
+ ResultVo<List<SiSetlFeeDetl>> chrgrsvo = getChrgitems(lst.getPsnNo(), lst.getSetlId(), lst.getMdtrtId(), lst.getInsuplcAdmdvs());
|
|
|
+ if (!chrgrsvo.getCode().equals(ExceptionEnum.SUCCESS.getCode())) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, chrgrsvo.getMessage());
|
|
|
}
|
|
|
- Admdvs admdvs = Admdvs.get(lst.getInsuplcAdmdvs());
|
|
|
- if (null == admdvs) {
|
|
|
- lst.setInsuplcAdmdvsName(redis.getRegionName(lst.getInsuplcAdmdvs()));
|
|
|
- } else {
|
|
|
- lst.setInsuplcAdmdvsName(admdvs.getName());
|
|
|
+ ChrgItemLvInfo chrgItemLvInfo = analyzeParticularChrgitmLv(chrgrsvo.getData());
|
|
|
+ lst.setChrgItemLvInfo(chrgItemLvInfo);
|
|
|
+ ResultVo<PolItemInfo> polItemRes = listPolItemCodePayInfo(lst.getPsnNo(), lst.getMdtrtId(), lst.getSetlId(), lst.getInsuplcAdmdvs());
|
|
|
+ if (polItemRes.getCode() != ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, polItemRes.getMessage());
|
|
|
}
|
|
|
- SiEnumReflectUtil.outptntSetlmtLstReflect(lst);
|
|
|
- List<BrfChrgitm> chrgitms = dao.selectMzBrfChrgitms(index.getPatNo(), index.getTimes());
|
|
|
+ lst.setPolItemInfo(polItemRes.getData());
|
|
|
+ } else {
|
|
|
analyzeMzChrgitm(lst, chrgitms);
|
|
|
- lst.setYrAdmtimes(cuminfo.getYearAdmtimesMz());
|
|
|
- lst.setYrMedfeeSumamt(cuminfo.getYearMedfeesumMz());
|
|
|
- lst.setYrFundPaySumamt(cuminfo.getYearBaseFundPayAmtMz());
|
|
|
- lst.setYrBigAmtFundPay(cuminfo.getYearBigAmtpaysMz());
|
|
|
- lst.setYrBigDssFundPay(cuminfo.getYearBigdssFundPayAmtMz());
|
|
|
- lst.setYrAcctPay(cuminfo.getYearAcctPayMz());
|
|
|
- lst.setYrMafPay(cuminfo.getYearMafPayAmtMz());
|
|
|
- lst.setFixmedinsName(SiUtil.INSTITUTION_NAME);
|
|
|
- return ResultVoUtil.success(lst);
|
|
|
}
|
|
|
+ return ResultVoUtil.success(lst);
|
|
|
}
|
|
|
|
|
|
- private ResultVo<InptntSetlmtLst> listPolItemCodePayInfo(InptntSetlmtLst lst) {
|
|
|
- JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.LIST_POL_ITEM_CODE_PAY_INFO, lst.getInsuplcAdmdvs());
|
|
|
+ private ResultVo<PolItemInfo> listPolItemCodePayInfo(String psnNo, String mdtrtId, String setlId, String insuplc) {
|
|
|
+ JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.LIST_POL_ITEM_CODE_PAY_INFO, insuplc);
|
|
|
JSONObject data = new JSONObject();
|
|
|
- data.put("psn_no", lst.getPsnNo());
|
|
|
- data.put("mdtrt_id", lst.getMdtrtId());
|
|
|
- data.put("setl_id", lst.getSetlId());
|
|
|
+ data.put("psn_no", psnNo);
|
|
|
+ data.put("mdtrt_id", mdtrtId);
|
|
|
+ data.put("setl_id", setlId);
|
|
|
input.getJSONObject("input").put("data", data);
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.LIST_POL_ITEM_CODE_PAY_INFO);
|
|
|
log.info("【操作员:{}】,政策信息查询:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
|
|
@@ -964,6 +984,7 @@ public class SiQueryService {
|
|
|
}
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心出错:" + message);
|
|
|
}
|
|
|
+ PolItemInfo polItemInfo = new PolItemInfo();
|
|
|
JSONArray array = result.getJSONArray("data");
|
|
|
BigDecimal selfPaySum = new BigDecimal(0);
|
|
|
BigDecimal fundPaySum = new BigDecimal(0);
|
|
@@ -986,88 +1007,88 @@ public class SiQueryService {
|
|
|
}
|
|
|
switch (polItemCode) {
|
|
|
case QZF:
|
|
|
- lst.setSelfPayPsnAmt(selfPayAmt);
|
|
|
- lst.setSelfPayPsnProp(selfPayProp);
|
|
|
- lst.setSelfPayFundAmt(fundPayAmt);
|
|
|
- lst.setSelfPayFundProp(fundPayProp);
|
|
|
- lst.setSelfPaySum(polItemPaySum);
|
|
|
+ polItemInfo.setSelfPayPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setSelfPayPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setSelfPayFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setSelfPayFundProp(fundPayProp);
|
|
|
+ polItemInfo.setSelfPaySum(polItemPaySum);
|
|
|
break;
|
|
|
case YLXZF:
|
|
|
- lst.setScndPrePayPsnAmt(selfPayAmt);
|
|
|
- lst.setScndPrePayPsnProp(selfPayProp);
|
|
|
- lst.setScndPrePayFundAmt(fundPayAmt);
|
|
|
- lst.setScndPrePayFundProp(fundPayProp);
|
|
|
- lst.setScndPrePaySum(polItemPaySum);
|
|
|
+ polItemInfo.setScndPrePayPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setScndPrePayPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setScndPrePayFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setScndPrePayFundProp(fundPayProp);
|
|
|
+ polItemInfo.setScndPrePaySum(polItemPaySum);
|
|
|
break;
|
|
|
case CXEZF:
|
|
|
- lst.setOvrlmtSelfPayPsnAmt(selfPayAmt);
|
|
|
- lst.setOvrlmtSelfPayPsnProp(selfPayProp);
|
|
|
- lst.setOvrlmtSelfPayFundAmt(fundPayAmt);
|
|
|
- lst.setOvrlmtSelfPayFundProp(fundPayProp);
|
|
|
- lst.setOvrlmtSelfPaySum(polItemPaySum);
|
|
|
+ polItemInfo.setOvrlmtSelfPayPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setOvrlmtSelfPayPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setOvrlmtSelfPayFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setOvrlmtSelfPayFundProp(fundPayProp);
|
|
|
+ polItemInfo.setOvrlmtSelfPaySum(polItemPaySum);
|
|
|
break;
|
|
|
case BCYFQFBZ:
|
|
|
- lst.setBegnlinePsnAmt(selfPayAmt);
|
|
|
- lst.setBegnlinePsnProp(selfPayProp);
|
|
|
- lst.setBegnlineFundAmt(fundPayAmt);
|
|
|
- lst.setBegnlineFundProp(fundPayProp);
|
|
|
- lst.setBegnlineSum(polItemPaySum);
|
|
|
+ polItemInfo.setBegnlinePsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setBegnlinePsnProp(selfPayProp);
|
|
|
+ polItemInfo.setBegnlineFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setBegnlineFundProp(fundPayProp);
|
|
|
+ polItemInfo.setBegnlineSum(polItemPaySum);
|
|
|
break;
|
|
|
case TCYD:
|
|
|
- lst.setFundFrstLvPsnAmt(selfPayAmt);
|
|
|
- lst.setFundFrstLvPsnProp(selfPayProp);
|
|
|
- lst.setFundFrstLvFundAmt(fundPayAmt);
|
|
|
- lst.setFundFrstLvFundProp(fundPayProp);
|
|
|
- lst.setFundFrstLvSum(polItemPaySum);
|
|
|
+ polItemInfo.setFundFrstLvPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setFundFrstLvPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setFundFrstLvFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setFundFrstLvFundProp(fundPayProp);
|
|
|
+ polItemInfo.setFundFrstLvSum(polItemPaySum);
|
|
|
break;
|
|
|
case TCED:
|
|
|
- lst.setFundScndLvPsnAmt(selfPayAmt);
|
|
|
- lst.setFundScndLvPsnProp(selfPayProp);
|
|
|
- lst.setFundScndLvFundAmt(fundPayAmt);
|
|
|
- lst.setFundScndLvFundProp(fundPayProp);
|
|
|
- lst.setFundScndLvSum(polItemPaySum);
|
|
|
+ polItemInfo.setFundScndLvPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setFundScndLvPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setFundScndLvFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setFundScndLvFundProp(fundPayProp);
|
|
|
+ polItemInfo.setFundScndLvSum(polItemPaySum);
|
|
|
break;
|
|
|
case TCSD:
|
|
|
- lst.setFundThrdLvPsnAmt(selfPayAmt);
|
|
|
- lst.setFundThrdLvPsnProp(selfPayProp);
|
|
|
- lst.setFundThrdLvFundAmt(fundPayAmt);
|
|
|
- lst.setFundThrdLvFundProp(fundPayProp);
|
|
|
- lst.setFundThrdLvSum(polItemPaySum);
|
|
|
+ polItemInfo.setFundThrdLvPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setFundThrdLvPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setFundThrdLvFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setFundThrdLvFundProp(fundPayProp);
|
|
|
+ polItemInfo.setFundThrdLvSum(polItemPaySum);
|
|
|
break;
|
|
|
case DEYD:
|
|
|
- lst.setBigAmtFrstLvPsnAmt(selfPayAmt);
|
|
|
- lst.setBigAmtFrstLvPsnProp(selfPayProp);
|
|
|
- lst.setBigAmtFrstLvFundAmt(fundPayAmt);
|
|
|
- lst.setBigAmtFrstLvFundProp(fundPayProp);
|
|
|
- lst.setBigAmtFrstLvSum(polItemPaySum);
|
|
|
+ polItemInfo.setBigAmtFrstLvPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setBigAmtFrstLvPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setBigAmtFrstLvFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setBigAmtFrstLvFundProp(fundPayProp);
|
|
|
+ polItemInfo.setBigAmtFrstLvSum(polItemPaySum);
|
|
|
break;
|
|
|
case STDTCZF:
|
|
|
- lst.setDualChannelFundPsnAmt(selfPayAmt);
|
|
|
- lst.setDualChannelFundPsnProp(selfPayProp);
|
|
|
- lst.setDualChannelFundFundAmt(fundPayAmt);
|
|
|
- lst.setDualChannelFundFundProp(fundPayProp);
|
|
|
- lst.setDualChannelFundSum(polItemPaySum);
|
|
|
+ polItemInfo.setDualChannelFundPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setDualChannelFundPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setDualChannelFundFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setDualChannelFundFundProp(fundPayProp);
|
|
|
+ polItemInfo.setDualChannelFundSum(polItemPaySum);
|
|
|
break;
|
|
|
case STDDEZF:
|
|
|
- lst.setDualChannelBigAmtPsnAmt(selfPayAmt);
|
|
|
- lst.setDualChannelBigAmtPsnProp(selfPayProp);
|
|
|
- lst.setDualChannelBigAmtFundAmt(fundPayAmt);
|
|
|
- lst.setDualChannelBigAmtFundProp(fundPayProp);
|
|
|
- lst.setDualChannelBigAmtSum(polItemPaySum);
|
|
|
+ polItemInfo.setDualChannelBigAmtPsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setDualChannelBigAmtPsnProp(selfPayProp);
|
|
|
+ polItemInfo.setDualChannelBigAmtFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setDualChannelBigAmtFundProp(fundPayProp);
|
|
|
+ polItemInfo.setDualChannelBigAmtSum(polItemPaySum);
|
|
|
break;
|
|
|
case ZWZL:
|
|
|
- lst.setExternalSelfHandlePsnAmt(selfPayAmt);
|
|
|
- lst.setExternalSelfHandlePsnProp(selfPayProp);
|
|
|
- lst.setExternalSelfHandleFundAmt(fundPayAmt);
|
|
|
- lst.setExternalSelfHandleFundProp(fundPayProp);
|
|
|
- lst.setExternalSelfHandleSum(polItemPaySum);
|
|
|
+ polItemInfo.setExternalSelfHandlePsnAmt(selfPayAmt);
|
|
|
+ polItemInfo.setExternalSelfHandlePsnProp(selfPayProp);
|
|
|
+ polItemInfo.setExternalSelfHandleFundAmt(fundPayAmt);
|
|
|
+ polItemInfo.setExternalSelfHandleFundProp(fundPayProp);
|
|
|
+ polItemInfo.setExternalSelfHandleSum(polItemPaySum);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- lst.setAllPsnAmt(selfPaySum);
|
|
|
- lst.setAllFundAmt(fundPaySum);
|
|
|
- lst.setAllSum(fundPaySum.add(selfPaySum));
|
|
|
- return ResultVoUtil.success(lst);
|
|
|
+ polItemInfo.setAllPsnAmt(selfPaySum);
|
|
|
+ polItemInfo.setAllFundAmt(fundPaySum);
|
|
|
+ polItemInfo.setAllSum(fundPaySum.add(selfPaySum));
|
|
|
+ return ResultVoUtil.success(polItemInfo);
|
|
|
}
|
|
|
|
|
|
private CuminfoInYear getYearCuminfo(String psnNo, String admdvs) {
|
|
@@ -1319,7 +1340,10 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到费用明细。");
|
|
|
}
|
|
|
for (int i = 0; i < output.size(); i++) {
|
|
|
- SiSetlFeeDetl fee = JSONObject.parseObject(output.getJSONObject(i).toJSONString(), SiSetlFeeDetl.class);
|
|
|
+ JSONObject feeItem = output.getJSONObject(i);
|
|
|
+ String[] mzFeeDetlSn = feeItem.getString("feedetl_sn").split("_");
|
|
|
+ feeItem.replace("feedetl_sn", Integer.parseInt(mzFeeDetlSn[mzFeeDetlSn.length - 1]));
|
|
|
+ SiSetlFeeDetl fee = JSONObject.parseObject(feeItem.toJSONString(), SiSetlFeeDetl.class);
|
|
|
if (StringUtil.isBlank(fee.getSetlId())) {
|
|
|
fee.setSetlId(setlId);
|
|
|
}
|
|
@@ -1337,11 +1361,12 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, result.getString(ERROR_MESSAGE));
|
|
|
}
|
|
|
|
|
|
- private void analyzeZyChrgitm(InptntSetlmtLst lst, List<SiSetlFeeDetl> chrgitms) {
|
|
|
+ private ChrgItemLvInfo analyzeParticularChrgitmLv(List<SiSetlFeeDetl> chrgitms) {
|
|
|
Map<String, BigDecimal> map = new HashMap<>();
|
|
|
map.put("allfeeSum", new BigDecimal(0));
|
|
|
map.put("totalFrst", new BigDecimal(0));
|
|
|
map.put("totalScnd", new BigDecimal(0));
|
|
|
+ map.put("totalThrd", new BigDecimal(0));
|
|
|
chrgitms.forEach(itm -> {
|
|
|
BigDecimal itmfeeSum = new BigDecimal(itm.getDetItemFeeSumamt());
|
|
|
map.replace("allfeeSum", map.get("allfeeSum").add(itmfeeSum));
|
|
@@ -1349,6 +1374,8 @@ public class SiQueryService {
|
|
|
map.replace("totalFrst", map.get("totalFrst").add(itmfeeSum));
|
|
|
} else if (itm.getChrgitmLv().equals(ChrgitmLv.SECOND_CLASS.getCode())) {
|
|
|
map.replace("totalScnd", map.get("totalScnd").add(itmfeeSum));
|
|
|
+ } else {
|
|
|
+ map.replace("totalThrd", map.get("totalThrd").add(itmfeeSum));
|
|
|
}
|
|
|
String typeKey = itm.getMedChrgitmType();
|
|
|
String lvKey = typeKey + "-" + itm.getChrgitmLv();
|
|
@@ -1363,51 +1390,68 @@ public class SiQueryService {
|
|
|
map.put(lvKey, itmfeeSum);
|
|
|
}
|
|
|
});
|
|
|
- lst.setAllfeeSum(map.get("allfeeSum"));
|
|
|
- lst.setAllfeeFrst(map.get("totalFrst"));
|
|
|
- lst.setAllfeeScnd(map.get("totalScnd"));
|
|
|
- lst.setWestMedFeeSum(map.get("09"));
|
|
|
- lst.setWestMedFeeFrst(map.get("09-01"));
|
|
|
- lst.setWestMedFeeScnd(map.get("09-02"));
|
|
|
- lst.setHerbalSum(map.get("10"));
|
|
|
- lst.setHerbalFrst(map.get("10-01"));
|
|
|
- lst.setHerbalScnd(map.get("10-02"));
|
|
|
- lst.setChnsPtntSum(map.get("11"));
|
|
|
- lst.setChnsPtntFrst(map.get("11-01"));
|
|
|
- lst.setChnsPtntScnd(map.get("11-02"));
|
|
|
- lst.setClinicSum(map.get("02"));
|
|
|
- lst.setClinicFrst(map.get("02-01"));
|
|
|
- lst.setClinicScnd(map.get("02-02"));
|
|
|
- lst.setTreatSum(map.get("05"));
|
|
|
- lst.setTreatFrst(map.get("05-01"));
|
|
|
- lst.setTreatScnd(map.get("05-02"));
|
|
|
- lst.setSurgerySum(map.get("06"));
|
|
|
- lst.setSurgeryFrst(map.get("06-01"));
|
|
|
- lst.setSurgeryScnd(map.get("06-02"));
|
|
|
- lst.setNursingSum(map.get("07"));
|
|
|
- lst.setNursingFrst(map.get("07-01"));
|
|
|
- lst.setNursingScnd(map.get("07-02"));
|
|
|
- lst.setSntryMtrlsSum(map.get("08"));
|
|
|
- lst.setSntryMtrlsFrst(map.get("08-01"));
|
|
|
- lst.setSntryMtrlsScnd(map.get("08-02"));
|
|
|
- lst.setExamSum(map.get("04"));
|
|
|
- lst.setExamFrst(map.get("04-01"));
|
|
|
- lst.setExamScnd(map.get("04-02"));
|
|
|
- lst.setNrmlTrtmtSum(map.get("12"));
|
|
|
- lst.setNrmlTrtmtFrst(map.get("12-01"));
|
|
|
- lst.setNrmlTrtmtScnd(map.get("12-02"));
|
|
|
- lst.setInspectSum(map.get("03"));
|
|
|
- lst.setInspectFrst(map.get("03-01"));
|
|
|
- lst.setInspectScnd(map.get("03-02"));
|
|
|
- lst.setRegisterSum(map.get("13"));
|
|
|
- lst.setRegisterFrst(map.get("13-01"));
|
|
|
- lst.setRegisterScnd(map.get("13-02"));
|
|
|
- lst.setBedfeeSum(map.get("01"));
|
|
|
- lst.setBedfeeFrst(map.get("01-01"));
|
|
|
- lst.setBedfeeScnd(map.get("01-02"));
|
|
|
- lst.setOthfeeSum(map.get("14"));
|
|
|
- lst.setOthfeeFrst(map.get("14-01"));
|
|
|
- lst.setOthfeeScnd(map.get("14-02"));
|
|
|
+ ChrgItemLvInfo chrgItemLvInfo = new ChrgItemLvInfo();
|
|
|
+ chrgItemLvInfo.setAllfeeSum(map.get("allfeeSum"));
|
|
|
+ chrgItemLvInfo.setAllfeeFrst(map.get("totalFrst"));
|
|
|
+ chrgItemLvInfo.setAllfeeScnd(map.get("totalScnd"));
|
|
|
+ chrgItemLvInfo.setAllfeeThrd(map.get("totalThrd"));
|
|
|
+ chrgItemLvInfo.setWestMedFeeSum(map.get("09"));
|
|
|
+ chrgItemLvInfo.setWestMedFeeFrst(map.get("09-01"));
|
|
|
+ chrgItemLvInfo.setWestMedFeeScnd(map.get("09-02"));
|
|
|
+ chrgItemLvInfo.setWestMedFeeThrd(map.get("09-03"));
|
|
|
+ chrgItemLvInfo.setHerbalSum(map.get("10"));
|
|
|
+ chrgItemLvInfo.setHerbalFrst(map.get("10-01"));
|
|
|
+ chrgItemLvInfo.setHerbalScnd(map.get("10-02"));
|
|
|
+ chrgItemLvInfo.setHerbalThrd(map.get("10-03"));
|
|
|
+ chrgItemLvInfo.setChnsPtntSum(map.get("11"));
|
|
|
+ chrgItemLvInfo.setChnsPtntFrst(map.get("11-01"));
|
|
|
+ chrgItemLvInfo.setChnsPtntScnd(map.get("11-02"));
|
|
|
+ chrgItemLvInfo.setChnsPtntThrd(map.get("11-03"));
|
|
|
+ chrgItemLvInfo.setClinicSum(map.get("02"));
|
|
|
+ chrgItemLvInfo.setClinicFrst(map.get("02-01"));
|
|
|
+ chrgItemLvInfo.setClinicScnd(map.get("02-02"));
|
|
|
+ chrgItemLvInfo.setClinicThrd(map.get("02-03"));
|
|
|
+ chrgItemLvInfo.setTreatSum(map.get("05"));
|
|
|
+ chrgItemLvInfo.setTreatFrst(map.get("05-01"));
|
|
|
+ chrgItemLvInfo.setTreatScnd(map.get("05-02"));
|
|
|
+ chrgItemLvInfo.setTreatThrd(map.get("05-03"));
|
|
|
+ chrgItemLvInfo.setSurgerySum(map.get("06"));
|
|
|
+ chrgItemLvInfo.setSurgeryFrst(map.get("06-01"));
|
|
|
+ chrgItemLvInfo.setSurgeryScnd(map.get("06-02"));
|
|
|
+ chrgItemLvInfo.setSurgeryThrd(map.get("06-03"));
|
|
|
+ chrgItemLvInfo.setNursingSum(map.get("07"));
|
|
|
+ chrgItemLvInfo.setNursingFrst(map.get("07-01"));
|
|
|
+ chrgItemLvInfo.setNursingScnd(map.get("07-02"));
|
|
|
+ chrgItemLvInfo.setNursingThrd(map.get("07-03"));
|
|
|
+ chrgItemLvInfo.setSntryMtrlsSum(map.get("08"));
|
|
|
+ chrgItemLvInfo.setSntryMtrlsFrst(map.get("08-01"));
|
|
|
+ chrgItemLvInfo.setSntryMtrlsScnd(map.get("08-02"));
|
|
|
+ chrgItemLvInfo.setSntryMtrlsThrd(map.get("08-03"));
|
|
|
+ chrgItemLvInfo.setExamSum(map.get("04"));
|
|
|
+ chrgItemLvInfo.setExamFrst(map.get("04-01"));
|
|
|
+ chrgItemLvInfo.setExamScnd(map.get("04-02"));
|
|
|
+ chrgItemLvInfo.setExamThrd(map.get("04-03"));
|
|
|
+ chrgItemLvInfo.setNrmlTrtmtSum(map.get("12"));
|
|
|
+ chrgItemLvInfo.setNrmlTrtmtFrst(map.get("12-01"));
|
|
|
+ chrgItemLvInfo.setNrmlTrtmtScnd(map.get("12-02"));
|
|
|
+ chrgItemLvInfo.setNrmlTrtmtThrd(map.get("12-03"));
|
|
|
+ chrgItemLvInfo.setInspectSum(map.get("03"));
|
|
|
+ chrgItemLvInfo.setInspectFrst(map.get("03-01"));
|
|
|
+ chrgItemLvInfo.setInspectScnd(map.get("03-02"));
|
|
|
+ chrgItemLvInfo.setInspectThrd(map.get("03-03"));
|
|
|
+ chrgItemLvInfo.setRegisterSum(map.get("13"));
|
|
|
+ chrgItemLvInfo.setRegisterFrst(map.get("13-01"));
|
|
|
+ chrgItemLvInfo.setRegisterScnd(map.get("13-02"));
|
|
|
+ chrgItemLvInfo.setRegisterThrd(map.get("13-03"));
|
|
|
+ chrgItemLvInfo.setBedfeeSum(map.get("01"));
|
|
|
+ chrgItemLvInfo.setBedfeeFrst(map.get("01-01"));
|
|
|
+ chrgItemLvInfo.setBedfeeScnd(map.get("01-02"));
|
|
|
+ chrgItemLvInfo.setBedfeeThrd(map.get("01-03"));
|
|
|
+ chrgItemLvInfo.setOthfeeSum(map.get("14"));
|
|
|
+ chrgItemLvInfo.setOthfeeFrst(map.get("14-01"));
|
|
|
+ chrgItemLvInfo.setOthfeeScnd(map.get("14-02"));
|
|
|
+ chrgItemLvInfo.setOthfeeThrd(map.get("14-03"));
|
|
|
+ return chrgItemLvInfo;
|
|
|
}
|
|
|
|
|
|
private void analyzeMzChrgitm(OtptntSetlmtLst lst, List<BrfChrgitm> chrgitms) {
|