Browse Source

更新

master
gengby 2 years ago
parent
commit
55cec0bf23
  1. 51
      acs/nladmin-system/src/main/java/org/nl/acs/hand/amb/service/impl/AMHandServiceImpl.java
  2. 4
      acs/nladmin-system/src/main/java/org/nl/acs/hand/amb/wql/QJN_QUERY001.wql
  3. 2
      acs/nladmin-system/src/main/resources/config/application.yml

51
acs/nladmin-system/src/main/java/org/nl/acs/hand/amb/service/impl/AMHandServiceImpl.java

@ -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) {
//获取起点点位数组的第一个点位 //获取起点点位数组的第一个点位

4
acs/nladmin-system/src/main/java/org/nl/acs/hand/amb/wql/QJN_QUERY001.wql

@ -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
acs/nladmin-system/src/main/resources/config/application.yml

@ -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:

Loading…
Cancel
Save