zhoushihao
2024-09-02 cfd9f0b05e4e9b46c4d72ec5cefd3c04648648ea
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/mapper/TemperingGlassInfoMapper.java
@@ -4,6 +4,8 @@
import com.github.yulichang.base.MPJBaseMapper;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@@ -19,5 +21,13 @@
public interface TemperingGlassInfoMapper extends MPJBaseMapper<TemperingGlassInfo> {
    boolean saveBatch(@Param(value = "list") List<TemperingGlassInfo> list);
    //绕过全局逻辑进行查询
    @Select("SELECT * FROM tempering_glass_info " + "WHERE tempering_layout_id = #{temperingLayoutId} " + "AND engineer_id = #{engineerId} " + "ORDER BY tempering_layout_id DESC, tempering_feed_sequence ASC")
    List<TemperingGlassInfo> selectByEngineerIdAndLayoutId(String engineerId, Integer temperingLayoutId);
    //绕过全局逻辑进行修改
    @Update("UPDATE tempering_glass_info " +
            "SET state = #{state}, " +
            "deleted = CASE WHEN #{state} < 8 THEN 0 ELSE deleted END " +
            "WHERE glass_id = #{glassId}")
    Integer updateTemperingGlassInfo(TemperingGlassInfo temperingGlassInfo);
}