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
2dd63bf4
authored
Jan 06, 2020
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
判断分母为零的情况
parent
61e8b7bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
internal/dao/bank_dong.go
logs/info.log
internal/dao/bank_dong.go
View file @
2dd63bf4
...
@@ -215,12 +215,19 @@ func (d *dao) BankDongRate(ctx context.Context,y map[string]string,modelItems []
...
@@ -215,12 +215,19 @@ func (d *dao) BankDongRate(ctx context.Context,y map[string]string,modelItems []
remark
=
c3
[
"period_use_times_six"
]
remark
=
c3
[
"period_use_times_six"
]
}
}
}
}
if
project_id
!=
48
&&
project_id
!=
44
{
if
project_id
!=
48
&&
project_id
!=
44
{
if
s1
==
""
||
s2
==
""
{
if
s1
==
""
||
s2
==
""
{
logic
.
LogWrite
(
"没有订单数据跳过:"
+
y
[
"erp_company_code"
],
"dong_error"
,
1
)
logic
.
LogWrite
(
"没有订单数据跳过:"
+
y
[
"erp_company_code"
],
"dong_error"
,
1
)
return
return
}
}
//如果0是被除则跳过,否则会出错
if
(
logic
.
MyFloat64
(
s2
)
!=
0
){
ladder_rate
=
logic
.
MyFloat64
(
s1
)
/
logic
.
MyFloat64
(
s2
)
ladder_rate
=
logic
.
MyFloat64
(
s1
)
/
logic
.
MyFloat64
(
s2
)
}
else
{
ladder_rate
=
0
}
remark
=
s1
+
"/"
+
s2
+
"="
+
logic
.
MyFloat64ToStr
(
ladder_rate
)
remark
=
s1
+
"/"
+
s2
+
"="
+
logic
.
MyFloat64ToStr
(
ladder_rate
)
}
}
...
@@ -244,7 +251,7 @@ func (d *dao) BankDongAddScore(ctx context.Context,com_credits_id int64,month_si
...
@@ -244,7 +251,7 @@ func (d *dao) BankDongAddScore(ctx context.Context,com_credits_id int64,month_si
sum_dong_score
float64
//动态模型总分
sum_dong_score
float64
//动态模型总分
)
)
c1
,
_
:=
d
.
QueryOne
(
ctx
,
3
,
fmt
.
Sprintf
(
bank_sql5
,
com_credits_id
,
month_six_zi
))
c1
,
_
:=
d
.
QueryOne
(
ctx
,
1
,
fmt
.
Sprintf
(
bank_sql5
,
com_credits_id
,
month_six_zi
))
if
c1
[
"sum_dong_score"
]
==
"0"
||
c1
[
"sum_dong_score"
]
==
""
{
//没有结果
if
c1
[
"sum_dong_score"
]
==
"0"
||
c1
[
"sum_dong_score"
]
==
""
{
//没有结果
sum_dong_score
=
0
sum_dong_score
=
0
}
else
{
}
else
{
...
...
logs/info.log
View file @
2dd63bf4
...
@@ -28,3 +28,5 @@
...
@@ -28,3 +28,5 @@
[2019/11/21 17:19:34.063] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/main.go:24] caipu-server start
[2019/11/21 17:19:34.063] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/main.go:24] caipu-server start
[2019/12/19 16:18:26.263] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/static/main.go:56] kaopuserver start%!(EXTRA int=0)
[2019/12/19 16:18:26.263] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/static/main.go:56] kaopuserver start%!(EXTRA int=0)
[2020/01/02 18:27:52.584] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/static/main.go:56] kaopuserver-static start%!(EXTRA int=0)
[2020/01/02 18:27:52.584] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/static/main.go:56] kaopuserver-static start%!(EXTRA int=0)
[2020/01/06 09:17:46.842] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/static/main.go:56] kaopuserver-static start%!(EXTRA int=0)
[2020/01/06 09:18:13.207] [INFO] [/usr/local/var/www/ichunt/kaopu-server/cmd/static/main.go:56] kaopuserver-static start%!(EXTRA int=0)
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