|
@@ -71,6 +71,12 @@ public class SecSupplyService {
|
|
|
* @return
|
|
|
*/
|
|
|
public AmountTotalDto findAmountTotalByTypeName(SceneEntity sceneEntity) {
|
|
|
+ BigDecimal multipleData;
|
|
|
+ if(sceneEntity.getSceneTypeName().equals("泵站")){
|
|
|
+ multipleData = new BigDecimal("1");
|
|
|
+ }else{
|
|
|
+ multipleData = new BigDecimal("10000");
|
|
|
+ }
|
|
|
AmountTotalDto amountTotalDto = new AmountTotalDto();
|
|
|
List<SceneEntity> sceneEntities = sceneService.selectByTypeName(sceneEntity);
|
|
|
if (sceneEntities.size() == 0)
|
|
@@ -133,7 +139,7 @@ public class SecSupplyService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- amountTotalDto.setDayAmount(BigDecimal.valueOf(dayAmount).divide(BigDecimal.valueOf(10000),3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ amountTotalDto.setDayAmount(BigDecimal.valueOf(dayAmount).divide(multipleData,3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//本月供水量
|
|
|
double monthAmount = 0d;
|
|
|
begin.add(Calendar.DATE, 1);// 恢复到当前日期
|
|
@@ -155,7 +161,7 @@ public class SecSupplyService {
|
|
|
} else {
|
|
|
monthAmount = dayAmount;
|
|
|
}
|
|
|
- amountTotalDto.setMonthAmount(BigDecimal.valueOf(monthAmount).divide(BigDecimal.valueOf(10000),3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ amountTotalDto.setMonthAmount(BigDecimal.valueOf(monthAmount).divide(multipleData,3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//本年供水量
|
|
|
double yearAmount = 0d;
|
|
|
begin.add(Calendar.MONTH, 1);// 恢复到当前日期
|
|
@@ -172,7 +178,7 @@ public class SecSupplyService {
|
|
|
} else {
|
|
|
yearAmount = monthAmount;
|
|
|
}
|
|
|
- amountTotalDto.setYearAmount(BigDecimal.valueOf(yearAmount).divide(BigDecimal.valueOf(10000),3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ amountTotalDto.setYearAmount(BigDecimal.valueOf(yearAmount).divide(multipleData,3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
return amountTotalDto;
|
|
|
}
|
|
|
|