Package org.bgerp.plugin.pln.callboard.dao

# Class ShiftDAO

java.lang.Object
ru.bgcrm.dao.CommonDAO
org.bgerp.plugin.pln.callboard.dao.ShiftDAO

public class ShiftDAO extends CommonDAO

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAO

  `CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id>`

- ## Field Summary

  ### Fields inherited from class ru.bgcrm.dao.CommonDAO

  `con, log, SQL_AND, SQL_DELETE, SQL_DELETE_FROM, SQL_DESC, SQL_DISTINCT, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT_IGNORE_INTO, SQL_INSERT_INTO, SQL_LEFT_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UNION_ALL, SQL_UPDATE, SQL_VALUES, SQL_VALUES_1, SQL_VALUES_2, SQL_VALUES_3, SQL_VALUES_4, SQL_VALUES_5, SQL_WHERE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ShiftDAO(Connection con)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCallboardTask(int process_id, int group, int team, int graph, Date date)`
  `void`
  `deleteCallboardTask(int process_id)`
  `void`
  `deleteCallboardTask(int process_id, int group, int team, int graph, Date date)`
  `void`
  `deleteShift(int id)`
  `void`
  `deleteWorkShift(int graphId, int groupId, int userId, Date date)`
  `List<WorkShift>`
  `findSameWorkShift(WorkShift workShift)`
  `Map<Integer,Shift>`
  `getAllShiftMap()`
  `Map<Integer,Map<Integer,Set<Date>>>`
  `getAvailableDateForShift(CallboardConfig.Callboard callboard, Map<Integer,List<Integer>> groupWithUsersMap, Date fromDate, Date toDate)`
  `List<CallboardTask>`
  `getDateTaskList(Date date)`
  `Map<Date,Set<WorkShift>>`
  `getMonthWorkShift(Date date, int groupId)`
  `int`
  `getSameWorkTypeShiftCount(int workTypeId, int workShiftId, int time_from, int time_to)`
  `Shift`
  `getShift(int id)`
  `Shift`
  `getShift(int id, int category)`
  `static Shift`
  `getShiftFromRs(ResultSet rs)`
  `List<Shift>`
  `getShiftList(int category)`
  `List<Shift>`
  `getShiftList(Set<Integer> shiftIds)`
  `Map<Integer,Integer>`
  `getShiftOrder(int graphId, int groupId)`
  `Map<Integer,Map<Date,WorkShift>>`
  `getUserShifts(int graphId, Date fromDate, Date toDate)`
  `WorkShift`
  `getWorkShift(int graphId, int groupId, int userId, Date date)`
  `Map<Integer,List<WorkShift>>`
  `getWorkShift(CallboardConfig.Callboard callboard, Date fromDate, Date toDate, Map<Integer,List<Integer>> groupWithUsersSet)`
  `Set<WorkShift>`
  `getWorkShiftSetFor(Date date, int userId)`
  `boolean`
  `isTimeOccupied(int group, int team, int graph, Date date)`
  `void`
  `searchShift(Pageable<Shift> searchResult, int category)`
  `void`
  `setDynamicShiftTime(int workShiftId, int timeBegin, int timeEnd)`
  `void`
  `updateShift(Shift shift)`
  `void`
  `updateShiftOrder(int graphId, int groupId, Map<Integer,Integer> orderMap)`
  `void`
  `updateWorkShift(WorkShift workShift)`

  ### Methods inherited from class ru.bgcrm.dao.CommonDAO

  `deleteById, foundRows, getById, getGroupedIds, getGroupedIds, getIds, getIds, getPageLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, update, updateColumn, updateIds, updateIds, updateOrInsert`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ShiftDAO

    public ShiftDAO(Connection con)

- ## Method Details

  - ### searchShift

    public void searchShift(Pageable<Shift> searchResult, int category)

  - ### getShiftList

    public List<Shift> getShiftList(int category)

  - ### getShiftList

    public List<Shift> getShiftList(Set<Integer> shiftIds)

  - ### getAllShiftMap

    public Map<Integer,Shift> getAllShiftMap()

  - ### getShiftFromRs

    public static Shift getShiftFromRs(ResultSet rs)

  - ### getShift

    public Shift getShift(int id, int category)

  - ### getShift

    public Shift getShift(int id)

  - ### deleteShift

    public void deleteShift(int id)

  - ### updateShift

    public void updateShift(Shift shift)

  - ### getWorkShift

    public WorkShift getWorkShift(int graphId, int groupId, int userId, Date date)

  - ### getWorkShift

    public Map<Integer,List<WorkShift>> getWorkShift(CallboardConfig.Callboard callboard, Date fromDate, Date toDate, Map<Integer,List<Integer>> groupWithUsersSet)

  - ### getAvailableDateForShift

    public Map<Integer,Map<Integer,Set<Date>>> getAvailableDateForShift(CallboardConfig.Callboard callboard, Map<Integer,List<Integer>> groupWithUsersMap, Date fromDate, Date toDate)

  - ### getUserShifts

    public Map<Integer,Map<Date,WorkShift>> getUserShifts(int graphId, Date fromDate, Date toDate)

  - ### getWorkShiftSetFor

    public Set<WorkShift> getWorkShiftSetFor(Date date, int userId)

  - ### getMonthWorkShift

    public Map<Date,Set<WorkShift>> getMonthWorkShift(Date date, int groupId)

  - ### updateWorkShift

    public void updateWorkShift(WorkShift workShift)

  - ### deleteWorkShift

    public void deleteWorkShift(int graphId, int groupId, int userId, Date date)

  - ### addCallboardTask

    public void addCallboardTask(int process_id, int group, int team, int graph, Date date)

  - ### deleteCallboardTask

    public void deleteCallboardTask(int process_id, int group, int team, int graph, Date date)

  - ### deleteCallboardTask

    public void deleteCallboardTask(int process_id)

  - ### isTimeOccupied

    public boolean isTimeOccupied(int group, int team, int graph, Date date)

  - ### getDateTaskList

    public List<CallboardTask> getDateTaskList(Date date)

  - ### findSameWorkShift

    public List<WorkShift> findSameWorkShift(WorkShift workShift)

  - ### updateShiftOrder

    public void updateShiftOrder(int graphId, int groupId, Map<Integer,Integer> orderMap)

  - ### getShiftOrder

    public Map<Integer,Integer> getShiftOrder(int graphId, int groupId)

  - ### setDynamicShiftTime

    public void setDynamicShiftTime(int workShiftId, int timeBegin, int timeEnd)

  - ### getSameWorkTypeShiftCount

    public int getSameWorkTypeShiftCount(int workTypeId, int workShiftId, int time_from, int time_to)