| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | |
| | | private GlassInfoMapper glassInfoMapper; |
| | | |
| | | @Autowired |
| | | @Autowired(required=false) |
| | | public GlassInfoServiceImpl(GlassInfoMapper glassInfoMapper) { |
| | | this.glassInfoMapper = glassInfoMapper; |
| | | } |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flow_card_id", flowCardId); |
| | | |
| | | return baseMapper.selectCount(queryWrapper); |
| | | return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda() |
| | | .eq(GlassInfo::getFlowCardId, flowCardId)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getFlowCardId() { |
| | | return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flow_card_id")); |
| | | return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().lambda().select(GlassInfo::getFlowCardId).groupBy(GlassInfo::getFlowCardId)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GlassInfo selectGlassId(String id) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("glass_id", id); |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | return baseMapper.selectOne(new QueryWrapper<GlassInfo>().lambda() |
| | | .eq(GlassInfo::getGlassId, id)); |
| | | } |
| | | |
| | | |
| | | // public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | // int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | // if (rowsAffected > 0) { |
| | | // System.out.println("更新架子上流程卡 ID 和数量成功"); |
| | | // } else { |
| | | // System.out.println("更新架子上流程卡 ID 和数量失败"); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | } |