| | |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.query.TDataStatisticsQuery; |
| | | import com.ruoyi.system.service.TOrderMealService; |
| | |
| | | import com.ruoyi.system.vo.PersonnelStatisticsVO; |
| | | import com.ruoyi.system.vo.SalesRankingVO; |
| | | import com.ruoyi.system.vo.SalesVolumeVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-27 |
| | | */ |
| | | @Api(tags = "营业数据统计") |
| | | @RestController |
| | | @RequestMapping("/t-data-statistics") |
| | | public class TDataStatisticsController { |
| | |
| | | endTime = LocalDateTime.now(); |
| | | break; |
| | | } |
| | | query.setStartTime(startTime); |
| | | query.setEndTime(endTime); |
| | | query.setStartTime(DateUtils.localDateTimeToDate(startTime)); |
| | | query.setEndTime(DateUtils.localDateTimeToDate(endTime)); |
| | | SalesVolumeVO salesVolumeVO; |
| | | if(roleType == 2){ |
| | | salesVolumeVO = orderMealService.salesVolume(query); |
| | |
| | | endTime = LocalDateTime.now(); |
| | | break; |
| | | } |
| | | query.setStartTime(startTime); |
| | | query.setEndTime(endTime); |
| | | query.setStartTime(DateUtils.localDateTimeToDate(startTime)); |
| | | query.setEndTime(DateUtils.localDateTimeToDate(endTime)); |
| | | List<SalesRankingVO> salesRankingVOS; |
| | | if(roleType == 2){ |
| | | salesRankingVOS = orderMealService.salesRanking(query); |
| | |
| | | endTime = LocalDateTime.now(); |
| | | break; |
| | | } |
| | | query.setStartTime(startTime); |
| | | query.setEndTime(endTime); |
| | | query.setStartTime(DateUtils.localDateTimeToDate(startTime)); |
| | | query.setEndTime(DateUtils.localDateTimeToDate(endTime)); |
| | | List<OrderTrendsVO> orderTrendsVOS; |
| | | if(roleType == 2){ |
| | | orderTrendsVOS = orderMealService.orderingTrends(query); |
| | |
| | | endTime = LocalDateTime.now(); |
| | | break; |
| | | } |
| | | query.setStartTime(startTime); |
| | | query.setEndTime(endTime); |
| | | query.setStartTime(DateUtils.localDateTimeToDate(startTime)); |
| | | query.setEndTime(DateUtils.localDateTimeToDate(endTime)); |
| | | return AjaxResult.success(orderMealService.personnelStatistics(query)); |
| | | } |
| | | |