Przeglądaj źródła

费用配置服务配置错误修改

wuxw 7 lat temu
rodzic
commit
03ec498fc3

+ 13 - 14
WebService/src/main/java/com/java110/web/smo/impl/FeeServiceSMOImpl.java

@@ -4,16 +4,12 @@ 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.ResponseConstant;
 import com.java110.common.constant.ServiceConstant;
-import com.java110.common.exception.SMOException;
 import com.java110.common.util.Assert;
-import com.java110.common.util.CommonUtil;
 import com.java110.common.util.StringUtil;
 import com.java110.core.context.IPageData;
 import com.java110.web.core.BaseComponentSMO;
 import com.java110.web.smo.IFeeServiceSMO;
-import com.java110.web.smo.IRoomServiceSMO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -56,19 +52,22 @@ public class FeeServiceSMOImpl extends BaseComponentSMO implements IFeeServiceSM
         //数据校验是否 商户是否入驻该小区
         super.checkStoreEnterCommunity(pd, storeId, storeTypeCd, communityId, restTemplate);
         paramIn.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_PROPERTY);
-        responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
-                ServiceConstant.SERVICE_API_URL + "/api/fee.queryFeeConfig",
+        responseEntity = this.callCenterService(restTemplate, pd, "",
+                ServiceConstant.SERVICE_API_URL + "/api/fee.queryFeeConfig" + mapToUrlParam(paramIn),
                 HttpMethod.GET);
-
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return responseEntity;
+        }
         JSONArray feeConfigs = JSONArray.parseArray(responseEntity.getBody().toString());
-        if(feeConfigs != null && feeConfigs.size() > 1){
+
+        if (feeConfigs != null && feeConfigs.size() > 1) {
             responseEntity = new ResponseEntity<String>("数据异常,请检查配置数据", HttpStatus.BAD_REQUEST);
             return responseEntity;
         }
 
-        if(feeConfigs != null) {
+        if (feeConfigs != null) {
             responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(feeConfigs.get(0)), HttpStatus.OK);
-        }else{
+        } else {
             responseEntity = new ResponseEntity<String>("{}", HttpStatus.OK);
 
         }
@@ -78,7 +77,6 @@ public class FeeServiceSMOImpl extends BaseComponentSMO implements IFeeServiceSM
     }
 
     /**
-     *
      * @param pd 页面数据封装对象
      * @return
      */
@@ -103,11 +101,11 @@ public class FeeServiceSMOImpl extends BaseComponentSMO implements IFeeServiceSM
         //数据校验是否 商户是否入驻该小区
         super.checkStoreEnterCommunity(pd, storeId, storeTypeCd, communityId, restTemplate);
         paramIn.put("feeTypeCd", FeeTypeConstant.FEE_TYPE_PROPERTY);
-        if(!paramIn.containsKey("configId") || StringUtil.isEmpty(paramIn.getString("configId"))) {
+        if (!paramIn.containsKey("configId") || StringUtil.isEmpty(paramIn.getString("configId"))) {
             responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
                     ServiceConstant.SERVICE_API_URL + "/api/fee.saveFeeConfig",
                     HttpMethod.POST);
-        }else{
+        } else {
             responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
                     ServiceConstant.SERVICE_API_URL + "/api/fee.updateFeeConfig",
                     HttpMethod.POST);
@@ -131,9 +129,10 @@ public class FeeServiceSMOImpl extends BaseComponentSMO implements IFeeServiceSM
 
     /**
      * 校验数据合法性
+     *
      * @param pd
      */
