Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
d4e7f8f0
Commit
d4e7f8f0
authored
Mar 18, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改公式和计算帮助类
parent
3aec3e7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
FormulaHelper.java
.../main/java/com/yanzuoguang/util/helper/FormulaHelper.java
+5
-5
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/FormulaHelper.java
View file @
d4e7f8f0
...
...
@@ -52,7 +52,7 @@ public class FormulaHelper {
// 从名称转换列序号
int
formulaColumnIndex
=
0
;
char
[]
chs
=
new
char
[
columnName
.
length
()];
columnName
.
getChars
(
0
,
columnName
.
length
()
,
chs
,
0
);
columnName
.
getChars
(
0
,
columnName
.
length
(),
chs
,
0
);
for
(
int
i
=
0
;
i
<
chs
.
length
;
i
++)
{
formulaColumnIndex
=
formulaColumnIndex
*
26
+
(
chs
[
i
]
-
'a'
+
1
);
}
...
...
@@ -216,13 +216,13 @@ public class FormulaHelper {
private
double
calcItem
(
String
flag
,
double
a
,
double
b
)
{
switch
(
flag
)
{
case
"+"
:
return
a
+
b
;
return
CalcHelper
.
add
(
a
,
b
)
;
case
"-"
:
return
a
-
b
;
return
CalcHelper
.
sub
(
a
,
b
)
;
case
"*"
:
return
a
*
b
;
return
CalcHelper
.
mul
(
a
,
b
)
;
case
"/"
:
return
a
/
b
;
return
CalcHelper
.
div
(
a
,
b
)
;
default
:
return
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