Commit cc01344c authored by 李驰骋's avatar 李驰骋

看板过滤关闭的工单任务

parent c2729836
......@@ -6,6 +6,7 @@ import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ximai.common.utils.data.StringUtils;
import com.ximai.mes.constant.TaskWorkunitStatusEnum;
import com.ximai.mes.constant.WorkorderStatusEnum;
import com.ximai.mes.kanban.dto.task.TaskPlanQuery;
import com.ximai.mes.kanban.dto.task.TaskPlanStatDto;
import com.ximai.mes.kanban.dto.task.TaskStatDto;
......@@ -243,6 +244,7 @@ public class KanbanTaskService {
query.gt("ptw.schedule_start_date", curr.plusDays(-3));
query.eq(StringUtils.isNotEmpty(taskPlanQuery.getLineName()), "wu.line_name", taskPlanQuery.getLineName());
query.orderByDesc("ordinal","schedule_start_date");
query.ne("wo.status", WorkorderStatusEnum.CLOSE.getValue());
List<ProTaskWorkunitDto> dataList = taskWorkunitMapper.selectTaskWorkUnitWithKanban(query);
//合并相同批号任务
Map<String,List<ProTaskWorkunitDto>> dataMap = dataList.stream().collect(Collectors.groupingBy(s->s.getTaskBatch()));
......
......@@ -227,7 +227,7 @@ public interface ProTaskWorkunitMapper extends BaseMapper<ProTaskWorkunit> {
"left join pro_task_workorder tw on t2.task_id = tw.task_id\n" +
"left join pro_workorder wo on wo.workorder_id = tw.workorder_id\n" +
"where t1.schedule_end_date > #{startDate} and t1.schedule_end_date < #{endDate} \n" +
"and t2.is_last_process = 1 group by t2.arrange_code,wo.product_name")
"and t2.is_last_process = 1 and wo.status <> 'close' group by t2.arrange_code,wo.product_name")
List<MesDataDto.OrderInfoDto> selectTaskWorkUnitWithKanban2(@Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
/**
......@@ -236,9 +236,9 @@ public interface ProTaskWorkunitMapper extends BaseMapper<ProTaskWorkunit> {
* @param endDate 结束时间
* @return
*/
@Select(value = "select ifnull(sum(t1.quantity),0) denominator,ifnull(sum(t1.quantity_produced),0) numerator from pro_task_workunit t1 left join pro_task t2 on t1.task_id = t2.task_id\n" +
@Select(value = "select ifnull(sum(t1.quantity),0) denominator,ifnull(sum(t1.quantity_produced),0) numerator from pro_task_workunit t1 left join pro_task t2 on t1.task_id = t2.task_id left join pro_task_workorder tw on t2.task_id = tw.task_id left join pro_workorder wo on wo.workorder_id = tw.workorder_id\n" +
"where t1.schedule_end_date > #{startDate} and t1.schedule_end_date < #{endDate} \n" +
"and t2.is_last_process = 1")
"and t2.is_last_process = 1 and wo.status <> 'close'")
BasicRatio selectStockInCompleteRatio(@Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment