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