* [perf story #75760] move reporttemplate-createCycleReport to weekly-createCycleReport.

This commit is contained in:
wangyidong
2025-09-10 10:25:35 +08:00
parent 6789f9398d
commit f467a70154
3 changed files with 19 additions and 3 deletions
+2 -2
View File
@@ -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
View File
@@ -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` (
+16
View File
@@ -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');
}
}