作者 yangfu

机会修改

@@ -610,6 +610,12 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate @@ -610,6 +610,12 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate
610 return 610 return
611 } 611 }
612 } 612 }
  613 + //发送提交日志
  614 + if err = agg.SaveApproveLog(orm, 1, header.UserId, chance.Id); err != nil {
  615 + log.Error(err)
  616 + orm.Rollback()
  617 + return
  618 + }
613 if len(auditFlows) > 0 { 619 if len(auditFlows) > 0 {
614 //7.发送审批实例给审批服务器 620 //7.发送审批实例给审批服务器
615 if m, e := suplusApprove.NewApproveInstance(header, auditFlows); e != nil { 621 if m, e := suplusApprove.NewApproveInstance(header, auditFlows); e != nil {
@@ -731,7 +737,7 @@ func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.Chanc @@ -731,7 +737,7 @@ func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.Chanc
731 } 737 }
732 } 738 }
733 739
734 - if err = saveApproveMsgChangePublic(orm, chance, request.PublicData); err != nil { 740 + if err = saveApproveMsgChangePublic(header, orm, chance, request.PublicData); err != nil {
735 log.Error(err) 741 log.Error(err)
736 orm.Rollback() 742 orm.Rollback()
737 return 743 return
@@ -743,7 +749,7 @@ func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.Chanc @@ -743,7 +749,7 @@ func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.Chanc
743 } 749 }
744 750
745 //发送审核日志 751 //发送审核日志
746 -func saveApproveMsgChangePublic(orm orm.Ormer, chance *models.Chance, approveData protocol.PublicData) (err error) { 752 +func saveApproveMsgChangePublic(header *protocol.RequestHeader, orm orm.Ormer, chance *models.Chance, approveData protocol.PublicData) (err error) {
747 var ( 753 var (
748 parames = make([]interface{}, 0) 754 parames = make([]interface{}, 0)
749 code = 0 755 code = 0
@@ -760,7 +766,7 @@ func saveApproveMsgChangePublic(orm orm.Ormer, chance *models.Chance, approveDat @@ -760,7 +766,7 @@ func saveApproveMsgChangePublic(orm orm.Ormer, chance *models.Chance, approveDat
760 } 766 }
761 parames = append(parames, strings.Join(department, ",")) 767 parames = append(parames, strings.Join(department, ","))
762 } 768 }
763 - if err = agg.SaveApproveLog(orm, code, chance.UserId, chance.Id, parames...); err != nil { 769 + if err = agg.SaveApproveLog(orm, code, header.UserId, chance.Id, parames...); err != nil {
764 log.Error(err) 770 log.Error(err)
765 return 771 return
766 } 772 }