更新
This commit is contained in:
@@ -622,7 +622,7 @@ public class AMHandServiceImpl implements AMHandService {
|
|||||||
}
|
}
|
||||||
if (type.equals("2")) {
|
if (type.equals("2")) {
|
||||||
try {
|
try {
|
||||||
agvService.sendAgvInstToNDC(instdto.getAgv_system_type(),instdto);
|
agvService.sendAgvInstToNDC(instdto.getAgv_system_type(), instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
jo.put("code", "2");
|
jo.put("code", "2");
|
||||||
jo.put("desc", "下发agv失败");
|
jo.put("desc", "下发agv失败");
|
||||||
@@ -764,7 +764,7 @@ public class AMHandServiceImpl implements AMHandService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> bindPoint(JSONObject reqParam) {
|
public Map<String, Object> bindPoint(JSONObject reqParam) {
|
||||||
WQLObject wo_runPoint = WQLObject.getWQLObject("acs_device_runpoint");
|
WQLObject wo_runPoint = WQLObject.getWQLObject("acs_device_runpoint");
|
||||||
JSONArray device_codes = MapUtil.get(reqParam,"device_codes",JSONArray.class);
|
JSONArray device_codes = MapUtil.get(reqParam, "device_codes", JSONArray.class);
|
||||||
String material_type = MapUtil.getStr(reqParam, "material_type");
|
String material_type = MapUtil.getStr(reqParam, "material_type");
|
||||||
String type = MapUtil.getStr(reqParam, "type");
|
String type = MapUtil.getStr(reqParam, "type");
|
||||||
String status = "0";
|
String status = "0";
|
||||||
@@ -873,21 +873,11 @@ public class AMHandServiceImpl implements AMHandService {
|
|||||||
jo.put("desc", "呼叫失败,起点或终点不能为空!");
|
jo.put("desc", "呼叫失败,起点或终点不能为空!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < start_device_codes.size(); i++) {
|
if (start_device_codes.size() > 2) {
|
||||||
String device_code = start_device_codes.getString(i);
|
throw new BadRequestException("起点个数不能大于2!");
|
||||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
||||||
JSONObject jsonObject = wo_runPoint.query("device_code = '" + device_code + "'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isNotEmpty(jsonObject)){
|
|
||||||
String hasgoods = jsonObject.getString("hasgoods");
|
|
||||||
if (StrUtil.equals(hasgoods,"0")){
|
|
||||||
throw new BadRequestException("设备:" + device_code + "库存为无货状态,请手动绑定货物!");
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
|
||||||
|
|
||||||
}
|
if (start_device_codes.size() == 2) {
|
||||||
}
|
|
||||||
//将数组转换为集合判断是否为同一排的库位,并按照库位顺序号排序
|
//将数组转换为集合判断是否为同一排的库位,并按照库位顺序号排序
|
||||||
List<String> start_device_code_list = JSONArray.parseArray(start_device_codes.toJSONString(), String.class);
|
List<String> start_device_code_list = JSONArray.parseArray(start_device_codes.toJSONString(), String.class);
|
||||||
Collections.sort(start_device_code_list, new Comparator<String>() {
|
Collections.sort(start_device_code_list, new Comparator<String>() {
|
||||||
@@ -908,7 +898,40 @@ public class AMHandServiceImpl implements AMHandService {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
start_device_codes = JSONArray.parseArray(JSON.toJSONString(start_device_code_list));
|
String s = start_device_code_list.get(0);
|
||||||
|
String e = start_device_code_list.get(1);
|
||||||
|
String row_num = s.split("_")[0];
|
||||||
|
int s_col_num = Integer.parseInt(s.split("_")[s.split("_").length - 1]);
|
||||||
|
int e_col_num = Integer.parseInt(e.split("_")[e.split("_").length - 1]);
|
||||||
|
start_device_codes = new JSONArray();
|
||||||
|
// start_device_codes = JSONArray.parseArray(JSON.toJSONString(start_device_code_list));
|
||||||
|
for (int i = s_col_num; i <= e_col_num; i++) {
|
||||||
|
String col_num = "";
|
||||||
|
if (i < 10){
|
||||||
|
col_num = "0" + i;
|
||||||
|
} else {
|
||||||
|
col_num = String.valueOf(i);
|
||||||
|
}
|
||||||
|
String point_code = row_num + "_" + col_num;
|
||||||
|
start_device_codes.add(point_code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < start_device_codes.size(); i++) {
|
||||||
|
String device_code = start_device_codes.getString(i);
|
||||||
|
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||||
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
|
JSONObject jsonObject = wo_runPoint.query("device_code = '" + device_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject)) {
|
||||||
|
String hasgoods = jsonObject.getString("hasgoods");
|
||||||
|
if (StrUtil.equals(hasgoods, "0")) {
|
||||||
|
throw new BadRequestException("设备:" + device_code + "库存为无货状态,请手动绑定货物!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int start_size = start_device_codes.size();
|
int start_size = start_device_codes.size();
|
||||||
if (start_size > 0) {
|
if (start_size > 0) {
|
||||||
//获取起点点位数组的第一个点位
|
//获取起点点位数组的第一个点位
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
OPTION 输入.next_point <> ""
|
OPTION 输入.next_point <> ""
|
||||||
task.next_point_code like 输入.next_point
|
task.next_point_code like 输入.next_point
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ORDER BY task.create_time
|
ORDER BY task.create_time desc,task.task_code
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
inst.next_point_code like 输入.next_point
|
inst.next_point_code like 输入.next_point
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ORDER BY
|
ORDER BY
|
||||||
inst.create_time DESC
|
inst.create_time DESC,inst.instruction_code
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: prod
|
active: dev
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user