| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.production.dto.ProductWorkOrderDto; |
| | | import com.ruoyi.production.mapper.ProductWorkOrderFileMapper; |
| | | import com.ruoyi.production.mapper.ProductWorkOrderMapper; |
| | | import com.ruoyi.production.pojo.ProductWorkOrder; |
| | | import com.ruoyi.production.pojo.ProductWorkOrderFile; |
| | | import com.ruoyi.production.service.ProductWorkOrderService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | public class ProductWorkOrderServiceImpl extends ServiceImpl<ProductWorkOrderMapper, ProductWorkOrder> implements ProductWorkOrderService { |
| | | |
| | | private ProductWorkOrderMapper productWorkOrdermapper; |
| | | private ProductWorkOrderFileMapper productWorkOrderFileMapper; |
| | | |
| | | @Override |
| | | public IPage<ProductWorkOrderDto> listPage(Page<ProductWorkOrderDto> page, ProductWorkOrderDto productWorkOrder) { |
| | | return productWorkOrdermapper.pageProductWorkOrder(page, productWorkOrder); |
| | | } |
| | | |
| | | @Override |
| | | public int updateProductWorkOrder(ProductWorkOrderDto productWorkOrderDto) { |
| | | return productWorkOrdermapper.updateById(productWorkOrderDto); |
| | | } |
| | | |
| | | @Override |
| | | public ProductWorkOrderDto getProductWorkOrderFlowCard(Long id) { |
| | | ProductWorkOrderDto productWorkOrderFlowCard = productWorkOrdermapper.getProductWorkOrderFlowCard(id); |
| | | List<ProductWorkOrderFile> productWorkOrderFiles = productWorkOrderFileMapper.selectList(Wrappers.<ProductWorkOrderFile>lambdaQuery().eq(ProductWorkOrderFile::getWorkOrderId, id)); |
| | | productWorkOrderFlowCard.setProductWorkOrderFiles(productWorkOrderFiles); |
| | | return productWorkOrderFlowCard; |
| | | } |
| | | |
| | | } |