From af9b7a83cb3ec8599ed7acdbf836b0058f80e0c8 Mon Sep 17 00:00:00 2001 From: LGH <1746689524@qq.com> Date: Tue, 2 Aug 2022 23:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=E6=A0=87=E8=AF=86=E5=8D=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=AE=A2=E5=8D=95=E4=BD=99=E9=87=8Fbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=9A=E6=AD=A5=E9=AA=A4=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8F=AA=E8=AE=A1=E7=AE=97=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../empty/service/impl/CurrTaskDetServiceImpl.java | 11 +++++++++++ .../empty/service/impl/TaskDetHisServiceImpl.java | 11 +++++++++++ .../main/java/com/mt/wms/empty/vo/CurrTaskVo.java | 12 ++++++++++++ 3 files changed, 34 insertions(+) diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java index e316880..106e265 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java @@ -3,8 +3,10 @@ package com.mt.wms.empty.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mt.wms.core.base.BaseService; +import com.mt.wms.core.dal.entity.AutoExeTask; import com.mt.wms.core.dal.entity.CurrTaskDet; import com.mt.wms.core.dal.entity.OrderInfo; +import com.mt.wms.core.dal.service.AutoExeTaskServiceBiz; import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz; import com.mt.wms.core.dal.service.OrderInfoServiceBiz; import com.mt.wms.core.params.IdParam; @@ -44,6 +46,8 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe CurrTaskService currTaskService; @Autowired OrderInfoServiceBiz orderInfoService; + @Autowired + AutoExeTaskServiceBiz autoExeTaskServiceBiz; @Override public PageVo getCurrOrderCurrTask(OrderInfoTaskDetParam param) { @@ -120,6 +124,13 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe { list.remove(e); } + //如果是多步骤任务且不是第一步,移除对象 + if (byId.getIsAuto()==1){ + AutoExeTask autoExeTask = autoExeTaskServiceBiz.getById(byId.getAutoExeTaskId()); + if (!byId.getId().equals(autoExeTask.getFTaskId())){ + list.remove(e); + } + } }); //计算加工总数 double sumWeight = list.stream().mapToDouble(CurrTaskDet::getWeight).sum(); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java index 9ccc2e2..b9716f8 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java @@ -3,8 +3,10 @@ package com.mt.wms.empty.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mt.wms.core.base.BaseService; +import com.mt.wms.core.dal.entity.AutoExeTask; import com.mt.wms.core.dal.entity.OrderInfo; import com.mt.wms.core.dal.entity.TaskDetHis; +import com.mt.wms.core.dal.service.AutoExeTaskServiceBiz; import com.mt.wms.core.dal.service.OrderInfoServiceBiz; import com.mt.wms.core.dal.service.TaskDetHisServiceBiz; import com.mt.wms.core.params.IdParam; @@ -41,6 +43,8 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ TaskHisService taskhisService; @Autowired OrderInfoServiceBiz orderInfoService; + @Autowired + AutoExeTaskServiceBiz autoExeTaskServiceBiz; @Override public R save(TaskDetHis taskDetHis) { @@ -78,6 +82,13 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ { list.remove(e); } + //如果是多步骤任务且不是第一步,移除对象 + if (byId.getIsAuto()==1){ + AutoExeTask autoExeTask = autoExeTaskServiceBiz.getById(byId.getAutoExeTaskId()); + if (!byId.getId().equals(autoExeTask.getFTaskId())){ + list.remove(e); + } + } }); //计算加工总数 double sumWeight = list.stream().mapToDouble(TaskDetHis::getWeight).sum(); diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java index dd28d1d..c61cd1c 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskVo.java @@ -1,5 +1,6 @@ package com.mt.wms.empty.vo; +import com.baomidou.mybatisplus.annotation.TableField; import com.mt.wms.core.base.BaseVo; import com.mt.wms.core.vo.PageVo; import io.swagger.annotations.ApiModel; @@ -126,4 +127,15 @@ public class CurrTaskVo extends BaseVo implements PageVo.ConvertVo { */ @ApiModelProperty("location_name") private String locationName; + /** + * 是否自动执行: 0手动,1自动,如果是自动任务这里要监控进出和到缓存区的调度任务 + */ + @TableField("is_auto") + private Integer isAuto; + + /** + * 任务流程ID,关联流程表:t_auto_exe_task + */ + @TableField("auto_exe_task_id") + private Long autoExeTaskId; }