Commit 533d6f68 authored by shiyiwei's avatar shiyiwei

111

parent 0c822bf9
......@@ -46,3 +46,5 @@ public class ZhnyLineRunner implements CommandLineRunner {
});
}
}
......@@ -19,9 +19,10 @@ import java.util.List;
public interface MainteDistributedRepository {
@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.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 " +
"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>" +
......
......@@ -24,5 +24,6 @@ public class EnergyDistributed implements Serializable {
private BigDecimal waterMoney;
private BigDecimal elecMoney;
private BigDecimal gasMoney;
private BigDecimal Money;
}
......@@ -36,7 +36,7 @@ public class MainteDistributedServiceImpl implements MainteDistributedService {
list.forEach(energyDistributed -> {
EnergyDistributedVo vo = new EnergyDistributedVo();
//项目名
vo.setName(energyDistributed.getProNm());
vo.setName(energyDistributed.getProNm());//ProNm
//坐标
List<Object> value = new ArrayList<>();
String[] coordinate = StringUtils.deleteWhitespace(energyDistributed.getBldCoordinate()).split(",");
......@@ -44,13 +44,13 @@ public class MainteDistributedServiceImpl implements MainteDistributedService {
value.add(Float.parseFloat(coordinate[1]));
//值
//
value.add(new BigDecimal(0)
value.add(new BigDecimal(0).add(energyDistributed.getMoney()).setScale(2)
/* value.add(new BigDecimal(0)
.add(energyDistributed.getWaterMoney())
.add(energyDistributed.getElecMoney())
.add(energyDistributed.getGasMoney())
.multiply(new BigDecimal(12)) //乘以12 *GoGlic
.divide(energyDistributed.getBldArea(), 2).setScale(2)
.divide(energyDistributed.getBldArea(), 2).setScale(2)*/
// .divide(energyDistributed.getBldArea(), 2)
);
vo.setValue(value);
......
......@@ -14,6 +14,6 @@ public class Params {
private String year;
private String month;
//建筑分区id
private String bldZoneId;
//建筑分区id
}
......@@ -13,7 +13,7 @@ server:
# org.springframework.web: DEBUG
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
password: root
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