wu
2024-05-06 a76880c78045275a2d8b9312ed4c7b9c232e69ed
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java
@@ -1,12 +1,10 @@
package com.mes.uppattenusage.service.impl;
package com.mes.glassinfo.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.downworkstation.entity.DownWorkstation;
import com.mes.uppattenusage.entity.GlassInfo;
import com.mes.uppattenusage.mapper.GlassInfoMapper;
import com.mes.uppattenusage.service.GlassInfoService;
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;
@@ -15,7 +13,7 @@
/**
 * <p>
 *  服务实现类
 * 服务实现类
 * </p>
 *
 * @author zhoush
@@ -34,30 +32,26 @@
    @Override
    public int getGlassInfoCountByFlowCardId(String flowCardId) {
        QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("flowcard_id", flowCardId);
        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 flowcard_id"));
        return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flow_card_id"));
    }
    @Override
    public GlassInfo selectGlassId(String id) {
        QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id", id);
        queryWrapper.eq("glass_id", id);
        return baseMapper.selectOne(queryWrapper);
    }
//    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 和数量失败");
//        }
//    }
}