wuyouming666
2024-04-29 6f39f26611a67e6c3edf561337490a270444c256
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.mes.glassinfo.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.mapper.GlassInfoMapper;
import com.mes.glassinfo.service.GlassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhoush
 * @since 2024-03-27
 */
@Service
public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService {
 
    private GlassInfoMapper glassInfoMapper;
 
    @Autowired
    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);
    }
 
    @Override
    public List<Map<String, Object>> getFlowCardId() {
        return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flow_card_id"));
    }
 
 
 
    @Override
    public GlassInfo selectGlassId(String id) {
        QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("glass_id", id);
 
        return baseMapper.selectOne(queryWrapper);
    }
 
 
 
}