|
|
|
@ -25,12 +25,16 @@ public class AsyncDiDlHelper {
|
|
|
|
|
@Value("${UDI_SERVER_URL}")
|
|
|
|
|
private String udiUrl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
HttpClient httpClient;
|
|
|
|
|
|
|
|
|
|
public List<ProductInfoEntity> dlByTime(String udiUrl, int page, int limit, String updateTime) {
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(16);
|
|
|
|
|
paramMap.put("page", page);
|
|
|
|
|
paramMap.put("limit", limit);
|
|
|
|
|
paramMap.put("updateTime", updateTime);
|
|
|
|
|
String response = HttpClient.mipsGet(udiUrl + "/udidl/udiwms/syncUdi", paramMap);
|
|
|
|
|
String response = httpClient.mipsGetUdiHead(udiUrl + "/udidl/udiwms/syncUdi", paramMap);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse<List<ProductInfoEntity>> udiDlDeviceResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<ProductInfoEntity>>>() {
|
|
|
|
@ -51,7 +55,7 @@ public class AsyncDiDlHelper {
|
|
|
|
|
paramMap.put("page", page);
|
|
|
|
|
paramMap.put("limit", limit);
|
|
|
|
|
paramMap.put("updateTime", updateTime);
|
|
|
|
|
String response = HttpClient.mipsGet(udiUrl + "/udidl/udiwms/syncCompany", paramMap);
|
|
|
|
|
String response = httpClient.mipsGetUdiHead(udiUrl + "/udidl/udiwms/syncCompany", paramMap);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse<List<UdiCompanyEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<UdiCompanyEntity>>>() {
|
|
|
|
@ -70,7 +74,7 @@ public class AsyncDiDlHelper {
|
|
|
|
|
public List<ProductInfoEntity> dlByDi(String deviceId) {
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(16);
|
|
|
|
|
paramMap.put("deviceId", deviceId);
|
|
|
|
|
String response = HttpClient.mipsGet(udiUrl + "/udidl/device/serchDlByDi", paramMap);
|
|
|
|
|
String response = httpClient.mipsGetUdiHead(udiUrl + "/udidl/device/serchDlByDi", paramMap);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse<List<ProductInfoEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<ProductInfoEntity>>>() {
|
|
|
|
@ -92,7 +96,7 @@ public class AsyncDiDlHelper {
|
|
|
|
|
public BaseResponse<List<ProductInfoEntity>> dlByDiRes(String deviceId) {
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(16);
|
|
|
|
|
paramMap.put("deviceId", deviceId);
|
|
|
|
|
String response = HttpClient.mipsGet(udiUrl + "/udidl/device/serchDlByDi", paramMap);
|
|
|
|
|
String response = httpClient.mipsGetUdiHead(udiUrl + "/udidl/device/serchDlByDi", paramMap);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse<List<ProductInfoEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<ProductInfoEntity>>>() {
|
|
|
|
@ -108,7 +112,7 @@ public class AsyncDiDlHelper {
|
|
|
|
|
public BaseResponse<List<ProductInfoEntity>> dlLastVersionByDi(String deviceId) {
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(16);
|
|
|
|
|
paramMap.put("deviceId", deviceId);
|
|
|
|
|
String response = HttpClient.mipsGet(udiUrl + "/udidl/device/dlLastVersionByDi", paramMap);
|
|
|
|
|
String response = httpClient.mipsGetUdiHead(udiUrl + "/udidl/device/dlLastVersionByDi", paramMap);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse<List<ProductInfoEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<ProductInfoEntity>>>() {
|
|
|
|
@ -131,7 +135,7 @@ public class AsyncDiDlHelper {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>(16);
|
|
|
|
|
paramMap.put("uuid", uuid);
|
|
|
|
|
String response = HttpClient.mipsGet(udiUrl + "/udidl/device/searchDlByUuid", paramMap);
|
|
|
|
|
String response = httpClient.mipsGetUdiHead(udiUrl + "/udidl/device/searchDlByUuid", paramMap);
|
|
|
|
|
try {
|
|
|
|
|
BaseResponse<List<ProductInfoEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<ProductInfoEntity>>>() {
|
|
|
|
|