AttendanceWarnMsgMinidao.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package cn.com.lzt.attendancewarnmsg.dao;
  2. import java.util.List;
  3. import org.jeecgframework.minidao.annotation.Arguments;
  4. import org.jeecgframework.minidao.annotation.MiniDao;
  5. import org.jeecgframework.minidao.annotation.ResultType;
  6. import org.jeecgframework.minidao.annotation.Sql;
  7. import org.jeecgframework.minidao.pojo.MiniDaoPage;
  8. import cn.com.lzt.attendancewarnmsg.dto.AttendanceWarnMsgDto;
  9. import cn.com.lzt.attendancewarnmsg.dto.ProjectAbnormalDetailDto;
  10. import cn.com.lzt.projarrangedetail.entity.ProjarrangeDetailEntity;
  11. /**
  12. *考勤预警消息
  13. *
  14. */
  15. @MiniDao
  16. public interface AttendanceWarnMsgMinidao {
  17. /**
  18. * 考勤预警消息首页数据展示
  19. * @author zbw
  20. * 2017-11-5
  21. * @param arrangeDutyDto
  22. * @param page
  23. * @param rows
  24. * @param authSql
  25. * @return
  26. */
  27. @Arguments({"attendanceWarnMsgDto", "page", "rows","authSql"})
  28. @ResultType(AttendanceWarnMsgDto.class)
  29. public MiniDaoPage<AttendanceWarnMsgDto> getAttendanceWarnMsgDtoPage(
  30. AttendanceWarnMsgDto attendanceWarnMsgDto, int page, int rows, String authSql);
  31. /**
  32. * 项目排班详细表duty_type
  33. * @author hualong.zhao
  34. * @date 2017-12-20
  35. * @return
  36. */
  37. @Arguments({ "dutyType","ymdDate" })
  38. @ResultType(ProjarrangeDetailEntity.class)
  39. @Sql(" SELECT"+
  40. " t4.*"+
  41. " FROM"+
  42. " t_bus_user_arrange_detail t1"+
  43. " LEFT JOIN t_bus_calendar t2 ON t1.calendarid = t2.id"+
  44. " LEFT JOIN t_bus_arrange_duty t3 ON t1.shiftid = t3.id"+
  45. " LEFT JOIN t_bus_projarrange_detail t4 ON t4.id = t1.projarrange_detailid"+
  46. " WHERE"+
  47. " 1=1"+
  48. " <#if dutyType ?exists && dutyType?length gt 0>"+
  49. " and t3.duty_type = :dutyType"+
  50. " </#if>"+
  51. " "+
  52. " <#if ymdDate ?exists && ymdDate?length gt 0>"+
  53. " and t2.ymd_date = :ymdDate"+
  54. " </#if>"+
  55. " ")
  56. public List<ProjarrangeDetailEntity> getSpecialDutyBydateAndDutyType(String dutyType, String ymdDate);
  57. /**
  58. * 通过预警消息表, 结合考勤的班次表, 查看项目维度下的考勤异常信息
  59. * @author hualong.zhao
  60. * @date 2017-12-20
  61. * @param ymdDate
  62. * @return
  63. */
  64. @Arguments({ "ymdDate" })
  65. @ResultType(ProjectAbnormalDetailDto.class)
  66. public List<ProjectAbnormalDetailDto> getProjectAbnormalDetail(String ymdDate);
  67. /**
  68. * 无入参查询 , 查询系统的人事部人员 和管理层人员
  69. * 【查询对象】
  70. 1,人事部:A_HR 所有人
  71. 2,M管理层(总顾问+副经理+总经理)
  72. * @author hualong.zhao
  73. * @date 2017-12-27
  74. * @return AttendanceWarnMsgDto 其他值为空 只有userId 和 orgId 有值
  75. */
  76. @ResultType(AttendanceWarnMsgDto.class)
  77. @Sql("SELECT baseuser.id as userId FROM t_s_base_user baseuser LEFT JOIN t_s_role_user roleuser ON baseuser.id = roleuser.userid LEFT JOIN t_s_role role ON roleuser.roleid = role.id WHERE (role.rolecode LIKE 'A_HR%' OR role.rolecode LIKE 'M%') AND baseuser.status = '1' AND baseuser.delete_flag != '1'")
  78. public List<AttendanceWarnMsgDto> getAllLeaderUserIdList();
  79. @Arguments({ "orgid" })
  80. @ResultType(AttendanceWarnMsgDto.class)
  81. @Sql(" SELECT"+
  82. " tsru.userid as userId, :orgid as orgId "+
  83. " FROM"+
  84. " t_s_role_user tsru"+
  85. " LEFT JOIN t_s_role tsr ON tsru.roleid = tsr.id"+
  86. " LEFT JOIN t_s_user tur ON tsru.userid = tur.id"+
  87. " WHERE"+
  88. " tur.dev_flag = 0"+
  89. " AND tsru.userid IN ("+
  90. " SELECT"+
  91. " user_id"+
  92. " FROM"+
  93. " t_s_user_org"+
  94. " WHERE"+
  95. " STATUS = 0"+
  96. " AND org_id = :orgid"+
  97. " ) GROUP BY tsru.userid ")
  98. public List<AttendanceWarnMsgDto> getAllQYJLUserIdListByOrgid(String orgid);
  99. }