package cn.com.lzt.userattendancetotal.dao; import java.util.List; import org.jeecgframework.minidao.annotation.MiniDao; import org.jeecgframework.minidao.annotation.Param; import org.jeecgframework.minidao.annotation.Sql; import cn.com.lzt.userattendancetotal.entity.UserAttendanceTotalEntity; @MiniDao public interface UserAttendanceTotalDao { /** * 查询员工的工资策略 * @param userid * @param monthly * @return */ @Sql("select * from t_bus_user_attendance_total where user_id = :userid and yearmonth = :monthly") public List getByuserid(@Param("userid")String userid,@Param("monthly")String monthly); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql(" DELETE FROM t_bus_user_attendance_detail"+ " where attendance_id in ("+ " SELECT id FROM t_bus_user_attendance_total"+ " where yearmonth = :yearmonth"+ " )") public Integer deleteUserAttendanceDetail( @Param("yearmonth")String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql("DELETE FROM t_bus_user_attendance_total where yearmonth =:yearmonth") public Integer deleteUserAttendanceTotal( @Param("yearmonth") String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql(" UPDATE t_bus_user_attendance_detail SET YMD_DATE='1999-10-10'"+ " where attendance_id in ("+ " SELECT id FROM t_bus_user_attendance_total"+ " where yearmonth = :yearmonth"+ " )") public Integer updateExpiredUserAttendanceDetail( @Param("yearmonth")String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql("UPDATE t_bus_user_attendance_total SET YEARMONTH='1999-10' where yearmonth =:yearmonth") public Integer updateExpiredUserAttendanceTotal( @Param("yearmonth") String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql(" DELETE FROM t_bus_user_attendance_detail"+ " where attendance_id in ("+ " SELECT id FROM t_bus_user_attendance_total"+ " where user_id=:userid and yearmonth = :yearmonth"+ " )") public Integer deleteUserAttendanceDetailByUserId(@Param("userid")String userid, @Param("yearmonth")String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql("DELETE FROM t_bus_user_attendance_total where yearmonth =:yearmonth and user_id=:userid") public Integer deleteUserAttendanceTotalByUserId(@Param("userid")String userid, @Param("yearmonth") String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql(" UPDATE t_bus_user_attendance_detail SET YMD_DATE='1999-10-10'"+ " where attendance_id in ("+ " SELECT id FROM t_bus_user_attendance_total"+ " where user_id=:userid and yearmonth = :yearmonth"+ " )") public Integer updateExpiredUserAttendanceDetailByUserId(@Param("userid")String userid, @Param("yearmonth")String yearmonth); /** * * @author hualong.zhao * @date 2018-1-29 * @param yearmonth * @return */ @Sql("UPDATE t_bus_user_attendance_total SET YEARMONTH='1999-10' where yearmonth =:yearmonth and user_id=:userid") public Integer updateExpiredUserAttendanceTotalByUserId(@Param("userid")String userid, @Param("yearmonth") String yearmonth); }