fix:点位查询异常

This commit is contained in:
zhangzq
2025-03-04 19:49:49 +08:00
parent e5539653a9
commit 3f9e85eb42
5 changed files with 19 additions and 17 deletions

View File

@@ -808,14 +808,14 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
} }
} }
} }
// 校验木箱是否绑定了托盘 // // 校验木箱是否绑定了托盘
JSONObject jsonExt = extList.stream() // JSONObject jsonExt = extList.stream()
.filter(row -> row.getString("pcsn").equals(json.getString("storagevehicle_code"))) // .filter(row -> row.getString("pcsn").equals(json.getString("storagevehicle_code")))
.findFirst().orElse(null); // .findFirst().orElse(null);
//
if (ObjectUtil.isEmpty(jsonExt)) { // if (ObjectUtil.isEmpty(jsonExt)) {
throw new BadRequestException("此木箱【"+json.getString("storagevehicle_code")+"】没有绑定托盘,请核查"); // throw new BadRequestException("此木箱【"+json.getString("storagevehicle_code")+"】没有绑定托盘,请核查");
} // }
// 创建任务 // 创建任务
JSONObject jsonTaskParam = new JSONObject(); JSONObject jsonTaskParam = new JSONObject();
@@ -823,7 +823,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
jsonTaskParam.put("start_device_code", json.getString("struct_code")); jsonTaskParam.put("start_device_code", json.getString("struct_code"));
jsonTaskParam.put("next_device_code", IOSEnum.EXCEP_OUT.code("异常出库口")); jsonTaskParam.put("next_device_code", IOSEnum.EXCEP_OUT.code("异常出库口"));
jsonTaskParam.put("vehicle_code", json.getString("storagevehicle_code")); jsonTaskParam.put("vehicle_code", json.getString("storagevehicle_code"));
jsonTaskParam.put("vehicle_code2", jsonExt.getString("storagevehicle_code")); // jsonTaskParam.put("vehicle_code2", jsonExt.getString("storagevehicle_code"));
jsonTaskParam.put("task_group_id", IdUtil.getStringId()); jsonTaskParam.put("task_group_id", IdUtil.getStringId());
jsonTaskParam.put("priority", json.getString("zdepth")); jsonTaskParam.put("priority", json.getString("zdepth"));
JSONObject request_param = new JSONObject(); JSONObject request_param = new JSONObject();

View File

@@ -24,6 +24,7 @@ import org.nl.wms.sch.service.dto.RegionDto;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
@@ -55,13 +56,14 @@ public class PointServiceImpl implements PointService {
map.put("point_type", whereJson.get("point_type")); map.put("point_type", whereJson.get("point_type"));
Object name = whereJson.get("name"); Object name = whereJson.get("name");
if (ObjectUtil.isNotEmpty(name)) { if (ObjectUtil.isNotEmpty(name)) {
String search = (String) name;
String[] split = search.split("_"); map.put("name", "%"+name+"%");
name = String.join("\\_", split);
map.put("name", name);
} }
JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc"); JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc");
JSONArray content = json.getJSONArray("content"); JSONArray content = json.getJSONArray("content");
if (CollectionUtils.isEmpty(content)){
return json;
}
List<String> regionIds = new ArrayList<>(); List<String> regionIds = new ArrayList<>();
for (int i = 0; i < content.size(); i++) { for (int i = 0; i < content.size(); i++) {
JSONObject object = content.getJSONObject(i); JSONObject object = content.getJSONObject(i);

View File

@@ -78,7 +78,7 @@
point.is_used = 输入.is_used point.is_used = 输入.is_used
ENDOPTION ENDOPTION
OPTION 输入.name <> "" OPTION 输入.name <> ""
( point.point_code like "%" 输入.name "%" or point.point_name like "%" 输入.name "%" ) ( point.point_code like 输入.name or point.point_name like 输入.name )
ENDOPTION ENDOPTION
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY

View File

@@ -1,9 +1,9 @@
window.g = { window.g = {
dev: { dev: {
VUE_APP_BASE_API: 'http://localhost:8013' VUE_APP_BASE_API: 'http://localhost:8081'
}, },
prod: { prod: {
VUE_APP_BASE_API: 'http://localhost:8013' VUE_APP_BASE_API: 'http://localhost:8081'
} }

View File

@@ -22,7 +22,7 @@
<el-select <el-select
v-model="logLevelValue" v-model="logLevelValue"
clearable clearable
style="width: 10px; height: 35px;top: 0px;" style="width: 100px; height: 35px;top: 0px;"
placeholder="日志级别" placeholder="日志级别"
> >
<el-option <el-option