| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Autowired |
| | | private DownWorkstationMapper downWorkstationMapper; |
| | | @Autowired(required=false) |
| | | @Autowired(required = false) |
| | | private DownWorkstationTaskMapper downWorkstationTaskMapper; |
| | | @Autowired |
| | | private DownGlassInfoService downGlassInfoService; |
| | |
| | | private DownGlassInfoMapper downGlassInfoMapper; |
| | | @Autowired |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Autowired |
| | | private DamageService damageservice; |
| | | |
| | | @Autowired |
| | | private DownWorkstationTaskService downWorkstationTaskService; |
| | |
| | | |
| | | //工位显示 |
| | | @Override |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(int start,int end) { |
| | | public List<Map<String, Object>> getTotalGlassDimensionsByWorkstation(int start, int end) { |
| | | MPJQueryWrapper<DownWorkstation> queryWrapper = new MPJQueryWrapper<>(); |
| | | queryWrapper.select("t.workstation_id", "t.flow_card_id", "COALESCE(SUM(b.width), 0) AS totalwidth", "COALESCE(SUM(b.height), 0) AS totalheight") |
| | | .leftJoin("down_glass_info b on t.flow_card_id = b.flow_card_id") |
| | |
| | | |
| | | ; |
| | | |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | // List<DownWorkstionAndDownGlassinfo> workstationList = null; |
| | | List<DownWorkstionAndDownGlassinfo> workstationList = downWorkstationMapper.selectJoinList(DownWorkstionAndDownGlassinfo.class, queryWrapper); |
| | | // List<DownWorkstionAndDownGlassinfo> workstationList = null; |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DownWorkstionAndDownGlassinfo downWorkstionAndDownGlassinfo : workstationList) { |
| | | Map<String, Object> rack = new HashMap<>(); |
| | |
| | | List<DownGlassInfo> downGlassInfoList = downGlassInfoMapper.selectList(glassInfoQueryWrapper); |
| | | |
| | | |
| | | if (!downGlassInfoList.isEmpty()) { |
| | | if (!downGlassInfoList.isEmpty()) { |
| | | |
| | | item.put("downGlassInfoList", downGlassInfoList); |
| | | |
| | |
| | | rack.put("item", item); |
| | | result.add(rack); |
| | | } |
| | | log.info("result"+(result)); |
| | | log.info("result" + (result)); |
| | | return result; // 返回最终结果 |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | public int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | public int updateFlowCardIdAndCount(String flowCardId, int workstationId, int layer) { |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId, layer); |
| | | QueryWrapper<Damage> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("process_id", flowCardId); |
| | | queryWrapper.eq("technology_number", layer); |
| | | |
| | | int otherNumber = damageservice.count(queryWrapper); |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("total_quantity", glassInfoCount) |
| | | .set("flow_card_id", flowCardId) |
| | | .set("layer", layer) |
| | | .set("other_number", otherNumber) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | return baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | this.update(updateWrapper); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | baseMapper.update(new DownWorkstation(), updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | List<DownWorkstationTask> downWorkstationTasks = downWorkstationTaskMapper.selectList(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |