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
358dd0f7
Commit
358dd0f7
authored
Aug 30, 2024
by
位宇华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
40521895
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
113 additions
and
19 deletions
+113
-19
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/controller/SalaryCurrentRuleController.java
.../ruoyi/system/controller/SalaryCurrentRuleController.java
+2
-2
ruoyi-wages/src/main/java/com/ruoyi/system/controller/SalaryPowerUnifyExposeController.java
...i/system/controller/SalaryPowerUnifyExposeController.java
+28
-0
ruoyi-wages/src/main/java/com/ruoyi/system/model/SalaryPowerUnifyExposeRequestModel.java
...uoyi/system/model/SalaryPowerUnifyExposeRequestModel.java
+31
-0
ruoyi-wages/src/main/java/com/ruoyi/system/model/newrule/NewRuleSalaryModel.java
...va/com/ruoyi/system/model/newrule/NewRuleSalaryModel.java
+2
-3
ruoyi-wages/src/main/java/com/ruoyi/system/service/SalaryCurrentRuleService.java
...va/com/ruoyi/system/service/SalaryCurrentRuleService.java
+2
-2
ruoyi-wages/src/main/java/com/ruoyi/system/service/SalaryPowerUnifyExposeService.java
...m/ruoyi/system/service/SalaryPowerUnifyExposeService.java
+8
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/SalaryCurrentRuleServiceImpl.java
...oyi/system/service/impl/SalaryCurrentRuleServiceImpl.java
+4
-4
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/SalaryPowerUnifyExposeServiceImpl.java
...ystem/service/impl/SalaryPowerUnifyExposeServiceImpl.java
+24
-0
ruoyi-wages/src/main/java/com/ruoyi/system/support/CurrentRuleSalarySupport.java
...va/com/ruoyi/system/support/CurrentRuleSalarySupport.java
+8
-8
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/constant/CoalConstant.java
View file @
358dd0f7
...
...
@@ -20,4 +20,8 @@ public class CoalConstant {
*/
public
final
static
String
LJT_MINE
=
"011702"
;
public
final
static
String
ONE
=
"1"
;
public
final
static
String
ZERO
=
"0"
;
}
ruoyi-wages/src/main/java/com/ruoyi/system/controller/SalaryCurrentRuleController.java
View file @
358dd0f7
package
com.ruoyi.system.controller
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.model.newrule
salary.NewRuleSalaryRequest
Model
;
import
com.ruoyi.system.model.newrule
.NewRuleSalary
Model
;
import
com.ruoyi.system.service.SalaryCurrentRuleService
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -19,7 +19,7 @@ public class SalaryCurrentRuleController {
}
@PostMapping
(
"/current/rule/salary"
)
public
AjaxResult
getCurrentRuleSalary
(
@RequestBody
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
){
public
AjaxResult
getCurrentRuleSalary
(
@RequestBody
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
){
return
salaryCurrentRuleService
.
getCurrentRuleSalary
(
newRuleSalaryRequestModelList
);
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/controller/SalaryPowerUnifyExposeController.java
0 → 100644
View file @
358dd0f7
package
com.ruoyi.system.controller
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.model.SalaryPowerUnifyExposeRequestModel
;
import
com.ruoyi.system.service.SalaryPowerUnifyExposeService
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
SalaryPowerUnifyExposeController
{
private
final
SalaryPowerUnifyExposeService
salaryPowerUnifyExposeService
;
public
SalaryPowerUnifyExposeController
(
SalaryPowerUnifyExposeService
salaryPowerUnifyExposeService
)
{
this
.
salaryPowerUnifyExposeService
=
salaryPowerUnifyExposeService
;
}
/**
* 工资电力统一接口
*
* @return
*/
@PostMapping
(
"/unify/expose"
)
public
AjaxResult
expose
(
@RequestBody
SalaryPowerUnifyExposeRequestModel
salaryPowerUnifyExposeRequestModel
)
{
return
salaryPowerUnifyExposeService
.
unify
(
salaryPowerUnifyExposeRequestModel
);
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/model/SalaryPowerUnifyExposeRequestModel.java
0 → 100644
View file @
358dd0f7
package
com.ruoyi.system.model
;
import
com.ruoyi.system.model.newrule.NewRuleSalaryModel
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
SalaryPowerUnifyExposeRequestModel
implements
Serializable
{
private
List
<
NewRuleSalaryModel
>
newRuleSalaryModelList
;
/**
* 类型 0--工资 1--电力
*/
private
String
type
;
public
List
<
NewRuleSalaryModel
>
getNewRuleSalaryModelList
()
{
return
newRuleSalaryModelList
;
}
public
void
setNewRuleSalaryModelList
(
List
<
NewRuleSalaryModel
>
newRuleSalaryModelList
)
{
this
.
newRuleSalaryModelList
=
newRuleSalaryModelList
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/model/newrule
salary/NewRuleSalaryRequest
Model.java
→
ruoyi-wages/src/main/java/com/ruoyi/system/model/newrule
/NewRuleSalary
Model.java
View file @
358dd0f7
package
com.ruoyi.system.model.newrule
salary
;
package
com.ruoyi.system.model.newrule
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
public
class
NewRuleSalary
Request
Model
implements
Serializable
{
public
class
NewRuleSalaryModel
implements
Serializable
{
private
String
row
;
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/service/SalaryCurrentRuleService.java
View file @
358dd0f7
package
com.ruoyi.system.service
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.model.newrule
salary.NewRuleSalaryRequest
Model
;
import
com.ruoyi.system.model.newrule
.NewRuleSalary
Model
;
import
java.util.List
;
public
interface
SalaryCurrentRuleService
{
AjaxResult
getCurrentRuleSalary
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
);
AjaxResult
getCurrentRuleSalary
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
);
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/SalaryPowerUnifyExposeService.java
0 → 100644
View file @
358dd0f7
package
com.ruoyi.system.service
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.model.SalaryPowerUnifyExposeRequestModel
;
public
interface
SalaryPowerUnifyExposeService
{
AjaxResult
unify
(
SalaryPowerUnifyExposeRequestModel
salaryPowerUnifyExposeRequestModel
);
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/SalaryCurrentRuleServiceImpl.java
View file @
358dd0f7
...
...
@@ -5,7 +5,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import
com.ruoyi.system.mapper.SalaryMapper
;
import
com.ruoyi.system.model.newrule
salary.NewRuleSalaryRequest
Model
;
import
com.ruoyi.system.model.newrule
.NewRuleSalary
Model
;
import
com.ruoyi.system.model.salary.SalaryExcelModel
;
import
com.ruoyi.system.model.salary.SalaryExpenseSourceModel
;
import
com.ruoyi.system.service.SalaryCurrentRuleService
;
...
...
@@ -27,12 +27,12 @@ public class SalaryCurrentRuleServiceImpl implements SalaryCurrentRuleService {
}
@Override
public
AjaxResult
getCurrentRuleSalary
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
)
{
Optional
<
List
<
NewRuleSalary
Request
Model
>>
optional
=
Optional
.
ofNullable
(
newRuleSalaryRequestModelList
);
public
AjaxResult
getCurrentRuleSalary
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
)
{
Optional
<
List
<
NewRuleSalaryModel
>>
optional
=
Optional
.
ofNullable
(
newRuleSalaryRequestModelList
);
optional
.
ifPresent
(
v
->
{
String
mineCode
=
newRuleSalaryRequestModelList
.
get
(
0
).
getMineid
();
String
salaryDate
=
newRuleSalaryRequestModelList
.
get
(
0
).
getWageMonth
();
Function
<
List
<
NewRuleSalary
Request
Model
>,
List
<
SalaryExcelModel
>>
stringListFunction
=
CurrentRuleSalarySupport
.
MINE_MAP
.
get
(
mineCode
);
Function
<
List
<
NewRuleSalaryModel
>,
List
<
SalaryExcelModel
>>
stringListFunction
=
CurrentRuleSalarySupport
.
MINE_MAP
.
get
(
mineCode
);
List
<
SalaryExcelModel
>
salaryExcelModels
=
stringListFunction
.
apply
(
newRuleSalaryRequestModelList
);
List
<
SalaryExpenseSourceModel
>
sourceModels
=
salaryMapper
.
getSources
(
mineCode
);
salaryExcelModels
.
forEach
(
salary
->
sourceModels
.
forEach
(
source
->
{
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/SalaryPowerUnifyExposeServiceImpl.java
0 → 100644
View file @
358dd0f7
package
com.ruoyi.system.service.impl
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.constant.CoalConstant
;
import
com.ruoyi.system.model.SalaryPowerUnifyExposeRequestModel
;
import
com.ruoyi.system.service.SalaryPowerUnifyExposeService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
@Service
public
class
SalaryPowerUnifyExposeServiceImpl
implements
SalaryPowerUnifyExposeService
{
@Override
public
AjaxResult
unify
(
SalaryPowerUnifyExposeRequestModel
salaryPowerUnifyExposeRequestModel
)
{
if
(
StringUtils
.
equals
(
CoalConstant
.
ZERO
,
salaryPowerUnifyExposeRequestModel
.
getType
())){
}
if
(
StringUtils
.
equals
(
CoalConstant
.
ONE
,
salaryPowerUnifyExposeRequestModel
.
getType
())){
}
return
null
;
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/support/CurrentRuleSalarySupport.java
View file @
358dd0f7
...
...
@@ -3,7 +3,7 @@ package com.ruoyi.system.support;
import
com.ruoyi.system.constant.CoalConstant
;
import
com.ruoyi.system.constant.SalaryConstant
;
import
com.ruoyi.system.model.newrule
salary.NewRuleSalaryRequest
Model
;
import
com.ruoyi.system.model.newrule
.NewRuleSalary
Model
;
import
com.ruoyi.system.model.salary.SalaryExcelModel
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -15,7 +15,7 @@ import java.util.stream.Collectors;
public
class
CurrentRuleSalarySupport
{
public
final
static
Map
<
String
,
Function
<
List
<
NewRuleSalary
Request
Model
>,
List
<
SalaryExcelModel
>>>
MINE_MAP
=
new
HashMap
<>();
public
final
static
Map
<
String
,
Function
<
List
<
NewRuleSalaryModel
>,
List
<
SalaryExcelModel
>>>
MINE_MAP
=
new
HashMap
<>();
static
{
MINE_MAP
.
put
(
CoalConstant
.
TS_MINE
,
CurrentRuleSalarySupport:
:
getTsMineSalaryData
);
...
...
@@ -31,7 +31,7 @@ public class CurrentRuleSalarySupport {
* @param newRuleSalaryRequestModelList
* @return
*/
private
static
List
<
SalaryExcelModel
>
getTsMineSalaryData
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
)
{
private
static
List
<
SalaryExcelModel
>
getTsMineSalaryData
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
)
{
List
<
SalaryExcelModel
>
salaryExcelModelList
=
new
ArrayList
<>();
return
salaryExcelModelList
;
...
...
@@ -44,7 +44,7 @@ public class CurrentRuleSalarySupport {
* @return
*/
private
static
List
<
SalaryExcelModel
>
getLjtMineSalaryData
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
)
{
private
static
List
<
SalaryExcelModel
>
getLjtMineSalaryData
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
)
{
return
getSalaryMapping
(
newRuleSalaryRequestModelList
);
}
...
...
@@ -54,7 +54,7 @@ public class CurrentRuleSalarySupport {
* @param newRuleSalaryRequestModelList
* @return
*/
private
static
List
<
SalaryExcelModel
>
getLxMineSalaryData
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
)
{
private
static
List
<
SalaryExcelModel
>
getLxMineSalaryData
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
)
{
List
<
SalaryExcelModel
>
salaryExcelModelList
=
new
ArrayList
<>();
return
salaryExcelModelList
;
}
...
...
@@ -65,14 +65,14 @@ public class CurrentRuleSalarySupport {
* @param newRuleSalaryRequestModelList
* @return
*/
private
static
List
<
SalaryExcelModel
>
getDhtMineSalaryData
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
)
{
private
static
List
<
SalaryExcelModel
>
getDhtMineSalaryData
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
)
{
List
<
SalaryExcelModel
>
salaryExcelModelList
=
new
ArrayList
<>();
return
salaryExcelModelList
;
}
public
static
List
<
SalaryExcelModel
>
getSalaryMapping
(
List
<
NewRuleSalary
Request
Model
>
newRuleSalaryRequestModelList
)
{
public
static
List
<
SalaryExcelModel
>
getSalaryMapping
(
List
<
NewRuleSalaryModel
>
newRuleSalaryRequestModelList
)
{
List
<
SalaryExcelModel
>
salaryExcelModelList
=
new
ArrayList
<>();
for
(
NewRuleSalary
Request
Model
newRuleSalaryRequestModel
:
newRuleSalaryRequestModelList
)
{
for
(
NewRuleSalaryModel
newRuleSalaryRequestModel
:
newRuleSalaryRequestModelList
)
{
SalaryExcelModel
salaryExcelModel
=
new
SalaryExcelModel
();
String
col
=
newRuleSalaryRequestModel
.
getColoumn
();
if
(
SalaryConstant
.
ORG_SET
.
contains
(
col
))
{
...
...
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