diff --git a/bonus-common-biz/src/main/java/com/bonus/common/houqin/constant/DeviceTypeEnum.java b/bonus-common-biz/src/main/java/com/bonus/common/houqin/constant/DeviceTypeEnum.java index bbe9fa3..c58cebd 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/houqin/constant/DeviceTypeEnum.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/houqin/constant/DeviceTypeEnum.java @@ -7,7 +7,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; public enum DeviceTypeEnum { - OTHER(0, "其他"), CAMERA(1, "摄像头"), SENSOR(2, "传感器"), DOOR(3, "门禁"), @@ -27,22 +26,66 @@ public enum DeviceTypeEnum { PROCESSING_DEVICE(17, "切配设备"), ULTRAVIOLET_LAMP_DEVICE(18, "紫外灯"), DISINFECTION_CABINET_DEVICE(19, "消毒柜"), - CLEANING_DEVICE(20, "初加工设备"), + ANDROID_DUAL_SCREEN(20, "双屏消费机"), + //ANDROID_HANG_CONSUMER(21, "安卓挂式机"), SAMPLE_WEIGHT(21, "留样秤"), - IMMERSION_SENSOR(22, "水浸检测传感器"), - ELECTRIC_BREAKER(23, "断路器"), - ELECTRIC_COLLECT(24, "采集器"), - HAND_DISINFECT(25, "手部消毒机"), - GRATING_DEVICE(30, "光栅"), - SMART_WEIGHT_CONTAINER(31, "智能称重货架"), - KITCHEN_WASTE(32, "智能厨余秤"), - ADDITIVE_MANAGEMENT_CABINET(33, "添加剂管理柜"), - BACK_DASHBOARD(34, "食安公示大屏"), - GRATING_COLLECT_DEVICE(35, "光栅采集器"), - DOOR_MAGNET(36, "门磁"), + HANDHELD(22, "手持机"), + ANDROID_DINING_TABLE(23, "智慧餐台"), + ANDROID_SELF_RECHARGE(25, "自助终端"), + MEAL_LOCKER(26, "取餐柜"), + ANDROID_BINDING(30, "安卓绑定机"), + PRINTER(31, "打印机"), + PRODUCTION(32, "出品机"), + PRODUCTION_TRANSFER(33, "出品机中转设备"), + SCAN_CODE_TOLL(34, "扫码收费机"), + AUTONOMOUS_WEIGHING(35, "计量主机"), + BUFFET(36, "自助点餐机"), + WRITE_OFF(37, "核销机"), + CALL_MACHINE(38, "叫号机"), + COUPON(39, "餐券"), + ISSUE(40, "信息发布屏"), + VERTICAL_CONSUME(41, "立式消费机"), + UFACE_MONITOR(42, "R23WFC-人脸识别终端"), + LEAVE_A_PROTOTYPE(43, "留样机"), + BATCH_PRODUCTION(44, "批量出品机"), + DISH_MANAGE_PAD(46, "排菜平板"), + PAYMENT_POS(47, "单屏消费机"), + WATER_CONTROL(48, "水控机"), + PERSON_FLOW_DETECTOR(49, "客流检测"), + AI_DISHES_RECOGNIZER(50, "AI菜品识别"), + //AI_DISHES_TERMINAL(51, "AI菜品采集终端"), SMART_IN_OUT_WEIGHT(51, "智能出入库秤"), - TASKS_BOARD(103, "任务看板"), - TASKS_EXECUTE_TERMINAL(104, "任务执行终端"); + SUPERMARKET_CASH_REGISTER(52, "自助超市收银机"), + DUAL_SCREEN_CASH_REGISTER(53, "双屏超市收银机"), + WEIGHT_LABEL_PRINT(54, "称重标签打印机"), + PRODUCTION_GATEWAY(55, "出品机网关"), + SUPERMARKET_PRINT(56, "超市打印机"), + PRICE_TAG(57, "营养价签机"), + PRICE_TAG_CONTROL(58, "营养价签控制机"), + PESTICIDE_RESIDUE_ANALYZER(59, "农药残留检测仪"), + DC_TERMINAL(60, "门禁设备"), + DC_DOOR(61, "门设备"), + GOODS_LOCKER(62, "取货柜"), + ORDER_PAD(63, "点餐Pad"), + HEIGHT_WEIGHT(64, "身高体重称"), + WEIGHT_MARGIN_BOARD(65, "计量主机余量面板"), + BUS_DEVICE(66, "车载设备终端"), + AI_ELECTRONIC_SCALE(66, "AI电子秤"), + WEIGHT_PRODUCTION_IN_ONE(67, "称重出品一体机"), + WEIGHT_PRODUCTION_IN_ONE_CONTROLS(68, "称重出品一体机控制终端"), + ALI_BUS_FACE_MACHINE(69, "阿里企业码班车刷脸机"), + AI_DISHES_UTENSIL_RECOGNIZER(70, "AI菜品餐具识别"), + SMART_KEEP_WARM_TERMINAL(71, "智能保温控制终端"), + FRESH_CABINET(72, "生鲜柜"), + SELF_VISITOR_DEVICE(73, "自助访客机"), + SMART_WEIGHT_CONTAINER(74, "智能称货柜"), + DISHES_AI(76, "菜品识别服务器"), + DUAL_VISITOR_DEVICE(75, "双屏访客机"), + OTHER(100, "其他第三方"), + OUTER_THIRD_MACHINE(101, "外部第三方设备"), + CANTEEN_VOICE(102, "收银喇叭(食堂)"), + MARKET_VOICE(103, "收银喇叭(商超)"), + UNKNOW(999, "未知设备"); private final Integer key; private final String value; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/controller/BasicStallMealtimeController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/controller/BasicStallMealtimeController.java index 6661be0..954f55e 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/controller/BasicStallMealtimeController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/controller/BasicStallMealtimeController.java @@ -1,119 +1,119 @@ -package com.bonus.canteen.core.basic.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.basic.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.basic.domain.BasicStallMealtime; -import com.bonus.canteen.core.basic.service.IBasicStallMealtimeService; -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 - * - * @author xsheng - * @date 2025-05-25 - */ -@Api(tags = "档口餐次配置接口") -@RestController -@RequestMapping("/basic_stall_mealtime") -public class BasicStallMealtimeController extends BaseController { - @Autowired - private IBasicStallMealtimeService basicStallMealtimeService; - - /** - * 查询档口餐次配置列表 - */ - @ApiOperation(value = "查询档口餐次配置列表") - //@RequiresPermissions("basic:mealtime:list") - @GetMapping("/list") - public TableDataInfo list(BasicStallMealtime basicStallMealtime) { - startPage(); - List list = basicStallMealtimeService.selectBasicStallMealtimeList(basicStallMealtime); - return getDataTable(list); - } - - /** - * 导出档口餐次配置列表 - */ - @ApiOperation(value = "导出档口餐次配置列表") - //@PreventRepeatSubmit - //@RequiresPermissions("basic:mealtime:export") - @SysLog(title = "档口餐次配置", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出档口餐次配置") - @PostMapping("/export") - public void export(HttpServletResponse response, BasicStallMealtime basicStallMealtime) { - List list = basicStallMealtimeService.selectBasicStallMealtimeList(basicStallMealtime); - ExcelUtil util = new ExcelUtil(BasicStallMealtime.class); - util.exportExcel(response, list, "档口餐次配置数据"); - } - - /** - * 获取档口餐次配置详细信息 - */ - @ApiOperation(value = "获取档口餐次配置详细信息") - //@RequiresPermissions("basic:mealtime:query") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return success(basicStallMealtimeService.selectBasicStallMealtimeById(id)); - } - - /** - * 新增档口餐次配置 - */ - @ApiOperation(value = "新增档口餐次配置") - //@PreventRepeatSubmit - //@RequiresPermissions("basic:mealtime:add") - @SysLog(title = "档口餐次配置", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增档口餐次配置") - @PostMapping - public AjaxResult add(@RequestBody BasicStallMealtime basicStallMealtime) { - try { - return toAjax(basicStallMealtimeService.insertBasicStallMealtime(basicStallMealtime)); - } catch (Exception e) { - return error(e.getMessage()); - } - } - - /** - * 修改档口餐次配置 - */ - @ApiOperation(value = "修改档口餐次配置") - //@PreventRepeatSubmit - //@RequiresPermissions("basic:mealtime:edit") - @SysLog(title = "档口餐次配置", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改档口餐次配置") - @PostMapping("/edit") - public AjaxResult edit(@RequestBody BasicStallMealtime basicStallMealtime) { - try { - return toAjax(basicStallMealtimeService.updateBasicStallMealtime(basicStallMealtime)); - } catch (Exception e) { - return error(e.getMessage()); - } - } - - /** - * 删除档口餐次配置 - */ - @ApiOperation(value = "删除档口餐次配置") - //@PreventRepeatSubmit - //@RequiresPermissions("basic:mealtime:remove") - @SysLog(title = "档口餐次配置", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除档口餐次配置") - @PostMapping("/del/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(basicStallMealtimeService.deleteBasicStallMealtimeByIds(ids)); - } -} +//package com.bonus.canteen.core.basic.controller; +// +//import java.util.List; +//import javax.servlet.http.HttpServletResponse; +//import com.bonus.common.log.enums.OperaType; +////import com.bonus.canteen.core.basic.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.basic.domain.BasicStallMealtime; +//import com.bonus.canteen.core.basic.service.IBasicStallMealtimeService; +//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 +// * +// * @author xsheng +// * @date 2025-05-25 +// */ +//@Api(tags = "档口餐次配置接口") +//@RestController +//@RequestMapping("/basic_stall_mealtime") +//public class BasicStallMealtimeController extends BaseController { +// @Autowired +// private IBasicStallMealtimeService basicStallMealtimeService; +// +// /** +// * 查询档口餐次配置列表 +// */ +// @ApiOperation(value = "查询档口餐次配置列表") +// //@RequiresPermissions("basic:mealtime:list") +// @GetMapping("/list") +// public TableDataInfo list(BasicStallMealtime basicStallMealtime) { +// startPage(); +// List list = basicStallMealtimeService.selectBasicStallMealtimeList(basicStallMealtime); +// return getDataTable(list); +// } +// +// /** +// * 导出档口餐次配置列表 +// */ +// @ApiOperation(value = "导出档口餐次配置列表") +// //@PreventRepeatSubmit +// //@RequiresPermissions("basic:mealtime:export") +// @SysLog(title = "档口餐次配置", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出档口餐次配置") +// @PostMapping("/export") +// public void export(HttpServletResponse response, BasicStallMealtime basicStallMealtime) { +// List list = basicStallMealtimeService.selectBasicStallMealtimeList(basicStallMealtime); +// ExcelUtil util = new ExcelUtil(BasicStallMealtime.class); +// util.exportExcel(response, list, "档口餐次配置数据"); +// } +// +// /** +// * 获取档口餐次配置详细信息 +// */ +// @ApiOperation(value = "获取档口餐次配置详细信息") +// //@RequiresPermissions("basic:mealtime:query") +// @GetMapping(value = "/{id}") +// public AjaxResult getInfo(@PathVariable("id") Long id) { +// return success(basicStallMealtimeService.selectBasicStallMealtimeById(id)); +// } +// +// /** +// * 新增档口餐次配置 +// */ +// @ApiOperation(value = "新增档口餐次配置") +// //@PreventRepeatSubmit +// //@RequiresPermissions("basic:mealtime:add") +// @SysLog(title = "档口餐次配置", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增档口餐次配置") +// @PostMapping +// public AjaxResult add(@RequestBody BasicStallMealtime basicStallMealtime) { +// try { +// return toAjax(basicStallMealtimeService.insertBasicStallMealtime(basicStallMealtime)); +// } catch (Exception e) { +// return error(e.getMessage()); +// } +// } +// +// /** +// * 修改档口餐次配置 +// */ +// @ApiOperation(value = "修改档口餐次配置") +// //@PreventRepeatSubmit +// //@RequiresPermissions("basic:mealtime:edit") +// @SysLog(title = "档口餐次配置", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改档口餐次配置") +// @PostMapping("/edit") +// public AjaxResult edit(@RequestBody BasicStallMealtime basicStallMealtime) { +// try { +// return toAjax(basicStallMealtimeService.updateBasicStallMealtime(basicStallMealtime)); +// } catch (Exception e) { +// return error(e.getMessage()); +// } +// } +// +// /** +// * 删除档口餐次配置 +// */ +// @ApiOperation(value = "删除档口餐次配置") +// //@PreventRepeatSubmit +// //@RequiresPermissions("basic:mealtime:remove") +// @SysLog(title = "档口餐次配置", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除档口餐次配置") +// @PostMapping("/del/{ids}") +// public AjaxResult remove(@PathVariable Long[] ids) { +// return toAjax(basicStallMealtimeService.deleteBasicStallMealtimeByIds(ids)); +// } +//} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicStallServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicStallServiceImpl.java index 0b7c84b..6c0bf11 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicStallServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/basic/service/impl/BasicStallServiceImpl.java @@ -83,6 +83,7 @@ public class BasicStallServiceImpl implements IBasicStallService { } int stallCount = basicStallMapper.insertBasicStall(basicStall); if (stallCount > 0 && !CollectionUtils.isEmpty(basicStall.getBasicStallMealtimeList())) { + checkMealtimeList(basicStall.getBasicStallMealtimeList()); basicStallMealtimeMapper.deleteBasicStallMealtimeByStallId(basicStall.getStallId()); List mealtimes = basicStall.getBasicStallMealtimeList(); mealtimes.stream().forEach(o -> o.setStallId(basicStall.getStallId())); @@ -94,6 +95,17 @@ public class BasicStallServiceImpl implements IBasicStallService { } } + private void checkMealtimeList(List basicStallMealtimeList) { + for (int i = 0; i < basicStallMealtimeList.size() - 1; i++) { + BasicStallMealtime current = basicStallMealtimeList.get(i); + BasicStallMealtime next = basicStallMealtimeList.get(i+1); + if (current.getStartTime().isAfter(next.getStartTime()) || current.getStartTime().isAfter(next.getEndTime()) || + current.getEndTime().isAfter(next.getStartTime()) || current.getEndTime().isAfter(next.getEndTime())) { + throw new ServiceException("前后餐次时间不能重叠"); + } + } + } + /** * 修改档口信息 * @@ -114,6 +126,7 @@ public class BasicStallServiceImpl implements IBasicStallService { } int stallCount = basicStallMapper.updateBasicStall(basicStall); if (stallCount > 0 && !CollectionUtils.isEmpty(basicStall.getBasicStallMealtimeList())) { + checkMealtimeList(basicStall.getBasicStallMealtimeList()); basicStallMealtimeMapper.deleteBasicStallMealtimeByStallId(basicStall.getStallId()); basicStallMealtimeMapper.batchInsertBasicStallMealtime(basicStall.getBasicStallMealtimeList()); } 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 a1d62c7..d17cf4d 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 @@ -86,4 +86,10 @@ public interface CookNutritionTypeMapper { * @return 食材小类列表 */ public List selectLittleTypeList(String id); + /** + * 检查是否存在菜品使用了指定的营养类型 + * @param nutritionTypeIds 营养类型ID数组 + * @return 存在的数量 + */ + int checkIsExistCook(@Param("nutritionTypeIds") Long[] nutritionTypeIds); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java index 7f44fa4..5b7f9e2 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookDishesServiceImpl.java @@ -104,9 +104,15 @@ public class CookDishesServiceImpl implements ICookDishesService { @Transactional(rollbackFor = Exception.class) public int insertCookDishes(CookDishes cookDishes) { cookDishes.setCreateTime(DateUtils.getNowDate()); + cookDishes.setCreateBy(SecurityUtils.getUsername()); try { checkParam(cookDishes, false); - //计算营养信息含量 + //转换价格金额元->分 + cookDishes.setPrice(Objects.isNull(cookDishes.getPrice()) ? 0L : cookDishes.getPrice() * 100); + cookDishes.setUnitPrice(Objects.isNull(cookDishes.getUnitPrice()) ? 0L : cookDishes.getUnitPrice() * 100); + cookDishes.setLargePrice(Objects.isNull(cookDishes.getLargePrice()) ? 0L : cookDishes.getLargePrice() * 100); + cookDishes.setLittlePrice(Objects.isNull(cookDishes.getLittlePrice()) ? 0L : cookDishes.getLittlePrice() * 100); + cookDishes.setMaterialCost(Objects.isNull(cookDishes.getMaterialCost()) ? 0L : cookDishes.getMaterialCost() * 100); //添加菜品 cookDishesMapper.insertCookDishes(cookDishes); //添加菜品-原料关联关系 @@ -131,8 +137,15 @@ public class CookDishesServiceImpl implements ICookDishesService { @Transactional(rollbackFor = Exception.class) public int updateCookDishes(CookDishes cookDishes) { cookDishes.setUpdateTime(DateUtils.getNowDate()); + cookDishes.setUpdateBy(SecurityUtils.getUsername()); try { checkParam(cookDishes, true); + //转换价格金额元->分 + cookDishes.setPrice(Objects.isNull(cookDishes.getPrice()) ? 0L : cookDishes.getPrice() * 100); + cookDishes.setUnitPrice(Objects.isNull(cookDishes.getUnitPrice()) ? 0L : cookDishes.getUnitPrice() * 100); + cookDishes.setLargePrice(Objects.isNull(cookDishes.getLargePrice()) ? 0L : cookDishes.getLargePrice() * 100); + cookDishes.setLittlePrice(Objects.isNull(cookDishes.getLittlePrice()) ? 0L : cookDishes.getLittlePrice() * 100); + cookDishes.setMaterialCost(Objects.isNull(cookDishes.getMaterialCost()) ? 0L : cookDishes.getMaterialCost() * 100); //修改菜品 cookDishesMapper.updateCookDishes(cookDishes); //删除菜品-原料关联关系 diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookNutritionTypeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookNutritionTypeServiceImpl.java index cef73b5..850eec9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookNutritionTypeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookNutritionTypeServiceImpl.java @@ -123,6 +123,11 @@ public class CookNutritionTypeServiceImpl implements ICookNutritionTypeService { if (code > 0) { throw new ServiceException("删除失败,营养类型下存在子集"); } + // 检查是否有食材使用该营养类型 + int count = cookNutritionTypeMapper.checkIsExistCook(nutritionTypeIds); + if (count > 0) { + throw new ServiceException("删除失败,营养类型下存在食材"); + } return cookNutritionTypeMapper.deleteCookNutritionTypeByNutritionTypeIds(nutritionTypeIds); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java index 3d0c64d..cc25e21 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/service/impl/HealthPersonInfoServiceImpl.java @@ -53,12 +53,12 @@ public class HealthPersonInfoServiceImpl implements IHealthPersonInfoService { String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(healthPersonInfo.getArticleTitle()); healthPersonInfo.setEncryptedSearchValue(encryptedSearchValue); List list=healthPersonInfoMapper.selectHealthPersonInfoList(healthPersonInfo); - if(CollUtil.isNotEmpty(list)) { - for(HealthPersonInfo vo : list) { - vo.setMobile(SM4EncryptUtils.sm4Decrypt(vo.getMobile())); - vo.setMobile(maskPhoneNumber(vo.getMobile())); - } - } +// if(CollUtil.isNotEmpty(list)) { +// for(HealthPersonInfo vo : list) { +// vo.setMobile(SM4EncryptUtils.sm4Decrypt(vo.getMobile())); +// vo.setMobile(maskPhoneNumber(vo.getMobile())); +// } +// } return list; } public static String maskPhoneNumber(String phoneNumber) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java index 46fd720..419abb9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/screening/service/DataScreeningServiceImpl.java @@ -47,7 +47,7 @@ public class DataScreeningServiceImpl implements DataScreeningService { String currentDate = DateUtils.getDate(); String yesterday = getLastDate(-1); //获取上一个有食堂订单的日期 - yesterday = getLastDate(lastDay, yesterday); +// yesterday = getLastDate(lastDay, yesterday); // 查询各项数据 addSingleItem("今日食堂营业额(元)", currentDate, yesterday, list, 11, TURNOVER); addSingleItem("今日食堂订单量(个)", currentDate, yesterday, list, 11, ORDER); @@ -135,6 +135,9 @@ public class DataScreeningServiceImpl implements DataScreeningService { BigDecimal rate = todayNum.subtract(yesterdayNum) .divide(yesterdayNum, 4, RoundingMode.HALF_UP) .multiply(BigDecimal.valueOf(100)); + if (rate.compareTo(BigDecimal.valueOf(100)) > 0) { + rate = BigDecimal.valueOf(100); + } today.setRate(String.format("%.2f", rate)); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml index 37d7162..747236f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookNutritionTypeMapper.xml @@ -99,4 +99,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{nutritionTypeId} + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml index c0732ea..0e29066 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml @@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and kseer.enter_img_url = #{enterImgUrl} and substring(kseer.enter_time,1,10) >= #{startDate} and #{endDate}>= substring(kseer.enter_time,1,10) + order by kseer.enter_time desc