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
768f0197
authored
Dec 04, 2019
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
4ea144af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
internal/dao/dong.go
internal/dao/scores.go
internal/dao/dong.go
View file @
768f0197
...
...
@@ -29,7 +29,7 @@ var Model_dong = map[int]string{
43
:
"退货率"
,
44
:
"近6个月逾期变化率"
,
45
:
"近6个月参保人数变化率"
,
999
:
"
统
计动态分数"
,
999
:
"
累
计动态分数"
,
}
//动态模型对应的日志文件名称
var
Model_dong_log
=
map
[
int
]
string
{
...
...
@@ -47,7 +47,6 @@ var Model_dong_log = map[int]string{
//计算逾期金额率:延期支付时间超过平均账期的金额/收款总额:
func
(
d
*
dao
)
DongMain
(
ctx
context
.
Context
,
project_id
int
,
erp_company_code
string
)
(
r
[]
map
[
string
]
interface
{},
err
error
)
{
var
(
ladder_rate
float64
//计算出来的各个动态分数率
ladder_score
float64
=
0
;
//对应梯度分数
...
...
@@ -146,7 +145,10 @@ func (d *dao) DongMain(ctx context.Context,project_id int,erp_company_code strin
fmt
.
Print
(
log2
)
logic
.
Loginfo
(
log2
,
log_pre
)
}
fmt
.
Print
(
"XIE:"
+
v
[
"erp_company_code"
])
}
//d.Close(); //关闭数据库连接
logic
.
Loginfo
(
"统计"
+
mod_name
+
"完成"
,
log_pre
)
return
}
...
...
internal/dao/scores.go
View file @
768f0197
...
...
@@ -10,7 +10,7 @@ import (
//增加或者修改记录
func
(
d
*
dao
)
InsertScores
(
ctx
context
.
Context
,
score
model
.
Scores
)
(
insertId
int64
,
err
error
)
{
//defer d.db.Close()
var
(
exitId
int
execSql
string
...
...
@@ -43,6 +43,6 @@ func (d *dao) InsertScores(ctx context.Context,score model.Scores) (insertId int
}
insertId
=
affectNum
//defer d.db.Close()
return
}
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