java110
2023-05-12 7b90160465723602365521fa85e233680b60dd5e
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPayOweFeeSMOImpl.java
@@ -66,8 +66,14 @@
    protected void validate(IPageData pd, JSONObject paramIn) {
        Assert.jsonObjectHaveKey(paramIn, "communityId", "请求报文中未包含communityId节点");
        Assert.jsonObjectHaveKey(paramIn, "roomId", "请求报文中未包含房屋信息节点");
        Assert.jsonObjectHaveKey(paramIn, "appId", "请求报文中未包含appId节点");
        if (!paramIn.containsKey("ownerId") && !paramIn.containsKey("roomId")) {
            throw new IllegalArgumentException("未包含房屋或者业主");
        }
        if (StringUtil.isEmpty(paramIn.getString("ownerId")) && StringUtil.isEmpty(paramIn.getString("roomId"))) {
            throw new IllegalArgumentException("未包含房屋或者业主");
        }
    }
@@ -91,9 +97,15 @@
            payObjType = paramIn.getString("payObjType");
        }
        String ownerId = paramIn.getString("ownerId");
        String roomId = paramIn.getString("roomId");
        //查询用户ID
        paramIn.put("userId", pd.getUserId());
        String url = "/feeApi/listOweFees?page=1&row=50&communityId=" + paramIn.getString("communityId") + "&payObjId=" + paramIn.getString("roomId") + "&payObjType=" + payObjType;
        String url = "/feeApi/listOweFees?page=1&row=50&communityId=" + paramIn.getString("communityId") + "&payObjId=" + roomId + "&payObjType=" + payObjType;
        if(!StringUtil.isEmpty(ownerId)){
            url = "/feeApi/listOweFees?page=1&row=50&communityId=" + paramIn.getString("communityId") + "&ownerId=" + ownerId;
        }
        responseEntity = super.callCenterService(restTemplate, pd, "", url, HttpMethod.GET);
        if (responseEntity.getStatusCode() != HttpStatus.OK) {
@@ -110,7 +122,7 @@
        BigDecimal tmpMoney = new BigDecimal(money);
        BigDecimal feePrice = null;
        for (int feeIndex = 0; feeIndex < fees.size(); feeIndex++) {
            feePrice = new BigDecimal(fees.getJSONObject(feeIndex).getDouble("feePrice"));
            feePrice = new BigDecimal(fees.getJSONObject(feeIndex).getDouble("feeTotalPrice"));
            tmpMoney = tmpMoney.add(feePrice);
        }