goCheck('monthMatrix'); $ym = (string) $params['year_month']; return $this->data(DeptPerformanceTargetLogic::monthMatrix($ym, $this->adminId, $this->adminInfo)); } public function batchSave() { $params = (new DeptPerformanceTargetValidate())->post()->goCheck('batchSave'); $ym = (string) $params['year_month']; $items = $params['items'] ?? []; if (!is_array($items)) { return $this->fail('目标数据格式错误'); } $result = DeptPerformanceTargetLogic::batchSave( $ym, $items, $this->adminId, $this->adminInfo, (string) ($this->adminInfo['name'] ?? '') ); if ($result === false) { return $this->fail(DeptPerformanceTargetLogic::getError()); } return $this->success( '保存成功', DeptPerformanceTargetLogic::monthMatrix($ym, $this->adminId, $this->adminInfo), 1, 1 ); } }