mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
新增 站点枪口利用率趋势统计接口
This commit is contained in:
@@ -185,4 +185,11 @@ public interface PileStationInfoService {
|
||||
* @return
|
||||
*/
|
||||
StationBusinessAnalyzeInfoVO getStationOrderQuantityInfo(StationBusinessAnalyzeInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 查询站点枪利用率趋势信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
StationBusinessAnalyzeInfoVO getStationConnectorUsedInfo(StationBusinessAnalyzeInfoDTO dto);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.system.service.SysDeptService;
|
||||
import com.jsowell.system.service.SysUserService;
|
||||
import com.yi.business.geo.GeoCodeInfo;
|
||||
import com.yi.business.geo.TermRelationTreeCoordinate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -1133,4 +1135,35 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
||||
vo.setStationOrderQuantityInfoList(list);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点枪利用率趋势信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public StationBusinessAnalyzeInfoVO getStationConnectorUsedInfo(StationBusinessAnalyzeInfoDTO dto) {
|
||||
List<String> stationIds = dto.getStationIds();
|
||||
String type = dto.getType();
|
||||
String dateTime = dto.getDateTime();
|
||||
String startTime = "";
|
||||
String endTime = "";
|
||||
if (StringUtils.equals(Constants.ONE, type)) {
|
||||
// 7天
|
||||
startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.addDays(new Date(), -7));
|
||||
endTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD);
|
||||
} else if (StringUtils.equals(Constants.TWO, type)) {
|
||||
// 30天
|
||||
startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, DateUtils.addDays(new Date(), -30));
|
||||
endTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD);
|
||||
}
|
||||
// 根据站点ids和开始、结束日期查询订单表
|
||||
List<BusinessOrderDetailInfoVO> orderDetailByStationIds = orderBasicInfoService.getOrderDetailByStationIds(stationIds, startTime, endTime);
|
||||
if (CollectionUtils.isEmpty(orderDetailByStationIds)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_SELECT_INFO_IS_NULL);
|
||||
}
|
||||
|
||||
// 分组出来key为日期,value为订单信息
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user