Commit d473455a authored by tangwei's avatar tangwei

修改数值单位

parent 95dc2b0b
...@@ -127,7 +127,7 @@ public class JpStationDto extends BaseDto { ...@@ -127,7 +127,7 @@ public class JpStationDto extends BaseDto {
private Double cumulativeIncome; private Double cumulativeIncome;
private Double dayPowerUse; // 日用电量 private Double dayPowerUse; // 日用电量
private Double month_power_use; // 月用电量 private Double monthPowerUse; // 月用电量
private Double yearPowerUse; // 年用电量 private Double yearPowerUse; // 年用电量
private int countBuiltNum;// 已建设场站数量 private int countBuiltNum;// 已建设场站数量
......
...@@ -5,7 +5,53 @@ ...@@ -5,7 +5,53 @@
<select id="queryForDealerReviewPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"> <select id="queryForDealerReviewPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto">
select * from hygf_jp_station select
`sequence_nbr` sequenceNbr,
`rec_date` recDate,
`rec_user_id` recUserId,
`rec_user_name` recUserName,
`sn_code` snCode,
`capacity` capacity,
`name` ,
`code` ,
`system_code` systemCode,
`access_time` accessTime,
`create_time` createTime,
`address` ,
`longitude` ,
`latitude` ,
`price` ,
`user_name` userName,
`user_phone` userPhone,
`station_contact` stationContact,
`module_count` moduleCount,
`on_grid_type` onGridType,
`on_grid_time` onGridTime,
`third_station_id` thirdStationId,
`third_code` thirdCode,
`station_id` stationId,
`day_power_use` dayPowerUse,
`month_power_use` monthPowerUse,
`year_power_use` yearPowerUse,
FORMAT(`real_time_power`,3) realTimePower,
FORMAT(`accumulated_power`/1000,3) accumulatedPower,
`state` ,
`type`,
`organizational_code` organizationalCode,
`is_delete` isDelete,
FORMAT(`day_generate`,3) dayGenerate,
`month_generate` monthGenerate,
`year_generate` yearGenerate,
`day_income` dayIncome,
`month_income` monthIncome,
`year_income` yearIncome,
`area` ,
`cumulative_income` cumulativeIncome,
`email`
from hygf_jp_station
<where> <where>
<if test="dto.name!=null"> <if test="dto.name!=null">
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%") and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
...@@ -37,19 +83,19 @@ ...@@ -37,19 +83,19 @@
select select
sum(real_time_power) realTimePower, FORMAT(sum(real_time_power),3) realTimePower,
sum(capacity) capacity, FORMAT(sum(capacity)/1000,3) capacity,
sum(day_generate) dayGenerate, FORMAT(sum(day_generate)/1000,3) dayGenerate,
sum(month_generate) monthGenerate, FORMAT(sum(month_generate)/1000,3) monthGenerate,
sum(year_generate) yearGenerate, FORMAT(sum(year_generate)/1000,3) yearGenerate,
sum(accumulated_power) accumulatedPower, FORMAT(sum(accumulated_power)/1000,3) accumulatedPower,
sum(day_income) dayIncome, FORMAT( sum(day_income),3) dayIncome,
sum(month_income) monthIncome, FORMAT(sum(month_income)/10000,3) monthIncome,
sum(year_income) yearIncome, FORMAT(sum(year_income)/10000,3) yearIncome,
sum(cumulative_income) cumulativeIncome, FORMAT(sum(cumulative_income)/10000,3) cumulativeIncome,
sum(day_power_use) dayPowerUse, FORMAT(sum(day_power_use)/1000,3) dayPowerUse,
sum(month_power_use) monthPowerUse, FORMAT(sum(month_power_use)/1000,3) monthPowerUse,
sum(year_power_use) yearPowerUse, FORMAT(sum(year_power_use)/1000,3) yearPowerUse,
count(*) countBuiltNum count(*) countBuiltNum
from hygf_jp_station from hygf_jp_station
<where> <where>
......
...@@ -17,6 +17,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -17,6 +17,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -87,7 +88,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -87,7 +88,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
for (int i = 0; i < listx.size(); i++) { for (int i = 0; i < listx.size(); i++) {
if(datum.getDate().equals(listx.get(i).toString())){ if(datum.getDate().equals(listx.get(i).toString())){
listy.remove(i); listy.remove(i);
listy.add(i,datum.getNum()); String format = new DecimalFormat("#.000").format(datum.getNum());
listy.add(i,format);
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment