|
@@ -279,7 +279,7 @@ func (this *ReportOpenController) ReportApprove() {
|
|
br.ErrMsg = fmt.Sprintf("智力共享报告ID有误, %v", req.ReportIds)
|
|
br.ErrMsg = fmt.Sprintf("智力共享报告ID有误, %v", req.ReportIds)
|
|
return
|
|
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.Msg = "审批类型异常"
|
|
br.ErrMsg = fmt.Sprintf("审批类型异常, %d", req.ApproveType)
|
|
br.ErrMsg = fmt.Sprintf("审批类型异常, %d", req.ApproveType)
|
|
return
|
|
return
|
|
@@ -295,16 +295,16 @@ func (this *ReportOpenController) ReportApprove() {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
if reportExist != nil && reportExist.Id > 0 {
|
|
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))
|
|
utils.FileLog.Info(fmt.Sprintf("ReportApprove-报告当前状态不允许审批, OutId: %d, State: %d", v, reportExist.State))
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
updateReports = append(updateReports, reportExist)
|
|
updateReports = append(updateReports, reportExist)
|
|
}
|
|
}
|
|
if pptExist != nil && pptExist.PptId > 0 {
|
|
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))
|
|
utils.FileLog.Info(fmt.Sprintf("ReportApprove-PPT当前状态不允许审批, OutId: %d, State: %d", v, pptExist.State))
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
@@ -338,6 +338,7 @@ func (this *ReportOpenController) ReportApprove() {
|
|
1: models.ReportStatePass,
|
|
1: models.ReportStatePass,
|
|
2: models.ReportStateRefused,
|
|
2: models.ReportStateRefused,
|
|
3: models.ReportStateWaitSubmit,
|
|
3: models.ReportStateWaitSubmit,
|
|
|
|
+ 4: models.ReportStateWaitApprove,
|
|
}
|
|
}
|
|
if len(updateReports) > 0 {
|
|
if len(updateReports) > 0 {
|
|
for _, v := range updateReports {
|
|
for _, v := range updateReports {
|
|
@@ -353,8 +354,8 @@ func (this *ReportOpenController) ReportApprove() {
|
|
br.ErrMsg = fmt.Sprintf("更新报告状态失败, %v", e)
|
|
br.ErrMsg = fmt.Sprintf("更新报告状态失败, %v", e)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if req.ApproveType == 3 {
|
|
+ if req.ApproveType == 3 || req.ApproveType == 4 {
|
|
-
|
|
+
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
|
|
@@ -435,8 +436,8 @@ func (this *ReportOpenController) ReportApprove() {
|
|
br.ErrMsg = fmt.Sprintf("更新报告状态失败, %v", e)
|
|
br.ErrMsg = fmt.Sprintf("更新报告状态失败, %v", e)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if req.ApproveType == 3 {
|
|
+ if req.ApproveType == 3 || req.ApproveType == 4 {
|
|
-
|
|
+
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
|