|
@@ -279,7 +279,7 @@ func (this *ReportOpenController) ReportApprove() {
|
|
|
br.ErrMsg = fmt.Sprintf("智力共享报告ID有误, %v", req.ReportIds)
|
|
|
return
|
|
|
}
|
|
|
- if req.ApproveType != 1 && req.ApproveType != 2 && req.ApproveType != 3 {
|
|
|
+ if req.ApproveType != 1 && req.ApproveType != 2 && req.ApproveType != 3 && req.ApproveType != 4 {
|
|
|
br.Msg = "审批类型异常"
|
|
|
br.ErrMsg = fmt.Sprintf("审批类型异常, %d", req.ApproveType)
|
|
|
return
|
|
@@ -295,16 +295,16 @@ func (this *ReportOpenController) ReportApprove() {
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
- // 通过和驳回需要审批中状态,撤回暂不做限制
|
|
|
+ // 通过和驳回需要审批中/已驳回状态,撤回、提审暂不做限制(若报告未撰写完毕,提审会把状态从待提交直接变为待审批,那么就是撰写终止附件不会再传回去了,这种情况是允许的)
|
|
|
if reportExist != nil && reportExist.Id > 0 {
|
|
|
- if req.ApproveType != 3 && reportExist.State != models.ReportStateWaitApprove && reportExist.State != models.ReportStateRefused {
|
|
|
+ if (req.ApproveType == 1 || req.ApproveType == 2) && reportExist.State != models.ReportStateWaitApprove && reportExist.State != models.ReportStateRefused {
|
|
|
utils.FileLog.Info(fmt.Sprintf("ReportApprove-报告当前状态不允许审批, OutId: %d, State: %d", v, reportExist.State))
|
|
|
continue
|
|
|
}
|
|
|
updateReports = append(updateReports, reportExist)
|
|
|
}
|
|
|
if pptExist != nil && pptExist.PptId > 0 {
|
|
|
- if req.ApproveType != 3 && pptExist.State != models.ReportStateWaitApprove && pptExist.State != models.ReportStateRefused {
|
|
|
+ if (req.ApproveType == 1 || req.ApproveType == 2) && pptExist.State != models.ReportStateWaitApprove && pptExist.State != models.ReportStateRefused {
|
|
|
utils.FileLog.Info(fmt.Sprintf("ReportApprove-PPT当前状态不允许审批, OutId: %d, State: %d", v, pptExist.State))
|
|
|
continue
|
|
|
}
|
|
@@ -338,6 +338,7 @@ func (this *ReportOpenController) ReportApprove() {
|
|
|
1: models.ReportStatePass,
|
|
|
2: models.ReportStateRefused,
|
|
|
3: models.ReportStateWaitSubmit,
|
|
|
+ 4: models.ReportStateWaitApprove,
|
|
|
}
|
|
|
if len(updateReports) > 0 {
|
|
|
for _, v := range updateReports {
|
|
@@ -353,8 +354,8 @@ func (this *ReportOpenController) ReportApprove() {
|
|
|
br.ErrMsg = fmt.Sprintf("更新报告状态失败, %v", e)
|
|
|
return
|
|
|
}
|
|
|
- if req.ApproveType == 3 {
|
|
|
- // 撤回暂不发消息
|
|
|
+ if req.ApproveType == 3 || req.ApproveType == 4 {
|
|
|
+ // 撤回/提审暂不发消息
|
|
|
continue
|
|
|
}
|
|
|
|
|
@@ -435,8 +436,8 @@ func (this *ReportOpenController) ReportApprove() {
|
|
|
br.ErrMsg = fmt.Sprintf("更新报告状态失败, %v", e)
|
|
|
return
|
|
|
}
|
|
|
- if req.ApproveType == 3 {
|
|
|
- // 撤回暂不发消息
|
|
|
+ if req.ApproveType == 3 || req.ApproveType == 4 {
|
|
|
+ // 撤回/提审暂不发消息
|
|
|
continue
|
|
|
}
|
|
|
|