| 
@@ -41,7 +41,7 @@ public class CgoAsmController { | 
 | 
@@ -41,7 +41,7 @@ public class CgoAsmController { | 
| 
41
 | 
      * @return
 | 
41
 | 
      * @return
 | 
| 
42
 | 
      */
 | 
42
 | 
      */
 | 
| 
43
 | 
     @GetMapping("/getInfo")
 | 
43
 | 
     @GetMapping("/getInfo")
 | 
| 
44
 | 
-    public ResultExitData getInfo(@RequestParam(value = "waybillNoMaster", required = false)String waybillNoMaster) {
 | 
44
 | 
+    public ResultExitData getInfo(@RequestParam(value = "waybillNoMaster", required = false) String waybillNoMaster) {
 | 
| 
45
 | 
         ResultExitData result = new ResultExitData();
 | 
45
 | 
         ResultExitData result = new ResultExitData();
 | 
| 
46
 | 
         /**
 | 
46
 | 
         /**
 | 
| 
47
 | 
          * 2.根据运单号,获取品名,二级品类,一级品类
 | 
47
 | 
          * 2.根据运单号,获取品名,二级品类,一级品类
 | 
 | 
@@ -66,11 +66,29 @@ public class CgoAsmController { | 
 | 
@@ -66,11 +66,29 @@ public class CgoAsmController { | 
| 
66
 | 
          */
 | 
66
 | 
          */
 | 
| 
67
 | 
         List<HzWaybillInfo> hz = hzWaybillInfoService.getHzWaybillInfo(waybillNoMaster);
 | 
67
 | 
         List<HzWaybillInfo> hz = hzWaybillInfoService.getHzWaybillInfo(waybillNoMaster);
 | 
| 
68
 | 
         if (hz != null && hz.size() > 0) {
 | 
68
 | 
         if (hz != null && hz.size() > 0) {
 | 
| 
69
 | 
-            HzShipperInformation hzInfo = hzShipperInformationService.getHzInfo(hz.get(0).getHzInforId());
 | 
 | 
   | 
| 
70
 | 
-            //设置代理人名称
 | 
 | 
   | 
| 
71
 | 
-            result.setFullName(hzInfo.getFullName());
 | 
 | 
   | 
| 
72
 | 
-            //设置代理人类型
 | 
 | 
   | 
| 
73
 | 
-            result.setTheShipperType(hzInfo.getTheShipperType());
 | 
69
 | 
+            /**
 | 
| 
 | 
   | 
70
 | 
+             * 同样运单号,货主信息表的ID不止一个,需要遍历
 | 
| 
 | 
   | 
71
 | 
+             */
 | 
| 
 | 
   | 
72
 | 
+            for (int i = 0; i < hz.size(); i++) {
 | 
| 
 | 
   | 
73
 | 
+                HzShipperInformation hzInfo = new HzShipperInformation();
 | 
| 
 | 
   | 
74
 | 
+                hzInfo = hzShipperInformationService.getHzInfo(hz.get(i).getHzInforId());
 | 
| 
 | 
   | 
75
 | 
+                if ("222".equals(hzInfo.getTheShipperType())) {
 | 
| 
 | 
   | 
76
 | 
+                    //订仓代理人
 | 
| 
 | 
   | 
77
 | 
+                    result.setOrderName(hzInfo.getFullName());
 | 
| 
 | 
   | 
78
 | 
+                }
 | 
| 
 | 
   | 
79
 | 
+                if ("333".equals(hzInfo.getTheShipperType())) {
 | 
| 
 | 
   | 
80
 | 
+                    //结算代理人
 | 
| 
 | 
   | 
81
 | 
+                    result.setCountName(hzInfo.getFullName());
 | 
| 
 | 
   | 
82
 | 
+                }
 | 
| 
 | 
   | 
83
 | 
+            }
 | 
| 
 | 
   | 
84
 | 
+//            HzShipperInformation hzInfo = hzShipperInformationService.getHzInfo(hz.get(0).getHzInforId());
 | 
| 
 | 
   | 
85
 | 
+//            //设置代理人名称
 | 
| 
 | 
   | 
86
 | 
+//            result.setCountName(hzInfo.getFullName());
 | 
| 
 | 
   | 
87
 | 
+//            result.setOrderName(hzInfo.getFullName());
 | 
| 
 | 
   | 
88
 | 
+//            //设置代理人类型
 | 
| 
 | 
   | 
89
 | 
+//            result.setTheShipperType(hzInfo.getTheShipperType());
 | 
| 
 | 
   | 
90
 | 
+
 | 
| 
 | 
   | 
91
 | 
+
 | 
| 
74
 | 
         }
 | 
92
 | 
         }
 | 
| 
75
 | 
         return result;
 | 
93
 | 
         return result;
 | 
| 
76
 | 
     }
 | 
94
 | 
     }
 |