| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @AllArgsConstructor |
| | | public class ProductProcessRouteItemServiceImpl extends ServiceImpl<ProductProcessRouteItemMapper, ProductProcessRouteItem> implements ProductProcessRouteItemService { |
| | | |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private ProductionProductMainService productionProductMainService; |
| | | |
| | | private ProductProcessRouteItemMapper productProcessRouteItemMapper; |
| | | |
| | | private ProductionProductMainMapper productionProductMainMapper; |
| | | |
| | | private ProductionProductInputMapper productionProductInputMapper; |
| | | |
| | | private ProductionProductOutputMapper productionProductOutputMapper; |
| | | |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | |
| | | private SalesLedgerProductionAccountingMapper salesLedgerProductionAccountingMapper; |
| | | |
| | |
| | | |
| | | private ProductOrderMapper productOrderMapper; |
| | | |
| | | private ProductProcessRouteMapper productProcessRouteMapper; |
| | | |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | String datePrefix = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | if (insert > 0) { |
| | | // 查询今日已存在的最大工单号 |
| | | QueryWrapper<ProductWorkOrder> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.likeRight("work_order_no", datePrefix) |
| | | .orderByDesc("work_order_no") |
| | | .last("LIMIT 1"); |
| | | ProductWorkOrder lastWorkOrder = productWorkOrderMapper.selectOne(queryWrapper); |
| | | ProductWorkOrder lastWorkOrder = productWorkOrderMapper.selectMax(datePrefix); |
| | | int sequenceNumber = 1; // 默认序号 |
| | | if (lastWorkOrder != null && lastWorkOrder.getWorkOrderNo() != null) { |
| | | String lastNo = lastWorkOrder.getWorkOrderNo().toString(); |