|
@@ -1031,48 +1031,47 @@ public class SiQueryService {
|
|
|
}
|
|
|
|
|
|
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", 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.getInstance().getTokenUserId(), input, result);
|
|
|
- if (null == result) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
- }
|
|
|
- if (null == result.getInteger("code")) {
|
|
|
- String message = result.getString("message");
|
|
|
- if (null == message) {
|
|
|
- message = result.getString(ERROR_MESSAGE);
|
|
|
- }
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + message);
|
|
|
- }
|
|
|
- if (result.getIntValue("code") != 0) {
|
|
|
- String message = result.getString("message");
|
|
|
- if (null == message) {
|
|
|
- message = result.getString(ERROR_MESSAGE);
|
|
|
- }
|
|
|
- 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);
|
|
|
- List<PolicyItem> policyItems = new ArrayList<>();
|
|
|
- for (int i = 0; i < array.size(); i++) {
|
|
|
- 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);
|
|
|
+// JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.LIST_POL_ITEM_CODE_PAY_INFO, insuplc);
|
|
|
+// JSONObject data = new JSONObject();
|
|
|
+// 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);
|
|
|
+// if (null == result) {
|
|
|
+// return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
+// }
|
|
|
+// if (null == result.getInteger("code")) {
|
|
|
+// String message = result.getString("message");
|
|
|
+// if (null == message) {
|
|
|
+// message = result.getString(ERROR_MESSAGE);
|
|
|
+// }
|
|
|
+// return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + message);
|
|
|
+// }
|
|
|
+// if (result.getIntValue("code") != 0) {
|
|
|
+// String message = result.getString("message");
|
|
|
+// if (null == message) {
|
|
|
+// message = result.getString(ERROR_MESSAGE);
|
|
|
+// }
|
|
|
+// 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);
|
|
|
+// List<PolicyItem> policyItems = new ArrayList<>();
|
|
|
+// for (int i = 0; i < array.size(); i++) {
|
|
|
+// 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(new PolItemInfo());
|
|
|
}
|
|
|
|
|
|
public CuminfoInYear getYearCuminfo(String setlId, String psnNo, String admdvs) {
|