Commit 1e9478f0 by Joneq

修改动态评分

parent 4c7557cb
Showing with 10 additions and 1 deletions
......@@ -116,7 +116,8 @@ func (d *dao) BankDongMain(ctx context.Context,project_id int,erp_company_code s
}
month_six = strings.TrimRight(month_six,",") // 六个月sql
d.QueryOne(ctx,3,"update lie_scores set current_score = 0,total_score,final_score where type = 2 and month in ("+month_six+")")
d.QueryOne(ctx,3,"update lie_scores set current_score = 0,current_score =0,total_score=0,final_score=0 where type = 2 and month in ("+month_six+")")
fmt.Println("update lie_scores set current_score = 0,current_score =0,total_score=0,final_score=0 where type = 2 and month in ("+month_six+")")
for _,v := range company_info{ //循环当前公司,计算各个公司对应分数
if v["erp_company_code"] == "" {
......@@ -171,6 +172,14 @@ func (d *dao) BankDongRate(ctx context.Context,y map[string]string,modelItems []
score_one float64 =0; //对应梯度分数
s1,s2 string //拼接六个月月份字符串
)
companyMonthInfoSql := fmt.Sprintf("select * from lie_basic_month_tolerance where erp_company_code = '%s' and month in (%s)",y["erp_company_code"],month_six)
monthInfo,_ := d.QueryOne(ctx,3,companyMonthInfoSql)
if len(monthInfo) == 0 {
logic.LogWrite("没有订单数据跳过:"+y["erp_company_code"],"dong_error",1)
return
}
sqla := fmt.Sprintf(bank_sql4,y["erp_company_code"],month_six)
c1,_ := d.QueryOne(ctx,3,sqla)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment