|
@@ -183,7 +183,7 @@ public class AppPageReportController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "getBusinessDataForSameMonth",method = RequestMethod.GET)
|
|
|
- @ApiOperation(value = "App总览——生产数据(本月)")
|
|
|
+ @ApiOperation(value = "App总览——营业总览应收实收回收率数据(本月)")
|
|
|
public AjaxMessage<Map<String,Object>> getSameMonthBusinessData(
|
|
|
@ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
@@ -202,7 +202,7 @@ public class AppPageReportController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "getBusinessDataForSameYear",method = RequestMethod.GET)
|
|
|
- @ApiOperation(value = "App总览——生产数据(本年)")
|
|
|
+ @ApiOperation(value = "App总览——营业总览应收实收回收率数据(本年)")
|
|
|
public AjaxMessage<Map<String,Object>> getBusinessDataForSameYear(
|
|
|
@ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){
|
|
|
LocalDate now = LocalDate.now();
|
|
@@ -221,4 +221,31 @@ public class AppPageReportController {
|
|
|
return new AjaxMessage<>(ResultStatus.OK,map);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Author wangbo
|
|
|
+ * @Description App 营业总览数据-近一年应收实收回收率数据
|
|
|
+ * @param companyOrgId 公司ID
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "getBusinessDataForLast12Month",method = RequestMethod.GET)
|
|
|
+ @ApiOperation(value = "App总览——营业总览应收实收回收率数据(近一年)")
|
|
|
+ public AjaxMessage<Map<String,Object>> getBusinessDataForLast12Month(
|
|
|
+ @ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ List<DeviceWaterSupply> sellerWaterList = appPageReportService.deviceSellerAmountReportForMonth(companyOrgId,now.getMonthValue());
|
|
|
+ BigDecimal totalReceivableAmount = new BigDecimal(0);
|
|
|
+ BigDecimal totalReceivedAmount = new BigDecimal(0);
|
|
|
+ for(DeviceWaterSupply amount: sellerWaterList){
|
|
|
+ totalReceivableAmount.add(amount.getAmount());
|
|
|
+ totalReceivedAmount.add(amount.getAmount2());
|
|
|
+ }
|
|
|
+ map.put("totalReceivable", totalReceivableAmount);
|
|
|
+ map.put("totalReceived",totalReceivedAmount);
|
|
|
+ map.put("amountDetails",sellerWaterList);
|
|
|
+ map.put("rate", sellerWaterList.get(0).getAmount().compareTo(BigDecimal.ZERO)==0? 0 : sellerWaterList.get(0).getAmount2().multiply(new BigDecimal(100)).divide(sellerWaterList.get(0).getAmount(),2));
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK,map);
|
|
|
+ }
|
|
|
+
|
|
|
}
|