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 "空货架", "0", null, "满货架", "1", null
)), )),
BIND_TYPE(ForkMap.of( BIND_TYPE(ForkMap.of(
"解绑", "0", null, "绑定", "1", null "解绑", "0", null, "绑定", "1", null, "不操作", "3", null
)); ));
/** /**
* L:label * L:label

View File

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

View File

@@ -64,11 +64,15 @@ public class SchBasePointController {
public ResponseEntity<Object> update(@Validated @RequestBody SchBasePoint entity) { public ResponseEntity<Object> update(@Validated @RequestBody SchBasePoint entity) {
LambdaUpdateWrapper<SchBasePoint> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<SchBasePoint> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
//绑定或解绑 //绑定或解绑
if (entity.getVehicle_code() != null) { if (StringUtils.isNotBlank(entity.getVehicle_code())) {
TableDataInfo result = pointService.bindOrUnbind(entity.getCode(), entity.getVehicle_code(), (entity.getPriority())); if (!"3".equals(entity.getPriority())) {
if (!"200".equals(result.getCode())) { TableDataInfo result = pointService.bindOrUnbind(entity.getCode(), entity.getVehicle_code(), (entity.getPriority()));
throw new BadRequestException( "地面站点:" + entity.getCode() + "绑定或解绑" + entity.getVehicle_code() + "指令下发CTU返回操作失败失败原因:" +result.getMsg()); 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::getProduct_area, entity.getProduct_area());
lambdaUpdateWrapper.set(SchBasePoint::getRegion_code, entity.getRegion_code()); 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())); .eq(SchBasePoint::getCode, schBaseTask.getPoint_code1()));
//货架绑定 //货架绑定
TableDataInfo tableDataInfo = iSchBasePointService.bindOrUnbind(schBaseTask.getPoint_code2(), schBaseTask.getVehicle_code(), "1"); TableDataInfo tableDataInfo = iSchBasePointService.bindOrUnbind(schBaseTask.getPoint_code2(), schBaseTask.getVehicle_code(), "1");
String bindResult = "200".equals(tableDataInfo.getCode()) ? "地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑成功!" : String bindResult = "200".equals(tableDataInfo.getCode()) ? "地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑成功!" :
"地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑失败,请操作站点绑定,失败原因:" + tableDataInfo.getMsg(); "地面站点:" + schBaseTask.getPoint_code2() + "" + schBaseTask.getVehicle_code() + "指令下发CTU返回绑失败,请操作站点绑定,失败原因:" + tableDataInfo.getMsg();
iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>() iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>()
.set(SchBaseTask::getRemark, bindResult) .set(SchBaseTask::getRemark, bindResult)
.eq(SchBaseTask::getId, schBaseTask.getId())); .eq(SchBaseTask::getId, schBaseTask.getId()));

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
ENV = 'development' ENV = 'development'
# 接口地址 # 接口地址
VUE_APP_BASE_API = 'http://127.0.0.1:8012' VUE_APP_BASE_API = 'http://127.0.0.1:8099'
VUE_APP_WS_API = 'ws://127.0.0.1:8012' VUE_APP_WS_API = 'ws://127.0.0.1:8099'
# 是否启用 babel-plugin-dynamic-import-node插件 # 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -169,6 +169,21 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="空架/满架" prop="point_type">
<el-select
v-model="form.point_type"
size="mini"
placeholder="空架/满架"
class="filter-item"
style="width: 370px;"
>
<el-option
v-for="item in statusEnum.POINT_TYPE"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="is_used"> <el-form-item label="是否启用" prop="is_used">
<el-switch v-model="form.is_used" :active-value=true :inactive-value=false /> <el-switch v-model="form.is_used" :active-value=true :inactive-value=false />
</el-form-item> </el-form-item>
@@ -235,11 +250,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="vehicle_code" label="载具编码" min-width="120" show-overflow-tooltip/> <el-table-column prop="vehicle_code" label="载具编码" min-width="120" show-overflow-tooltip/>
<el-table-column prop="priority" label="优先级"/> <!-- <el-table-column prop="priority" label="优先级"/>-->
<el-table-column prop="point_location" label="位置" min-width="120" show-overflow-tooltip/> <!-- <el-table-column prop="point_location" label="位置" min-width="120" show-overflow-tooltip/>-->
<el-table-column prop="group_code" label="点位组编码" min-width="120" show-overflow-tooltip/> <!-- <el-table-column prop="group_code" label="点位组编码" min-width="120" show-overflow-tooltip/>-->
<el-table-column prop="form_data" label="表单数据" min-width="120" show-overflow-tooltip/> <!-- <el-table-column prop="form_data" label="表单数据" min-width="120" show-overflow-tooltip/>-->
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip/> <el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" show-overflow-tooltip/>
<el-table-column prop="create_name" label="创建人"/> <el-table-column prop="create_name" label="创建人"/>
<el-table-column prop="create_time" label="创建时间" width="150"/> <el-table-column prop="create_time" label="创建时间" width="150"/>
<el-table-column prop="update_name" label="修改人" width="100"/> <el-table-column prop="update_name" label="修改人" width="100"/>