修改
This commit is contained in:
parent
2543d474be
commit
4e23a6722c
@ -592,7 +592,7 @@ func MyAllWorkApprovals(in *approval.ListRequest) ([]*Approval, int64) {
|
||||
|
||||
//我未阅读的和我未操作的
|
||||
queryApproval := &Approval{NowUserId: in.UserID}
|
||||
if in.ApprovalStatus == 0 { // 此处 为 阅读状态 表示 审批状态 默认为 StatusDoing
|
||||
if in.ApprovalStatus == 0 && in.SubmitterName == "" { // 此处 为 阅读状态 表示 审批状态 默认为 StatusDoing
|
||||
queryApproval.Status = StatusDoing
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ func MyAllWorkApprovals(in *approval.ListRequest) ([]*Approval, int64) {
|
||||
// }
|
||||
modelObj = modelObj.Where(&Approval{Type: in.Type}).Where(
|
||||
DB.Where(queryApproval). // 我需要审批的
|
||||
Or(DB.Where("id in (?)", s1)))
|
||||
Or(DB.Where("id in (?)", s1)))
|
||||
//}
|
||||
|
||||
modelObj.Count(&count)
|
||||
@ -682,8 +682,8 @@ func MyApprovalWorkApprovals(in *approval.ListRequest) ([]*Approval, int64) {
|
||||
if in.UserID != 0 {
|
||||
modelObj = modelObj.Where(
|
||||
DB.Where("JSON_CONTAINS(approval_users,JSON_OBJECT('ID', ?))", in.UserID).
|
||||
Where("status != ?", StatusDoing). //完成,我参与审批
|
||||
Or(DB.Where("now_user_id", in.UserID).Where("status = ?", StatusDoing)). //进行中,当前审批人是我,
|
||||
Where("status != ?", StatusDoing). //完成,我参与审批
|
||||
Or(DB.Where("now_user_id", in.UserID).Where("status = ?", StatusDoing)). //进行中,当前审批人是我,
|
||||
Or(DB.Where("JSON_CONTAINS(copy_users,JSON_OBJECT('ID', ?))", in.UserID).Where("status = ?", StatusOk))) //抄送人(完成抄送)
|
||||
}
|
||||
|
||||
@ -749,8 +749,8 @@ func MyWorkApprovals(in *approval.ListRequest) ([]*Approval, int64) {
|
||||
if in.UserID != 0 {
|
||||
modelObj = modelObj.Where(
|
||||
DB.Where("JSON_CONTAINS(approval_users,JSON_OBJECT('ID', ?))", in.UserID).
|
||||
Where("status != ?", StatusDoing). //完成,我参与审批
|
||||
Or(DB.Where("now_user_id", in.UserID).Where("status = ?", StatusDoing)). //进行中,当前审批人是我,
|
||||
Where("status != ?", StatusDoing). //完成,我参与审批
|
||||
Or(DB.Where("now_user_id", in.UserID).Where("status = ?", StatusDoing)). //进行中,当前审批人是我,
|
||||
Or(DB.Where("JSON_CONTAINS(copy_users,JSON_OBJECT('ID', ?))", in.UserID).Where("status = ?", StatusOk))) //抄送人(完成抄送)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user