* Refactor updateExecutionEsDateByGantt and updateEsDateByGantt method.

This commit is contained in:
tianshujie
2023-08-22 13:22:33 +08:00
parent 27f068d382
commit 42bf61e2fa
3 changed files with 38 additions and 46 deletions
+5
View File
@@ -49,3 +49,8 @@ $config->programplan->form->create['end'] = array('label' => $lang->progr
$config->programplan->form->create['realBegan'] = array('label' => $lang->programplan->realBegan, 'type' => 'array', 'control' => 'date', 'required' => false, 'default' => '');
$config->programplan->form->create['realEnd'] = array('label' => $lang->programplan->realEnd, 'type' => 'array', 'control' => 'date', 'required' => false, 'default' => '');
$config->programplan->form->create['desc'] = array('label' => $lang->programplan->desc, 'type' => 'array', 'control' => 'textarea', 'required' => false, 'default' => '');
$config->programplan->form->updateDateByGantt['id'] = array('required' => false, 'type' => 'int', 'default' => 0);
$config->programplan->form->updateDateByGantt['startDate'] = array('required' => false, 'type' => 'string', 'default' => null);
$config->programplan->form->updateDateByGantt['endDate'] = array('required' => false, 'type' => 'string', 'default' => '');
$config->programplan->form->updateDateByGantt['type'] = array('required' => false, 'type' => 'string', 'default' => '');
+2 -1
View File
@@ -206,7 +206,8 @@ class programplan extends control
$objectID = $this->post->id;
$objectType = $this->post->type;
$this->loadModel('task')->updateEsDateByGantt($objectID, $objectType);
$postData = form::data($this->config->programplan->form->updateDateByGantt)->get();
$this->loadModel('task')->updateEsDateByGantt($postData);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success'));