wuyouming666
2024-04-09 6e9136d1e4ed83f9b789af1c4db150adca3488cc
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
package com.mes.service;
 
import com.mes.mapper.GlassInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
@Service
public class GlassInfoService {
 
    @Autowired
    private GlassInfoMapper glassInfoMapper;
 
    public int getGlassInfoCountByFlowCardId(String flowCardId) {
        return glassInfoMapper.getGlassInfoCountByFlowCardId(flowCardId);
    }
 
    public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount,int workstationId) {
        // 调用 GlassInfoMapper 的 updateFlowCardIdAndCount 方法
        int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount,workstationId);
        if (rowsAffected > 0) {
            System.out.println("更新架子上流程卡 ID 和数量成功");
        } else {
            System.out.println("更新架子上流程卡 ID 和数量失败");
        }
    }
 
    // 这里可以添加其他业务逻辑方法
}