Commit 533d6f68 authored by shiyiwei's avatar shiyiwei

111

parent 0c822bf9
...@@ -46,3 +46,5 @@ public class ZhnyLineRunner implements CommandLineRunner { ...@@ -46,3 +46,5 @@ public class ZhnyLineRunner implements CommandLineRunner {
}); });
} }
} }
...@@ -19,9 +19,10 @@ import java.util.List; ...@@ -19,9 +19,10 @@ import java.util.List;
public interface MainteDistributedRepository { public interface MainteDistributedRepository {
@Select("<script>select b.PRO_NM,b.BLD_COORDINATE,b.BLD_AREA, " + @Select("<script>select b.PRO_NM,b.BLD_COORDINATE,b.BLD_AREA, " +
"sum(if(e.WATER_MONEY is null, 0, e.WATER_MONEY)) WATER_MONEY, " + "CONVERT(sum((if(e.WATER_MONEY is null, 0, e.WATER_MONEY)+if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)+if(e.GAS_MONEY is null, 0, e.GAS_MONEY))*12/b.BLD_AREA),DECIMAL(10,2)) MONEY " +
/*"sum(if(e.WATER_MONEY is null, 0, e.WATER_MONEY)) WATER_MONEY, " +
"sum(if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)) ELEC_MONEY, " + "sum(if(e.ELEC_MONEY is null, 0, e.ELEC_MONEY)) ELEC_MONEY, " +
"sum(if(e.GAS_MONEY is null, 0, e.GAS_MONEY)) GAS_MONEY " + "sum(if(e.GAS_MONEY is null, 0, e.GAS_MONEY)) GAS_MONEY " +*/
"from energy_count_m e,bus_project b " + "from energy_count_m e,bus_project b " +
"where e.PRO_ID=b.PRO_ID and e.`YEAR`=#{year} " + "where e.PRO_ID=b.PRO_ID and e.`YEAR`=#{year} " +
"<if test=\"month != null and month != ''\">and e.MON=${month} group by e.MON,b.PRO_NM</if>" + "<if test=\"month != null and month != ''\">and e.MON=${month} group by e.MON,b.PRO_NM</if>" +
......
...@@ -24,5 +24,6 @@ public class EnergyDistributed implements Serializable { ...@@ -24,5 +24,6 @@ public class EnergyDistributed implements Serializable {
private BigDecimal waterMoney; private BigDecimal waterMoney;
private BigDecimal elecMoney; private BigDecimal elecMoney;
private BigDecimal gasMoney; private BigDecimal gasMoney;
private BigDecimal Money;
} }
...@@ -36,7 +36,7 @@ public class MainteDistributedServiceImpl implements MainteDistributedService { ...@@ -36,7 +36,7 @@ public class MainteDistributedServiceImpl implements MainteDistributedService {
list.forEach(energyDistributed -> { list.forEach(energyDistributed -> {
EnergyDistributedVo vo = new EnergyDistributedVo(); EnergyDistributedVo vo = new EnergyDistributedVo();
//项目名 //项目名
vo.setName(energyDistributed.getProNm()); vo.setName(energyDistributed.getProNm());//ProNm
//坐标 //坐标
List<Object> value = new ArrayList<>(); List<Object> value = new ArrayList<>();
String[] coordinate = StringUtils.deleteWhitespace(energyDistributed.getBldCoordinate()).split(","); String[] coordinate = StringUtils.deleteWhitespace(energyDistributed.getBldCoordinate()).split(",");
...@@ -44,13 +44,13 @@ public class MainteDistributedServiceImpl implements MainteDistributedService { ...@@ -44,13 +44,13 @@ public class MainteDistributedServiceImpl implements MainteDistributedService {
value.add(Float.parseFloat(coordinate[1])); value.add(Float.parseFloat(coordinate[1]));
//值 //值
// //
value.add(new BigDecimal(0).add(energyDistributed.getMoney()).setScale(2)
value.add(new BigDecimal(0) /* value.add(new BigDecimal(0)
.add(energyDistributed.getWaterMoney()) .add(energyDistributed.getWaterMoney())
.add(energyDistributed.getElecMoney()) .add(energyDistributed.getElecMoney())
.add(energyDistributed.getGasMoney()) .add(energyDistributed.getGasMoney())
.multiply(new BigDecimal(12)) //乘以12 *GoGlic .multiply(new BigDecimal(12)) //乘以12 *GoGlic
.divide(energyDistributed.getBldArea(), 2).setScale(2) .divide(energyDistributed.getBldArea(), 2).setScale(2)*/
// .divide(energyDistributed.getBldArea(), 2) // .divide(energyDistributed.getBldArea(), 2)
); );
vo.setValue(value); vo.setValue(value);
......
...@@ -14,6 +14,6 @@ public class Params { ...@@ -14,6 +14,6 @@ public class Params {
private String year; private String year;
private String month; private String month;
//建筑分区id
private String bldZoneId; private String bldZoneId;
//建筑分区id
} }
...@@ -13,7 +13,7 @@ server: ...@@ -13,7 +13,7 @@ server:
# org.springframework.web: DEBUG # org.springframework.web: DEBUG
druid: druid:
url: jdbc:mysql://127.0.0.1:3306/zhny?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true url: jdbc:mysql://192.168.0.198:3306/zhny?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root username: root
password: root password: root
initial-size: 1 initial-size: 1
......
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