zentaomax.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. <?php
  2. /**
  3. * Save copy project.
  4. *
  5. * @param int $copyProjectID
  6. * @param string $model
  7. * @param object $executions
  8. * @param string $copyFrom
  9. * @access public
  10. * @return string
  11. */
  12. public function saveCopyProject($copyProjectID, $model = 'scrum', $executions = array(), $copyFrom = '')
  13. {
  14. return $this->loadExtension('zentaomax')->saveCopyProject($copyProjectID, $model, $executions, $copyFrom);
  15. }
  16. /**
  17. * Check create.
  18. *
  19. * @access public
  20. * @return bool
  21. */
  22. public function checkCreate($copyProjectID = 0)
  23. {
  24. return $this->loadExtension('zentaomax')->checkCreate($copyProjectID);
  25. }
  26. /**
  27. * Change execution deliverable.
  28. *
  29. * @param object $project
  30. * @access public
  31. * @return bool
  32. */
  33. public function changeExecutionDeliverable($project)
  34. {
  35. return $this->loadExtension('zentaomax')->changeExecutionDeliverable($project);
  36. }
  37. /**
  38. * check execution.
  39. *
  40. * @param array $executions
  41. * @param int $projectID
  42. * @param string $model
  43. * @access public
  44. * @return void
  45. */
  46. public function checkExecution($executions, $projectID = 0, $model = 'scrum')
  47. {
  48. return $this->loadExtension('zentaomax')->checkExecution($executions, $projectID, $model);
  49. }
  50. /**
  51. * Save process.
  52. *
  53. * @param int $copyProjectID
  54. * @param int $executionID
  55. * @param int $lastExecutionID
  56. * @param string $model
  57. * @access public
  58. * @return void
  59. */
  60. public function saveProcess($copyProjectID, $projectID, $executionID, $lastExecutionID, $model)
  61. {
  62. return $this->loadExtension('zentaomax')->saveProcess($copyProjectID, $projectID, $executionID, $lastExecutionID, $model);
  63. }
  64. /**
  65. * 复制项目的任务关系。
  66. * Copy project task relations.
  67. *
  68. * @param int $copyProjectID
  69. * @param int $projectID
  70. * @param array $executionIdList
  71. * @param array $taskIdList
  72. * @access public
  73. * @return bool
  74. */
  75. public function copyProjectTaskRelations($copyProjectID, $projectID, $executionIdList, $taskIdList)
  76. {
  77. return $this->loadExtension('zentaomax')->copyProjectTaskRelations($copyProjectID, $projectID, $executionIdList, $taskIdList);
  78. }
  79. /**
  80. * 复制项目的审批设置。
  81. * Copy project approval flow objects.
  82. *
  83. * @param int $copyProjectID
  84. * @param int $projectID
  85. * @access public
  86. * @return bool
  87. */
  88. public function copyProjectApprovalFlow($copyProjectID, $projectID)
  89. {
  90. return $this->loadExtension('zentaomax')->copyProjectApprovalFlow($copyProjectID, $projectID);
  91. }
  92. /**
  93. * 复制迭代的模块。
  94. * Copy execution Module.
  95. *
  96. * @param int $executionID
  97. * @param int $lastExecutionID
  98. * @access public
  99. * @return array
  100. */
  101. public function copyExecutionTaskModule($executionID, $lastExecutionID)
  102. {
  103. return $this->loadExtension('zentaomax')->copyExecutionTaskModule($executionID, $lastExecutionID);
  104. }
  105. /**
  106. * 复制项目的评审点。
  107. * Copy project review point.
  108. *
  109. * @param int $copyProjectID
  110. * @param int $projectID
  111. * @access public
  112. * @return bool
  113. */
  114. public function copyProjectReviewPoint($copyProjectID, $projectID)
  115. {
  116. return $this->loadExtension('zentaomax')->copyProjectReviewPoint($copyProjectID, $projectID);
  117. }
  118. /**
  119. * Save QA.
  120. *
  121. * @param int $copyProjectID
  122. * @param int $projectID
  123. * @param int $executionID
  124. * @param int $lastExecutionID
  125. * @access public
  126. * @return void
  127. */
  128. public function saveQA($copyProjectID, $projectID, $executionID, $lastExecutionID)
  129. {
  130. return $this->loadExtension('zentaomax')->saveQA($copyProjectID, $projectID, $executionID, $lastExecutionID);
  131. }
  132. /**
  133. * Save task.
  134. *
  135. * @param int $copyProjectID
  136. * @param int $projectID
  137. * @param int $executionID
  138. * @param int $lastExecutionID
  139. * @param array $moduleList
  140. * @param string $copyFrom
  141. * @access public
  142. * @return void
  143. */
  144. public function saveTask($copyProjectID, $projectID, $executionID, $lastExecutionID, $moduleList, $copyFrom = '')
  145. {
  146. return $this->loadExtension('zentaomax')->saveTask($copyProjectID, $projectID, $executionID, $lastExecutionID, $copyFrom);
  147. }
  148. /**
  149. * Save execution doc lib.
  150. *
  151. * @param int $executionID
  152. * @param int $lastExecutionID
  153. * @access public
  154. * @return void
  155. */
  156. public function saveExecutionDocLib($executionID, $lastExecutionID, $projectID)
  157. {
  158. return $this->loadExtension('zentaomax')->saveExecutionDocLib($executionID, $lastExecutionID, $projectID);
  159. }
  160. /**
  161. * Save project doc lib.
  162. *
  163. * @param int $copyProjectID
  164. * @param int $projectID
  165. * @access public
  166. * @return void
  167. */
  168. public function saveProjectDocLib($copyProjectID, $projectID)
  169. {
  170. return $this->loadExtension('zentaomax')->saveProjectDocLib($copyProjectID, $projectID);
  171. }
  172. /**
  173. * Save team.
  174. *
  175. * @param int $copyObjectID
  176. * @param int $objectID
  177. * @param string $type
  178. * @access public
  179. * @return void
  180. */
  181. public function saveTeam($copyObjectID, $objectID, $type = 'project')
  182. {
  183. return $this->loadExtension('zentaomax')->saveTask($copyObjectID, $objectID, $type);
  184. }
  185. /**
  186. * Save stakeholder.
  187. *
  188. * @param int $copyProjectID
  189. * @param int $projectID
  190. * @access public
  191. * @return void
  192. */
  193. public function saveStakeholder($copyProjectID, $projectID)
  194. {
  195. return $this->loadExtension('zentaomax')->saveStakeholder($copyProjectID, $projectID);
  196. }
  197. /**
  198. * Save group.
  199. *
  200. * @param int $copyProjectID
  201. * @param int $projectID
  202. * @access public
  203. * @return void
  204. */
  205. public function saveGroup($copyProjectID, $projectID)
  206. {
  207. return $this->loadExtension('zentaomax')->saveGroup($copyProjectID, $projectID);
  208. }
  209. /**
  210. * Save RD kanban.
  211. *
  212. * @param int $execution
  213. * @param int $lastExecutionID
  214. * @access public
  215. * @return void
  216. */
  217. public function saveKanban($execuitonID, $lastExecutionID)
  218. {
  219. return $this->loadExtension('zentaomax')->saveKanban($execuitonID, $lastExecutionID);
  220. }
  221. /**
  222. * Set menu of project module.
  223. *
  224. * @param int $projectID
  225. * @access public
  226. * @return int|false
  227. */
  228. public function setMenu($projectID)
  229. {
  230. return $this->loadExtension('zentaomax')->setMenu($projectID);
  231. }
  232. /**
  233. * 检查名称唯一性.
  234. * Check name unique.
  235. *
  236. * @param array $names
  237. * @access public
  238. * @return bool
  239. */
  240. public function checkNameUnique($names)
  241. {
  242. return $this->loadExtension('zentaomax')->checkNameUnique($names);
  243. }
  244. /**
  245. * 创建一个项目。
  246. * Create a project.
  247. *
  248. * @param object $project
  249. * @param object $postData
  250. * @access public
  251. * @return int|bool
  252. */
  253. public function create($project, $postData)
  254. {
  255. return $this->loadExtension('zentaomax')->create($project, $postData);
  256. }
  257. /**
  258. * 关闭项目并更改其状态
  259. * Close project and update status.
  260. *
  261. * @param int $projectID
  262. * @param object $project
  263. *
  264. * @access public
  265. * @return array|false
  266. */
  267. public function close($projectID, $project)
  268. {
  269. return $this->loadExtension('zentaomax')->close($projectID, $project);
  270. }
  271. /**
  272. * 添加默认交付物。
  273. * Add default deliverable.
  274. *
  275. * @param int $projectID
  276. * @param int $groupID
  277. * @access public
  278. * @return void
  279. */
  280. public function addDefaultDeliverable($projectID, $groupID)
  281. {
  282. return $this->loadExtension('zentaomax')->addDefaultDeliverable($projectID, $groupID);
  283. }
  284. /**
  285. * 获取项目交付物键值对。
  286. * Get deliverable pairs.
  287. *
  288. * @param int $projectID
  289. * @param string $status
  290. * @access public
  291. * @return array
  292. * @param string $frozen
  293. */
  294. public function getDeliverablePairs($projectID, $status = '', $frozen = 'all')
  295. {
  296. return $this->loadExtension('zentaomax')->getDeliverablePairs($projectID, $status, $frozen);
  297. }
  298. /**
  299. * 获取按照交付物类型分组的项目交付物。
  300. * Get deliverable group by category.
  301. *
  302. * @param int $projectID
  303. * @param string $status
  304. * @access public
  305. * @return array
  306. */
  307. public function getDeliverableGroupByCategory($projectID, $status = '')
  308. {
  309. return $this->loadExtension('zentaomax')->getDeliverableGroupByCategory($projectID, $status);
  310. }
  311. /**
  312. * 获取项目可提交评审交付物键值对。
  313. * Get deliverable pairs for submit review.
  314. *
  315. * @param int $projectID
  316. * @param int $categoryID
  317. * @param int $reviewID
  318. * @param int $deliverableID
  319. * @access public
  320. * @return array
  321. */
  322. public function getCanSubmitDeliverablePairs($projectID, $categoryID = 0, $reviewID = 0, $deliverableID = 0)
  323. {
  324. return $this->loadExtension('zentaomax')->getCanSubmitDeliverablePairs($projectID, $categoryID, $reviewID, $deliverableID);
  325. }
  326. /**
  327. * 获取项目的交付物列表。
  328. * Get project deliverable list.
  329. *
  330. * @param int $projectID
  331. * @param string $browseType
  332. * @param int|string $param
  333. * @param string $orderBy
  334. * @param object|null $pager
  335. * @access public
  336. * @return array
  337. */
  338. public function getDeliverableList($projectID, $browseType = 'normal', $param = 0, $orderBy = 'id_desc', $pager = null)
  339. {
  340. return $this->loadExtension('zentaomax')->getDeliverableList($projectID, $browseType, $param, $orderBy, $pager);
  341. }
  342. /**
  343. * 获取项目的待评审交付物列表。
  344. * Get project wait deliverable list.
  345. *
  346. * @param int $projectID
  347. * @param string $orderBy
  348. * @param object|null $pager
  349. * @access public
  350. * @return array
  351. */
  352. public function getWaitDeliverableList($projectID, $orderBy = 'id_desc', $pager = null)
  353. {
  354. return $this->loadExtension('zentaomax')->getWaitDeliverableList($projectID, $orderBy, $pager);
  355. }
  356. /**
  357. * 获取后台的交付物配置。
  358. * Get deliverables for backend.
  359. *
  360. * @param int $groupID
  361. * @param string $stageType project|stageList(release|design|request|mix...)|sprint|kanban
  362. * @param int $objectID
  363. * @param string $status
  364. * @param int $appendID
  365. * @param bool $excludeSystemList
  366. * @param int $projectID
  367. * @access public
  368. * @return array
  369. */
  370. public function getDeliverables($groupID, $stageType = 'project', $objectID = 0, $status = 'enabled', $appendID = 0, $excludeSystemList = false, $projectID = 0)
  371. {
  372. return $this->loadExtension('zentaomax')->getDeliverables($groupID, $stageType, $objectID, $status, $appendID, $excludeSystemList, $projectID);
  373. }
  374. /**
  375. * 获取项目的交付物,包含已上传的和未上传的。
  376. * Get project deliverables, include uploaded and not uploaded.
  377. *
  378. * @param int $groupID
  379. * @param string $type project|stageList(release|design|request|mix...)|sprint|kanban
  380. * @param array $projectDeliverables
  381. * @param int $objectID
  382. * @param bool $withName
  383. * @access public
  384. * @return string
  385. */
  386. public function getProjectDeliverables($groupID, $type = 'project', $projectDeliverables = array(), $objectID = 0, $withName = false)
  387. {
  388. return $this->loadExtension('zentaomax')->getProjectDeliverables($groupID, $type, $projectDeliverables, $objectID, $withName);
  389. }
  390. /**
  391. * 填充交付物附件和文档用于展示。
  392. * Fill deliverable file and doc for display.
  393. *
  394. * @param array $deliverables
  395. * @param string $objectType project|execution
  396. * @access public
  397. * @return array
  398. */
  399. public function fillDocForDisplay($deliverables, $objectType = 'project')
  400. {
  401. return $this->loadExtension('zentaomax')->fillDocForDisplay($deliverables, $objectType);
  402. }
  403. /**
  404. * 检查项目是否提交过交付物。
  405. * Check uploaded deliverable.
  406. *
  407. * @param int $projectID
  408. * @access public
  409. * @return bool
  410. */
  411. public function checkUploadedDeliverable($projectID)
  412. {
  413. return $this->loadExtension('zentaomax')->checkUploadedDeliverable($projectID);
  414. }
  415. /**
  416. * 保存单个交付物。
  417. * Save single deliverable.
  418. *
  419. * @param object $project
  420. * @param array $postData
  421. * @param object $deliverable
  422. * @access public
  423. * @return bool
  424. */
  425. public function saveSingleDeliverable($project, $postData, $deliverable)
  426. {
  427. return $this->loadExtension('zentaomax')->saveSingleDeliverable($project, $postData, $deliverable);
  428. }
  429. /**
  430. * 维护交付物页面的保存逻辑。
  431. * Save deliverable.
  432. *
  433. * @param object $object
  434. * @param array $newDeliverables
  435. * @access public
  436. * @return bool
  437. */
  438. public function saveDeliverable($object, $newDeliverables)
  439. {
  440. return $this->loadExtension('zentaomax')->saveDeliverable($object, $newDeliverables);
  441. }
  442. /**
  443. * 计算交付物数量。
  444. * Count deliverable.
  445. *
  446. * @param array $objects
  447. * @param string $objectType
  448. * @access public
  449. * @return array
  450. */
  451. public function countDeliverable($objects, $objectType = 'project')
  452. {
  453. return $this->loadExtension('zentaomax')->countDeliverable($objects, $objectType);
  454. }
  455. /**
  456. * 获取项目模板列表。
  457. * Get template list.
  458. *
  459. * @param string $status
  460. * @param string $orderBy
  461. * @param object $pager
  462. * @access public
  463. * @return array
  464. */
  465. public function getTemplateList($status = 'all', $orderBy = 'id_asc', $pager = null)
  466. {
  467. return $this->loadExtension('zentaomax')->getTemplateList($status, $orderBy, $pager);
  468. }
  469. /**
  470. * 更新项目模板。
  471. * Update project template.
  472. *
  473. * @param int $projectID
  474. * @param object $project
  475. * @param object $oldProject
  476. * @access public
  477. * @return bool|array
  478. */
  479. public function updateTemplate($projectID, $project, $oldProject)
  480. {
  481. return $this->loadExtension('zentaomax')->updateTemplate($projectID, $project, $oldProject);
  482. }
  483. /**
  484. * 获取交付物模板项。
  485. * Get deliverable template items.
  486. *
  487. * @param string $template
  488. * @param string $type
  489. * @param int $objectID
  490. * @access public
  491. * @return array
  492. */
  493. public function getTemplateItems($template, $type, $objectID)
  494. {
  495. return $this->loadExtension('zentaomax')->getTemplateItems($template, $type, $objectID);
  496. }
  497. /**
  498. * 检查交付物是否必填。
  499. * Check deliverable is required.
  500. *
  501. * @param array $categories
  502. * @param array $currentDeliverables
  503. * @access public
  504. * @return bool
  505. */
  506. public function checkDeliverables($categories, $currentDeliverables)
  507. {
  508. return $this->loadExtension('zentaomax')->checkDeliverables($categories, $currentDeliverables);
  509. }
  510. /*
  511. * 保存复制的执行。
  512. * Save copy executions.
  513. *
  514. * @param array $insertExecutions
  515. * @param int $productID
  516. * @param int $copyProjectID
  517. * @param object $project
  518. * @param int $projectID
  519. * @param string $model
  520. * @param string $copyFrom
  521. * @access public
  522. * @return array
  523. */
  524. public function saveExecutions($insertExecutions = array(), $productID = 0, $copyProjectID = 0, $project = null, $projectID = 0, $model = 'scrum', $copyFrom = '')
  525. {
  526. return $this->loadExtension('zentaomax')->saveExecutions($insertExecutions, $productID, $copyProjectID, $project, $projectID, $model, $copyFrom);
  527. }
  528. /**
  529. * 构建交付物搜索表单。
  530. * Build deliverable search form.
  531. *
  532. * @param string $actionURL
  533. * @param int $queryID
  534. * @param int $projectID
  535. * @access public
  536. * @return void
  537. */
  538. public function buildDeliverableSearchForm($actionURL, $queryID, $projectID)
  539. {
  540. return $this->loadExtension('zentaomax')->buildDeliverableSearchForm($actionURL, $queryID, $projectID);
  541. }
  542. /**
  543. * 获取项目交付物。
  544. * Get project deliverable.
  545. *
  546. * @param int $deliverableID
  547. * @param int $reviewID
  548. * @access public
  549. * @return object
  550. */
  551. public function getDeliverableByID($deliverableID, $reviewID = 0)
  552. {
  553. return $this->loadExtension('zentaomax')->getDeliverableByID($deliverableID, $reviewID);
  554. }
  555. /**
  556. * 替换交付物。
  557. * Replace deliverable.
  558. *
  559. * @param int $projectID
  560. * @param int $oldGroupID
  561. * @param int $newGroupID
  562. * @access public
  563. * @return void
  564. */
  565. public function modifyWorkflowGroup($projectID, $oldGroupID, $newGroupID)
  566. {
  567. return $this->loadExtension('zentaomax')->modifyWorkflowGroup($projectID, $oldGroupID, $newGroupID);
  568. }
  569. /**
  570. * 获取交付物版本状态。
  571. * Get deliverable version status.
  572. *
  573. * @param int $projectID
  574. * @param object $deliverable
  575. * @param object|null $doc
  576. * @access public
  577. * @return string
  578. */
  579. public function getVersionStatus($projectID, $deliverable, $doc)
  580. {
  581. return $this->loadExtension('zentaomax')->getVersionStatus($projectID, $deliverable, $doc);
  582. }
  583. /**
  584. * 填充编辑链接。
  585. * Append edit link.
  586. *
  587. *
  588. * @param object $deliverable
  589. * @param mixed $doc
  590. * @param int $projectID
  591. * @access public
  592. * @return object
  593. */
  594. public function appendEditLink($deliverable, $doc, $projectID)
  595. {
  596. return $this->loadExtension('zentaomax')->appendEditLink($deliverable, $doc, $projectID);
  597. }
  598. /**
  599. * 获取提交来源列表。
  600. * Get submit from pairs.
  601. *
  602. * @param int $projectID
  603. * @access public
  604. * @return array
  605. */
  606. public function getSubmitFromPairs($projectID)
  607. {
  608. return $this->loadExtension('zentaomax')->getSubmitFromPairs($projectID);
  609. }
  610. /**
  611. * 获取交付物检查列表。
  612. * Get deliverable checklist.
  613. *
  614. * @param int $groupID
  615. * @param int $projectID
  616. * @param int $executionID
  617. * @param string $browseType all|wait|normal
  618. * @access public
  619. * @return array
  620. */
  621. public function getDeliverableChecklist($groupID, $projectID, $executionID = 0, $browseType = 'all')
  622. {
  623. return $this->loadExtension('zentaomax')->getDeliverableChecklist($groupID, $projectID, $executionID, $browseType);
  624. }
  625. /**
  626. * 获取项目过程裁剪后不适用的活动。
  627. * Get disabled activities.
  628. *
  629. * @param int $projectID
  630. * @param int $executionID
  631. * @access public
  632. * @return array
  633. */
  634. public function getDisabledActivities($projectID, $executionID = 0)
  635. {
  636. return $this->loadExtension('zentaomax')->getDisabledActivities($projectID, $executionID);
  637. }
  638. /**
  639. * 获取项目过程裁剪后不适用的交付物类型。
  640. * Get disabled deliverables.
  641. *
  642. * @param int $projectID
  643. * @param int $executionID
  644. * @access public
  645. * @return array
  646. */
  647. public function getDisabledDeliverables($projectID, $executionID = 0)
  648. {
  649. return $this->loadExtension('zentaomax')->getDisabledDeliverables($projectID, $executionID);
  650. }
  651. /**
  652. * 复制目标数据。
  653. * Copy targets.
  654. *
  655. * @param int $copyProjectID
  656. * @param int $projectID
  657. * @access public
  658. * @return bool
  659. */
  660. public function copyProjectTargets($copyProjectID, $projectID)
  661. {
  662. return $this->loadExtension('zentaomax')->copyProjectTargets($copyProjectID, $projectID);
  663. }
  664. /**
  665. * 设置要插入的执行数据。
  666. * Set insert execution data.
  667. *
  668. * @param array $executions
  669. * @param array $executionIdList
  670. * @param string $model
  671. * @param int $productID
  672. * @param string $parentAcl
  673. * @param string $copyFrom
  674. * @access public
  675. * @return void
  676. */
  677. public function setInsertExecutions($executions = array(), $executionIdList = array(), $model = 'scrum', $productID = 0, $parentAcl = '', $copyFrom = '')
  678. {
  679. return $this->loadExtension('zentaomax')->setInsertExecutions($executions, $executionIdList, $model, $productID, $parentAcl, $copyFrom);
  680. }