|
@@ -6,9 +6,12 @@ import com.sunyo.wlpt.cgonms.provide.domain.*; |
|
@@ -6,9 +6,12 @@ import com.sunyo.wlpt.cgonms.provide.domain.*; |
6
|
import com.sunyo.wlpt.cgonms.provide.feign.GetCgoAsmFeign;
|
6
|
import com.sunyo.wlpt.cgonms.provide.feign.GetCgoAsmFeign;
|
7
|
import com.sunyo.wlpt.cgonms.provide.feign.GetDataWareHouseFeign;
|
7
|
import com.sunyo.wlpt.cgonms.provide.feign.GetDataWareHouseFeign;
|
8
|
import com.sunyo.wlpt.cgonms.provide.feign.GetTransportFeign;
|
8
|
import com.sunyo.wlpt.cgonms.provide.feign.GetTransportFeign;
|
|
|
9
|
+import com.sunyo.wlpt.cgonms.provide.response.ResultJson;
|
9
|
import com.sunyo.wlpt.cgonms.provide.service.*;
|
10
|
import com.sunyo.wlpt.cgonms.provide.service.*;
|
10
|
import com.sunyo.wlpt.cgonms.provide.thread.ExitThreadPoolFactory;
|
11
|
import com.sunyo.wlpt.cgonms.provide.thread.ExitThreadPoolFactory;
|
11
|
import lombok.extern.slf4j.Slf4j;
|
12
|
import lombok.extern.slf4j.Slf4j;
|
|
|
13
|
+import org.springframework.beans.propertyeditors.CustomDateEditor;
|
|
|
14
|
+import org.springframework.web.bind.WebDataBinder;
|
12
|
import org.springframework.web.bind.annotation.*;
|
15
|
import org.springframework.web.bind.annotation.*;
|
13
|
|
16
|
|
14
|
import javax.annotation.Resource;
|
17
|
import javax.annotation.Resource;
|
|
@@ -76,13 +79,15 @@ public class NmsController { |
|
@@ -76,13 +79,15 @@ public class NmsController { |
76
|
* @return {@link ResultExitData}
|
79
|
* @return {@link ResultExitData}
|
77
|
*/
|
80
|
*/
|
78
|
@GetMapping("/getInfo")
|
81
|
@GetMapping("/getInfo")
|
79
|
- public List<ResultExitData> getData(
|
82
|
+ public ResultJson getData(
|
80
|
@RequestParam(value = "flightDate", required = false) Date flightDate,
|
83
|
@RequestParam(value = "flightDate", required = false) Date flightDate,
|
81
|
@RequestParam(value = "flightNo", required = false) String flightNo) {
|
84
|
@RequestParam(value = "flightNo", required = false) String flightNo) {
|
82
|
|
85
|
|
83
|
final String startTime = sdf.format(new Date());
|
86
|
final String startTime = sdf.format(new Date());
|
84
|
System.out.println("开始时间:" + startTime);
|
87
|
System.out.println("开始时间:" + startTime);
|
85
|
System.out.println("出港数据,开始获取");
|
88
|
System.out.println("出港数据,开始获取");
|
|
|
89
|
+ ResultJson resultJson = new ResultJson();
|
|
|
90
|
+
|
86
|
/**
|
91
|
/**
|
87
|
* 查询出新舱单里面回执表里面的数据条件
|
92
|
* 查询出新舱单里面回执表里面的数据条件
|
88
|
*/
|
93
|
*/
|
|
@@ -145,7 +150,9 @@ public class NmsController { |
|
@@ -145,7 +150,9 @@ public class NmsController { |
145
|
System.out.println("结束时间:" + endTime);
|
150
|
System.out.println("结束时间:" + endTime);
|
146
|
System.out.println("出港信息,获取完毕");
|
151
|
System.out.println("出港信息,获取完毕");
|
147
|
System.out.println("index的值为:" + index);
|
152
|
System.out.println("index的值为:" + index);
|
148
|
- return resultList;
|
153
|
+ resultJson.setCode("200");
|
|
|
154
|
+ resultJson.setData(resultList);
|
|
|
155
|
+ return resultJson;
|
149
|
}
|
156
|
}
|
150
|
|
157
|
|
151
|
/**
|
158
|
/**
|
|
@@ -265,5 +272,10 @@ public class NmsController { |
|
@@ -265,5 +272,10 @@ public class NmsController { |
265
|
return result;
|
272
|
return result;
|
266
|
}
|
273
|
}
|
267
|
|
274
|
|
268
|
-
|
275
|
+ @InitBinder
|
|
|
276
|
+ public void initBinder(WebDataBinder binder) {
|
|
|
277
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
278
|
+ dateFormat.setLenient(false);
|
|
|
279
|
+ binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
|
|
|
280
|
+ }
|
269
|
} |
281
|
} |