Documentation ¶
Index ¶
- func AddUserIntoProParticipant(orgId int64, opUid, targetUid int64, projectId int64) errs.SystemErrorInfo
- func ChangeWorkerIdWhenChangedIssueOwner(orgId, issueId, oldOwner, newOwner int64) errs.SystemErrorInfo
- func CheckAndFixGetStatisticDataParam(param *vo.GetWorkHourStatisticReq) errs.SystemErrorInfo
- func CheckHasWorkHoursUpdatePower(orgId int64, paramBo bo.CheckWorkHoursUpdatePowerBo) (bool, errs.SystemErrorInfo)
- func CheckIsEnableWorkHour(orgId, currentUserId int64, param vo.CheckIsEnableWorkHourReq) (*vo.CheckIsEnableWorkHourResp, errs.SystemErrorInfo)
- func CheckIsIssueMember(orgId int64, param vo.CheckIsIssueMemberReq) (*vo.BoolResp, errs.SystemErrorInfo)
- func CheckIsIssueRelatedPeople(orgId int64, param vo.CheckIsIssueMemberReq) (*vo.BoolResp, errs.SystemErrorInfo)
- func CheckNeedTimeValid(needTime string) errs.SystemErrorInfo
- func CheckPowerForCreateIssueWorkHours(orgId, currentUserId int64, issue *bo.IssueBo) (bool, errs.SystemErrorInfo)
- func CheckWorkerIdValid(workerId int64) bool
- func CreateIssueWorkHours(orgId, currentUserId int64, param vo.CreateIssueWorkHoursReq, needPush bool, ...) (*vo.BoolResp, errs.SystemErrorInfo)
- func CreateMultiIssueWorkHours(orgId, currentUserId int64, param vo.CreateMultiIssueWorkHoursReq) (*vo.BoolResp, errs.SystemErrorInfo)
- func DeleteIssueWorkHours(orgId, currentUserId int64, param vo.DeleteIssueWorkHoursReq, ...) (*vo.BoolResp, errs.SystemErrorInfo)
- func DisOrEnableIssueWorkHours(orgId, currentUserId int64, param vo.DisOrEnableIssueWorkHoursReq) (*vo.BoolResp, errs.SystemErrorInfo)
- func ExportWorkHourStatistic(orgId int64, param vo.GetWorkHourStatisticReq) (*vo.ExportWorkHourStatisticResp, errs.SystemErrorInfo)
- func GenExcelFileForData(fileWithPath string, workHourInfo *vo.GetWorkHourStatisticResp, ...) errs.SystemErrorInfo
- func GetDateListByDateRange(startTime, endTime int64) []string
- func GetExportFileInfo(orgId int64) (relatePath, fileDir, fileName string, err errs.SystemErrorInfo)
- func GetIssueIdsByStatisticInput(orgId int64, param vo.GetWorkHourStatisticReq) ([]int64, errs.SystemErrorInfo)
- func GetIssueWorkHoursInfo(orgId, currentUserId int64, param vo.GetIssueWorkHoursInfoReq) (*vo.GetIssueWorkHoursInfoResp, errs.SystemErrorInfo)
- func GetIssueWorkHoursList(orgId, currentUserId int64, param vo.GetIssueWorkHoursListReq) (*vo.GetIssueWorkHoursListResp, errs.SystemErrorInfo)
- func GetPermissionUserIdsForWorkHour(orgId, userId, issueId int64) (owners, participant, followers []int64, err errs.SystemErrorInfo)
- func GetStatisticDataForActual(startTime, endTime int64, workHours []*po.PpmPriIssueWorkHours) (total int64, list []vo.OneDateWorkHour, err errs.SystemErrorInfo)
- func GetStatisticDataForPredict(workHours []*po.PpmPriIssueWorkHours) (total int64, err errs.SystemErrorInfo)
- func GetStatisticDataForSummary(orgId int64, param vo.GetWorkHourStatisticReq, ...) (vo.GetWorkHourStatisticSummary, errs.SystemErrorInfo)
- func GetUpdateData(orgId, currentUserId int64, param vo.UpdateMultiIssueWorkHoursReq, ...) (newData []*po.PpmPriIssueWorkHours, updateData []*vo.UpdateIssueWorkHoursReq, ...)
- func GetWeekAndDate(datetimeStr string) (weekStr, monthlyDate string, err errs.SystemErrorInfo)
- func GetWorkHourStatistic(orgId int64, param vo.GetWorkHourStatisticReq) (*vo.GetWorkHourStatisticResp, errs.SystemErrorInfo)
- func GetWorkerIdsForStatistic(orgId int64, param vo.GetWorkHourStatisticReq) (totalWorkerIds []int64, retErr errs.SystemErrorInfo)
- func GetWorkerInfos(orgId int64, workerIds []int64) (map[int64]*vo.WorkHourWorker, errs.SystemErrorInfo)
- func PushMqttForWorkHour(orgId, userId, issueId int64)
- func RenderExcelBody(sheet *xlsx.Sheet, dataList []*vo.OnePersonWorkHourStatisticInfo)
- func RenderExcelHeader(row *xlsx.Row, dateStrList []string)
- func RenderSummaryData(sheet *xlsx.Sheet, summaryData *vo.OnePersonWorkHourStatisticInfo)
- func SetUserJoinIssue(orgId, currentUserId int64, param vo.SetUserJoinIssueReq) (*vo.BoolResp, errs.SystemErrorInfo)
- func TriggerCreateWorkHourTrend(orgId, currentUserId, issueId int64, newWorkHourParam vo.OneWorkHourRecord) errs.SystemErrorInfo
- func TriggerDeleteWorkHourTrend(orgId, currentUserId, issueId int64, workHour vo.OneWorkHourRecord) errs.SystemErrorInfo
- func TriggerEnableOrDisableWorkHourTrend(orgId, currentUserId int64, project *bo.ProjectBo, disOrEnable string) errs.SystemErrorInfo
- func TriggerFsCardForWorkHourChange(issueTrendsBo *bo.IssueTrendsBo) errs.SystemErrorInfo
- func TriggerUpdateWorkHourTrend(orgId, currentUserId, issueId int64, oldWorkHour vo.OneWorkHourRecord, ...) error
- func TriggerWorkHourWhenChangedPlanStartOrEndTime(orgId, issueId int64, updateField string, oldValue, newValue types2.Time) errs.SystemErrorInfo
- func UpdateIssueWorkHours(orgId, currentUserId int64, param vo.UpdateIssueWorkHoursReq, ...) (*vo.BoolResp, errs.SystemErrorInfo)
- func UpdateMultiIssueWorkHourWithDelete(orgId, currentUserId int64, param vo.UpdateMultiIssueWorkHoursReq) (*vo.BoolResp, errs.SystemErrorInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUserIntoProParticipant ¶
func AddUserIntoProParticipant(orgId int64, opUid, targetUid int64, projectId int64) errs.SystemErrorInfo
AddUserIntoProParticipant 将一个用户加为项目参与者
func ChangeWorkerIdWhenChangedIssueOwner ¶
func ChangeWorkerIdWhenChangedIssueOwner(orgId, issueId, oldOwner, newOwner int64) errs.SystemErrorInfo
当任务的负责人变更之后,对应的工时的执行人也发生变更
func CheckAndFixGetStatisticDataParam ¶
func CheckAndFixGetStatisticDataParam(param *vo.GetWorkHourStatisticReq) errs.SystemErrorInfo
func CheckHasWorkHoursUpdatePower ¶
func CheckHasWorkHoursUpdatePower(orgId int64, paramBo bo.CheckWorkHoursUpdatePowerBo) (bool, errs.SystemErrorInfo)
CheckHasWorkHoursUpdatePower 检查是否有权限编辑工时记录 工时执行人、项目负责人,以及有工时字段权限角色的协作人能对工时进行编辑
func CheckIsEnableWorkHour ¶
func CheckIsEnableWorkHour(orgId, currentUserId int64, param vo.CheckIsEnableWorkHourReq) (*vo.CheckIsEnableWorkHourResp, errs.SystemErrorInfo)
CheckIsEnableWorkHour 引入工时字段后,默认就是开启的。增加工时列后,就能添加工时记录。
func CheckIsIssueMember ¶
func CheckIsIssueMember(orgId int64, param vo.CheckIsIssueMemberReq) (*vo.BoolResp, errs.SystemErrorInfo)
检查员工是否是项目成员
func CheckIsIssueRelatedPeople ¶
func CheckIsIssueRelatedPeople(orgId int64, param vo.CheckIsIssueMemberReq) (*vo.BoolResp, errs.SystemErrorInfo)
检查是否是任务相关人员(创建人,关注人,负责人)
func CheckNeedTimeValid ¶
func CheckNeedTimeValid(needTime string) errs.SystemErrorInfo
func CheckPowerForCreateIssueWorkHours ¶
func CheckPowerForCreateIssueWorkHours(orgId, currentUserId int64, issue *bo.IssueBo) (bool, errs.SystemErrorInfo)
CheckPowerForCreateIssueWorkHours 创建工时记录时,检查是否有权限 1.先检查当前用户是否是项目负责人、任务负责人、关注人 2.检查当前人是否是任务的相关人
func CreateIssueWorkHours ¶
func CreateIssueWorkHours(orgId, currentUserId int64, param vo.CreateIssueWorkHoursReq, needPush bool, tx ...sqlbuilder.Tx) (*vo.BoolResp, errs.SystemErrorInfo)
CreateIssueWorkHours 创建新的工时记录,2种情况 1.issue 负责人创建预估工时或者实际工时 2.issue 参与人,创建自己的实际工时
func CreateMultiIssueWorkHours ¶
func CreateMultiIssueWorkHours(orgId, currentUserId int64, param vo.CreateMultiIssueWorkHoursReq) (*vo.BoolResp, errs.SystemErrorInfo)
CreateMultiIssueWorkHours 新增详细版预估工时(多个子预估工时)信息。新建多个子预估工时时,会生成一个总预估工时记录
func DeleteIssueWorkHours ¶
func DeleteIssueWorkHours(orgId, currentUserId int64, param vo.DeleteIssueWorkHoursReq, needUpdateTotal, needCheckPermission bool) (*vo.BoolResp, errs.SystemErrorInfo)
DeleteIssueWorkHours 删除工时记录 只有自己和负责人类型的人可以删除工时 删除子预估工时,会削减总预估工时的时长
func DisOrEnableIssueWorkHours ¶
func DisOrEnableIssueWorkHours(orgId, currentUserId int64, param vo.DisOrEnableIssueWorkHoursReq) (*vo.BoolResp, errs.SystemErrorInfo)
启用/关闭工时记录功能 通过更新项目详情中的 is_enable_work_hours 判断是否开启工时功能 只有项目负责人可以开启/关闭工时功能
func ExportWorkHourStatistic ¶
func ExportWorkHourStatistic(orgId int64, param vo.GetWorkHourStatisticReq) (*vo.ExportWorkHourStatisticResp, errs.SystemErrorInfo)
工时统计数据的导出。
func GenExcelFileForData ¶
func GenExcelFileForData(fileWithPath string, workHourInfo *vo.GetWorkHourStatisticResp, dateStrArr []string) errs.SystemErrorInfo
生成 excel 文件
func GetDateListByDateRange ¶
通过起始时间生成这段日期内的所有日期穷举。
func GetExportFileInfo ¶
func GetExportFileInfo(orgId int64) (relatePath, fileDir, fileName string, err errs.SystemErrorInfo)
获取导出的文件相关信息
func GetIssueIdsByStatisticInput ¶
func GetIssueIdsByStatisticInput(orgId int64, param vo.GetWorkHourStatisticReq) ([]int64, errs.SystemErrorInfo)
GetIssueIdsByStatisticInput 通过统计的输入参数,获取符合条件的所有任务id
func GetIssueWorkHoursInfo ¶
func GetIssueWorkHoursInfo(orgId, currentUserId int64, param vo.GetIssueWorkHoursInfoReq) (*vo.GetIssueWorkHoursInfoResp, errs.SystemErrorInfo)
GetIssueWorkHoursInfo 获取一个任务的工时信息 包含预估工时、实际工时记录列表等信息
func GetIssueWorkHoursList ¶
func GetIssueWorkHoursList(orgId, currentUserId int64, param vo.GetIssueWorkHoursListReq) (*vo.GetIssueWorkHoursListResp, errs.SystemErrorInfo)
工时记录列表
func GetPermissionUserIdsForWorkHour ¶
func GetPermissionUserIdsForWorkHour(orgId, userId, issueId int64) (owners, participant, followers []int64, err errs.SystemErrorInfo)
通过 issueId 获取项目负责人、任务负责人,参与人
func GetStatisticDataForActual ¶
func GetStatisticDataForActual(startTime, endTime int64, workHours []*po.PpmPriIssueWorkHours) (total int64, list []vo.OneDateWorkHour, err errs.SystemErrorInfo)
实际工时计算:计算时间区域内,每个日期的工时
func GetStatisticDataForPredict ¶
func GetStatisticDataForPredict(workHours []*po.PpmPriIssueWorkHours) (total int64, err errs.SystemErrorInfo)
预估工时计算
func GetStatisticDataForSummary ¶
func GetStatisticDataForSummary(orgId int64, param vo.GetWorkHourStatisticReq, projectIds, issueIds, totalWorkerIds []int64) (vo.GetWorkHourStatisticSummary, errs.SystemErrorInfo)
筛选条件下的数据汇总
func GetUpdateData ¶
func GetUpdateData(orgId, currentUserId int64, param vo.UpdateMultiIssueWorkHoursReq, issue *bo.IssueBo) (newData []*po.PpmPriIssueWorkHours, updateData []*vo.UpdateIssueWorkHoursReq, deleteIds []int64, err errs.SystemErrorInfo)
摘取出需要更新的一些信息。编辑预估工时时调用!
func GetWeekAndDate ¶
func GetWeekAndDate(datetimeStr string) (weekStr, monthlyDate string, err errs.SystemErrorInfo)
通过标准的日期字符串,获取对应的星期和日期。如将 `2020-12-04 00:00:00` 抓换为 `周一`、`11/29`。
func GetWorkHourStatistic ¶
func GetWorkHourStatistic(orgId int64, param vo.GetWorkHourStatisticReq) (*vo.GetWorkHourStatisticResp, errs.SystemErrorInfo)
工时统计 startTime、endTime 如果不传,则会默认最近 7 天内
func GetWorkerIdsForStatistic ¶
func GetWorkerIdsForStatistic(orgId int64, param vo.GetWorkHourStatisticReq) (totalWorkerIds []int64, retErr errs.SystemErrorInfo)
通过查询条件获取要查询的工时执行人。
func GetWorkerInfos ¶
func GetWorkerInfos(orgId int64, workerIds []int64) (map[int64]*vo.WorkHourWorker, errs.SystemErrorInfo)
通过工时中的 worker_id 获取对应工时执行者的信息
func PushMqttForWorkHour ¶
func PushMqttForWorkHour(orgId, userId, issueId int64)
func RenderExcelBody ¶
func RenderExcelBody(sheet *xlsx.Sheet, dataList []*vo.OnePersonWorkHourStatisticInfo)
func RenderExcelHeader ¶
func RenderExcelHeader(row *xlsx.Row, dateStrList []string)
func RenderSummaryData ¶
func RenderSummaryData(sheet *xlsx.Sheet, summaryData *vo.OnePersonWorkHourStatisticInfo)
渲染总计数据
func SetUserJoinIssue ¶
func SetUserJoinIssue(orgId, currentUserId int64, param vo.SetUserJoinIssueReq) (*vo.BoolResp, errs.SystemErrorInfo)
将用户加入为任务的关注者
func TriggerCreateWorkHourTrend ¶
func TriggerCreateWorkHourTrend(orgId, currentUserId, issueId int64, newWorkHourParam vo.OneWorkHourRecord) errs.SystemErrorInfo
TriggerCreateWorkHourTrend 新增工时,触发新增动态,触发工时变更卡片推送
func TriggerDeleteWorkHourTrend ¶
func TriggerDeleteWorkHourTrend(orgId, currentUserId, issueId int64, workHour vo.OneWorkHourRecord) errs.SystemErrorInfo
TriggerDeleteWorkHourTrend 删除工时,触发新增动态、飞书卡片推送
func TriggerEnableOrDisableWorkHourTrend ¶
func TriggerEnableOrDisableWorkHourTrend(orgId, currentUserId int64, project *bo.ProjectBo, disOrEnable string) errs.SystemErrorInfo
生成开启工时或者关闭工时功能的项目动态
func TriggerFsCardForWorkHourChange ¶
func TriggerFsCardForWorkHourChange(issueTrendsBo *bo.IssueTrendsBo) errs.SystemErrorInfo
TriggerFsCardForWorkHourChange 工时的卡片推送
func TriggerUpdateWorkHourTrend ¶
func TriggerUpdateWorkHourTrend(orgId, currentUserId, issueId int64, oldWorkHour vo.OneWorkHourRecord, newWorkHour vo.OneWorkHourRecord) error
TriggerUpdateWorkHourTrend 编辑工时,触发新增动态
func TriggerWorkHourWhenChangedPlanStartOrEndTime ¶
func TriggerWorkHourWhenChangedPlanStartOrEndTime(orgId, issueId int64, updateField string, oldValue, newValue types2.Time) errs.SystemErrorInfo
更新任务时,触发更新总预估工时的某个字段。
func UpdateIssueWorkHours ¶
func UpdateIssueWorkHours(orgId, currentUserId int64, param vo.UpdateIssueWorkHoursReq, needCheckPermission, needUpdateTotal, needTrend, needPush bool, tx ...sqlbuilder.Tx) (*vo.BoolResp, errs.SystemErrorInfo)
UpdateIssueWorkHours 编辑工时记录 needUpdateTotal 是否需要更新总预估工时。当一个请求中,只更新一个工时记录时,传 true。 needTrend 是否需要产生动态
func UpdateMultiIssueWorkHourWithDelete ¶
func UpdateMultiIssueWorkHourWithDelete(orgId, currentUserId int64, param vo.UpdateMultiIssueWorkHoursReq) (*vo.BoolResp, errs.SystemErrorInfo)
UpdateMultiIssueWorkHourWithDelete 编辑多条预估工时,支持 diff 后的删除操作。
Types ¶
This section is empty.