psh 10 months ago
parent
commit
43921ffb6b
  1. 16
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java
  2. 8
      lms/nladmin-ui/src/views/wms/sch/task/index.vue

16
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java

@ -228,7 +228,8 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
} }
// 根据标识找到任务 // 根据标识找到任务
SchBaseTask taskOne = schBaseTaskMapper.selectById(task_id); 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("任务已完成或已取消!"); throw new BadRequestException("任务已完成或已取消!");
} }
// 根据配置去工厂类获得类对象 // 根据配置去工厂类获得类对象
@ -248,9 +249,22 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
case "cancel": case "cancel":
abstractTask.cancel(task_id); abstractTask.cancel(task_id);
break; break;
case "feedback":
sendToMes(taskOne);
break;
default: default:
break; 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!");
}
}
} }

8
lms/nladmin-ui/src/views/wms/sch/task/index.vue

@ -233,6 +233,12 @@
:disabled="scope.row.task_status==='5' || scope.row.task_status==='6'" :disabled="scope.row.task_status==='5' || scope.row.task_status==='6'"
@click="doOperate(scope.row, 'b')" @click="doOperate(scope.row, 'b')"
>取消</el-button> >取消</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -352,6 +358,8 @@ export default {
case 'd':// case 'd'://
method_name = 'view' method_name = 'view'
break break
case 'e':// MES
method_name = 'feedback'
} }
if (method_name === 'view') { if (method_name === 'view') {
// this.view(row) // this.view(row)

Loading…
Cancel
Save