* [perf story #75760] move reporttemplate-createCycleReport to weekly-createCycleReport.
This commit is contained in:
+2
-2
@@ -5,5 +5,5 @@ ALTER TABLE `zt_doc` ADD `cycleConfig` text COLLATE 'utf8mb4_general_ci' NULL AF
|
||||
CREATE INDEX `templateType` ON `zt_doc`(`templateType`);
|
||||
|
||||
DELETE FROM `zt_cron` WHERE `command`='moduleName=weekly&methodName=computeWeekly' AND `type`='zentao';
|
||||
DELETE FROM `zt_cron` WHERE `command`='moduleName=reporttemplate&methodName=createCycleReport' AND `type`='zentao';
|
||||
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`) VALUES('1','0','*','*','*','moduleName=reporttemplate&methodName=createCycleReport','定时生成报告','zentao',1,'normal');
|
||||
DELETE FROM `zt_cron` WHERE `command`='moduleName=weekly&methodName=createCycleReport' AND `type`='zentao';
|
||||
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`) VALUES('1','0','*','*','*','moduleName=weekly&methodName=createCycleReport','定时生成报告','zentao',1,'normal');
|
||||
+1
-1
@@ -15482,7 +15482,7 @@ REPLACE INTO `zt_zoutput` (`id`, `activity`, `name`, `content`, `optional`, `tai
|
||||
(494, 329, '《量化项目计划及跟踪表》', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', NULL, 630, '0');
|
||||
|
||||
REPLACE INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`) VALUES
|
||||
('1','0','*','*','*','moduleName=reporttemplate&methodName=createCycleReport','定时生成报告','zentao',1,'normal');
|
||||
('1','0','*','*','*','moduleName=weekly&methodName=createCycleReport','定时生成报告','zentao',1,'normal');
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_pivot`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_pivot` (
|
||||
|
||||
@@ -91,4 +91,20 @@ class weekly extends control
|
||||
$this->weekly->save($projectID, $date);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时创建报告。
|
||||
* Generate weekly report.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createCycleReport()
|
||||
{
|
||||
if(in_array($this->config->edition, array('open', 'biz'))) return print('Support min edition is max');
|
||||
|
||||
$errors = $this->loadModel('reporttemplate')->createCycleReport();
|
||||
if($errors) return print(json_encode($errors));
|
||||
return print('success');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user