diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskDispatchDetailTotalVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskDispatchDetailTotalVO.java index 87ee314..723b1c0 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskDispatchDetailTotalVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskDispatchDetailTotalVO.java @@ -105,4 +105,9 @@ public class TaskDispatchDetailTotalVO { @Schema(description = "每日最大运行时长") private BigDecimal maxLongTime; + + @Schema(description = "派工类型 生产任务|装配任务 PRODUCTION|ASSEMBLE") + private String dispatchType; + + } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java index c9aaff1..7e0c86c 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java @@ -266,6 +266,10 @@ public interface TaskDispatchDetailMapper extends BaseMapperX query2 = new MPJLambdaWrapper<>(); + //增加一个关联查询条件 ,装配派工只查装配派工,生产派工只查生产派工 + query2.selectAll(TaskDispatchDetailDO.class); + query2.leftJoin(TaskDispatchDO.class,"a",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId) + .eq(TaskDispatchDO::getDispatchType,pageTotalVO.getDispatchType()); query2.eq(TaskDispatchDetailDO::getDeviceModel, pageTotalVO.getDeviceModel()) .and(wrapper -> { wrapper.ge(TaskDispatchDetailDO::getStartTime, startDate) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue index 00d7af0..a9944ef 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detail.vue @@ -686,6 +686,7 @@ const clearWatches = () => { watches = []; // 重新初始化 }; + watch( () => formData.value.taskDispatchDetails, (newDetails) => { @@ -708,11 +709,27 @@ watch( console.log(`第 ${index + 1} 行的预计工时变化为: ${newWorkTime}`); console.log("detail==", detail) if(detail.startTime){ + //设置派工类型 + detail.dispatchType = "ASSEMBLE"; openDialogWT(detail); } } ); watches.push(unwatch); // 存储当前的取消监听函数 + //制造设备监听 + const unwatchDeviceModel = watch( + () => detail.deviceModel, + (newDeviceModel) => { + console.log(`第 ${index + 1} 行的制造设备变化为: ${newDeviceModel}`); + console.log("detail==", detail); + if (detail.startTime) { + //设置派工类型 + detail.dispatchType = "ASSEMBLE"; + openDialogWT(detail); + } + } + ); + watches.push(unwatchDeviceModel); }); }, { deep: true @@ -726,6 +743,13 @@ const openDialogWT = async (dataParam) => { dataList.value = []; if (data.total !== 0) { dataList.value = data.list; // 将获取到的数据存储到 dataList + for(var a=0;a detail.deviceModel, + (newDeviceModel) => { + console.log(`第 ${index + 1} 行的制造设备变化为: ${newDeviceModel}`); + console.log("detail==", detail); + if (detail.startTime) { + //设置派工类型 + detail.dispatchType = "PRODUCTION"; + openDialogWT(detail); + } + } + ); + watches.push(unwatchDeviceModel); }); }, { deep: true @@ -773,6 +789,13 @@ const openDialogWT = async (dataParam) => { dataList.value = []; if (data.total !== 0) { dataList.value = data.list; // 将获取到的数据存储到 dataList + for(var a=0;a