This commit is contained in:
psh
2024-03-26 09:18:50 +08:00
parent 52fb8e45f8
commit 43921ffb6b
2 changed files with 23 additions and 1 deletions

View File

@@ -228,7 +228,8 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
}
// 根据标识找到任务
SchBaseTask taskOne = schBaseTaskMapper.selectById(task_id);
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())) {
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())
&&!"feedback".equals(method_name)) {
throw new BadRequestException("任务已完成或已取消!");
}
// 根据配置去工厂类获得类对象
@@ -248,9 +249,22 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
case "cancel":
abstractTask.cancel(task_id);
break;
case "feedback":
sendToMes(taskOne);
break;
default:
break;
}
}
private void sendToMes(SchBaseTask task){
if(task.getPoint_code2().startsWith("YL")){
// QPMES062
}else if(task.getPoint_code2().startsWith("HW")){
// QPMES065
}else{
throw new RuntimeException("目的地非入原材料库或出库无需反馈MES");
}
}
}

View File

@@ -233,6 +233,12 @@
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
@click="doOperate(scope.row, 'b')"
>取消</el-button>
<!-- <el-button
type="text"
icon="el-icon-upload"
:disabled="scope.row.task_status!=='5' && scope.row.task_status!=='6'"
@click="doOperate(scope.row, 'e')"
>MES反馈</el-button> -->
</template>
</el-table-column>
</el-table>
@@ -352,6 +358,8 @@ export default {
case 'd':// 详情
method_name = 'view'
break
case 'e':// 反馈MES
method_name = 'feedback'
}
if (method_name === 'view') {
// this.view(row)