作者 yangfu

审批流程修改

... ... @@ -123,7 +123,10 @@ func UpdatetAuditFlowProcessNoApprove(o orm.Ormer, chanceId int64, level int, re
//获取机会审核流信息
func GetAuditFlowProcessList(chanceId int64) (v []*AuditFlowProcess, err error) {
o := orm.NewOrm()
sql := "select * from audit_flow_process where chance_id=? and enable_status=1 order by create_at,level,update_at asc "
sql := `select id ,chance_id,uid,level,is_active,IFNULL(approve_time,NOW()) approve_time,basic_score,extra_score,value_score,discovery_score,
review_status,audit_flow_type,flow_type,action_type,update_at,create_at,enable_status,approve_data,user_name,role_name,role_id,approve_message,
template_id from audit_flow_process
where chance_id =? and enable_status=1 order by approve_time,level desc`
if _, err = o.Raw(sql, chanceId).QueryRows(&v); err == nil {
return v, nil
}
... ...
... ... @@ -619,7 +619,7 @@ func ChanceApproveProcess(header *protocol.RequestHeader, chance *models.Chance)
for j := i; j < len(processList); j++ {
p = processList[j]
checkApprovePermission(p)
if p.ReviewStatus == protocol.ReviewStatusPass {
if p.ReviewStatus != protocol.ReviewStatusAuditging {
rsp.ApproveProcess = append(rsp.ApproveProcess, newProcessItem(p))
continue
}
... ...