dev
wj 2 years ago
parent 937f680fd2
commit ca36b1d859

@ -375,7 +375,7 @@ public class OrderController {
BaseResponse baseResponse = BaseResponse baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse>() { JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
}); });
if (baseResponse.getCode() == ResultEnum.SUCCESS.getCode()) { if (baseResponse.getCode() == 20000) {
orderEntity.setUploadStatus("1"); orderEntity.setUploadStatus("1");
orderService.updateOrder(orderEntity); orderService.updateOrder(orderEntity);
return baseResponse; return baseResponse;

@ -138,7 +138,7 @@ public class PlatformService {
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("invSubCode", invSubCode); paramMap.put("invSubCode", invSubCode);
String resp = HttpClient.mipsGet(host + "/udiwms/bussinessType/udimsFilter", paramMap); String resp = HttpClient.mipsGet(host + "/udiwms/bussinessType/udimsFilter", paramMap);
if (StrUtil.isNotBlank(resp) && resp.contains(ResultEnum.SUCCESS.getCode().toString())) { if (StrUtil.isNotBlank(resp) && resp.contains("20000")) {
return JSON.parseObject(resp, BaseResponse.class); return JSON.parseObject(resp, BaseResponse.class);
} else { } else {
log.error("获取自助平台单据类型异常"); log.error("获取自助平台单据类型异常");
@ -158,7 +158,7 @@ public class PlatformService {
log.info("拉取自助平台仓库数据:" + url); log.info("拉取自助平台仓库数据:" + url);
String resp = HttpUtil.get(url); String resp = HttpUtil.get(url);
log.info("拉取结果:" + resp); log.info("拉取结果:" + resp);
if (StrUtil.isNotBlank(resp) && resp.contains(ResultEnum.SUCCESS.getCode().toString())) { if (StrUtil.isNotBlank(resp) && resp.contains("20000")) {
try { try {
return JSON.parseObject(resp, BaseResponse.class); return JSON.parseObject(resp, BaseResponse.class);
} catch (Exception e) { } catch (Exception e) {
@ -182,7 +182,7 @@ public class PlatformService {
Map<String, String> paramMap = new HashMap<>(); Map<String, String> paramMap = new HashMap<>();
paramMap.put("invCode", invCode); paramMap.put("invCode", invCode);
String resp = HttpClient.mipsGet(host + "/spms/sub/inv/warehouse/getSubInvForUdims", paramMap); String resp = HttpClient.mipsGet(host + "/spms/sub/inv/warehouse/getSubInvForUdims", paramMap);
if (StrUtil.isNotBlank(resp) && resp.contains(ResultEnum.SUCCESS.getCode().toString())) { if (StrUtil.isNotBlank(resp) && resp.contains("20000")) {
return JSON.parseObject(resp, BaseResponse.class); return JSON.parseObject(resp, BaseResponse.class);
} else { } else {
log.error("获取自助平台分库失败"); log.error("获取自助平台分库失败");
@ -202,7 +202,7 @@ public class PlatformService {
if (StrUtil.isNotBlank(response)) { if (StrUtil.isNotBlank(response)) {
try { try {
BaseResponse result = JSONUtil.toBean(response, BaseResponse.class); BaseResponse result = JSONUtil.toBean(response, BaseResponse.class);
if (result.getCode() == ResultEnum.SUCCESS.getCode()) { if (result.getCode() == 20000) {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);

@ -5,7 +5,6 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.glxp.udi.admin.common.enums.ResultEnum;
import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.constant.SystemParamConstant; import com.glxp.udi.admin.constant.SystemParamConstant;
import com.glxp.udi.admin.dao.info.ScheduledDao; import com.glxp.udi.admin.dao.info.ScheduledDao;
@ -144,7 +143,7 @@ public class SubmitOrderToSpmsTask implements SchedulingConfigurer {
BaseResponse baseResponse = BaseResponse baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse>() { JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
}); });
if (baseResponse.getCode() == ResultEnum.SUCCESS.getCode()) { if (baseResponse.getCode() == 20000) {
log.info("自动上传单据成功," + unitMaintainEntity.getName() + "上传单据数量为 " + orderEntities.size()); log.info("自动上传单据成功," + unitMaintainEntity.getName() + "上传单据数量为 " + orderEntities.size());
for (OrderEntity orderEntity : orderEntities) { for (OrderEntity orderEntity : orderEntities) {
log.info("修改单号为:{} 的上传状态", orderEntity.getOrderId()); log.info("修改单号为:{} 的上传状态", orderEntity.getOrderId());

@ -1,7 +1,6 @@
package com.glxp.udi.admin.thread; package com.glxp.udi.admin.thread;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.glxp.udi.admin.common.enums.ResultEnum;
import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.constant.SystemParamConstant; import com.glxp.udi.admin.constant.SystemParamConstant;
import com.glxp.udi.admin.dao.info.ScheduledDao; import com.glxp.udi.admin.dao.info.ScheduledDao;
@ -59,7 +58,7 @@ public class SupplementOrderTask implements SchedulingConfigurer {
if (CollUtil.isNotEmpty(orderEntities)) { if (CollUtil.isNotEmpty(orderEntities)) {
orderEntities.forEach(orderEntity -> { orderEntities.forEach(orderEntity -> {
BaseResponse baseResponse = orderService.supplementOrder(orderEntity); BaseResponse baseResponse = orderService.supplementOrder(orderEntity);
if (baseResponse.getCode() == ResultEnum.SUCCESS.getCode()) { if (baseResponse.getCode() == 20000) {
counter.addAndGet(1); counter.addAndGet(1);
} }
}); });

Loading…
Cancel
Save