소스 검색

返回客户信息

gaodd 1 년 전
부모
커밋
ebfde98abc
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      src/main/java/com/chinaitop/depot/business/controller/audit/BusinessContractAuditController.java

+ 13 - 0
src/main/java/com/chinaitop/depot/business/controller/audit/BusinessContractAuditController.java

@@ -9,10 +9,12 @@ import javax.annotation.Resource;
9 9
 import javax.servlet.http.HttpServletRequest;
10 10
 
11 11
 import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.beans.factory.annotation.Value;
12 13
 import org.springframework.http.MediaType;
13 14
 import org.springframework.web.bind.annotation.RequestMapping;
14 15
 import org.springframework.web.bind.annotation.RequestMethod;
15 16
 import org.springframework.web.bind.annotation.RestController;
17
+import org.springframework.web.client.RestTemplate;
16 18
 
17 19
 import com.chinaitop.depot.act.model.HistoryList;
18 20
 import com.chinaitop.depot.act.service.ActTaskService;
@@ -58,6 +60,12 @@ public class BusinessContractAuditController {
58 60
     @Autowired
59 61
     private BusinessFileService businessFileService;
60 62
     
63
+    @Autowired
64
+    private RestTemplate restTemplate;
65
+    
66
+    @Value("${customerUrl}")
67
+    private String customerUrl;
68
+    
61 69
     /**
62 70
      * 获取审批列表.
63 71
      * @param pageNum  页码
@@ -147,6 +155,11 @@ public class BusinessContractAuditController {
147 155
         Map<String, Object> modelMap = new HashMap<String, Object>();
148 156
         BusinessContract contract = businessContractService.findById(id);
149 157
         modelMap.put("contract", contract);
158
+        
159
+        //客户
160
+        Object forObject =  restTemplate.getForEntity(customerUrl+""+contract.getCustomerBid(), Object.class);
161
+        modelMap.put("customer",forObject);
162
+        
150 163
        // 获取对应的文件.
151 164
         List<BusinessFile> fileList= businessFileService.getByBid(id,"contract", null, null);
152 165