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
fb8bdfdb
authored
Jan 06, 2020
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
判断分母为零的情况
parent
a25bece4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
internal/dao/dong_mod.go
internal/dao/dong_mod.go
View file @
fb8bdfdb
...
@@ -101,7 +101,14 @@ func (d *dao) DongRate(ctx context.Context,y map[string]string,modelItems []map[
...
@@ -101,7 +101,14 @@ func (d *dao) DongRate(ctx context.Context,y map[string]string,modelItems []map[
logic
.
LogWrite
(
"没有订单数据跳过:"
+
y
[
"erp_company_code"
],
"dong_error"
,
1
)
logic
.
LogWrite
(
"没有订单数据跳过:"
+
y
[
"erp_company_code"
],
"dong_error"
,
1
)
return
return
}
}
ladder_rate
=
logic
.
MyFloat64
(
s1
)
/
logic
.
MyFloat64
(
s2
)
//如果0是被除则跳过,否则会出错
if
(
logic
.
MyFloat64
(
s2
)
!=
0
){
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
)
}
}
...
...
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