|
@@ -23,7 +23,7 @@ type SafeAuditService interface {
|
|
|
ValidStart(ctx iris.Context) (viewmodels.AuditStart, error)
|
|
|
AddAuditor(safeId int, bId int, auditId int, times int) error
|
|
|
CloseAudit(id int, opinion string, curUid int, saveId int) error
|
|
|
- BackAudit(id int, opinion string, curUid int, saveId int, auditId int, progress string) error
|
|
|
+ BackAudit(id int, opinion string, curUid int, saveId int, auditId int) error
|
|
|
PassAudit(id int, uid int, auditId int, opinion string, rectifiedInfo string) error
|
|
|
StartAudit(safeId int, bidsectionId int, times int, auditors []int, reAuditors []int, uid int) error
|
|
|
}
|
|
@@ -78,7 +78,7 @@ func (s *safeAuditService) CloseAudit(id int, opinion string, curUid int, saveId
|
|
|
}
|
|
|
|
|
|
// 审批退回
|
|
|
-func (s *safeAuditService) BackAudit(id int, opinion string, curUid int, saveId int, auditId int, progress string) error {
|
|
|
+func (s *safeAuditService) BackAudit(id int, opinion string, curUid int, saveId int, auditId int) error {
|
|
|
auditor, err := s.daoSafeAudit.FindById(id)
|
|
|
if err != nil {
|
|
|
return err
|
|
@@ -87,27 +87,28 @@ func (s *safeAuditService) BackAudit(id int, opinion string, curUid int, saveId
|
|
|
return errors.New("该用户没有审批权限!")
|
|
|
}
|
|
|
// 更改cm_safe_audit的记录
|
|
|
- err = s.daoSafeAudit.ChangeStatusById(id, opinion, 2, "")
|
|
|
+ err = s.daoSafeAudit.ChangeStatusById(id, opinion, 3, "")
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
safeData := s.daoSafe.FindById(saveId)
|
|
|
- // 拷贝审批流程
|
|
|
- // 退回检查人-uncheck
|
|
|
- // 整改人审批退回-checking
|
|
|
- // 复查人审批退回-checkNo
|
|
|
- // 审批组退回-checked
|
|
|
- err = s.daoSafeAudit.CopyAuditors(saveId, safeData.Times, progress, auditId)
|
|
|
+ err = s.daoSafeAudit.CopyAuditors(saveId, safeData.Times, auditId)
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
// 更改cm_safe的记录
|
|
|
- err = s.daoSafe.ChangeStatus(saveId, 2, auditor.Times+1)
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
- return nil
|
|
|
+ // if progress == "uncheck" {
|
|
|
+ // err = s.daoSafe.ChangeStatus(saveId, 0, auditor.Times+1)
|
|
|
+ // } else if progress == "checked" {
|
|
|
+ // err = s.daoSafe.ChangeStatus(saveId, 1, auditor.Times+1)
|
|
|
+ // } else if progress == "checking" {
|
|
|
+ // err = s.daoSafe.ChangeStatus(saveId, 2, auditor.Times+1)
|
|
|
+ // } else {
|
|
|
+ // err = s.daoSafe.ChangeStatus(saveId, 3, auditor.Times+1)
|
|
|
+
|
|
|
+ // }
|
|
|
+ return err
|
|
|
}
|
|
|
|
|
|
// 审批通过
|