Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
29078bcf
Commit
29078bcf
authored
May 28, 2024
by
刘_震
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工资-后端代码实现,如果传过来的含应付工资,就加到工人工资里面
parent
1624e692
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/WagesCalculateConversionServiceImpl.java
...tem/service/impl/WagesCalculateConversionServiceImpl.java
+11
-3
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/WagesCalculateConversionServiceImpl.java
View file @
29078bcf
...
@@ -140,7 +140,7 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
...
@@ -140,7 +140,7 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
if
(
first
.
isPresent
())
{
if
(
first
.
isPresent
())
{
vo
.
setLabel
(
wagesFormulaDto
.
getLabel
());
vo
.
setLabel
(
wagesFormulaDto
.
getLabel
());
vo
.
setDep
(
first
.
get
().
getUnitName
());
vo
.
setDep
(
first
.
get
().
getUnitName
());
vo
.
setWorker
(
dao
.
getWorkerWagesPayable
().
toString
());
//
vo.setWorker(dao.getWorkerWagesPayable().toString());
vo
.
setCadre
(
dao
.
getCadreWagesPayable
().
toString
());
vo
.
setCadre
(
dao
.
getCadreWagesPayable
().
toString
());
vo
.
setC
(
wagesFormulaDto
.
getC
());
vo
.
setC
(
wagesFormulaDto
.
getC
());
for
(
String
s
:
formula
)
{
for
(
String
s
:
formula
)
{
...
@@ -161,7 +161,14 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
...
@@ -161,7 +161,14 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
value
=
StringUtils
.
replaceOnce
(
value
,
s
,
s
);
value
=
StringUtils
.
replaceOnce
(
value
,
s
,
s
);
}
}
}
}
vo
.
setValue
(
count
(
value
));
// vo.setValue(count(value));
vo
.
setValue
(
dao
.
getTotalWagesPayable
().
toString
());
// 假设 count(value) 返回的是一个字符串,表示一个数值
String
countString
=
count
(
value
);
BigDecimal
countValue
=
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
countString
));
BigDecimal
cadreWagesPayable
=
dao
.
getCadreWagesPayable
();
BigDecimal
result
=
countValue
.
subtract
(
cadreWagesPayable
);
vo
.
setWorker
(
result
.
toString
());
voList
.
add
(
vo
);
voList
.
add
(
vo
);
value
=
value1
;
value
=
value1
;
}
}
...
@@ -186,6 +193,7 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
...
@@ -186,6 +193,7 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
value
=
StringUtils
.
replaceOnce
(
value
,
s
,
fieldValue
.
toString
());
value
=
StringUtils
.
replaceOnce
(
value
,
s
,
fieldValue
.
toString
());
}
}
vo
.
setValue
(
count
(
value
));
vo
.
setValue
(
count
(
value
));
voList
.
add
(
vo
);
voList
.
add
(
vo
);
value
=
value1
;
value
=
value1
;
}
}
...
@@ -328,4 +336,4 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
...
@@ -328,4 +336,4 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
private
boolean
isOperator
(
char
c
)
{
private
boolean
isOperator
(
char
c
)
{
return
c
==
'+'
||
c
==
'-'
||
c
==
'*'
||
c
==
'/'
;
return
c
==
'+'
||
c
==
'-'
||
c
==
'*'
||
c
==
'/'
;
}
}
}
}
\ No newline at end of file
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