Commit d473455a authored by tangwei's avatar tangwei

修改数值单位

parent 95dc2b0b
......@@ -127,7 +127,7 @@ public class JpStationDto extends BaseDto {
private Double cumulativeIncome;
private Double dayPowerUse; // 日用电量
private Double month_power_use; // 月用电量
private Double monthPowerUse; // 月用电量
private Double yearPowerUse; // 年用电量
private int countBuiltNum;// 已建设场站数量
......
......@@ -5,7 +5,53 @@
<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>
<if test="dto.name!=null">
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
......@@ -37,19 +83,19 @@
select
sum(real_time_power) realTimePower,
sum(capacity) capacity,
sum(day_generate) dayGenerate,
sum(month_generate) monthGenerate,
sum(year_generate) yearGenerate,
sum(accumulated_power) accumulatedPower,
sum(day_income) dayIncome,
sum(month_income) monthIncome,
sum(year_income) yearIncome,
sum(cumulative_income) cumulativeIncome,
sum(day_power_use) dayPowerUse,
sum(month_power_use) monthPowerUse,
sum(year_power_use) yearPowerUse,
FORMAT(sum(real_time_power),3) realTimePower,
FORMAT(sum(capacity)/1000,3) capacity,
FORMAT(sum(day_generate)/1000,3) dayGenerate,
FORMAT(sum(month_generate)/1000,3) monthGenerate,
FORMAT(sum(year_generate)/1000,3) yearGenerate,
FORMAT(sum(accumulated_power)/1000,3) accumulatedPower,
FORMAT( sum(day_income),3) dayIncome,
FORMAT(sum(month_income)/10000,3) monthIncome,
FORMAT(sum(year_income)/10000,3) yearIncome,
FORMAT(sum(cumulative_income)/10000,3) cumulativeIncome,
FORMAT(sum(day_power_use)/1000,3) dayPowerUse,
FORMAT(sum(month_power_use)/1000,3) monthPowerUse,
FORMAT(sum(year_power_use)/1000,3) yearPowerUse,
count(*) countBuiltNum
from hygf_jp_station
<where>
......
......@@ -17,6 +17,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -87,7 +88,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
for (int i = 0; i < listx.size(); i++) {
if(datum.getDate().equals(listx.get(i).toString())){
listy.remove(i);
listy.add(i,datum.getNum());
String format = new DecimalFormat("#.000").format(datum.getNum());
listy.add(i,format);
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