diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccCardServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccCardServiceImpl.java index 077f660..8392638 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccCardServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/account/service/impl/AccCardServiceImpl.java @@ -78,6 +78,10 @@ public class AccCardServiceImpl implements IAccCardService { if (cardCountByUserId > 0) { throw new ServiceException("此用户已有卡, 不能再次发放"); } + int cardCountByCardSerialNum= accCardMapper.selectAccCardCountByCardSerialNum(accountCard.getSerialNum()); + if (cardCountByCardSerialNum > 0) { + throw new ServiceException("卡号已存在, 卡号不能重复"); + } int count = accCardMapper.insertAccCard(accountCard); saveAccCardChangeRecord(accountCard); return count; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/common/annotation/PreventRepeatSubmit.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/common/annotation/PreventRepeatSubmit.java index 7173298..5f87a11 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/common/annotation/PreventRepeatSubmit.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/common/annotation/PreventRepeatSubmit.java @@ -15,7 +15,7 @@ public @interface PreventRepeatSubmit /** * 间隔时间(s),小于此时间视为重复提交 */ - public int interval() default 5; + public int interval() default 7; /** * 提示消息 diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java index 8e3d1b1..50833f7 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java @@ -299,7 +299,7 @@ public class CookRecipeServiceImpl implements ICookRecipeService { if (RecipeTypeEnum.DAILY.key().equals(cookRecipeDTO.getRecipeType()) && Objects.nonNull(recipeDateList.get(0))) { //每日循环 List recipeDetailList = recipeDateList.get(0).getDetailList(); LocalDate now = LocalDate.now(); - for (int i = 0; i < GlobalConstants.WEEK_DAYS; ++i) { + for (int i = 0; i < 3; ++i) { //每日循环菜谱,只生成3天的量,后面的依赖每天的定时任务 CookRecipeDateDTO cookRecipeDateDTO = new CookRecipeDateDTO(); cookRecipeDateDTO.setDetailList(recipeDetailList); cookRecipeDateDTO.setApplyDate(now.plusDays(i)); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java index e908afe..eca2906 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/health/domain/HealthPersonInfo.java @@ -175,5 +175,5 @@ public class HealthPersonInfo extends BaseEntity { private String doctorAdvices; private String placeIds; private String deptIds; - + private String encryptedSearchValue; } 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 e427e01..85152b3 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 @@ -50,6 +50,8 @@ public class HealthPersonInfoServiceImpl implements IHealthPersonInfoService { */ @Override public List selectHealthPersonInfoList(HealthPersonInfo healthPersonInfo) { + String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(healthPersonInfo.getArticleTitle()); + healthPersonInfo.setEncryptedSearchValue(encryptedSearchValue); List list=healthPersonInfoMapper.selectHealthPersonInfoList(healthPersonInfo); if(CollUtil.isNotEmpty(list)) { for(HealthPersonInfo vo : list) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffFaceMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffFaceMapper.java index 389a86c..ee6eb7c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffFaceMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffFaceMapper.java @@ -3,6 +3,8 @@ package com.bonus.canteen.core.kitchen.mapper; import com.bonus.canteen.core.kitchen.domain.KitchenStaffFace; import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo; +import java.util.List; + /** * 人员生物识别特征Mapper接口 * @@ -17,4 +19,6 @@ public interface KitchenStaffFaceMapper { int deleteStaffFaces(Long[] staffIds); int updateStaffFaceState(KitchenStaffInfo kitchenStaffInfo); + + KitchenStaffFace selectStaffFaceByStaffId(Long staffId); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffInfoServiceImpl.java index 1e6f1d0..85ce0d9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffInfoServiceImpl.java @@ -195,6 +195,10 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService { if(!StaffFaceStateEnum.isValidFaceState(kitchenStaffInfo.getFaceState())) { throw new ServiceException("无效的人脸状态"); } + KitchenStaffFace kitchenStaffFace = kitchenStaffFaceMapper.selectStaffFaceByStaffId(kitchenStaffInfo.getStaffId()); + if(Objects.isNull(kitchenStaffFace)) { + throw new ServiceException("该员工没有人脸信息"); + } return kitchenStaffFaceMapper.updateStaffFaceState(kitchenStaffInfo); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccCardMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccCardMapper.xml index c65bcd1..9678d05 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccCardMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccCardMapper.xml @@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + select staff_id,photo_url,features,create_by,error_msg,create_time,update_by,update_time + from kitchen_staff_face + where staff_id = #{staffId} + + insert into kitchen_staff_face(staff_id,photo_url,features,create_by,error_msg,create_time,update_by,update_time) values(#{staffId},#{photoUrl},#{features},#{createBy},#{errorMsg},#{createTime},#{updateBy},#{updateTime})