请求逻辑提示信息优化
This commit is contained in:
@@ -112,12 +112,12 @@ public class MydoJobController extends BaseController
|
||||
return toAjax(mydoJobService.deleteMydoJobByJobIds(jobIds));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:OuthandFinish')")
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:outhandFinish')")
|
||||
@Log(title = "出库手动完成", businessType = BusinessType.OTHER)
|
||||
@RequestMapping("/OuthandFinish")
|
||||
@RequestMapping("/outhandFinish")
|
||||
public AjaxResult manualCompleted(@RequestParam("jobIds")String[] jobIds)
|
||||
{
|
||||
return mydoJobService.OuthandFinish(jobIds);
|
||||
return mydoJobService.outhandFinish(jobIds);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('job:mydoJob:resendTaskToEntrance')")
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.ruoyi.job.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 作业信息Service接口
|
||||
@@ -92,7 +88,7 @@ public interface IMydoJobService
|
||||
|
||||
MydoJob selectMydoJobByEntranceList1(String entranceId);
|
||||
|
||||
AjaxResult OuthandFinish(String[] jobIds);
|
||||
AjaxResult outhandFinish(String[] jobIds);
|
||||
|
||||
AjaxResult ManuelTaskFinish(String taskNo);
|
||||
|
||||
|
||||
@@ -102,11 +102,15 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
mydoJobMapper.insertHistory(jobId);
|
||||
//当执行任务的【删除】操作时(特殊场景需要手动处理异常导致不需要入库时,此时不需要向回传异常)
|
||||
// 此处顺便处理对应任务号生成的堆垛机执行队列,省去sql直接表中删记录的操作
|
||||
String taskNo = selectMydoJobByJobId(jobId).getTaskNo();
|
||||
if (ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByTaskNo(taskNo) != null) {
|
||||
ddjDeviceExecutionQueueService.deleteDdjDeviceExecutionQueueByTaskNo(taskNo);
|
||||
if (selectMydoJobByJobId(jobId) != null){
|
||||
String taskNo = selectMydoJobByJobId(jobId).getTaskNo();
|
||||
if (ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByTaskNo(taskNo) != null) {
|
||||
ddjDeviceExecutionQueueService.deleteDdjDeviceExecutionQueueByTaskNo(taskNo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return mydoJobMapper.deleteMydoJobByJobIds(jobIds);
|
||||
}
|
||||
@@ -207,12 +211,11 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
|
||||
/**
|
||||
* 手动完成同一【作业单号】的作业
|
||||
* 如果【jobid】和【taskno】是一对多的情况,使用上一个方法<OuthandFinish>手动完成作业会导致整个【jobid】单据完成回传
|
||||
* @param jobIds
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult OuthandFinish(String[] jobIds) {
|
||||
public AjaxResult outhandFinish(String[] jobIds) {
|
||||
//获取所有符合【任务单号】的作业
|
||||
for (String jobId : jobIds) {
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ public class BaseController
|
||||
*/
|
||||
protected AjaxResult toAjax(int rows)
|
||||
{
|
||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
return rows != 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,7 @@ export function delMydoJob(jobId) {
|
||||
// 手动完成作业
|
||||
export function handFinish(jobIds) {
|
||||
return request({
|
||||
url: '/job/mydoJob/OuthandFinish',
|
||||
url: '/job/mydoJob/outhandFinish',
|
||||
method: 'get',
|
||||
params: { jobIds: jobIds }
|
||||
})
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
<!-- <el-table-column label="设备名称" prop="name"/>-->
|
||||
<el-table-column label="任务号" prop="taskNo"/>
|
||||
<el-table-column label="托盘条码" prop="trayCode"/>
|
||||
<el-table-column label="入库请求" prop="rkqq">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_rkqq" :value="scope.row.rkqq"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到位" prop="dw">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ssj_dw" :value="scope.row.dw"/>
|
||||
@@ -241,7 +246,7 @@ import { listDeviceCar, getDeviceCar, delDeviceCar, addDeviceCar, updateDeviceCa
|
||||
|
||||
export default {
|
||||
name: "deviceMonitor",
|
||||
dicts: ['ddj_task_status', 'ddj_sbzt', 'ddj_czfs', 'ddj_yxxf', 'ddj_hczt', 'ssj_dw', 'ssj_kx', 'ssj_ex','ssj_allow_put','tray_size','ssj_rkqq'],
|
||||
dicts: ['ddj_task_status', 'ddj_sbzt', 'ddj_czfs', 'ddj_yxxf', 'ddj_hczt', 'ssj_rkqq', 'ssj_dw', 'ssj_kx', 'ssj_ex','ssj_allow_put','tray_size','ssj_rkqq'],
|
||||
data() {
|
||||
return {
|
||||
// 查询参数
|
||||
|
||||
@@ -116,16 +116,19 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="OuthandFinish"
|
||||
v-hasPermi="['job:mydoJob:OuthandFinish']">手动完成</el-button>
|
||||
<el-button type="success" plain icon="el-icon-check" size="mini" :disabled="multiple" @click="outhandFinish"
|
||||
v-hasPermi="['job:mydoJob:outhandFinish']">手动完成
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-check" size="mini" :disabled="multiple"
|
||||
@click="handleDelete(scope.row)" v-hasPermi="['job:mydoJob:remove']">手动作废</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||
@click="cancelTask" v-hasPermi="['job:mydoJob:remove']">手动作废
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-edit" size="mini" :disabled="single"
|
||||
@click="onResendTaskClicked" v-hasPermi="['job:mydoJob:resendTaskToEntrance']">入库重新下发</el-button>
|
||||
@click="onResendTaskClicked" v-hasPermi="['job:mydoJob:resendTaskToEntrance']">入库重新下发
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@@ -369,8 +372,26 @@ export default {
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
}).catch(() => { })
|
||||
},
|
||||
OuthandFinish() {
|
||||
|
||||
cancelTask() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError("请选择需要手动作废的任务");
|
||||
return;
|
||||
}
|
||||
console.log(this.ids.join(','))
|
||||
|
||||
this.$modal.confirm('是否确认手动作废选中的任务?').then(() => {
|
||||
return delMydoJob(this.ids.join(','))
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("手动作废成功");
|
||||
}).catch(error => {
|
||||
// console.error('手动作废失败:', error);
|
||||
// this.$modal.msgError(`手动作废失败:${error.message || '未知错误'}`);
|
||||
});
|
||||
},
|
||||
|
||||
outhandFinish() {
|
||||
if (this.ids.length === 0) {
|
||||
this.$modal.msgError("请选择需要手动完成的任务");
|
||||
return;
|
||||
@@ -396,7 +417,7 @@ export default {
|
||||
this.$modal.confirm('是否确认重新下发选中的任务?').then(() => {
|
||||
return resendTaskToEntrance(jobId);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("手动完成成功");
|
||||
this.$modal.msgSuccess("重新下发成功");
|
||||
this.getList();
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user