|
@@ -994,113 +994,18 @@ public class SiQueryService {
|
|
|
JSONArray array = result.getJSONArray("data");
|
|
|
BigDecimal selfPaySum = new BigDecimal(0);
|
|
|
BigDecimal fundPaySum = new BigDecimal(0);
|
|
|
+ List<PolicyItem> policyItems = new ArrayList<>();
|
|
|
for (int i = 0; i < array.size(); i++) {
|
|
|
- JSONObject itm = array.getJSONObject(i);
|
|
|
- BigDecimal selfPayAmt = BigDecimal.valueOf(itm.getDouble("selfPayAmt"));
|
|
|
- String selfPayProp = itm.getString("selfPayProp");
|
|
|
- BigDecimal fundPayAmt = BigDecimal.valueOf(itm.getDouble("fundPayAmt"));
|
|
|
- String fundPayProp = itm.getString("fundPayProp");
|
|
|
- BigDecimal polItemPaySum = BigDecimal.valueOf(itm.getDouble("polItemPaySum"));
|
|
|
- selfPaySum = selfPaySum.add(selfPayAmt);
|
|
|
- fundPaySum = fundPaySum.add(fundPayAmt);
|
|
|
-
|
|
|
- PolItemCode polItemCode = PolItemCode.get(itm.getString("polItemCode"));
|
|
|
- if (null == polItemCode) {
|
|
|
- String message = String.format("找到了字典缺失的政策项:%s", itm);
|
|
|
- log.info(message);
|
|
|
- wxsrvc.sendCorpWxMsg("2801", message);
|
|
|
- continue;
|
|
|
- }
|
|
|
- switch (polItemCode) {
|
|
|
- case QZF:
|
|
|
- polItemInfo.setSelfPayPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setSelfPayPsnProp(selfPayProp);
|
|
|
- polItemInfo.setSelfPayFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setSelfPayFundProp(fundPayProp);
|
|
|
- polItemInfo.setSelfPaySum(polItemPaySum);
|
|
|
- break;
|
|
|
- case YLXZF:
|
|
|
- polItemInfo.setScndPrePayPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setScndPrePayPsnProp(selfPayProp);
|
|
|
- polItemInfo.setScndPrePayFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setScndPrePayFundProp(fundPayProp);
|
|
|
- polItemInfo.setScndPrePaySum(polItemPaySum);
|
|
|
- break;
|
|
|
- case CXEZF:
|
|
|
- polItemInfo.setOvrlmtSelfPayPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setOvrlmtSelfPayPsnProp(selfPayProp);
|
|
|
- polItemInfo.setOvrlmtSelfPayFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setOvrlmtSelfPayFundProp(fundPayProp);
|
|
|
- polItemInfo.setOvrlmtSelfPaySum(polItemPaySum);
|
|
|
- break;
|
|
|
- case BCYFQFBZ:
|
|
|
- polItemInfo.setBegnlinePsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setBegnlinePsnProp(selfPayProp);
|
|
|
- polItemInfo.setBegnlineFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setBegnlineFundProp(fundPayProp);
|
|
|
- polItemInfo.setBegnlineSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case TCYD:
|
|
|
- polItemInfo.setFundFrstLvPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setFundFrstLvPsnProp(selfPayProp);
|
|
|
- polItemInfo.setFundFrstLvFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setFundFrstLvFundProp(fundPayProp);
|
|
|
- polItemInfo.setFundFrstLvSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case TCED:
|
|
|
- polItemInfo.setFundScndLvPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setFundScndLvPsnProp(selfPayProp);
|
|
|
- polItemInfo.setFundScndLvFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setFundScndLvFundProp(fundPayProp);
|
|
|
- polItemInfo.setFundScndLvSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case TCSD:
|
|
|
- polItemInfo.setFundThrdLvPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setFundThrdLvPsnProp(selfPayProp);
|
|
|
- polItemInfo.setFundThrdLvFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setFundThrdLvFundProp(fundPayProp);
|
|
|
- polItemInfo.setFundThrdLvSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case DEYD:
|
|
|
- polItemInfo.setBigAmtFrstLvPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setBigAmtFrstLvPsnProp(selfPayProp);
|
|
|
- polItemInfo.setBigAmtFrstLvFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setBigAmtFrstLvFundProp(fundPayProp);
|
|
|
- polItemInfo.setBigAmtFrstLvSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case STDTCZF:
|
|
|
- polItemInfo.setDualChannelFundPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setDualChannelFundPsnProp(selfPayProp);
|
|
|
- polItemInfo.setDualChannelFundFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setDualChannelFundFundProp(fundPayProp);
|
|
|
- polItemInfo.setDualChannelFundSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case STDDEZF:
|
|
|
- polItemInfo.setDualChannelBigAmtPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setDualChannelBigAmtPsnProp(selfPayProp);
|
|
|
- polItemInfo.setDualChannelBigAmtFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setDualChannelBigAmtFundProp(fundPayProp);
|
|
|
- polItemInfo.setDualChannelBigAmtSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case ZWZL:
|
|
|
- polItemInfo.setExternalSelfHandlePsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setExternalSelfHandlePsnProp(selfPayProp);
|
|
|
- polItemInfo.setExternalSelfHandleFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setExternalSelfHandleFundProp(fundPayProp);
|
|
|
- polItemInfo.setExternalSelfHandleSum(polItemPaySum);
|
|
|
- break;
|
|
|
- case MZWFD:
|
|
|
- polItemInfo.setOutpatientWfdPsnAmt(selfPayAmt);
|
|
|
- polItemInfo.setOutpatientWfdPsnProp(selfPayProp);
|
|
|
- polItemInfo.setOutpatientWfdFundAmt(fundPayAmt);
|
|
|
- polItemInfo.setOutpatientWfdFundProp(fundPayProp);
|
|
|
- polItemInfo.setOutpatientWfdSum(polItemPaySum);
|
|
|
- break;
|
|
|
- }
|
|
|
+ JSONObject polObj = array.getJSONObject(i);
|
|
|
+ PolicyItem policyItem = JSONObject.parseObject(JSONObject.toJSONString(polObj), PolicyItem.class);
|
|
|
+ policyItems.add(policyItem);
|
|
|
+ selfPaySum = selfPaySum.add(policyItem.getSelfPayAmt());
|
|
|
+ fundPaySum = fundPaySum.add(policyItem.getFundPayAmt());
|
|
|
}
|
|
|
polItemInfo.setAllPsnAmt(selfPaySum);
|
|
|
polItemInfo.setAllFundAmt(fundPaySum);
|
|
|
polItemInfo.setAllSum(fundPaySum.add(selfPaySum));
|
|
|
+ polItemInfo.setPolicyItems(policyItems);
|
|
|
return ResultVoUtil.success(polItemInfo);
|
|
|
}
|
|
|
|