OapiAttendanceApproveScheduleSwitchRequest.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.attendance.approve.schedule.switch request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.09.19
  7. */
  8. class OapiAttendanceApproveScheduleSwitchRequest
  9. {
  10. /**
  11. * 申请人换班日期当天的班次id
  12. **/
  13. private $applyShiftId;
  14. /**
  15. * 申请换班人id,仅支持排班制考勤组用户
  16. **/
  17. private $applyUserid;
  18. /**
  19. * 审批单唯一id
  20. **/
  21. private $approveId;
  22. /**
  23. * 申请人还班日期当天的班次id
  24. **/
  25. private $rebackApplyShiftId;
  26. /**
  27. * 还班日期,当天必须有排班或排休,如果申请换班人和被换班人是同一个人,那么必须要有还班日期
  28. **/
  29. private $rebackDate;
  30. /**
  31. * 被换班人还班日期当天的班次id
  32. **/
  33. private $rebackTargetShiftId;
  34. /**
  35. * 申请换班日期,当天必须有排班或排休
  36. **/
  37. private $switchDate;
  38. /**
  39. * 被换班人换班日期当天的班次id
  40. **/
  41. private $targetShiftId;
  42. /**
  43. * 被换班人id,仅支持排班制考勤组用户
  44. **/
  45. private $targetUserid;
  46. /**
  47. * 发起人的user_id
  48. **/
  49. private $userid;
  50. private $apiParas = array();
  51. public function setApplyShiftId($applyShiftId)
  52. {
  53. $this->applyShiftId = $applyShiftId;
  54. $this->apiParas["apply_shift_id"] = $applyShiftId;
  55. }
  56. public function getApplyShiftId()
  57. {
  58. return $this->applyShiftId;
  59. }
  60. public function setApplyUserid($applyUserid)
  61. {
  62. $this->applyUserid = $applyUserid;
  63. $this->apiParas["apply_userid"] = $applyUserid;
  64. }
  65. public function getApplyUserid()
  66. {
  67. return $this->applyUserid;
  68. }
  69. public function setApproveId($approveId)
  70. {
  71. $this->approveId = $approveId;
  72. $this->apiParas["approve_id"] = $approveId;
  73. }
  74. public function getApproveId()
  75. {
  76. return $this->approveId;
  77. }
  78. public function setRebackApplyShiftId($rebackApplyShiftId)
  79. {
  80. $this->rebackApplyShiftId = $rebackApplyShiftId;
  81. $this->apiParas["reback_apply_shift_id"] = $rebackApplyShiftId;
  82. }
  83. public function getRebackApplyShiftId()
  84. {
  85. return $this->rebackApplyShiftId;
  86. }
  87. public function setRebackDate($rebackDate)
  88. {
  89. $this->rebackDate = $rebackDate;
  90. $this->apiParas["reback_date"] = $rebackDate;
  91. }
  92. public function getRebackDate()
  93. {
  94. return $this->rebackDate;
  95. }
  96. public function setRebackTargetShiftId($rebackTargetShiftId)
  97. {
  98. $this->rebackTargetShiftId = $rebackTargetShiftId;
  99. $this->apiParas["reback_target_shift_id"] = $rebackTargetShiftId;
  100. }
  101. public function getRebackTargetShiftId()
  102. {
  103. return $this->rebackTargetShiftId;
  104. }
  105. public function setSwitchDate($switchDate)
  106. {
  107. $this->switchDate = $switchDate;
  108. $this->apiParas["switch_date"] = $switchDate;
  109. }
  110. public function getSwitchDate()
  111. {
  112. return $this->switchDate;
  113. }
  114. public function setTargetShiftId($targetShiftId)
  115. {
  116. $this->targetShiftId = $targetShiftId;
  117. $this->apiParas["target_shift_id"] = $targetShiftId;
  118. }
  119. public function getTargetShiftId()
  120. {
  121. return $this->targetShiftId;
  122. }
  123. public function setTargetUserid($targetUserid)
  124. {
  125. $this->targetUserid = $targetUserid;
  126. $this->apiParas["target_userid"] = $targetUserid;
  127. }
  128. public function getTargetUserid()
  129. {
  130. return $this->targetUserid;
  131. }
  132. public function setUserid($userid)
  133. {
  134. $this->userid = $userid;
  135. $this->apiParas["userid"] = $userid;
  136. }
  137. public function getUserid()
  138. {
  139. return $this->userid;
  140. }
  141. public function getApiMethodName()
  142. {
  143. return "dingtalk.oapi.attendance.approve.schedule.switch";
  144. }
  145. public function getApiParas()
  146. {
  147. return $this->apiParas;
  148. }
  149. public function check()
  150. {
  151. RequestCheckUtil::checkNotNull($this->applyUserid,"applyUserid");
  152. RequestCheckUtil::checkNotNull($this->approveId,"approveId");
  153. RequestCheckUtil::checkMaxLength($this->approveId,100,"approveId");
  154. RequestCheckUtil::checkNotNull($this->switchDate,"switchDate");
  155. RequestCheckUtil::checkNotNull($this->targetUserid,"targetUserid");
  156. RequestCheckUtil::checkNotNull($this->userid,"userid");
  157. }
  158. public function putOtherTextParam($key, $value) {
  159. $this->apiParas[$key] = $value;
  160. $this->$key = $value;
  161. }
  162. }