From 05596230c5f5f3de3c2d21c37c61dffa2d628f31 Mon Sep 17 00:00:00 2001
From: heyun <786911938@qq.com>
Date: 星期二, 22 十月 2019 01:05:28 +0800
Subject: [PATCH] 省市二级联动

---
 WebService/src/main/java/com/java110/web/smo/ownerRepair/impl/EditOwnerRepairSMOImpl.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/WebService/src/main/java/com/java110/web/smo/ownerRepair/impl/EditOwnerRepairSMOImpl.java b/WebService/src/main/java/com/java110/web/smo/ownerRepair/impl/EditOwnerRepairSMOImpl.java
index d5b6bcc..a9a9b89 100644
--- a/WebService/src/main/java/com/java110/web/smo/ownerRepair/impl/EditOwnerRepairSMOImpl.java
+++ b/WebService/src/main/java/com/java110/web/smo/ownerRepair/impl/EditOwnerRepairSMOImpl.java
@@ -9,6 +9,7 @@
 import com.java110.web.smo.ownerRepair.IEditOwnerRepairSMO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
@@ -46,6 +47,24 @@
         ResponseEntity<String> responseEntity = null;
         super.validateStoreStaffCommunityRelationship(pd, restTemplate);
 
+        JSONObject newParamIn = new JSONObject();
+        newParamIn.put("communityId", paramIn.getString("communityId"));
+        newParamIn.put("repairId", paramIn.getString("repairId"));
+        newParamIn.put("page", 1);
+        newParamIn.put("row", 1);
+
+        //鏌ヨ淇濅慨鐘舵��
+        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/ownerRepair.listOwnerRepairs" + mapToUrlParam(newParamIn);
+        responseEntity = this.callCenterService(restTemplate, pd, "",
+                apiUrl,
+                HttpMethod.GET);
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return responseEntity;
+        }
+        JSONObject outRepairInfo = JSONObject.parseObject(responseEntity.getBody());
+        JSONObject repairObj = outRepairInfo.getJSONArray("ownerRepairs").getJSONObject(0);
+        paramIn.put("state", repairObj.getString("state"));
         responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
                 ServiceConstant.SERVICE_API_URL + "/api/ownerRepair.updateOwnerRepair",
                 HttpMethod.POST);

--
Gitblit v1.8.0