本文整理汇总了Python中Activity.getEndDate方法的典型用法代码示例。如果您正苦于以下问题:Python Activity.getEndDate方法的具体用法?Python Activity.getEndDate怎么用?Python Activity.getEndDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity.getEndDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: EditSupportTask
# 需要导入模块: import Activity [as 别名]
# 或者: from Activity import getEndDate [as 别名]
def EditSupportTask(session, id, st):
task = list(session.query(Activity.Assignment).filter(Activity.Assignment.objectId == id))[0]
task.person = st["person"]
task.task_phase = st["type"]
task.planned_start_date = st["start_date"]
task.planned_num_weeks = st["duration"]
task.forecast_end_date = Activity.getEndDate(st['start_date'], float(st["duration"]))
task.activity_id = st["activity_id"]
task.work_load = st["workload"]
session.commit()
示例2: AddSupportTask
# 需要导入模块: import Activity [as 别名]
# 或者: from Activity import getEndDate [as 别名]
def AddSupportTask(session, st):
if st["duration"]=='':
durationCount = 0
expectedEnd = ''
else:
durationCount = st["duration"]
expectedEnd = Activity.getEndDate(st['start_date'], float(st["duration"]))
if st["type"]=="300":
setname = st["person"]+" On Vacation"
elif st["type"] == "301":
setname = "Other"
else:
setname = st["team"] +":"+st["person"] + " Support Task"
task = Activity.Assignment(name = setname, team = st["team"], activity_id = st["activity_id"],person = st["person"], task_phase = st["type"],\
planned_start_date = st["start_date"],planned_num_weeks = durationCount, work_load=st["workload"], forecast_start_date='',\
forecast_end_date = expectedEnd,actual_start_date='', actual_end_date='', status = 0, predecessor="[]", successor="[]",description='')
session.add(task)
session.commit()