opt:优化点位及任务相关查询,操作
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user