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
d63a5e1e
Commit
d63a5e1e
authored
Oct 16, 2024
by
位宇华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--代码提交
parent
7e9a63fe
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
402 additions
and
12 deletions
+402
-12
ruoyi-wages/src/main/java/com/ruoyi/system/controller/ConfigSaveController.java
...ava/com/ruoyi/system/controller/ConfigSaveController.java
+22
-2
ruoyi-wages/src/main/java/com/ruoyi/system/controller/PowerDisplayController.java
...a/com/ruoyi/system/controller/PowerDisplayController.java
+6
-0
ruoyi-wages/src/main/java/com/ruoyi/system/mapper/PowerDisplayMapper.java
...main/java/com/ruoyi/system/mapper/PowerDisplayMapper.java
+6
-0
ruoyi-wages/src/main/java/com/ruoyi/system/model/power/PowerSourceModel.java
...n/java/com/ruoyi/system/model/power/PowerSourceModel.java
+36
-0
ruoyi-wages/src/main/java/com/ruoyi/system/model/power/dto/PowerDisplayDto.java
...ava/com/ruoyi/system/model/power/dto/PowerDisplayDto.java
+169
-2
ruoyi-wages/src/main/java/com/ruoyi/system/service/PowerDisplayService.java
...in/java/com/ruoyi/system/service/PowerDisplayService.java
+3
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/ImportExpenseSourceServiceImpl.java
...i/system/service/impl/ImportExpenseSourceServiceImpl.java
+6
-1
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java
...om/ruoyi/system/service/impl/PowerDisplayServiceImpl.java
+141
-5
ruoyi-wages/src/main/resources/mapper/system/PowerDisplayMapper.xml
...s/src/main/resources/mapper/system/PowerDisplayMapper.xml
+12
-1
ruoyi-wages/src/main/resources/mapper/system/SalaryMapper.xml
...i-wages/src/main/resources/mapper/system/SalaryMapper.xml
+1
-1
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/controller/ConfigSaveController.java
View file @
d63a5e1e
...
...
@@ -18,7 +18,7 @@ public class ConfigSaveController {
@PostMapping
(
"/test/save"
)
public
void
save
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"org"
,
"项目,部门名称"
);
/*
map.put("org","项目,部门名称");
map.put("personCount","人数");
map.put("salary","应付工资");
map.put("medicalSubsidy","应付工资2(医疗补贴)");
...
...
@@ -40,7 +40,27 @@ public class ConfigSaveController {
map.put("longAccountInsurance","长户险");
map.put("honorMoney","荣誉金");
map.put("warmSubsidy","取暖补贴");
map
.
put
(
"heatPreventSubsidy"
,
"防暑降温,降温防暑费"
);
map.put("heatPreventSubsidy","防暑降温,降温防暑费");*/
map
.
put
(
"classificationName"
,
"用电单位"
);
map
.
put
(
"powerTotal"
,
"电量(kwh)"
);
map
.
put
(
"powerTip"
,
""
);
map
.
put
(
"powerPeak"
,
""
);
map
.
put
(
"powerFlat"
,
""
);
map
.
put
(
"powerValley"
,
""
);
map
.
put
(
"electricityTotal"
,
"含税电费总额(元)"
);
map
.
put
(
"electricityTip"
,
""
);
map
.
put
(
"electricityPeak"
,
""
);
map
.
put
(
"electricityFlat"
,
""
);
map
.
put
(
"electricityValley"
,
""
);
map
.
put
(
"electricityPriceTip"
,
""
);
map
.
put
(
"electricityPricePeak"
,
""
);
map
.
put
(
"electricityPriceFlat"
,
""
);
map
.
put
(
"electricityPriceValley"
,
""
);
map
.
put
(
"levelOneClassification"
,
""
);
map
.
put
(
"levelTwoClassification"
,
""
);
map
.
put
(
"levelThreeClassification"
,
""
);
map
.
put
(
"basicElectricityTariff"
,
""
);
map
.
forEach
((
k
,
v
)->
salaryMapper
.
insertMap
(
k
,
v
));
}
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/controller/PowerDisplayController.java
View file @
d63a5e1e
...
...
@@ -32,4 +32,10 @@ public class PowerDisplayController {
powerDisplayService
.
peek
(
powerDisplayDtoList
);
return
new
AjaxResult
(
200
,
"成功"
);
}
@PostMapping
(
"/save"
)
public
AjaxResult
save
(
@RequestBody
List
<
NewRuleRequestModel
>
powerDisplayDtoList
)
{
return
powerDisplayService
.
save
(
powerDisplayDtoList
);
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/mapper/PowerDisplayMapper.java
View file @
d63a5e1e
package
com.ruoyi.system.mapper
;
import
com.ruoyi.system.model.power.PowerSourceModel
;
import
com.ruoyi.system.model.power.dao.PowerClassificationQueryDao
;
import
com.ruoyi.system.model.power.dao.PowerControlDao
;
import
com.ruoyi.system.model.power.dto.PowerDisplayDto
;
import
com.ruoyi.system.model.salary.ConfigModel
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -24,4 +26,8 @@ public interface PowerDisplayMapper {
List
<
PowerDisplayDto
>
selOfMid
(
@Param
(
"id"
)
String
mindId
,
@Param
(
"date"
)
String
date
);
void
update
(
List
<
PowerDisplayDto
>
collect
);
List
<
ConfigModel
>
seletPowerConfig
();
List
<
PowerSourceModel
>
selectSource
(
@Param
(
"number"
)
String
number
);
}
ruoyi-wages/src/main/java/com/ruoyi/system/model/power/PowerSourceModel.java
0 → 100644
View file @
d63a5e1e
package
com.ruoyi.system.model.power
;
import
java.io.Serializable
;
public
class
PowerSourceModel
implements
Serializable
{
private
String
levelOneClassification
;
private
String
classificationName
;
private
String
mindId
;
public
String
getLevelOneClassification
()
{
return
levelOneClassification
;
}
public
void
setLevelOneClassification
(
String
levelOneClassification
)
{
this
.
levelOneClassification
=
levelOneClassification
;
}
public
String
getClassificationName
()
{
return
classificationName
;
}
public
void
setClassificationName
(
String
classificationName
)
{
this
.
classificationName
=
classificationName
;
}
public
String
getMindId
()
{
return
mindId
;
}
public
void
setMindId
(
String
mindId
)
{
this
.
mindId
=
mindId
;
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/model/power/dto/PowerDisplayDto.java
View file @
d63a5e1e
package
com.ruoyi.system.model.power.dto
;
import
lombok.Data
;
/**
* 2024/7/30
* 电力展示保存
*/
@Data
public
class
PowerDisplayDto
{
// 年月
private
String
dateColumn
;
...
...
@@ -50,4 +49,172 @@ public class PowerDisplayDto {
private
String
levelThreeClassification
;
// 基本电费
private
String
basicElectricityTariff
;
public
String
getDateColumn
()
{
return
dateColumn
;
}
public
void
setDateColumn
(
String
dateColumn
)
{
this
.
dateColumn
=
dateColumn
;
}
public
String
getMindId
()
{
return
mindId
;
}
public
void
setMindId
(
String
mindId
)
{
this
.
mindId
=
mindId
;
}
public
String
getClassificationName
()
{
return
classificationName
;
}
public
void
setClassificationName
(
String
classificationName
)
{
this
.
classificationName
=
classificationName
;
}
public
String
getPowerTotal
()
{
return
powerTotal
;
}
public
void
setPowerTotal
(
String
powerTotal
)
{
this
.
powerTotal
=
powerTotal
;
}
public
String
getPowerTip
()
{
return
powerTip
;
}
public
void
setPowerTip
(
String
powerTip
)
{
this
.
powerTip
=
powerTip
;
}
public
String
getPowerPeak
()
{
return
powerPeak
;
}
public
void
setPowerPeak
(
String
powerPeak
)
{
this
.
powerPeak
=
powerPeak
;
}
public
String
getPowerFlat
()
{
return
powerFlat
;
}
public
void
setPowerFlat
(
String
powerFlat
)
{
this
.
powerFlat
=
powerFlat
;
}
public
String
getPowerValley
()
{
return
powerValley
;
}
public
void
setPowerValley
(
String
powerValley
)
{
this
.
powerValley
=
powerValley
;
}
public
String
getElectricityTotal
()
{
return
electricityTotal
;
}
public
void
setElectricityTotal
(
String
electricityTotal
)
{
this
.
electricityTotal
=
electricityTotal
;
}
public
String
getElectricityTip
()
{
return
electricityTip
;
}
public
void
setElectricityTip
(
String
electricityTip
)
{
this
.
electricityTip
=
electricityTip
;
}
public
String
getElectricityPeak
()
{
return
electricityPeak
;
}
public
void
setElectricityPeak
(
String
electricityPeak
)
{
this
.
electricityPeak
=
electricityPeak
;
}
public
String
getElectricityFlat
()
{
return
electricityFlat
;
}
public
void
setElectricityFlat
(
String
electricityFlat
)
{
this
.
electricityFlat
=
electricityFlat
;
}
public
String
getElectricityValley
()
{
return
electricityValley
;
}
public
void
setElectricityValley
(
String
electricityValley
)
{
this
.
electricityValley
=
electricityValley
;
}
public
String
getElectricityPriceTip
()
{
return
electricityPriceTip
;
}
public
void
setElectricityPriceTip
(
String
electricityPriceTip
)
{
this
.
electricityPriceTip
=
electricityPriceTip
;
}
public
String
getElectricityPricePeak
()
{
return
electricityPricePeak
;
}
public
void
setElectricityPricePeak
(
String
electricityPricePeak
)
{
this
.
electricityPricePeak
=
electricityPricePeak
;
}
public
String
getElectricityPriceFlat
()
{
return
electricityPriceFlat
;
}
public
void
setElectricityPriceFlat
(
String
electricityPriceFlat
)
{
this
.
electricityPriceFlat
=
electricityPriceFlat
;
}
public
String
getElectricityPriceValley
()
{
return
electricityPriceValley
;
}
public
void
setElectricityPriceValley
(
String
electricityPriceValley
)
{
this
.
electricityPriceValley
=
electricityPriceValley
;
}
public
String
getLevelOneClassification
()
{
return
levelOneClassification
;
}
public
void
setLevelOneClassification
(
String
levelOneClassification
)
{
this
.
levelOneClassification
=
levelOneClassification
;
}
public
String
getLevelTwoClassification
()
{
return
levelTwoClassification
;
}
public
void
setLevelTwoClassification
(
String
levelTwoClassification
)
{
this
.
levelTwoClassification
=
levelTwoClassification
;
}
public
String
getLevelThreeClassification
()
{
return
levelThreeClassification
;
}
public
void
setLevelThreeClassification
(
String
levelThreeClassification
)
{
this
.
levelThreeClassification
=
levelThreeClassification
;
}
public
String
getBasicElectricityTariff
()
{
return
basicElectricityTariff
;
}
public
void
setBasicElectricityTariff
(
String
basicElectricityTariff
)
{
this
.
basicElectricityTariff
=
basicElectricityTariff
;
}
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/PowerDisplayService.java
View file @
d63a5e1e
package
com.ruoyi.system.service
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.system.model.newrule.NewRuleRequestModel
;
import
java.util.List
;
...
...
@@ -9,4 +10,6 @@ import java.util.List;
*/
public
interface
PowerDisplayService
{
void
peek
(
List
<
NewRuleRequestModel
>
powerDisplayDtoList
);
AjaxResult
save
(
List
<
NewRuleRequestModel
>
powerDisplayDtoList
);
}
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/ImportExpenseSourceServiceImpl.java
View file @
d63a5e1e
...
...
@@ -8,6 +8,7 @@ import com.ruoyi.system.model.power.PowerImportSourceModel;
import
com.ruoyi.system.model.salary.SalaryExpenseSourceModel
;
import
com.ruoyi.system.service.ImportExpenseSourceService
;
import
lombok.SneakyThrows
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -34,7 +35,11 @@ public class ImportExpenseSourceServiceImpl implements ImportExpenseSourceServic
@Override
@SneakyThrows
public
AjaxResult
save
(
MultipartFile
multipartFile
)
{
List
<
PowerImportSourceModel
>
powerImportSourceModelList
=
EasyExcelFactory
.
read
(
multipartFile
.
getInputStream
(),
PowerImportSourceModel
.
class
,
new
ExcelListener
<>()).
sheet
(
"Sheet1"
).
headRowNumber
(
1
).
doReadSync
();
List
<
PowerImportSourceModel
>
powerImportSourceModelList
=
EasyExcelFactory
.
read
(
multipartFile
.
getInputStream
(),
PowerImportSourceModel
.
class
,
new
ExcelListener
<>()).
sheet
(
"Sheet2"
).
headRowNumber
(
1
).
doReadSync
();
powerImportSourceModelList
.
forEach
(
v
->{
v
.
setClassificationName
(
v
.
getClassificationName
().
replaceAll
(
StringUtils
.
SPACE
,
StringUtils
.
EMPTY
));
v
.
setLevelOneClassification
(
v
.
getLevelOneClassification
().
replaceAll
(
StringUtils
.
SPACE
,
StringUtils
.
EMPTY
));
});
importExpenseSourceMapper
.
saveSource
(
powerImportSourceModelList
);
return
AjaxResult
.
success
();
}
...
...
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java
View file @
d63a5e1e
This diff is collapsed.
Click to expand it.
ruoyi-wages/src/main/resources/mapper/system/PowerDisplayMapper.xml
View file @
d63a5e1e
...
...
@@ -95,9 +95,20 @@
where mind_id = #{id}
</select>
<select
id=
"selOfMid"
resultType=
"com.ruoyi.system.model.power.dto.PowerDisplayDto"
>
select a.level_one_classification
levelOneClassification, a.classification_name
classificationName
select a.level_one_classification
levelOneClassification, a.classification_name
classificationName
from power_large_screen_display a
where mind_id = #{id}
and date_column = #{date}
</select>
<select
id=
"seletPowerConfig"
resultType=
"com.ruoyi.system.model.salary.ConfigModel"
>
select key_name as keyName, col_name as colName
from power_col_config
where col_name !=''
</select>
<select
id=
"selectSource"
resultType=
"com.ruoyi.system.model.power.PowerSourceModel"
>
select level_one_classification as levelOneClassification,
classification_name as classificationName
from power_classification_query
where mind_id = #{number}
</select>
</mapper>
\ No newline at end of file
ruoyi-wages/src/main/resources/mapper/system/SalaryMapper.xml
View file @
d63a5e1e
...
...
@@ -200,7 +200,7 @@
and salary_date = #{salaryDate}
</update>
<insert
id=
"insertMap"
>
INSERT INTO
salary
_col_config (key_name, col_name)
INSERT INTO
power
_col_config (key_name, col_name)
values (#{k}, #{v})
</insert>
<select
id=
"getConfig"
resultType=
"com.ruoyi.system.model.salary.ConfigModel"
>
...
...
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