| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.engineering.entity.Engineering; |
| | | import com.mes.engineering.mapper.EngineeringMapper; |
| | | import com.mes.engineering.service.EngineeringService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<UpPattenUsage> selectLoadTask(Integer cell) { |
| | | //获取正在上片的任务id |
| | | Engineering engineering= engineeringService.selectInitiates(1,cell); |
| | | //log.info("将参数传入到查询类里{}",engineering); |
| | | if(engineering!=null){ |
| | | LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(UpPattenUsage::getEngineeringId, engineering.getEngineerId()); |
| | | return this.list(wrapper); |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void saveUpPattenUsage(List<UpPattenUsage> upPattenUsage) { |
| | | this.saveBatch(upPattenUsage); |
| | | //保存原片使用详情表 |
| | | if (CollectionUtil.isEmpty(upPattenUsage)){ |
| | | return; |
| | | } |
| | | String engineerId = upPattenUsage.get(0).getEngineeringId(); |
| | | int count = this.count(new LambdaQueryWrapper<UpPattenUsage>().eq(UpPattenUsage::getEngineeringId, engineerId)); |
| | | if (count <=0){ |
| | | //保存原片使用详情表 |
| | | this.saveBatch(upPattenUsage); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | log.info("查询预览参数{}", this.getOne(wrapper)); |
| | | return this.getOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteTask(String engineerId) { |
| | | QueryWrapper<UpPattenUsage> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("engineering_id",engineerId); |
| | | this.remove(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public UpPattenUsage selectOverTask() { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Engineering> setRawGlassTaskRequest(Engineering request) { |
| | | return null; |
| | | } |
| | | |
| | | public Object Engineering(Engineering request) { |
| | | return null; |
| | | } |