diff --git a/ruoyi-wages/src/main/java/com/ruoyi/system/model/power/dto/PowerDisplayDto.java b/ruoyi-wages/src/main/java/com/ruoyi/system/model/power/dto/PowerDisplayDto.java index c03eea7ef3676de8e43531455753129f40288932..d850ca0dc51ff505647e423758ca654468411b3b 100644 --- a/ruoyi-wages/src/main/java/com/ruoyi/system/model/power/dto/PowerDisplayDto.java +++ b/ruoyi-wages/src/main/java/com/ruoyi/system/model/power/dto/PowerDisplayDto.java @@ -49,6 +49,10 @@ public class PowerDisplayDto { private String levelThreeClassification; // 基本电费 private String basicElectricityTariff; + //照明 + private String lighting; + //动力 + private String motivation; public String getDateColumn() { return dateColumn; @@ -217,4 +221,20 @@ public class PowerDisplayDto { public void setBasicElectricityTariff(String basicElectricityTariff) { this.basicElectricityTariff = basicElectricityTariff; } + + public String getLighting() { + return lighting; + } + + public void setLighting(String lighting) { + this.lighting = lighting; + } + + public String getMotivation() { + return motivation; + } + + public void setMotivation(String motivation) { + this.motivation = motivation; + } } diff --git a/ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java b/ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java index 713e5c3486bd1cb850c8c205c2953621a13bec93..bbaaa6f8db7baaa71973f509b4e20d57076033da 100644 --- a/ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java +++ b/ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/PowerDisplayServiceImpl.java @@ -263,14 +263,14 @@ public class PowerDisplayServiceImpl implements PowerDisplayService { } @Override - public AjaxResult save(List<NewRuleRequestModel> powerDisplayDtoList) { - if (!CollectionUtils.isEmpty(powerDisplayDtoList)) { - String mineid = powerDisplayDtoList.get(0).getMineid(); + public AjaxResult save(List<NewRuleRequestModel> newRuleRequestModelList) { + if (!CollectionUtils.isEmpty(newRuleRequestModelList)) { + String mineid = newRuleRequestModelList.get(0).getMineid(); if (StringUtils.equals("011702", mineid)) { - saveLJTPowerData(powerDisplayDtoList); + saveLJTPowerData(newRuleRequestModelList); } if (StringUtils.equals("011701", mineid)) { - saveFGZPowerData(powerDisplayDtoList); + saveFGZPowerData(newRuleRequestModelList); } } else { return AjaxResult.error(); @@ -403,6 +403,8 @@ public class PowerDisplayServiceImpl implements PowerDisplayService { existingData.setLevelTwoClassification(StringUtils.isEmpty(existingData.getLevelTwoClassification()) ? newData.getLevelTwoClassification() : existingData.getLevelTwoClassification()); existingData.setLevelThreeClassification(StringUtils.isEmpty(existingData.getLevelThreeClassification()) ? newData.getLevelThreeClassification() : existingData.getLevelThreeClassification()); existingData.setBasicElectricityTariff(StringUtils.isEmpty(existingData.getBasicElectricityTariff()) ? newData.getBasicElectricityTariff() : existingData.getBasicElectricityTariff()); + existingData.setLighting(StringUtils.isEmpty(existingData.getLighting()) ? newData.getLighting() : existingData.getLighting()); + existingData.setMotivation(StringUtils.isEmpty(existingData.getMotivation()) ? newData.getMotivation() : existingData.getMotivation()); return existingData; }), map -> map.values().iterator().next())); } diff --git a/ruoyi-wages/src/main/resources/mapper/system/PowerDisplayMapper.xml b/ruoyi-wages/src/main/resources/mapper/system/PowerDisplayMapper.xml index f7602806b33e12f5e807248045ea7a1d849302c9..feec43ef5e91a5ff28a89c5a3ffb374c203852e9 100644 --- a/ruoyi-wages/src/main/resources/mapper/system/PowerDisplayMapper.xml +++ b/ruoyi-wages/src/main/resources/mapper/system/PowerDisplayMapper.xml @@ -9,7 +9,7 @@ power_total, power_tip, power_peak, power_flat, power_valley, electricity_total, electricity_tip, electricity_peak, electricity_flat, electricity_valley, electricity_price_tip, electricity_price_peak, electricity_price_flat, electricity_price_valley, - level_three_classification, basic_electricity_tariff) + level_three_classification, basic_electricity_tariff,lighting,motivation) values <foreach collection="list" item="item" separator=","> (#{item.dateColumn}, #{item.mindId}, #{item.levelOneClassification}, #{item.levelTwoClassification}, @@ -18,7 +18,8 @@ , #{item.electricityTotal}, #{item.electricityTip}, #{item.electricityPeak}, #{item.electricityFlat}, #{item.electricityValley} , #{item.electricityPriceTip}, #{item.electricityPricePeak}, #{item.electricityPriceFlat}, - #{item.electricityPriceValley}, #{item.levelThreeClassification}, #{item.basicElectricityTariff}) + #{item.electricityPriceValley}, #{item.levelThreeClassification}, + #{item.basicElectricityTariff},#{item.lighting},#{item.motivation}) </foreach> </insert> <update id="update">