| | |
| | | import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
| | | import cn.hutool.core.io.resource.ClassPathResource; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.constant.OrderNumConstants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | |
| | | this.tokenService = tokenService; |
| | | this.redisCache = redisCache; |
| | | } |
| | | |
| | | @Log(title = "生成-餐饮数据生成", businessType = BusinessType.INSERT) |
| | | @ApiOperation( value = "餐饮数据生成") |
| | | @PostMapping(value = "/mealDataGenerator") |
| | | public AjaxResult<String> mealDataGenerator(@RequestBody OrderMealGeneratorDTO dto) { |
| | |
| | | dataGeneratorService.mealDataGenerator(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "生成-销售数据生成", businessType = BusinessType.INSERT) |
| | | @ApiOperation( value = "销售数据生成") |
| | | @PostMapping(value = "/saleDataGenerator") |
| | | public AjaxResult<String> saleDataGenerator(@RequestBody OrderSaleGeneratorDTO dto) { |
| | |
| | | return AjaxResult.success(dataGeneratorService.pageList(query)); |
| | | } |
| | | |
| | | @Log(title = "数据生成-数据生成删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation( value = "数据生成删除") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<String> deleteById(@RequestParam("id") Long id) { |
| | | dataGeneratorService.removeById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "数据生成-数据覆盖", businessType = BusinessType.UPDATE) |
| | | @ApiOperation( value = "数据覆盖") |
| | | @GetMapping(value = "/dataCoverage") |
| | | public AjaxResult<String> dataCoverage(@RequestParam(value = "id") Long id) { |
| | | dataGeneratorService.dataCoverage(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "生成-数据生成终止", businessType = BusinessType.UPDATE) |
| | | @ApiOperation( value = "数据生成终止 shopId=店铺id type: 1=餐饮 2=进货") |
| | | @GetMapping(value = "/stopGenerator") |
| | | public AjaxResult<String> stopGenerator(@RequestParam(value = "shopId") Long shopId, |
| | |
| | | // } |
| | | // } |
| | | // } |
| | | @Log(title = "生成-餐饮生成数据详情导出", businessType = BusinessType.UPDATE) |
| | | @ApiOperation( value = "餐饮生成数据详情导出") |
| | | @PostMapping(value = "/mealGeneratorExport") |
| | | public void mealGeneratorExport(@Validated @RequestBody TDataGeneratorMealQuery query) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Log(title = "生成-销售生成数据详情导出", businessType = BusinessType.UPDATE) |
| | | @ApiOperation( value = "销售生成数据详情导出") |
| | | @PostMapping(value = "/saleGeneratorExport") |
| | | public void saleGeneratorExport(@Validated @RequestBody TDataGeneratorSaleQuery query) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Log(title = "生成-餐饮数据生成列表导出", businessType = BusinessType.UPDATE) |
| | | @ApiOperation( value = "餐饮数据生成列表导出") |
| | | @PostMapping(value = "/mealGeneratorListExport") |
| | | public void mealGeneratorListExport(@RequestBody TDataGeneratorQuery query) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Log(title = "生成-销售数据生成列表导出", businessType = BusinessType.UPDATE) |
| | | @ApiOperation( value = "销售数据生成列表导出") |
| | | @PostMapping(value = "/saleGeneratorListExport") |
| | | public void saleGeneratorListExport(@RequestBody TDataGeneratorQuery query) { |