java110
2021-08-17 f98df3864f181ea9b465ecc40c9192cee9aad24e
service-front/src/main/java/com/java110/front/smo/impl/FrontFeeServiceSMOImpl.java
old mode 100644 new mode 100755
@@ -2,14 +2,14 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.component.BaseComponentSMO;
import com.java110.core.context.IPageData;
import com.java110.front.smo.IFeeServiceSMO;
import com.java110.utils.constant.FeeTypeConstant;
import com.java110.utils.constant.PrivilegeCodeConstant;
import com.java110.utils.constant.ServiceConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.StringUtil;
import com.java110.core.context.IPageData;
import com.java110.core.component.BaseComponentSMO;
import com.java110.front.smo.IFeeServiceSMO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -62,15 +62,15 @@
        }
        JSONArray feeConfigs = JSONObject.parseObject(responseEntity.getBody().toString()).getJSONArray("feeConfigs");
        if (feeConfigs != null && feeConfigs.size() > 1) {
            responseEntity = new ResponseEntity<String>("数据异常,请检查配置数据", HttpStatus.BAD_REQUEST);
            return responseEntity;
        }
//        if (feeConfigs != null && feeConfigs.size() > 1) {
//            responseEntity = new ResponseEntity<String>("数据异常,请检查配置数据", HttpStatus.BAD_REQUEST);
//            return responseEntity;
//        }
        if (feeConfigs != null && feeConfigs.size() > 0) {
            responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(feeConfigs.get(0)), HttpStatus.OK);
            responseEntity = new ResponseEntity<String>(JSONArray.toJSONString(feeConfigs), HttpStatus.OK);
        } else {
            responseEntity = new ResponseEntity<String>("{}", HttpStatus.OK);
            responseEntity = new ResponseEntity<String>("[]", HttpStatus.OK);
        }
@@ -131,6 +131,11 @@
        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_PROPERTY_FEE);
        JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
        String remark = paramIn.getString("remark");
        if(!StringUtil.isEmpty(remark)){
            remark="-"+remark;
        }
        paramIn.put("remark", "现场收银台支付" + remark);
        String communityId = paramIn.getString("communityId");
        ResponseEntity responseEntity = super.getStoreInfo(pd, restTemplate);
        if (responseEntity.getStatusCode() != HttpStatus.OK) {
@@ -405,11 +410,11 @@
    private void validateLoadFeeDetail(IPageData pd) {
        Assert.jsonObjectHaveKey(pd.getReqData(), "communityId", "请求报文中未包含communityId节点");
        Assert.jsonObjectHaveKey(pd.getReqData(), "feeId", "请求报文中未包含roomId节点");
        //Assert.jsonObjectHaveKey(pd.getReqData(), "feeId", "请求报文中未包含feeId节点");
        JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
        Assert.hasLength(paramIn.getString("communityId"), "小区ID不能为空");
        Assert.hasLength(paramIn.getString("feeId"), "费用ID不能为空");
        //Assert.hasLength(paramIn.getString("feeId"), "费用ID不能为空");
    }
    /**
@@ -477,13 +482,13 @@
        Assert.jsonObjectHaveKey(pd.getReqData(), "apartment", "请求报文中未包含apartment节点");
        Assert.jsonObjectHaveKey(pd.getReqData(), "builtUpArea", "请求报文中未包含builtUpArea节点");
        Assert.jsonObjectHaveKey(pd.getReqData(), "state", "请求报文中未包含state节点");
        Assert.jsonObjectHaveKey(pd.getReqData(), "unitPrice", "请求报文中未包含unitPrice节点");
        Assert.jsonObjectHaveKey(pd.getReqData(), "feeCoefficient", "请求报文中未包含feeCoefficient节点");
        JSONObject reqJson = JSONObject.parseObject(pd.getReqData());
        Assert.hasLength(reqJson.getString("communityId"), "小区ID不能为空");
        Assert.isInteger(reqJson.getString("section"), "房间数不是有效数字");
        Assert.isMoney(reqJson.getString("builtUpArea"), "建筑面积数据格式错误");
        Assert.isMoney(reqJson.getString("unitPrice"), "房屋单价数据格式错误");
        Assert.isMoney(reqJson.getString("feeCoefficient"), "算费系数数据格式错误");
       /* if (!"1010".equals(reqJson.getString("apartment")) && !"2020".equals(reqJson.getString("apartment"))) {
            throw new IllegalArgumentException("不是有效房屋户型 传入数据错误");