wuyouming666
2024-04-11 873114cc56fb6181db86fef920520e218257e235
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
package com.mes.uppattenusage.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.uppattenusage.entity.GlassInfo;
import com.mes.uppattenusage.mapper.GlassInfoMapper;
import com.mes.uppattenusage.service.GlassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
/**
 * <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) {
        return glassInfoMapper.getGlassInfoCountByFlowCardId(flowCardId);
    }
 
    @Override
    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 和数量失败");
        }
    }
}