Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-01-16 09:59:45 +08:00
100 changed files with 1414 additions and 2241 deletions

View File

@@ -8,7 +8,6 @@ import lombok.Data;
import org.springframework.stereotype.Component;
@Data
@Component
public class CommonFinalParam {
private final String DELETE = "0";

View File

@@ -66,7 +66,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
/**
/**
* 心跳
*/
Integer heartbeat = 0;
@@ -76,17 +76,17 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
*/
Integer item_deviceCode = 0;
Integer last_item_deviceCode = 0;
/**
/**
* 工作模式
*/
Integer mode = 0;
Integer last_mode = 0;
/**
*作业状态
* 作业状态
*/
Integer command = 0;
Integer last_command = 0;
/**
/**
* 任务号
*/
Integer task = 0;
@@ -111,7 +111,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
*/
Integer y = 0;
Integer last_y = 0;
/**
/**
* 行走开关信号
*/
Float move = 0F;
@@ -121,12 +121,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
*/
Float cargoMove = 0F;
Float last_cargoMove = 0F;
/**
/**
* 行走动作信号
*/
Float action = 0F;
Float last_action = 0F;
/**
/**
* 行走激光数值
*/
Integer distancex = 0;
@@ -137,41 +137,41 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
Integer distancey = 0;
Integer last_distancey = 0;
/**
*载货台超限信号
* 载货台超限信号
*/
Float cargoError = 0F;
Float last_cargoError = 0F;
/**
*货叉探货信号
* 货叉探货信号
*/
Float forkCargo = 0F;
Float last_forkCargo = 0F;
/**
*货叉位置信号
* 货叉位置信号
*/
Float forkLocation = 0F;
Float last_forkLocation = 0F;
/**
*货叉动作信号
* 货叉动作信号
*/
Float forkAction = 0F;
Float last_forkAction = 0F;
/**
/**
* 特殊开关量1
*/
Float special1 = 0F;
Float last_special1 = 0F;
/**
/**
* 特殊开关量2
*/
Float special2 = 0F;
Float last_special2 = 0F;
/**
*托盘条码
* 托盘条码
*/
int[] trayCode;
int[] last_trayCode;
/**
/**
* 水箱和消防缓存位有无货
*/
Float storage_cache = 0F;
@@ -181,58 +181,58 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
*/
Integer stacker_rpm = 0;
Integer last_stacker_rpm = 0;
/**
/**
* 电流
*/
Integer stacker_electricCurrent = 0;
Integer last_stacker_electricCurrent = 0;
/**
/**
* 轴运行次数
*/
Integer stacker_runing_time = 0;
Integer last_stacker_runing_time = 0;
/**
/**
* 轴工作时间(小时)
*/
Integer stacker_workingHours = 0;
Integer last_stacker_workingHours = 0;
/**
*载货台速度(转/分钟)
* 载货台速度(转/分钟)
*/
Integer cargo_rpm = 0;
Integer last_cargo_rpm = 0;
/**
*载货台电流
* 载货台电流
*/
Integer cargo_electric_Current = 0;
Integer last_cargo_electric_Current = 0;
/**
*载货台轴工作小时数
* 载货台轴工作小时数
*/
Integer cargo_workingHour = 0;
Integer last_cargo_workingHour = 0;
/**
*载货台轴运行次数
* 载货台轴运行次数
*/
Integer cargo_runingTimes = 0;
Integer last_cargo_runingTimes = 0;
/**
*货叉速度(转/分钟
* 货叉速度(转/分钟
*/
Integer fork_rpm = 0;
Integer last_fork_rpm = 0;
/**
*货叉电流
* 货叉电流
*/
Integer fork_electric_Current = 0;
Integer last_fork_electric_Current = 0;
/**
*货叉轴工作时间(小时
* 货叉轴工作时间(小时
*/
Integer fork_workingHours = 0;
Integer last_fork_workingHours = 0;
/**
*货叉轴运行次数
* 货叉轴运行次数
*/
Integer fork_runingTimes = 0;
Integer last_fork_runingTimes = 0;
@@ -250,7 +250,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
List<String> getDeviceCodeList = null;
List<String> putDeviceCodeList = null;
/**
/**
* 请求成功标记
*/
Boolean requireSucess = false;
@@ -459,7 +459,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
//更改指令状态
if (task > 0) {
Instruction inst = checkInst();
if (inst != null) {
if (ObjectUtil.isNotEmpty(inst)) {
if (StrUtil.equals(inst.getInstruction_status(), "0")) {
inst.setInstruction_status(CommonFinalParam.ONE);
inst.setExecute_device_code(this.device_code);
@@ -730,7 +730,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
}
map.put("to_x", inst.getFrom_y());
}
if(ObjectUtil.isNotEmpty(map)){
if (ObjectUtil.isNotEmpty(map)) {
list.add(map);
this.writing(list);
}
@@ -828,7 +828,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
if (command == 8) {
map.put("to_command", 8);
}
if(ObjectUtil.isNotEmpty(map)){
if (ObjectUtil.isNotEmpty(map)) {
list.add(map);
this.writing(list);
}
@@ -873,6 +873,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
}
}
/**
* 完成指令
*
@@ -926,7 +927,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
}
/**
/**
* 将扩展表中的字符串数据转换成集合
*/
@Override

View File

@@ -6,6 +6,7 @@ import org.nl.acs.ext.wms.data.one.BaseRequest;
@Data
public class FeedBackTaskStatusRequest extends BaseRequest {
/**
* 任务id
*/

View File

@@ -131,10 +131,9 @@ public interface TaskService extends CommonService<Task> {
/**
* 查询所有数据不分页
*
* @param whereJson 条件参数
* @return List<TaskDto>
*/
List<TaskDto> queryAll(String whereJson);
List<TaskDto> queryAll();
/**
* 根据状态查询
@@ -177,6 +176,13 @@ public interface TaskService extends CommonService<Task> {
*/
List<TaskDto> queryByStauts(String task_status);
/**
* 根绝状态查询缓存
* @param task_status
* @return
*/
List<TaskDto> findByTaskStatus(String task_status);
/**
* 根据编码查询
*
@@ -234,14 +240,6 @@ public interface TaskService extends CommonService<Task> {
List<TaskDto> queryTaskByNextAndIntStatus(String head_next_device_code);
/**
* 根据关联编号查询非立刻下发的关联任务
*
* @param link_num
* @return TaskDto
*/
TaskDto queryTaskByLinkNum(String link_num);
/**
* 创建
*
@@ -297,14 +295,6 @@ public interface TaskService extends CommonService<Task> {
void cancel(String ids) throws Exception;
/**
* 取消任务
*
* @param ids
* @throws Exception
*/
void cancelNoSendWms(String ids) throws Exception;
/**
* 手动创建指令
*
@@ -314,24 +304,6 @@ public interface TaskService extends CommonService<Task> {
*/
Instruction createInst(String ids) throws Exception;
/**
* 手动创建指令
*
* @param inst
* @return
* @throws Exception
*/
Instruction createInst(Instruction inst) throws Exception;
/**
* '
* 创建指令
*
* @param dto
* @return
*/
Instruction createTemporaryInst(TaskDto dto);
/**
* 导出数据
@@ -351,14 +323,6 @@ public interface TaskService extends CommonService<Task> {
void createTaskByClick(JSONObject json);
/**
* 检查是否允许创建任务
*
* @param code
* @return
*/
int checkAllowCreate(String code);
/**
* 从缓存中删除任务
*
@@ -367,6 +331,13 @@ public interface TaskService extends CommonService<Task> {
*/
boolean removeByCodeFromCache(String code);
/**
* 向缓存中添加就绪和执行中任务
*
* @param taskDto
*/
void addTaskToCache(TaskDto taskDto);
/**
* 根据容器编号查询任务
*
@@ -392,21 +363,6 @@ public interface TaskService extends CommonService<Task> {
*/
TaskDto findByNextCode(String device_code);
/**
* 根据目的地设备编号查询当前是否有设备
*
* @param device_code
* @return
*/
List<TaskDto> findAllByNextCode(String device_code);
/**
* 根据设备编号查询当前是否有设备
*
* @param device_code
* @return
*/
Integer queryAllTaskMaterialQty(String device_code);
/**
* 根据起点设备编号查询当前是否有设备
@@ -467,13 +423,6 @@ public interface TaskService extends CommonService<Task> {
*/
String queryAssignedByDevice(String device_code, String task_nextdevice_code);
/**
* 查询相同任务类型的数量
*
* @param taskType
* @return
*/
Integer querySameTaskByType(String taskType);
/**
* 查询相同起点任务的数量
@@ -492,17 +441,6 @@ public interface TaskService extends CommonService<Task> {
Integer querySameDestinationTask(String code);
/**
* 查询相同起终任务的数量
*
* @param start_device
* @param next_device
* @param status
* @return Integer
*/
Integer querySameDeviceReadyTask(String start_device, String next_device, String status);
/**
* 条件查询任务和指令
*

View File

@@ -45,8 +45,7 @@ public class CreateDDJInst {
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineService.class);
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
DeviceExtraService deviceExtra = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
List<TaskDto> taskDtos = taskserver.queryByStauts("0");
List<TaskDto> taskDtos = taskserver.findByTaskStatus("0");
List<TaskDto> taskDtoList = new ArrayList<>();
if (CollUtil.isEmpty(taskDtos) || taskDtos.size() < 1) {
} else {
@@ -69,7 +68,7 @@ public class CreateDDJInst {
if (ObjectUtils.isEmpty(list)) {
throw new BadRequestException("路由不通");
}
RouteLineDto routeLineDto = (RouteLineDto) list.get(0);
RouteLineDto routeLineDto = list.get(0);
String[] path = routeLineDto.getPath().split("->");
List<String> pathlist = Arrays.asList(path);
String deviceType = appService.findDeviceByCode(pathlist.get(1)).getDevice_type();
@@ -137,7 +136,6 @@ public class CreateDDJInst {
RouteLineDto routeLineDto1 = shortPathsList.get(0);
String path1 = routeLineDto1.getPath();
String type1 = routeLineDto1.getType();
String[] str = path1.split("->");
List<String> pathlist1 = Arrays.asList(str);

View File

@@ -32,6 +32,7 @@
<el-date-picker
v-model="value"
type="datetimerange"
style="height: 30.5px; display: inline-block; vertical-align: middle; margin: 0 3px 10px 0; line-height: 30.5px;"
:end-placeholder="$t('errorLog.table.end_time')"
:start-placeholder="$t('errorLog.table.start_time')"
value-format="yyyy-MM-dd HH:mm:ss"

View File

@@ -337,6 +337,11 @@
<el-form-item :label="$t('task.txt_box.Vehicle_number')">
<el-input v-model="form.vehicle_code" style="width: 370px;" @change="isDisabled=false" />
</el-form-item>
<el-form-item label="扩展字段">
<div>
<el-button @click="openDialog">请选择</el-button>
</div>
</el-form-item>
<el-form-item :label="$t('task.select.Description')" prop="description">
<el-input v-model="form.remark" style="width: 370px;" type="textarea" @change="isDisabled=false" />
</el-form-item>
@@ -348,6 +353,58 @@
<el-button :loading="crud.cu === 2" :disabled="isDisabled" type="primary" @click="saveBtn">{{ $t('task.select.Confirm') }}</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" title="扩展字段" @close="closeDialog">
<el-form>
<el-form-item>
<el-button v-if="showAddRowButton" style="color: #6b75e9;" @click="addNewRow">添加新行</el-button>
</el-form-item>
<el-form-item>
<el-form>
<el-table
style="width: 100%;"
:header-cell-style="{'text-align':'center'}"
:data="extension"
stripe
border
>
<el-table-column type="index" label="序号" min-width="50" />
<el-table-column label="扩展字段" prop="name" min-width="115">
<template slot-scope="scope">
<el-select
v-model="scope.row.name"
class="extended-field-select"
filterable
placeholder="请选择"
>
<el-option
v-for="item in dict.kezhuan"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="扩展字段值" prop="value" min-width="115">
<template slot-scope="scope">
<el-input v-model="scope.row.value" style="width: 100%" />
</template>
</el-table-column>
<el-table-column label="操作" min-width="115" align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-minus" circle @click="deleteField(scope.$index)" />
</template>
</el-table-column>
</el-table>
</el-form>
</el-form-item>
<div class="button-container">
<el-button type="danger" @click="cancelForm">取消</el-button>
<!-- 确认按钮 -->
<el-button type="primary" @click="saveForm">确认</el-button>
</div>
</el-form>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="25" />
@@ -459,7 +516,7 @@ import i18n from '@/i18n'
export default {
name: 'Task',
components: { pagination, crudOperation },
dicts: ['task_status', 'task_type', 'agv_system_type', 'storage_task_type'],
dicts: ['task_status', 'task_type', 'agv_system_type', 'storage_task_type', 'kezhuan'],
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({ title: i18n.t('task.txt_box.Task'), url: 'api/task', idField: 'task_id', sort: 'task_id,desc',
@@ -536,6 +593,7 @@ export default {
edit: ['admin', 'task:edit'],
del: ['admin', 'task:del']
},
showAddRowButton: true,
form: {
task_id: null,
vehicle_code: null,
@@ -561,6 +619,11 @@ export default {
to_z: null,
agv_system_type: '1'
},
extension: [{
name: '',
value: ''
}],
dialogVisible: false,
rules: {
start_point_code: [
{ required: true, message: '起点不能为空', trigger: 'change' }
@@ -595,12 +658,48 @@ export default {
})
},
methods: {
addNewRow() {
this.extension.push({
name: '',
value: ''
})
},
deleteField(index) { // 添加字段的时候删除一条数据
if (this.extension.length > 1) {
this.extension.splice(index, 1)
}
},
cancelForm() {
// 清空表单数据
this.extension = [{
name: '',
value: '' }]
this.dialogVisible = false
},
saveForm() {
// 保存表单数据
// 你可以在这里处理保存逻辑,并发送请求保存表单数据
this.extension.reduce((form, item) => {
form[item.name] = item.value
return form
}, this.form)
this.dialogVisible = false
},
saveBtn() {
crudTask.add(this.form).then(res => {
this.crud.toQuery()
this.formDia = false
this.isDisabled = true
})
this.extension = [{
name: '',
value: '' }]
},
openDialog() {
this.dialogVisible = true
},
closeDialog() {
this.dialogVisible = false
},
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
@@ -766,4 +865,10 @@ export default {
.el-icon-arrow-down {
font-size: 12px;
}
.button-container {
display: flex;
justify-content: flex-end;
align-items: flex-end;
}
</style>

View File

@@ -31,4 +31,4 @@ export function edit(data) {
})
}
export default { add, edit, del }
export default { getDicts, add, edit, del }