opt:优化点位及任务相关查询,操作

This commit is contained in:
2025-03-10 17:51:37 +08:00
parent 48dc9de1e0
commit fa85da9eb3
31 changed files with 37 additions and 19 deletions

View File

@@ -82,7 +82,7 @@ public enum StatusEnum {
"空货架", "0", null, "满货架", "1", null
)),
BIND_TYPE(ForkMap.of(
"解绑", "0", null, "绑定", "1", null
"解绑", "0", null, "绑定", "1", null, "不操作", "3", null
));
/**
* L:label

View File

@@ -82,7 +82,7 @@ public class ErpServiceUtils {
}
}
} else {
throw new BadRequestException("系统正在自动同步ERP单据正占用接口资源请稍后再试");
throw new BadRequestException("系统正在自动同步ERP单据正占用接口资源请稍后再试1");
}
} catch (Exception ex) {
throw new BadRequestException(ex.getMessage());
@@ -115,7 +115,7 @@ public class ErpServiceUtils {
result.add(jsonObject);
}
} else {
throw new BadRequestException("系统正在自动同步ERP单据正占用接口资源请稍后再试");
throw new BadRequestException("系统正在自动同步ERP单据正占用接口资源请稍后再试2");
}
} catch (Exception ex) {
throw new BadRequestException(ex.getMessage());

View File

@@ -64,11 +64,15 @@ public class SchBasePointController {
public ResponseEntity<Object> update(@Validated @RequestBody SchBasePoint entity) {
LambdaUpdateWrapper<SchBasePoint> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
//绑定或解绑
if (entity.getVehicle_code() != null) {
TableDataInfo result = pointService.bindOrUnbind(entity.getCode(), entity.getVehicle_code(), (entity.getPriority()));
if (!"200".equals(result.getCode())) {
throw new BadRequestException( "地面站点:" + entity.getCode() + "绑定或解绑" + entity.getVehicle_code() + "指令下发CTU返回操作失败失败原因:" +result.getMsg());
if (StringUtils.isNotBlank(entity.getVehicle_code())) {
if (!"3".equals(entity.getPriority())) {
TableDataInfo result = pointService.bindOrUnbind(entity.getCode(), entity.getVehicle_code(), (entity.getPriority()));
if (!"200".equals(result.getCode())) {
throw new BadRequestException("地面站点:" + entity.getCode() + "绑定或解绑" + entity.getVehicle_code() + "指令下发CTU返回操作失败失败原因:" + result.getMsg());
}
}
} else {
lambdaUpdateWrapper.set(SchBasePoint::getVehicle_code, null);
}
lambdaUpdateWrapper.set(SchBasePoint::getProduct_area, entity.getProduct_area());
lambdaUpdateWrapper.set(SchBasePoint::getRegion_code, entity.getRegion_code());

View File

@@ -87,8 +87,8 @@ public class SecondFloorEmptyShelfTask extends AbstractTask {
.eq(SchBasePoint::getCode, schBaseTask.getPoint_code1()));
//货架绑定
TableDataInfo tableDataInfo = iSchBasePointService.bindOrUnbind(schBaseTask.getPoint_code2(), schBaseTask.getVehicle_code(), "1");
String bindResult = "200".equals(tableDataInfo.getCode()) ? "地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑成功!" :
"地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑失败,请操作站点绑定,失败原因:" + tableDataInfo.getMsg();
String bindResult = "200".equals(tableDataInfo.getCode()) ? "地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑成功!" :
"地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑失败,请操作站点绑定,失败原因:" + tableDataInfo.getMsg();
iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>()
.set(SchBaseTask::getRemark, bindResult)
.eq(SchBaseTask::getId, schBaseTask.getId()));

View File

@@ -153,9 +153,8 @@ public class DeviceManageController {
HashMap<String, String> map = new HashMap<>();
ArrayList<Map> list = new ArrayList<>();
list.add(MapOf.of("text","二楼出库点","value","2127"));
list.add(MapOf.of("text","三楼出库点","value","3104"));
list.add(MapOf.of("text","三楼出库点","value","3110"));
list.add(MapOf.of("text","一楼出库点","value","1131"));
return new ResponseEntity<>(list,HttpStatus.OK);
}
@PostMapping("transfConfirm")

View File

@@ -212,7 +212,7 @@ public class SyncErpBillsScheduleService {
return "同步成功,共计" + result.size() + "";
}
}else {
throw new BadRequestException("系统正在自动同步ERP单据正占用接口资源请稍后再试");
throw new BadRequestException("3系统正在自动同步ERP单据正占用接口资源请稍后再试3");
}
} catch (Exception ex) {
throw new BadRequestException(ex.getMessage());