dev
wj 2 years ago
parent 937f680fd2
commit ca36b1d859

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

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

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

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

Loading…
Cancel
Save