严智鑫
2024-04-16 e208aa1ef8e861dba168e8d83ab3066fc9f1e02d
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/mapper/GlassInfoMapper.java
@@ -5,6 +5,7 @@
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.mapstruct.Mapper;
/**
 * <p>
@@ -14,13 +15,14 @@
 * @author zhoush
 * @since 2024-03-27
 */
@Mapper
public interface GlassInfoMapper extends BaseMapper<GlassInfo> {
    @Select("SELECT COUNT(*) FROM glass_info WHERE flowcard_id = #{flowCardId}")
    int getGlassInfoCountByFlowCardId(@Param("flowCardId") String flowCardId);
//    @Select("SELECT COUNT(*) FROM glass_info WHERE flowcard_id = #{flowCardId}")
//    int getGlassInfoCountByFlowCardId(@Param("flowCardId") String flowCardId);
    @Update("UPDATE down_workstation SET  total_quantity = #{glassInfoCount},flow_card_id=#{flowCardId} WHERE workstation_id = #{workstationId}")
    int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount,@Param("workstationId")int workstationId);
//    @Update("UPDATE down_workstation SET  total_quantity = #{glassInfoCount},flow_card_id=#{flowCardId} WHERE workstation_id = #{workstationId}")
//    int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount,@Param("workstationId")int workstationId);
}