def update_project(self, project_id, reason): project = Project.objects.get(id=project_id) if project: # 驳回 project.audit_status = 3 project.save() BusinessPublic.create_reason(project.id, project.auditor.id, project.sender.id, BusinessPublic.GetReasonTypeIdByKey('project_audit_reject'), reason) BusinessPublic.create_message(project.auditor.id, project.sender.id, menu_id=2, messages='你的项目已被驳回,请尽快处理!')
def update_project(self, project_id, reason): project = Project.objects.get(id=project_id) if project is not None: # 拒接 project.receive_status = BusinessPublic.GetProjectStatusObjectByKey('rejected') project.save() reason_type_id = BusinessPublic.GetReasonTypeIdByKey('project_reject') BusinessPublic.create_reason(project.id, project.receiver.id, project.sender.id, reason_type_id, reason) BusinessPublic.create_message(project.receiver.id, project.sender.id, menu_id=2, messages='项目负责人拒接了你的项目,请尽快处理!')
def update_project(self, project_id, reason): if project_id is not None: project = Project.objects.get(id=project_id) if project: # 验收不通过 project.receive_status = BusinessPublic.GetProjectStatusObjectByKey('check_rejected') project.save() BusinessPublic.create_reason(project.id, project.receiver.id, project.auditor.id, BusinessPublic.GetReasonTypeIdByKey('project_check_reject'), reason) BusinessPublic.create_message(project.receiver.id, project.auditor.id, menu_id=2, messages='你的项目验收不通过,请尽快检查!')
def update_task(self, task_id, reason): if task_id is not None: from business.models.task import Task task = Task.objects.get(id=task_id) if task is not None: # 任务验收不通过 task.receive_status = BusinessPublic.GetTaskStatusObjectByKey( 'check_rejected') task.save() BusinessPublic.create_reason( task.id, task.receiver.id, task.sender.id, BusinessPublic.GetReasonTypeIdByKey('task_check_reject'), reason) BusinessPublic.create_message(task.receiver.id, task.sender.id, menu_id=2, messages='任务验收不通过')