| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakoutParam; |
| | | import com.zy.asrs.entity.result.OrderNameListDto; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.mapper.OrderMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.common.model.DetlDto; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private DocTypeService docTypeService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | |
| | | @Override |
| | | public List<OrderNameListDto> selectAllCombOrderNo() { |
| | | List<Order> list = this.selectList(new EntityWrapper<Order>().orderBy("create_time",false)); |
| | | if (Cools.isEmpty(list)){ |
| | | return null; |
| | | } |
| | | ArrayList<OrderNameListDto> orderNameListDtos = new ArrayList<>(); |
| | | for (Order order :list){ |
| | | DocType docType = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_id", order.getDocType())); |
| | | |
| | | if (order.getSettle() >= 4) { |
| | | continue; |
| | | } |
| | | |
| | | if (docType.getPakin() == 1){ |
| | | OrderNameListDto orderNameListDto = new OrderNameListDto(); |
| | | orderNameListDto.setOrder_no(order.getOrderNo()); |
| | | orderNameListDtos.add(orderNameListDto); |
| | | } |
| | | } |
| | | |
| | | return orderNameListDtos; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Order selectByNo(String orderNo) { |
| | |
| | | //当该订单明细数量==完成数量且>上报数量,上报状态为 否 或者 是 时都改成等待上报,定时器轮询等待上报进行上报 |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | if (Objects.equals(orderDetl.getAnfme(), orderDetl.getQty())&& |
| | | orderDetl.getQty()>orderDetl.getUnits() |
| | | orderDetl.getQty()>(orderDetl.getUnits() == null ? 0 : orderDetl.getUnits()) |
| | | &&orderDetl.getInspect()<2) { |
| | | |
| | | orderDetl.setInspect(2);//等待上报 |