mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-10 04:50:11 +08:00
新增 查询经营效率接口
This commit is contained in:
@@ -8,9 +8,11 @@ import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.MerchantOrderReportDTO;
|
||||
import com.jsowell.pile.dto.ParkingCouponRecordQueryDTO;
|
||||
import com.jsowell.pile.dto.business.BusinessEfficiencyQueryDTO;
|
||||
import com.jsowell.pile.dto.business.BusinessOperationAnalysisQueryDTO;
|
||||
import com.jsowell.pile.dto.business.BusinessScaleQueryDTO;
|
||||
import com.jsowell.pile.service.BusinessFinancialService;
|
||||
import com.jsowell.pile.vo.uniapp.business.BusinessEfficiencyVO;
|
||||
import com.jsowell.pile.vo.uniapp.business.BusinessGunEfficiencyAnalysisVO;
|
||||
import com.jsowell.pile.vo.uniapp.business.BusinessOperationAnalysisVO;
|
||||
import com.jsowell.pile.vo.uniapp.business.BusinessScaleVO;
|
||||
@@ -148,4 +150,32 @@ public class BusinessFinancialController extends BaseController {
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询经营效率
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 经营效率数据(含指标卡片和曲线图)
|
||||
*/
|
||||
@PostMapping("/businessEfficiency")
|
||||
public RestApiResponse<?> getBusinessEfficiency(@RequestBody BusinessEfficiencyQueryDTO dto) {
|
||||
logger.info("查询经营效率 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response;
|
||||
try {
|
||||
if (dto == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
BusinessEfficiencyVO result = businessFinancialService.getBusinessEfficiency(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
logger.info("查询经营效率成功 startTime:{}, endTime:{}, selectedMetricCode:{}",
|
||||
dto.getStartTime(), dto.getEndTime(), dto.getSelectedMetricCode());
|
||||
} catch (BusinessException e) {
|
||||
logger.warn("查询经营效率业务异常 code:{}, message:{}", e.getCode(), e.getMessage(), e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("查询经营效率系统异常 params:{}", JSONObject.toJSONString(dto), e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/opt/app/spring/logs" />
|
||||
<property name="log.path" value="./opt/app/spring/logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n%ex" />
|
||||
<!-- 日志最大的历史 90天 -->
|
||||
|
||||
Reference in New Issue
Block a user