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
c4b8b401
Commit
c4b8b401
authored
Oct 29, 2024
by
位宇华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中润工资--代码提交
parent
4b0d77c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
5 deletions
+33
-5
ruoyi-wages/src/main/java/com/ruoyi/system/constant/CoalConstant.java
...src/main/java/com/ruoyi/system/constant/CoalConstant.java
+4
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/ImportExpenseSourceServiceImpl.java
...i/system/service/impl/ImportExpenseSourceServiceImpl.java
+2
-2
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/SalaryCurrentRuleServiceImpl.java
...oyi/system/service/impl/SalaryCurrentRuleServiceImpl.java
+1
-1
ruoyi-wages/src/main/java/com/ruoyi/system/support/CurrentRuleSalarySupport.java
...va/com/ruoyi/system/support/CurrentRuleSalarySupport.java
+26
-2
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/constant/CoalConstant.java
View file @
c4b8b401
...
...
@@ -39,6 +39,10 @@ public class CoalConstant {
* 云飞
*/
public
final
static
String
YF_MINE
=
"011504"
;
/**
* 中润
*/
public
final
static
String
ZR_MINE
=
"011706"
;
public
final
static
String
ONE
=
"1"
;
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/ImportExpenseSourceServiceImpl.java
View file @
c4b8b401
...
...
@@ -27,8 +27,8 @@ public class ImportExpenseSourceServiceImpl implements ImportExpenseSourceServic
@Override
@SneakyThrows
public
AjaxResult
expenseSource
(
MultipartFile
multipartFile
)
{
List
<
SalaryExpenseSourceModel
>
list
=
EasyExcelFactory
.
read
(
multipartFile
.
getInputStream
(),
SalaryExpenseSourceModel
.
class
,
new
ExcelListener
<>()).
sheet
(
"Sheet
1
"
).
headRowNumber
(
1
).
doReadSync
();
list
.
forEach
(
v
->
v
.
setOrgCode
(
"01170
4
"
));
List
<
SalaryExpenseSourceModel
>
list
=
EasyExcelFactory
.
read
(
multipartFile
.
getInputStream
(),
SalaryExpenseSourceModel
.
class
,
new
ExcelListener
<>()).
sheet
(
"Sheet
7
"
).
headRowNumber
(
1
).
doReadSync
();
list
.
forEach
(
v
->
v
.
setOrgCode
(
"01170
6
"
));
importExpenseSourceMapper
.
save
(
list
);
return
AjaxResult
.
success
();
}
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/SalaryCurrentRuleServiceImpl.java
View file @
c4b8b401
...
...
@@ -65,7 +65,7 @@ public class SalaryCurrentRuleServiceImpl implements SalaryCurrentRuleService {
}
}
}
else
{
salaryMapper
.
save
(
salaryExcelModels
);
salaryMapper
.
save
(
salaryExcelModels
);
}
});
stopWatch
.
stop
();
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/support/CurrentRuleSalarySupport.java
View file @
c4b8b401
...
...
@@ -7,6 +7,7 @@ import com.ruoyi.system.mapper.SalaryMapper;
import
com.ruoyi.system.model.newrule.NewRuleRequestModel
;
import
com.ruoyi.system.model.salary.ConfigModel
;
import
com.ruoyi.system.model.salary.SalaryExcelModel
;
import
com.ruoyi.system.model.salary.SalaryExpenseSourceModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -35,6 +36,7 @@ public class CurrentRuleSalarySupport {
MINE_MAP
.
put
(
CoalConstant
.
HF_MINE
,
CurrentRuleSalarySupport:
:
getHfMineSalaryData
);
MINE_MAP
.
put
(
CoalConstant
.
QJY_MINE
,
CurrentRuleSalarySupport:
:
getQjyMineSalaryData
);
MINE_MAP
.
put
(
CoalConstant
.
YF_MINE
,
CurrentRuleSalarySupport:
:
getYfMineSalaryData
);
MINE_MAP
.
put
(
CoalConstant
.
ZR_MINE
,
CurrentRuleSalarySupport:
:
getZrMineSalaryData
);
}
...
...
@@ -45,6 +47,23 @@ public class CurrentRuleSalarySupport {
CurrentRuleSalarySupport
.
salaryMapper
=
salaryMapper
;
}
/**
* 中润
*
* @param newRuleRequestModelList
* @return
*/
private
static
List
<
SalaryExcelModel
>
getZrMineSalaryData
(
List
<
NewRuleRequestModel
>
newRuleRequestModelList
)
{
String
mineCode
=
newRuleRequestModelList
.
get
(
0
).
getMineid
();
ReplaceSpace
(
newRuleRequestModelList
);
ReplaceBracket
(
newRuleRequestModelList
);
List
<
SalaryExpenseSourceModel
>
sourceModels
=
salaryMapper
.
getSources
(
mineCode
);
List
<
NewRuleRequestModel
>
collect
=
newRuleRequestModelList
.
stream
().
filter
(
v
->
sourceModels
.
stream
().
noneMatch
(
source
->
StringUtils
.
equals
(
v
.
getRow
(),
source
.
getExpenseSource
()))).
collect
(
Collectors
.
toList
());
collect
=
collect
.
stream
().
filter
(
v
->
sourceModels
.
stream
().
anyMatch
(
source
->
StringUtils
.
equals
(
v
.
getRow
(),
source
.
getOrg
()))).
collect
(
Collectors
.
toList
());
return
getSalaryMapping
(
collect
);
}
/**
* 云飞
...
...
@@ -116,6 +135,7 @@ public class CurrentRuleSalarySupport {
*/
private
static
List
<
SalaryExcelModel
>
getLjtMineSalaryData
(
List
<
NewRuleRequestModel
>
newRuleSalaryRequestModelList
)
{
ReplaceSpace
(
newRuleSalaryRequestModelList
);
return
getSalaryMapping
(
newRuleSalaryRequestModelList
);
}
...
...
@@ -139,7 +159,6 @@ public class CurrentRuleSalarySupport {
}
/**
* 东欢坨矿
*
...
...
@@ -222,6 +241,7 @@ public class CurrentRuleSalarySupport {
}
}
}
salaryExcelModel
.
setOrg
(
newRuleRequestModel
.
getRow
());
salaryExcelModel
.
setBelongToCoal
(
newRuleRequestModel
.
getMineid
());
salaryExcelModel
.
setSalaryDate
(
newRuleRequestModel
.
getWageMonth
());
}
...
...
@@ -261,8 +281,9 @@ public class CurrentRuleSalarySupport {
BigDecimal
multiply
=
new
BigDecimal
(
sumSalary
).
multiply
(
new
BigDecimal
(
coefficient
));
return
multiply
.
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
();
}
private
static
void
ReplaceSpace
(
List
<
NewRuleRequestModel
>
newRuleSalaryRequestModelList
)
{
newRuleSalaryRequestModelList
.
forEach
(
v
->
{
newRuleSalaryRequestModelList
.
forEach
(
v
->
{
v
.
setColoumn
(
v
.
getColoumn
().
replaceAll
(
StringUtils
.
SPACE
,
StringUtils
.
EMPTY
));
v
.
setRow
(
v
.
getRow
().
replaceAll
(
StringUtils
.
SPACE
,
StringUtils
.
EMPTY
));
v
.
setMineid
(
v
.
getMineid
().
replaceAll
(
StringUtils
.
SPACE
,
StringUtils
.
EMPTY
));
...
...
@@ -270,5 +291,8 @@ public class CurrentRuleSalarySupport {
v
.
setWageMonth
(
v
.
getWageMonth
().
replaceAll
(
StringUtils
.
SPACE
,
StringUtils
.
EMPTY
));
});
}
private
static
void
ReplaceBracket
(
List
<
NewRuleRequestModel
>
newRuleRequestModelList
)
{
newRuleRequestModelList
.
forEach
(
v
->
v
.
setRow
(
v
.
getRow
().
replaceAll
(
"\\(.*?\\)"
,
StringUtils
.
EMPTY
).
replaceAll
(
"(.*?\\)"
,
StringUtils
.
EMPTY
).
replaceAll
(
"(.*?)"
,
StringUtils
.
EMPTY
).
replaceAll
(
"其中:"
,
StringUtils
.
EMPTY
)));
}
}
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