opt:统一把业务id等字段的Long类型改为String类型,避免前端序列号丢失精度。
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
package org.nl.wms.ext.acs.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
@@ -18,7 +16,6 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.sch.tasks.TwoBoxExcepTask;
|
||||
@@ -115,8 +112,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
@Resource
|
||||
private IschBaseTaskService taskService;
|
||||
@Resource
|
||||
private IschBasePointService pointService;
|
||||
|
||||
@Resource
|
||||
private IbstIvtPackageinfoivtService packageinfoivtService;
|
||||
|
||||
@@ -170,8 +166,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
// 任务处理类
|
||||
try {
|
||||
Class<?> clz = Class.forName(processing_class);
|
||||
Object obj = clz.newInstance();
|
||||
Object obj = SpringContextHolder.getBean(Class.forName(processing_class));
|
||||
// 调用每个任务类的forceFinishInst()强制结束方法
|
||||
Method m = obj.getClass().getDeclaredMethod("updateTaskStatus", JSONObject.class, String.class);
|
||||
m.invoke(obj, row, status);
|
||||
@@ -1679,9 +1674,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Override
|
||||
public void initPoint() {
|
||||
WQLObject point = WQLObject.getWQLObject("sch_base_point");
|
||||
|
||||
JSONArray resultJSONArray = point.query("point_type = '9' order by point_code").getResultJSONArray(0);
|
||||
|
||||
for (int i = 0; i < resultJSONArray.size(); i++) {
|
||||
JSONObject json = resultJSONArray.getJSONObject(i);
|
||||
json.put("device_code", json.getString("point_code"));
|
||||
@@ -1787,7 +1780,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
mzhcwTask.createTask(jo);
|
||||
}
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "反馈成功!");
|
||||
result.put("message", "操作成功!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1842,10 +1835,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("container_type"))) {
|
||||
throw new BadRequestException("载具类型不能为空!");
|
||||
}
|
||||
|
||||
whereJson.put("vehicle_type", whereJson.getString("container_type"));
|
||||
outVehicleManageService.outVehicle(whereJson);
|
||||
|
||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
|
||||
|
||||
// 4-空木箱异常处理
|
||||
|
||||
@@ -32,11 +32,9 @@ public class AcsUtil {
|
||||
result.put("data", new JSONObject());
|
||||
return result;
|
||||
}
|
||||
|
||||
for (int j = 0; j < list.size(); j++) {
|
||||
JSONObject jo = list.getJSONObject(j);
|
||||
String product_area = jo.getString("product_area");
|
||||
|
||||
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0105")) {
|
||||
product_area = "LK";
|
||||
}
|
||||
@@ -46,13 +44,12 @@ public class AcsUtil {
|
||||
if (StrUtil.isEmpty(product_area)) {
|
||||
throw new BadRequestException("区域不能为空!下发信息:" + jo.toString());
|
||||
}
|
||||
|
||||
String acs_url = URLEnum.find(product_area);
|
||||
//String acs_url = URLEnum.find(product_area);
|
||||
String acs_url = "http://192.168.81.65:8011/";
|
||||
if (StrUtil.isEmpty(acs_url)) {
|
||||
log.info(product_area);
|
||||
throw new BadRequestException("未查询到区域对应的acs地址!");
|
||||
}
|
||||
|
||||
String url = acs_url + api;
|
||||
try {
|
||||
JSONArray rows = new JSONArray();
|
||||
@@ -62,7 +59,6 @@ public class AcsUtil {
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("ACS相应参数----------------------------------------+" + api + ",---" + result.toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
//ConnectException: Connection refused: connect
|
||||
@@ -88,7 +84,6 @@ public class AcsUtil {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -151,8 +146,6 @@ public class AcsUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,6 @@ public abstract class AbstractAcsTask {
|
||||
return AcsUtil.notifyAcs("api/wms/task", arr);
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.function.Supplier;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum URLEnum {
|
||||
//
|
||||
ACS_URL_A1("A1", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A1").getValue()),
|
||||
ACS_URL_A2("A2", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A2").getValue()),
|
||||
ACS_URL_A3("A3", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A3").getValue()),
|
||||
|
||||
Reference in New Issue
Block a user