TaskHeaderTvService.java 2.58 KB
package com.huaheng.pc.task.taskHeader.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.common.utils.DataUtils;
import com.huaheng.common.utils.Wrappers;
import com.huaheng.common.utils.security.ShiroUtils;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail;
import com.huaheng.pc.inventory.cycleCountDetail.service.CycleCountDetailService;
import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderAGVService;
import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerHeader;
import com.huaheng.pc.shipment.shipmentContainerHeader.service.ShipmentContainerHeaderService;
import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class TaskHeaderTvService extends ServiceImpl<TaskHeaderMapper, TaskHeader> {

    @Resource
    private ReceiptHeaderService receiptHeaderService;
    @Resource
    private TaskDetailService taskDetailService;

    @Resource
    private ReceiptContainerHeaderService receiptContainerHeaderService;
    @Resource
    private ShipmentContainerHeaderService shipmentContainerHeaderService;
    @Resource
    private CycleCountDetailService cycleCountDetailService;
    @Resource
    private ReceiptContainerHeaderAGVService receiptContainerHeaderAGVService;


    /**
     * 根据站台任务给电视显示
     * @param port
     * @return
     */
    public List<TaskHeader> getTaskByTvPort(String port) {
        //查询的状态区间
        int taskStatus1 = 10;
        int taskStatus2 = 50;
        LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(TaskHeader::getPort, port);
        lambdaQueryWrapper.le(TaskHeader::getStatus, taskStatus2);
        lambdaQueryWrapper.orderByDesc(TaskHeader::getStatus);
        return this.list(lambdaQueryWrapper);
    }

}