2
3
baichengfei 5 سال پیش
والد
کامیت
cc356cf491
1فایلهای تغییر یافته به همراه11 افزوده شده و 9 حذف شده
  1. 11 9
      src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

+ 11 - 9
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -1736,7 +1736,7 @@ func (this *InfoChangeController) UnitAuditEntity() {
 func (this *InfoChangeController) SeparateAuditEntity() {
 	infoId := this.Ctx.Input.Param(":id")
 	//SuppId := this.GetString("SuppId")
-	//Result := this.GetString("Result")
+	Result := this.GetString("Result")
 	firstAudit := this.GetString("FirstAudit")
 	secondAudit := this.GetString("SecondAudit")
 	AuditRemark := this.GetString("AuditRemark")
@@ -1761,14 +1761,16 @@ func (this *InfoChangeController) SeparateAuditEntity() {
 	infoSrv := infochange.GetInfoChangeService(utils.DBE)
 	var infoChangeEntity infochange.OilInfoChange
 	infoSrv.GetEntityById(infoId, &infoChangeEntity)
-	// 将选择的初审和复审人员保存下来
-	cols := []string{
-		"FirstAudit",
-		"SecondAudit",
+	if Result == "1" {
+		// 将选择的初审和复审人员保存下来
+		cols := []string{
+			"FirstAudit",
+			"SecondAudit",
+		}
+		infoChangeEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
+		infoChangeEntity.SecondAudit, _ = strconv.Atoi(secondAudit)
+		infoSrv.UpdateEntityByIdCols(infoId, infoChangeEntity, cols)
 	}
-	infoChangeEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
-	infoChangeEntity.SecondAudit, _ = strconv.Atoi(secondAudit)
-	infoSrv.UpdateEntityByIdCols(infoId, infoChangeEntity, cols)
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 	var ActiComplete workflow.ActiCompleteVM
@@ -1776,7 +1778,7 @@ func (this *InfoChangeController) SeparateAuditEntity() {
 	ActiComplete.BusinessKey = infoChangeEntity.BusinessKey
 	ActiComplete.UserId = this.User.Id // 审批人员
 	// ActiComplete.UserNames = secondAudit // 初审人员
-	ActiComplete.Result = "1" //分办完成后只向前走
+	ActiComplete.Result = Result //分办完成后只向前走
 	ActiComplete.Remarks = AuditRemark
 	ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
 	receiveVal := svcActiviti.TaskComplete(ActiComplete)