|
@@ -1,5 +1,4 @@
|
|
|
package com.huaxu.controller;
|
|
|
-import com.huaxu.dao.SceneMapper;
|
|
|
import com.huaxu.dto.generalView.DeviceWaterSupply;
|
|
|
import com.huaxu.model.AjaxMessage;
|
|
|
import com.huaxu.model.ResultStatus;
|
|
@@ -13,7 +12,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
|
import java.util.HashMap;
|
|
@@ -208,6 +206,27 @@ public class AppPageReportController {
|
|
|
return new AjaxMessage<>(ResultStatus.OK,map);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Author wangbo
|
|
|
+ * @Description App 营业数据-本月应收实收售水回收率数据
|
|
|
+ * @param companyOrgId 公司ID
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "getRevenueDataForSameMonth ",method = RequestMethod.GET)
|
|
|
+ @ApiOperation(value = "App——营业数据-应收实收售水回收率数据(本月)")
|
|
|
+ public AjaxMessage<Map<String,Object>> getRevenueDataForSameMonth(
|
|
|
+ @ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){
|
|
|
+ List<DeviceWaterSupply> sellerWaterList = appPageReportService.deviceSellerAmountReportForMonth(companyOrgId,1);
|
|
|
+ List<DeviceWaterSupply> sellerAmountList = appPageReportService.deviceSellerWaterReportForMonth(companyOrgId,1);
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ map.put("receivableAmount", sellerWaterList.get(0).getReceivableAmount());
|
|
|
+ map.put("receivedAmount", sellerWaterList.get(0).getReceivedAmount());
|
|
|
+ map.put("sellerAmount",sellerAmountList.get(0).getAmount());
|
|
|
+ map.put("recoveryRate", sellerWaterList.get(0).getReceivableAmount().compareTo(BigDecimal.ZERO)==0? 0 : sellerWaterList.get(0).getReceivedAmount().multiply(new BigDecimal(100)).divide(sellerWaterList.get(0).getReceivableAmount(),2));
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK,map);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @Author wangbo
|
|
|
* @Description App 营业总览数据-本月应收实收回收率数据
|