| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.constant.FeeTypeConstant; |
| | | import com.java110.common.constant.PrivilegeCodeConstant; |
| | | import com.java110.common.constant.ServiceConstant; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.common.util.StringUtil; |
| | | 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.web.core.BaseComponentSMO; |
| | | import com.java110.core.component.BaseComponentSMO; |
| | | import com.java110.web.smo.IFeeServiceSMO; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | validateLoadPropertyConfigFee(pd); |
| | | |
| | | //校验员工是否有权限操作 |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_PROPERTY_CONFIG_FEE); |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_PROPERTY_CONFIG_FEE); |
| | | |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | String communityId = paramIn.getString("communityId"); |
| | |
| | | paramIn.put("feeTypeCd", feeTypeCd); |
| | | } |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/fee.queryFeeConfig" + mapToUrlParam(paramIn), |
| | | ServiceConstant.SERVICE_API_URL + "/api/feeConfig.listFeeConfigs" + mapToUrlParam(paramIn), |
| | | HttpMethod.GET); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | JSONArray feeConfigs = JSONArray.parseArray(responseEntity.getBody().toString()); |
| | | JSONArray feeConfigs = JSONObject.parseObject(responseEntity.getBody().toString()).getJSONArray("feeConfigs"); |
| | | |
| | | if (feeConfigs != null && feeConfigs.size() > 1) { |
| | | responseEntity = new ResponseEntity<String>("数据异常,请检查配置数据", HttpStatus.BAD_REQUEST); |
| | |
| | | */ |
| | | private void validateLoadPropertyConfigFee(IPageData pd) { |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "communityId", "请求报文中未包含communityId节点"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "page", "请求报文中未包含page节点"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "row", "请求报文中未包含row节点"); |
| | | |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | Assert.hasLength(paramIn.getString("communityId"), "小区ID不能为空"); |
| | |
| | | Assert.isMoney(reqJson.getString("builtUpArea"), "建筑面积数据格式错误"); |
| | | Assert.isMoney(reqJson.getString("unitPrice"), "房屋单价数据格式错误"); |
| | | |
| | | if (!"1010".equals(reqJson.getString("apartment")) && !"2020".equals(reqJson.getString("apartment"))) { |
| | | /* if (!"1010".equals(reqJson.getString("apartment")) && !"2020".equals(reqJson.getString("apartment"))) { |
| | | throw new IllegalArgumentException("不是有效房屋户型 传入数据错误"); |
| | | } |
| | | }*/ |
| | | |
| | | if (!"2001".equals(reqJson.getString("state")) |
| | | && !"2002".equals(reqJson.getString("state")) |