Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
kaopu-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1e9478f0
authored
Jan 08, 2020
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改动态评分
parent
4c7557cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
internal/dao/bank_dong.go
internal/dao/bank_dong.go
View file @
1e9478f0
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment