| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | 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); |
| | | |
| | | } |
| | | |
| | |
| | | super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_PROPERTY_FEE); |
| | | |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | String remark = paramIn.getString("remark"); |
| | | paramIn.put("remark", "现场收银台支付-" + remark); |
| | | String communityId = paramIn.getString("communityId"); |
| | | ResponseEntity responseEntity = super.getStoreInfo(pd, restTemplate); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | 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("不是有效房屋户型 传入数据错误"); |