-    private void validateSaveOrUpdatePropertyFeeConfig(IPageData pd){
+    private void validateSaveOrUpdatePropertyFeeConfig(IPageData pd) {
         Assert.jsonObjectHaveKey(pd.getReqData(), "communityId", "请求报文中未包含communityId节点");
         Assert.jsonObjectHaveKey(pd.getReqData(), "squarePrice", "请求报文中未包含communityId节点");
         Assert.jsonObjectHaveKey(pd.getReqData(), "additionalAmount", "请求报文中未包含communityId节点");

+ 2 - 2
WebService/src/main/resources/components/config-property-fee/configPropertyFee.html

@@ -8,11 +8,11 @@
                         <div>
                             <div class="form-group row">
                                 <label class="col-sm-2 col-form-label">每平米单价</label>
-                                <div class="col-sm-10"><input v-model="changeFeeConfigInfo.squarePrice" type="text" placeholder="必填,请填写房屋每平米的物业费单价" class="form-control"></div>
+                                <div class="col-sm-10"><input v-model="changeFeeConfigInfo.squarePrice" type="text" placeholder="必填,请填写房屋每平米的物业费单价,如1000.00" class="form-control"></div>
                             </div>
                             <div class="form-group row">
                                 <label class="col-sm-2 col-form-label">附加费用</label>
-                                <div class="col-sm-10"><input v-model="changeFeeConfigInfo.additionalAmount" type="text" placeholder="必填,请填写附加费" class="form-control"></div>
+                                <div class="col-sm-10"><input v-model="changeFeeConfigInfo.additionalAmount" type="text" placeholder="必填,请填写附加费,如200.00" class="form-control"></div>
                             </div>
                             <div class="ibox-content">
                                 <button class="btn btn-primary float-right" type="button" v-on:click="savePropertyConfigFee()" ><i class="fa fa-check"></i>&nbsp;保存</button>

+ 1 - 1
WebService/src/main/resources/components/config-property-fee/configPropertyFee.js

@@ -5,7 +5,7 @@
             changeFeeConfigInfo:{
                 configId:"",
                 squarePrice:"",
-                additionalAmount:"0.00"
+                additionalAmount:""
             }
         },
          _initMethod:function(){

+ 17 - 10
WebService/src/main/resources/components/view-property-fee-config/viewPropertyFeeConfig.html

@@ -1,4 +1,4 @@
-<div class="row">
+<div class="row" id="component">
     <div class="col-lg-12">
         <div class="ibox ">
             <div class="ibox-title">
@@ -10,18 +10,25 @@
             </div>
             <div class="ibox-content">
                 <div class="row">
-                        <div class="form-group row">
-                            <label class="col-sm-2 col-form-label">物业费配置ID:</label>
-                            <div class="col-sm-10">{{feeConfigInfo.configId}}</div>
+                    <div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >物业费配置ID:</label>
+                            <label class="">{{feeConfigInfo.configId}}</label>
                         </div>
-                        <div class="form-group row">
-                            <label class="col-sm-2 col-form-label">每平米单价:</label>
-                            <div class="col-sm-10">{{feeConfigInfo.squarePrice}} 元</div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label">每平米单价:</label>
+                            <label class="">{{feeConfigInfo.squarePrice}} 元</label>
                         </div>
-                        <div class="form-group row">
-                            <label class="col-sm-2 col-form-label">附加费用:</label>
-                            <div class="col-sm-10">{{feeConfigInfo.additionalAmount}} 元</div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="form-group">
+                            <label class="col-form-label" >附加费用:</label>
+                            <label class="">{{feeConfigInfo.additionalAmount}} 元</label>
                         </div>
+                    </div>
+
                 </div>
             </div>
         </div>

+ 2 - 2
WebService/src/main/resources/components/view-property-fee-config/viewPropertyFeeConfig.js

@@ -23,13 +23,13 @@
         methods:{
 
             openConfigPropertyFeeModel:function(){
-                vc.emit('configPropertyFee','openConfigPropertyFeeModel',feeConfigInfo);
+                vc.emit('configPropertyFee','openConfigPropertyFeeModel',vc.component.feeConfigInfo);
             },
             loadPropertyConfigFee:function(){
                 var param = {
                     params:{
                         communityId:vc.getCurrentCommunity().communityId,
-                        configId:feeConfigInfo.configId
+                        configId:vc.component.feeConfigInfo.configId
                     }
                 };
                 vc.http.get(

+ 1 - 1
java110-core/src/main/java/com/java110/core/base/smo/BaseServiceSMO.java

@@ -80,7 +80,7 @@ public class BaseServiceSMO extends AppBase {
         } catch (Exception e) {
             responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
         } finally {
-            logger.debug("请求中心服务信息,{}", responseEntity);
+            logger.debug("中心服务返回信息,{}", responseEntity);
             return responseEntity;
         }
 

+ 1 - 1
java110-core/src/main/java/com/java110/core/smo/fee/IFeeAttrInnerServiceSMO.java

@@ -17,7 +17,7 @@ import java.util.List;
  * @Version 1.0
  * add by wuxw 2019/4/24
  **/
-@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@FeignClient(name = "fee-service", configuration = {FeignConfiguration.class})
 @RequestMapping("/feeAttrApi")
 public interface IFeeAttrInnerServiceSMO {
 

+ 1 - 1
java110-core/src/main/java/com/java110/core/smo/fee/IFeeConfigInnerServiceSMO.java

@@ -17,7 +17,7 @@ import java.util.List;
  * @Version 1.0
  * add by wuxw 2019/4/24
  **/
-@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@FeignClient(name = "fee-service", configuration = {FeignConfiguration.class})
 @RequestMapping("/feeConfigApi")
 public interface IFeeConfigInnerServiceSMO {