From 71bcaa0e07349d09c76611f47e1710029f2dbccb Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Thu, 29 May 2025 10:15:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9F=E5=A0=82-=E6=A0=B9=E6=8D=AE=E9=98=BF?= =?UTF-8?q?=E9=87=8C=E8=A7=84=E7=BA=A6=E6=89=AB=E6=8F=8F=E5=AF=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=BF=9B=E8=A1=8C=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cook/controller/CookDishesController.java | 4 -- .../CookDishesMaterialController.java | 4 -- .../controller/CookDishesTypeController.java | 7 --- .../controller/CookMaterialController.java | 4 -- .../CookMaterialTypeController.java | 5 -- .../controller/CookNutritionController.java | 4 -- .../CookNutritionTypeController.java | 5 -- .../cook/mapper/CookDishesTypeMapper.java | 5 ++ .../cook/mapper/CookNutritionTypeMapper.java | 1 + .../cook/mapper/CookRecipeDishesMapper.java | 5 ++ .../cook/service/ICookDishesTypeService.java | 7 ++- .../canteen/core/cook/vo/NutritionTypeVO.java | 3 ++ .../service/DataScreeningService.java | 16 ------- .../controller/DeviceInfoController.java | 4 -- .../core/device/domain/DeviceSearchDTO.java | 3 ++ .../device/mapper/DeviceAppVersionMapper.java | 18 ++++++- .../service/IDeviceAppVersionService.java | 5 ++ .../controller/DataScreeningController.java | 6 +-- .../dto/DataScreenDTO.java | 2 +- .../mapper/DataScreeningMapper.java | 6 +-- .../service/DataScreeningService.java | 47 +++++++++++++++++++ .../service/DataScreeningServiceImpl.java | 11 +++-- .../vo/EchartsVO.java | 5 +- .../vo/SingleModelVO.java | 5 +- .../DataScreeningMapper.xml | 18 +++---- 25 files changed, 121 insertions(+), 79 deletions(-) delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningService.java rename bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/{dataScreening => screening}/controller/DataScreeningController.java (92%) rename bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/{dataScreening => screening}/dto/DataScreenDTO.java (82%) rename bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/{dataScreening => screening}/mapper/DataScreeningMapper.java (92%) create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningService.java rename bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/{dataScreening => screening}/service/DataScreeningServiceImpl.java (96%) rename bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/{dataScreening => screening}/vo/EchartsVO.java (71%) rename bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/{dataScreening => screening}/vo/SingleModelVO.java (73%) rename bonus-modules/bonus-smart-canteen/src/main/resources/mapper/{DataScreening => screening}/DataScreeningMapper.xml (88%) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesController.java index ab3527a..d0335c4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesController.java @@ -3,20 +3,16 @@ package com.bonus.canteen.core.cook.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookDishes; import com.bonus.canteen.core.cook.service.ICookDishesService; import com.bonus.common.core.web.controller.BaseController; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesMaterialController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesMaterialController.java index 1d1a62d..5f91b4c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesMaterialController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesMaterialController.java @@ -3,20 +3,16 @@ package com.bonus.canteen.core.cook.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookDishesMaterial; import com.bonus.canteen.core.cook.service.ICookDishesMaterialService; import com.bonus.common.core.web.controller.BaseController; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesTypeController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesTypeController.java index c5cbeba..4b4ac0f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesTypeController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookDishesTypeController.java @@ -1,31 +1,24 @@ package com.bonus.canteen.core.cook.controller; import java.util.List; -import javax.servlet.http.HttpServletResponse; import com.bonus.canteen.core.common.utils.TreeNodeUtil; import com.bonus.canteen.core.cook.vo.CookDishesTypeVO; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookDishesType; import com.bonus.canteen.core.cook.service.ICookDishesTypeService; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; -import com.bonus.common.core.utils.poi.ExcelUtil; -import com.bonus.common.core.web.page.TableDataInfo; /** * 菜品类型信息Controller diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialController.java index f402128..622ab1f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialController.java @@ -3,20 +3,16 @@ package com.bonus.canteen.core.cook.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookMaterial; import com.bonus.canteen.core.cook.service.ICookMaterialService; import com.bonus.common.core.web.controller.BaseController; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialTypeController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialTypeController.java index 19d8fc9..0602978 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialTypeController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookMaterialTypeController.java @@ -3,26 +3,21 @@ package com.bonus.canteen.core.cook.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookMaterialType; import com.bonus.canteen.core.cook.service.ICookMaterialTypeService; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.utils.poi.ExcelUtil; -import com.bonus.common.core.web.page.TableDataInfo; /** * 原料类别Controller diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionController.java index 59cb622..47add64 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionController.java @@ -5,20 +5,16 @@ import javax.servlet.http.HttpServletResponse; import com.bonus.canteen.core.cook.vo.NutritionTypeVO; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookNutrition; import com.bonus.canteen.core.cook.service.ICookNutritionService; import com.bonus.common.core.web.controller.BaseController; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionTypeController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionTypeController.java index 0561667..5f9073d 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionTypeController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookNutritionTypeController.java @@ -5,26 +5,21 @@ import javax.servlet.http.HttpServletResponse; import com.bonus.canteen.core.cook.vo.NutritionTypeVO; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.cook.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.cook.domain.CookNutritionType; import com.bonus.canteen.core.cook.service.ICookNutritionTypeService; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.utils.poi.ExcelUtil; -import com.bonus.common.core.web.page.TableDataInfo; /** * 食材营养基础类型Controller diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookDishesTypeMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookDishesTypeMapper.java index b33697f..c99fce4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookDishesTypeMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookDishesTypeMapper.java @@ -75,5 +75,10 @@ public interface CookDishesTypeMapper { */ public int checkIsUse(@Param("dishesTypeIds") Long[] dishesTypeIds); + /** + * 查询菜品类型信息列表 + * @param cookDishesType 入参 + * @return 菜品类型集合 + */ List selectList(CookDishesType cookDishesType); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookNutritionTypeMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookNutritionTypeMapper.java index c12f798..a1d62c7 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookNutritionTypeMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookNutritionTypeMapper.java @@ -82,6 +82,7 @@ public interface CookNutritionTypeMapper { public List selectBigTypeList(); /** * 获取所有食材小类 + * @param id 食材营养基础类型id * @return 食材小类列表 */ public List selectLittleTypeList(String id); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeDishesMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeDishesMapper.java index 5930af8..8fb166d 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeDishesMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeDishesMapper.java @@ -58,5 +58,10 @@ public interface CookRecipeDishesMapper { */ public int deleteCookRecipeDishesByIds(Long[] ids); + /** + * 删除菜谱关联菜品信息 + * @param recipeDetailIds id集合 + * @return 是否成功 + */ public int deleteCookRecipeDishesByCookRecipeDetailIds(Long[] recipeDetailIds); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookDishesTypeService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookDishesTypeService.java index e11fc39..5130c90 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookDishesTypeService.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookDishesTypeService.java @@ -58,6 +58,11 @@ public interface ICookDishesTypeService { * @return 结果 */ public int deleteCookDishesTypeByDishesTypeId(Long dishesTypeId); - + /** + * 查询菜品类型信息 + * + * @param cookDishesType 菜品类型信息 + * @return 结果 + */ List selectList(CookDishesType cookDishesType); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/NutritionTypeVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/NutritionTypeVO.java index 8478d81..197768c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/NutritionTypeVO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/NutritionTypeVO.java @@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; +/** + * @author 19814 + */ @Data public class NutritionTypeVO { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningService.java deleted file mode 100644 index a287e13..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.bonus.canteen.core.dataScreening.service; - -import com.bonus.canteen.core.dataScreening.dto.DataScreenDTO; -import com.bonus.common.core.web.domain.AjaxResult; - -public interface DataScreeningService { - AjaxResult getDataScreeningModel(); - - AjaxResult getCanteenOrdersAndSalesTrends(DataScreenDTO dataScreenDTO); - - AjaxResult getSupermarketOrderAndSalesTrend(DataScreenDTO dataScreenDTO); - - AjaxResult getThisMonthDishSalesRanking(); - - AjaxResult getProportionOfOrderTypes(DataScreenDTO dataScreenDTO); -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/DeviceInfoController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/DeviceInfoController.java index eca4f33..5b9366d 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/DeviceInfoController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/DeviceInfoController.java @@ -7,20 +7,16 @@ import cn.hutool.core.util.ObjectUtil; import com.bonus.canteen.core.device.domain.DeviceSearchDTO; import com.bonus.common.core.exception.ServiceException; import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.device.common.annotation.PreventRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.canteen.core.device.domain.DeviceInfo; import com.bonus.canteen.core.device.service.IDeviceInfoService; import com.bonus.common.core.web.controller.BaseController; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/DeviceSearchDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/DeviceSearchDTO.java index bc4f6be..4ca8034 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/DeviceSearchDTO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/DeviceSearchDTO.java @@ -3,6 +3,9 @@ package com.bonus.canteen.core.device.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +/** + * @author 19814 + */ @Data public class DeviceSearchDTO { @ApiModelProperty("设备sn码") diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/DeviceAppVersionMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/DeviceAppVersionMapper.java index bff69bd..4ba3e5f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/DeviceAppVersionMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/DeviceAppVersionMapper.java @@ -61,10 +61,24 @@ public interface DeviceAppVersionMapper { */ public int deleteDeviceAppVersionByIds(Integer[] ids); - + /** + * 根据类型查询apk + * @param type 类型 + * @param version 版本 + * @return 结果 + */ ApkDTO getApkByType(@Param("type") String type, @Param("version") String version); + /** + * 更新apk信息 + * @param dto 入参 + * @return 结果 + */ int updateApk(ApkDTO dto); - + /** + * 新增apk信息 + * @param dto 入参 + * @return 结果 + */ int insertApk(ApkDTO dto); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/IDeviceAppVersionService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/IDeviceAppVersionService.java index 16fdb9e..b606134 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/IDeviceAppVersionService.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/IDeviceAppVersionService.java @@ -63,5 +63,10 @@ public interface IDeviceAppVersionService { */ public int deleteDeviceAppVersionById(Integer id); + /** + * 上传apk + * @param dto 入参 + * @return 结果 + */ AjaxResult uploadApk(@Valid ApkDTO dto); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/controller/DataScreeningController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/controller/DataScreeningController.java similarity index 92% rename from bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/controller/DataScreeningController.java rename to bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/controller/DataScreeningController.java index a8e9fba..99b3857 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/controller/DataScreeningController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/controller/DataScreeningController.java @@ -1,7 +1,7 @@ -package com.bonus.canteen.core.dataScreening.controller; +package com.bonus.canteen.core.screening.controller; -import com.bonus.canteen.core.dataScreening.dto.DataScreenDTO; -import com.bonus.canteen.core.dataScreening.service.DataScreeningService; +import com.bonus.canteen.core.screening.dto.DataScreenDTO; +import com.bonus.canteen.core.screening.service.DataScreeningService; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import io.swagger.annotations.Api; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/dto/DataScreenDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/dto/DataScreenDTO.java similarity index 82% rename from bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/dto/DataScreenDTO.java rename to bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/dto/DataScreenDTO.java index 2c0f779..72159ef 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/dto/DataScreenDTO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/dto/DataScreenDTO.java @@ -1,4 +1,4 @@ -package com.bonus.canteen.core.dataScreening.dto; +package com.bonus.canteen.core.screening.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/mapper/DataScreeningMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/mapper/DataScreeningMapper.java similarity index 92% rename from bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/mapper/DataScreeningMapper.java rename to bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/mapper/DataScreeningMapper.java index 1a8b6d1..9927c81 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/mapper/DataScreeningMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/mapper/DataScreeningMapper.java @@ -1,7 +1,7 @@ -package com.bonus.canteen.core.dataScreening.mapper; +package com.bonus.canteen.core.screening.mapper; -import com.bonus.canteen.core.dataScreening.vo.EchartsVO; -import com.bonus.canteen.core.dataScreening.vo.SingleModelVO; +import com.bonus.canteen.core.screening.vo.EchartsVO; +import com.bonus.canteen.core.screening.vo.SingleModelVO; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningService.java new file mode 100644 index 0000000..9eb13b7 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningService.java @@ -0,0 +1,47 @@ +package com.bonus.canteen.core.screening.service; + +import com.bonus.canteen.core.screening.dto.DataScreenDTO; +import com.bonus.common.core.web.domain.AjaxResult; + +/** + * @author 19814 + */ +public interface DataScreeningService { + /** + * 获取数据总览(今日营业额、订单等) + * + * @return AjaxResult + */ + AjaxResult getDataScreeningModel(); + + /** + * 获取食堂订单及销量趋势 + * + * @param dataScreenDTO 数据筛选条件 + * @return AjaxResult + */ + AjaxResult getCanteenOrdersAndSalesTrends(DataScreenDTO dataScreenDTO); + + /** + * 获取商超订单及销量趋势 + * + * @param dataScreenDTO 数据筛选条件 + * @return AjaxResult + */ + AjaxResult getSupermarketOrderAndSalesTrend(DataScreenDTO dataScreenDTO); + + /** + * 获取本月菜品销量排名 + * + * @return AjaxResult + */ + AjaxResult getThisMonthDishSalesRanking(); + + /** + * 订单类型占比 + * + * @param dataScreenDTO 数据筛选条件 + * @return AjaxResult + */ + AjaxResult getProportionOfOrderTypes(DataScreenDTO dataScreenDTO); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java similarity index 96% rename from bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningServiceImpl.java rename to bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java index c75faca..0fe59e9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/service/DataScreeningServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java @@ -1,9 +1,9 @@ -package com.bonus.canteen.core.dataScreening.service; +package com.bonus.canteen.core.screening.service; -import com.bonus.canteen.core.dataScreening.dto.DataScreenDTO; -import com.bonus.canteen.core.dataScreening.mapper.DataScreeningMapper; -import com.bonus.canteen.core.dataScreening.vo.EchartsVO; -import com.bonus.canteen.core.dataScreening.vo.SingleModelVO; +import com.bonus.canteen.core.screening.dto.DataScreenDTO; +import com.bonus.canteen.core.screening.mapper.DataScreeningMapper; +import com.bonus.canteen.core.screening.vo.EchartsVO; +import com.bonus.canteen.core.screening.vo.SingleModelVO; import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.web.domain.AjaxResult; import org.slf4j.Logger; @@ -176,6 +176,7 @@ public class DataScreeningServiceImpl implements DataScreeningService { : mapper.getSupermarketOrderAndSalesTrend(date, DateUtils.getDate()); List dateList = getDatesBetween(date, DateUtils.getDate(), "yyyy-MM-dd"); + // 将list中的数据放入map中,key为orderDate,value为EchartsVO 提升查询效率 Map dataMap = list.stream() .collect(Collectors.toMap(EchartsVO::getOrderDate, vo -> vo, (a, b) -> a)); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/vo/EchartsVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/vo/EchartsVO.java similarity index 71% rename from bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/vo/EchartsVO.java rename to bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/vo/EchartsVO.java index 4c7e01d..56a19a4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/vo/EchartsVO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/vo/EchartsVO.java @@ -1,7 +1,10 @@ -package com.bonus.canteen.core.dataScreening.vo; +package com.bonus.canteen.core.screening.vo; import lombok.Data; +/** + * @author 19814 + */ @Data public class EchartsVO { private String name; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/vo/SingleModelVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/vo/SingleModelVO.java similarity index 73% rename from bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/vo/SingleModelVO.java rename to bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/vo/SingleModelVO.java index 4cff073..43bfec1 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/dataScreening/vo/SingleModelVO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/vo/SingleModelVO.java @@ -1,9 +1,12 @@ -package com.bonus.canteen.core.dataScreening.vo; +package com.bonus.canteen.core.screening.vo; import lombok.Data; import java.math.BigDecimal; +/** + * @author 19814 + */ @Data public class SingleModelVO { private BigDecimal num; diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/DataScreening/DataScreeningMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/screening/DataScreeningMapper.xml similarity index 88% rename from bonus-modules/bonus-smart-canteen/src/main/resources/mapper/DataScreening/DataScreeningMapper.xml rename to bonus-modules/bonus-smart-canteen/src/main/resources/mapper/screening/DataScreeningMapper.xml index 4235331..fc5e122 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/DataScreening/DataScreeningMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/screening/DataScreeningMapper.xml @@ -2,9 +2,9 @@ - + - select IFNULL(sum( real_amount ),0) AS num from order_info @@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select IFNULL(count( 1 ),0) AS num from order_info @@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select count( DISTINCT user_id ) AS num from order_info @@ -52,14 +52,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select count( DISTINCT mrd2.dishes_id ) AS num from cook_recipe_detail mrd left join cook_recipe_dishes mrd2 on mrd.recipe_detail_id = mrd2.recipe_detail_id where mrd.apply_date = #{date} and mrd.detail_type = '2' - SELECT IFNULL( count( 1 ), 0 ) AS orderValue, IFNULL(sum( real_amount ),0) AS salesValue, @@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by order_date - SELECT sum(od.quantity) AS num, md.dishes_name as name @@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" group by od.goods_id order by num desc - select IFNULL(count( 1 ),0) AS num from order_info