diff --git a/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/constant/LeMqConstant.java b/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/constant/LeMqConstant.java index 2a69e9a..8fcb580 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/constant/LeMqConstant.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/constant/LeMqConstant.java @@ -149,6 +149,7 @@ public interface LeMqConstant { DEVICE_STALL_UPDATE_WEIGHTINFO_V2("device-stall-update-weightinfo-v2", "通知计量主机状态(余量看板)"), DEVICE_TIME_CALIBRATION_V4("time-calibration-v4", "设备时间校准"), DEVICE_UPDATE_PERSONAL_CONFIG_V4("device-update-person-config-v4", "通知设备人员和特征值更新"), + MORNING_INSPECTION_DEVICE_UPDATE_PERSONAL_CONFIG_V4(" morning_inspection_device_update_person_config_v4", "通知晨检设备人员和特征值更新"), DEVICE_SYNC_ACCOUNT_BALANCE_V1("device-sync-acc-balance-v1", "设备实时同步账户余额v1"), DEVICE_SYNC_ACCOUNT_BALANCE_V4("device-sync-acc-balance-v4", "设备实时同步账户余额v4"), DEVICE_UPDATE_MENU_CONFIG_V4("device-update-menu-config-v4", "设备下发菜谱通知"), @@ -221,7 +222,7 @@ public interface LeMqConstant { // $FF: synthetic method private static Topic[] $values() { - return new Topic[]{DEVICE_UPDATE_BIND_DISHES, DEVICE_UPDATE_DEVICE_BASICSETTING, DEVICE_UPDATE_DEVICE_METADATA, DEVICE_UPDATE_PERSON, DEVICE_UPDATE_PERSON_BATCH, DEVICE_UPDATE_PERSONALFEATURE_BATCH, DEVICE_DOOR_OPERATOR, DEVICE_HAIQING_DEVICE_COMMUNICATION, DEVICE_HAIQING_DEVICE_TRANSIT, DEVICE_PUSH_USER_DATA, DEVICE_SBLS_DEVICE_TRANSIT, DEVICE_SBLS_CR02EN_COMMUNICATION, DEVICE_DC_DEVICE_DELEAY, DEVICE_LOCKER_STATUS, DEVICE_NEW_MAKING_ORDER, DEVICE_ATTENDANCE_ACCEPT_DOOR_CONTROL, DEVICE_ATTENDANCE_ACCEPT_DOOR_CONTROL_VISITOR, CUSTOMER_VISITOR_INVITE, CUSTOMER_VISITOR_AUDIT_PASS, CUSTOMER_VISITOR_WAITING_AUDIT, CUSTOMER_VISITOR_SIGN_IN, DATA_CHANGE_ORG, DATA_CHANGE_CUSTOMER, CUSTOMER_CHANGE_DELAY, DATA_CHANGE_AREA, DATA_CHANGE_WAREHOUSE, BACK_DEVICE_HAIQING_DEVICE_TRANSIT, BACK_DEVICE_HAIQING_DEVICE_COMMUNICATION, BACK_DEVICE_SBLS_DEVICE_TRANSIT, BACK_DEVICE_SBLS_CR02EN_COMMUNICATION, BACK_DEVICE_IOT_GATEWAY, BACK_ATTENDANCE_CARD_DATA, BACK_TH_ALARM_DATA, DATA_CHANGE_CANTEEN, DATA_CHANGE_SHOP_STALL, DATA_CHANGE_DISHES, DATA_CHANGE_RECIPE, DATA_CHANGE_RECIPE_RELEASE, DATA_CHANGE_ORDER, DATA_CHANGE_SUPERMARKET, DATA_CHANGE_SUPERMARKET_ORDER, DATA_CHANGE_SUPERMARKET_GOODS, DATA_CHANGE_RULE, DATA_CHANGE_SUPERMARKET_RULE, DATA_CHANGE_RECHARGE, BUFFET_BIND_NOTIFY, BUFFET_ORD_PAY, ORDER_V3_ASYNC_SAVE, ORDER_V3_ASYNC_SAVE_WEIGHT, ORDER_V3_ASYNC_PAY_RESULT, ORDER_V3_ASYNC_TIMEOUT, ORDER_V3_ASYNC_IMAGE_UPDATE, ORDER_CHANGE, ORDER_V3_PLACED, ORDER_V3_REFUNDED, ORDER_V3_CANCELED, ORDER_V3_DISHES_STATE_UPDATED, ORDER_V3_ADD_DISHES, ORDER_V3_REMOVE_DISHES, PAY_ASYNC_PAY_QUERY, PAY_ZHIFUFEN_ORDER_DELAY_CONFIRM, PAY_RESULT, REFUND_RESULT, PAY_ABC_NATIVE_RECHARGE_RESULT, PAY_ALI_ENTERPRISE_CODE_PAY_ASYNC, DATA_CHANGE_CUSTOMER_DINING_PLACE, ORDER_PRINT, ROOM_ORDER_PRINT, ACC_STATUS_CHANGE, ACC_TRADE_REPORT, MENUAI_REGIST, NOTICE_SUMMARY_COLLECT, NOTICE_USER_BUSINESS_SEND, NOTICE_VERIFICATION_CODE, JIABO_PRINTER_FAIL, JIABO_PRINTER_SUCCESS, AUTH_OPS_USER_EXPIRE, DEVICE_HEARTBEAT, BACK_DEVICE_HEARTBEAT_DELAY, DASHBOARD_DATA_SEND, NOTICE_DRP_GENERAL, NOTICE_DRP_GENERAL_RESULT, DRP_INTO_AND_OUT_DETAIL, DRP_CANCEL_INTO_AND_OUT, DRP_OUT_NOTICE_BACKFIELD_MATERIAL, DRP_ALLOCATION_DETAIL, DRP_SYNC_MATERIAL, DRP_SYNC_MATERIAL_BIG_CATEGORY, BACK_STAFF_CHANGE, BACK_DEVICE_CONTROL, BACK_ALARM_NOTICE, BACK_ALARM_NOTICE_TO_DASHBOARD, BACK_CABINET_STORAGE_STATUS, BACK_TRAIN_AUTO_FINISH, BACK_EXAM_AUTO_FINISH, BACK_DISINFECT_MISSION_AUTO_FINISH, BACK_DISINFECT_PHOTO, BACK_FOLLOW_PHOTO, BACK_DH_BACK_ILLEGAL_WARNING, BACK_DH_BACK_ILLEGAL_WARNING_STAFF, DEVICE_LOG_INFO_DELETE_v4, DEVICE_ORDER_DELAY, DEVICE_UPDATE_PERSONALINFO_V2, DEVICE_ONLINE_REPORT_V2, DEVICE_UPDATE_DEVICE_BASICSETTING_V2, DEVICE_UPDATE_DEVICE_METADATASETTING_V2, DEVICE_TIME_CALIBRATION_V2, DEVICE_DISTRIBUTE_RECIPE_V2, DEVICE_SWITCH_DEVICE_MENU_V2, DEVICE_SWITCH_DEVICE_MENU_PRICE_V2, DEVICE_STALL_UPDATE_WEIGHTINFO_V2, DEVICE_TIME_CALIBRATION_V4, DEVICE_UPDATE_PERSONAL_CONFIG_V4, DEVICE_SYNC_ACCOUNT_BALANCE_V1, DEVICE_SYNC_ACCOUNT_BALANCE_V4, DEVICE_UPDATE_MENU_CONFIG_V4, DEVICE_UPDATE_INTERVAL_CONFIG_V4, DEVICE_UPDATE_SYSTEM_CARD_V4, DEVICE_UPDATE_INFO_V4, DEVICE_ONLINE_REPORT_V4, DEVICE_ORDER_DISHES_STATE_UPDATE_V4, DEVICE_LOCKER_STATUS_V4, BACK_DEVICE_IOT_GATEWAY_V4, BACK_DEVICE_UPDATE_PERSONAL_CONFIG_V4, BACK_CABINET_UPDATE_SETTING_CONFIG_V4, BACK_CABINET_OPEN_V4, DEVICE_UPDATE_BUFFET_MERCHANT_V4, DEVICE_STALL_UPDATE_WEIGHTINFO_V4, DEVICE_PULL_LOG_NOTICE_V4, DEVICE_SWITCH_DEVICE_MENU_V4, DEVICE_SWITCH_DEVICE_MENU_PRICE_V4, DEVICE_STALL_BUFFET_ALARM_V4, DEVICE_PRICE_TAG_V4, DEVICE_UPDATE_AD_V4, DEVICE_UPDATE_APK_V4, BACK_DEVICE_PASSENGER_FLOW, DATA_BRIDGE_DEVICE_HEART, DEVICE_CAMERA_CONTROL, BACK_DEVICE_HEART, BACK_DEVICE_IOT, MERCHANT_LIMIT_FLAG_CHANGE, DEVICE_VOICE, AI_GATEWAY_MQTT, DEVICE_SYNC_PADDLE_FAISS, DEVICE_SYNC_PADDLE_PICODET,VIDEO_UPLOAD}; + return new Topic[]{DEVICE_UPDATE_BIND_DISHES, DEVICE_UPDATE_DEVICE_BASICSETTING, DEVICE_UPDATE_DEVICE_METADATA, DEVICE_UPDATE_PERSON, DEVICE_UPDATE_PERSON_BATCH, DEVICE_UPDATE_PERSONALFEATURE_BATCH, DEVICE_DOOR_OPERATOR, DEVICE_HAIQING_DEVICE_COMMUNICATION, DEVICE_HAIQING_DEVICE_TRANSIT, DEVICE_PUSH_USER_DATA, DEVICE_SBLS_DEVICE_TRANSIT, DEVICE_SBLS_CR02EN_COMMUNICATION, DEVICE_DC_DEVICE_DELEAY, DEVICE_LOCKER_STATUS, DEVICE_NEW_MAKING_ORDER, DEVICE_ATTENDANCE_ACCEPT_DOOR_CONTROL, DEVICE_ATTENDANCE_ACCEPT_DOOR_CONTROL_VISITOR, CUSTOMER_VISITOR_INVITE, CUSTOMER_VISITOR_AUDIT_PASS, CUSTOMER_VISITOR_WAITING_AUDIT, CUSTOMER_VISITOR_SIGN_IN, DATA_CHANGE_ORG, DATA_CHANGE_CUSTOMER, CUSTOMER_CHANGE_DELAY, DATA_CHANGE_AREA, DATA_CHANGE_WAREHOUSE, BACK_DEVICE_HAIQING_DEVICE_TRANSIT, BACK_DEVICE_HAIQING_DEVICE_COMMUNICATION, BACK_DEVICE_SBLS_DEVICE_TRANSIT, BACK_DEVICE_SBLS_CR02EN_COMMUNICATION, BACK_DEVICE_IOT_GATEWAY, BACK_ATTENDANCE_CARD_DATA, BACK_TH_ALARM_DATA, DATA_CHANGE_CANTEEN, DATA_CHANGE_SHOP_STALL, DATA_CHANGE_DISHES, DATA_CHANGE_RECIPE, DATA_CHANGE_RECIPE_RELEASE, DATA_CHANGE_ORDER, DATA_CHANGE_SUPERMARKET, DATA_CHANGE_SUPERMARKET_ORDER, DATA_CHANGE_SUPERMARKET_GOODS, DATA_CHANGE_RULE, DATA_CHANGE_SUPERMARKET_RULE, DATA_CHANGE_RECHARGE, BUFFET_BIND_NOTIFY, BUFFET_ORD_PAY, ORDER_V3_ASYNC_SAVE, ORDER_V3_ASYNC_SAVE_WEIGHT, ORDER_V3_ASYNC_PAY_RESULT, ORDER_V3_ASYNC_TIMEOUT, ORDER_V3_ASYNC_IMAGE_UPDATE, ORDER_CHANGE, ORDER_V3_PLACED, ORDER_V3_REFUNDED, ORDER_V3_CANCELED, ORDER_V3_DISHES_STATE_UPDATED, ORDER_V3_ADD_DISHES, ORDER_V3_REMOVE_DISHES, PAY_ASYNC_PAY_QUERY, PAY_ZHIFUFEN_ORDER_DELAY_CONFIRM, PAY_RESULT, REFUND_RESULT, PAY_ABC_NATIVE_RECHARGE_RESULT, PAY_ALI_ENTERPRISE_CODE_PAY_ASYNC, DATA_CHANGE_CUSTOMER_DINING_PLACE, ORDER_PRINT, ROOM_ORDER_PRINT, ACC_STATUS_CHANGE, ACC_TRADE_REPORT, MENUAI_REGIST, NOTICE_SUMMARY_COLLECT, NOTICE_USER_BUSINESS_SEND, NOTICE_VERIFICATION_CODE, JIABO_PRINTER_FAIL, JIABO_PRINTER_SUCCESS, AUTH_OPS_USER_EXPIRE, DEVICE_HEARTBEAT, BACK_DEVICE_HEARTBEAT_DELAY, DASHBOARD_DATA_SEND, NOTICE_DRP_GENERAL, NOTICE_DRP_GENERAL_RESULT, DRP_INTO_AND_OUT_DETAIL, DRP_CANCEL_INTO_AND_OUT, DRP_OUT_NOTICE_BACKFIELD_MATERIAL, DRP_ALLOCATION_DETAIL, DRP_SYNC_MATERIAL, DRP_SYNC_MATERIAL_BIG_CATEGORY, BACK_STAFF_CHANGE, BACK_DEVICE_CONTROL, BACK_ALARM_NOTICE, BACK_ALARM_NOTICE_TO_DASHBOARD, BACK_CABINET_STORAGE_STATUS, BACK_TRAIN_AUTO_FINISH, BACK_EXAM_AUTO_FINISH, BACK_DISINFECT_MISSION_AUTO_FINISH, BACK_DISINFECT_PHOTO, BACK_FOLLOW_PHOTO, BACK_DH_BACK_ILLEGAL_WARNING, BACK_DH_BACK_ILLEGAL_WARNING_STAFF, DEVICE_LOG_INFO_DELETE_v4, DEVICE_ORDER_DELAY, DEVICE_UPDATE_PERSONALINFO_V2, DEVICE_ONLINE_REPORT_V2, DEVICE_UPDATE_DEVICE_BASICSETTING_V2, DEVICE_UPDATE_DEVICE_METADATASETTING_V2, DEVICE_TIME_CALIBRATION_V2, DEVICE_DISTRIBUTE_RECIPE_V2, DEVICE_SWITCH_DEVICE_MENU_V2, DEVICE_SWITCH_DEVICE_MENU_PRICE_V2, DEVICE_STALL_UPDATE_WEIGHTINFO_V2, DEVICE_TIME_CALIBRATION_V4, DEVICE_UPDATE_PERSONAL_CONFIG_V4,MORNING_INSPECTION_DEVICE_UPDATE_PERSONAL_CONFIG_V4, DEVICE_SYNC_ACCOUNT_BALANCE_V1, DEVICE_SYNC_ACCOUNT_BALANCE_V4, DEVICE_UPDATE_MENU_CONFIG_V4, DEVICE_UPDATE_INTERVAL_CONFIG_V4, DEVICE_UPDATE_SYSTEM_CARD_V4, DEVICE_UPDATE_INFO_V4, DEVICE_ONLINE_REPORT_V4, DEVICE_ORDER_DISHES_STATE_UPDATE_V4, DEVICE_LOCKER_STATUS_V4, BACK_DEVICE_IOT_GATEWAY_V4, BACK_DEVICE_UPDATE_PERSONAL_CONFIG_V4, BACK_CABINET_UPDATE_SETTING_CONFIG_V4, BACK_CABINET_OPEN_V4, DEVICE_UPDATE_BUFFET_MERCHANT_V4, DEVICE_STALL_UPDATE_WEIGHTINFO_V4, DEVICE_PULL_LOG_NOTICE_V4, DEVICE_SWITCH_DEVICE_MENU_V4, DEVICE_SWITCH_DEVICE_MENU_PRICE_V4, DEVICE_STALL_BUFFET_ALARM_V4, DEVICE_PRICE_TAG_V4, DEVICE_UPDATE_AD_V4, DEVICE_UPDATE_APK_V4, BACK_DEVICE_PASSENGER_FLOW, DATA_BRIDGE_DEVICE_HEART, DEVICE_CAMERA_CONTROL, BACK_DEVICE_HEART, BACK_DEVICE_IOT, MERCHANT_LIMIT_FLAG_CHANGE, DEVICE_VOICE, AI_GATEWAY_MQTT, DEVICE_SYNC_PADDLE_FAISS, DEVICE_SYNC_PADDLE_PICODET,VIDEO_UPLOAD}; } } } diff --git a/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/rabbit/RabbitListenerConfiguration.java b/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/rabbit/RabbitListenerConfiguration.java index 6ef1095..5531faa 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/rabbit/RabbitListenerConfiguration.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/houqin/mq/rabbit/RabbitListenerConfiguration.java @@ -161,20 +161,20 @@ public class RabbitListenerConfiguration implements RabbitListenerConfigurer { public void configureRabbitListeners(RabbitListenerEndpointRegistrar registrar) { this.nowQueues.add(this.rabbitPropertiesExt.getRetryQueue()); -// try { -// this.existQueues().forEach((queue, queueStatus) -> { -// if (!this.nowQueues.contains(queue) || !this.mqProperties.getNamespace().equals(queueStatus.getNamespace())) { -// if (queueStatus.messagesReady > 0L) { -// throw new IllegalStateException("Queue be deleted while unconsumed messages exist. \"" + queue + "\""); -// } -// -// this.amqpAdmin.deleteQueue(queue); -// } -// -// }); -// } catch (JsonProcessingException e) { -// throw new RuntimeException(e); -// } + try { + this.existQueues().forEach((queue, queueStatus) -> { + if (!this.nowQueues.contains(queue) || !this.mqProperties.getNamespace().equals(queueStatus.getNamespace())) { + if (queueStatus.messagesReady > 0L) { + throw new IllegalStateException("Queue be deleted while unconsumed messages exist. \"" + queue + "\""); + } + + this.amqpAdmin.deleteQueue(queue); + } + + }); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } Iterator var2 = this.rabbitListenerEndpoints.iterator(); while(var2.hasNext()) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeController.java index b783b1c..3d22db9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeController.java @@ -63,8 +63,8 @@ public class CookRecipeController extends BaseController { @ApiOperation(value = "当前菜谱") //@RequiresPermissions("menu:recipe:list") - @PostMapping("/currentList") - public TableDataInfo currentList(@RequestBody AllocRecipeStallDTO content) { + @GetMapping("/currentList") + public TableDataInfo currentList(AllocRecipeStallDTO content) { startPage(); List list = cookRecipeService.selectCookRecipeList4Current(content); return getDataTable(list); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BaseUserResponse.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BaseUserResponse.java new file mode 100644 index 0000000..5d60d5b --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BaseUserResponse.java @@ -0,0 +1,93 @@ +package com.bonus.canteen.core.healthmachine.bean; + +public class BaseUserResponse { + private boolean success; + private int resCode; + private String message; + private String resMsg; + private int statusCode; + private T userData; + + // 构造方法 + public BaseUserResponse() { + } + + public BaseUserResponse(boolean success, int resCode, String message, String resMsg, int statusCode, T userData) { + this.success = success; + this.resCode = resCode; + this.message = message; + this.resMsg = resMsg; + this.statusCode = statusCode; + this.userData = userData; + } + + // Getter和Setter方法 + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public int getResCode() { + return resCode; + } + + public void setResCode(int resCode) { + this.resCode = resCode; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getResMsg() { + return resMsg; + } + + public void setResMsg(String resMsg) { + this.resMsg = resMsg; + } + + public int getStatusCode() { + return statusCode; + } + + public void setStatusCode(int statusCode) { + this.statusCode = statusCode; + } + + public T getUserData() { + return userData; + } + + public void setUserData(T userData) { + this.userData = userData; + } + + /** + * 快速创建成功响应的方法 + * @param data 响应数据 + * @return BaseUserResponse + * @param 响应数据类型 + */ + public static BaseUserResponse success(T data) { + return new BaseUserResponse<>(true, 200, "操作成功", "操作成功", 200, data); + } + + /** + * 快速创建失败响应的方法 + * @param message 失败信息 + * @param resCode 失败状态码 + * @return BaseUserResponse + * @param 响应数据类型 + */ + public static BaseUserResponse failure(String message, int resCode) { + return new BaseUserResponse<>(false, resCode, message, message, resCode, null); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BodyMeasurement.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BodyMeasurement.java new file mode 100644 index 0000000..180b777 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BodyMeasurement.java @@ -0,0 +1,29 @@ +package com.bonus.canteen.core.healthmachine.bean; + +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.ToString; + +@Data +@NoArgsConstructor +@AllArgsConstructor +@ToString +public class BodyMeasurement { + private String machineId; + private String userId; + private String sex; + private int age; + private double height; + private int weight; + private double bmi; + private double bodyFat; + private double muscle; + private double boneMass; + private double waterContent; + private double extwater; + private double protein; + private int metabolism; + private int fatLevel; + private int bodyAge; +} \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BodyResponse.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BodyResponse.java new file mode 100644 index 0000000..0bbdfd9 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/BodyResponse.java @@ -0,0 +1,66 @@ +package com.bonus.canteen.core.healthmachine.bean; + +import lombok.Data; + +@Data +public class BodyResponse { + /** + * 通信状态码 (SUCCESS/FAIL) + */ + private String returnCode = "SUCCESS"; + + /** + * 通信返回信息 + */ + private String returnMsg; + + /** + * 通信成功标识 (true/false) + */ + private boolean success = true; + + /** + * 业务结果代码 (200表示成功) + */ + private int resCode = 200; + + /** + * 操作提示信息 + */ + private String message = "操作成功"; + + /** + * HTTP状态码 + */ + private int statusCode = 200; + + /** + * 返回信息详情 + */ + private String resMsg = "操作成功"; + + /** + * 业务数据 + */ + private T data; + + // 快速创建成功响应 + public static BodyResponse success(T data) { + BodyResponse response = new BodyResponse<>(); + response.setData(data); + return response; + } + + // 快速创建失败响应 + public static BodyResponse fail(String returnMsg, int resCode, String message) { + BodyResponse response = new BodyResponse<>(); + response.setReturnCode("FAIL"); + response.setReturnMsg(returnMsg); + response.setSuccess(false); + response.setResCode(resCode); + response.setMessage(message); + response.setStatusCode(resCode); + response.setResMsg(message); + return response; + } +} \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/UserDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/UserDTO.java new file mode 100644 index 0000000..a6bd066 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/UserDTO.java @@ -0,0 +1,18 @@ +package com.bonus.canteen.core.healthmachine.bean; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +@Data +@NoArgsConstructor +@AllArgsConstructor +@ToString +public class UserDTO { + + private String machineId; + + private String phoneNumber; + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/UserData.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/UserData.java new file mode 100644 index 0000000..dd669a0 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/bean/UserData.java @@ -0,0 +1,73 @@ +package com.bonus.canteen.core.healthmachine.bean; + +public class UserData { + private String userId; + private String nickName; + private String sex; + private String avatar; + private int age; + private boolean isSure; + + // 构造方法 + public UserData() { + this.isSure = false; // 默认值 + } + + public UserData(String userId, String nickName, String sex, String avatar, int age, boolean isSure) { + this.userId = userId; + this.nickName = nickName; + this.sex = sex; + this.avatar = avatar; + this.age = age; + this.isSure = isSure; + } + + // Getter和Setter方法 + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public boolean isSure() { + return isSure; + } + + public void setSure(boolean sure) { + isSure = sure; + } +} \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/controller/HealthMachineController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/controller/HealthMachineController.java new file mode 100644 index 0000000..2e730c8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/healthmachine/controller/HealthMachineController.java @@ -0,0 +1,39 @@ +package com.bonus.canteen.core.healthmachine.controller; + +import com.bonus.canteen.core.healthmachine.bean.*; +import com.bonus.common.core.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + + +/** + * 账户信息Controller + * + * @author xsheng + * @date 2025-05-25 + */ +@Api(tags = "健康一体机") +@RestController +@RequestMapping("/api/anthropometer") +@Slf4j +public class HealthMachineController extends BaseController { + + @ApiOperation("检查人员是否存在并获取人员信息") + @PostMapping({"/getPhoneUser/restful"}) + public BaseUserResponse checkUserIsExist(@RequestBody @Valid UserDTO dto) { + UserData userData = new UserData("1","张三","13800138000","http://example.com/photo.jpg",22,false); + System.out.println("dto = " + dto); + return BaseUserResponse.success(userData); + } + + @ApiOperation("健康体检一体机-体检数据上传") + @PostMapping({"/userTest/restful"}) + public BodyResponse physicalExaminationDataUpload(@RequestBody @Valid BodyMeasurement dto) { + System.out.println("dto = " + dto); + return BodyResponse.success(dto); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ImsInventoryController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ImsInventoryController.java index f066321..028cee4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ImsInventoryController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ImsInventoryController.java @@ -53,8 +53,8 @@ public class ImsInventoryController extends BaseController */ @ApiOperation(value = "查询库存列表") //@RequiresPermissions("ims:inventory:list") - @PostMapping("/list") - public TableDataInfo list(@RequestBody ImsInventoryQuery imsInventoryQuery) + @GetMapping("/list") + public TableDataInfo list(ImsInventoryQuery imsInventoryQuery) { startPage(); List list = imsInventoryService.selectImsInventoryList(imsInventoryQuery); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/InquiryController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/InquiryController.java index aa8ea98..df7f7e4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/InquiryController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/InquiryController.java @@ -45,8 +45,8 @@ public class InquiryController extends BaseController { */ @ApiOperation(value = "查询询价单列表") //@RequiresPermissions("ims:inquiry:list") - @PostMapping("/list") - public TableDataInfo list(@RequestBody @Valid Inquiry inquiry) { + @GetMapping("/list") + public TableDataInfo list(@Valid Inquiry inquiry) { startPage(); List list = inquiryService.selectInquiryList(inquiry); return getDataTable(list); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/PurchasePlanController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/PurchasePlanController.java index dcb071f..509c69c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/PurchasePlanController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/PurchasePlanController.java @@ -48,8 +48,8 @@ public class PurchasePlanController extends BaseController { */ @ApiOperation(value = "查询采购计划列表") //@RequiresPermissions("ims:plan:list") - @PostMapping("/list") - public TableDataInfo list(@RequestBody PurchasePlanQuery purchasePlanQuery) { + @GetMapping("/list") + public TableDataInfo list(PurchasePlanQuery purchasePlanQuery) { startPage(); PurchasePlan purchasePlan = new PurchasePlan(); BeanUtils.copyProperties(purchasePlanQuery, purchasePlan); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java index ae529cb..5eeffbd 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/ReportInventoryBaseController.java @@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import com.bonus.canteen.core.ims.report.ReportInventoryIntoDetailParam; import com.bonus.canteen.core.ims.report.ReportInventoryOutDetailParam; @@ -64,7 +65,7 @@ public class ReportInventoryBaseController extends BaseController { @GetMapping({"/out_into/flowing/page"}) @ApiOperation("出入库流水") - public TableDataInfo pageInventoryOutIntoFlowing( ReportInventoryOutDetailParam content) { + public TableDataInfo pageInventoryOutIntoFlowing(@Valid ReportInventoryOutDetailParam content) { startPage(); List list = reportInventoryBaseService.pageInventoryOutIntoFlowing(content); return getDataTable(list); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/report/ReportInventoryOutDetailParam.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/report/ReportInventoryOutDetailParam.java index 894c331..6186b8b 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/report/ReportInventoryOutDetailParam.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/report/ReportInventoryOutDetailParam.java @@ -4,31 +4,36 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.Pattern; import java.util.List; @ApiModel("出库明细查询入参") @Data public class ReportInventoryOutDetailParam { - @ApiModelProperty("仓库id集合") - private List warehouseIdList; - @ApiModelProperty("货品名称") - private String materialName; - @ApiModelProperty("货品类别id集合") - private List categoryIdList; - @ApiModelProperty("出库类型") - private List outTypeList; - @ApiModelProperty("单据编号") - private String recordId; - @ApiModelProperty("区域id集合") - private List areaIdList; + @ApiModelProperty("仓库id集合") + private List warehouseIdList; + @ApiModelProperty("货品名称") + private String materialName; + @ApiModelProperty("货品类别id集合") + private List categoryIdList; + @ApiModelProperty("出库类型") + private List outTypeList; + @ApiModelProperty("单据编号") + private String recordId; + @ApiModelProperty("区域id集合") + private List areaIdList; - @ApiModelProperty("供应商id集合") - private List supplierIdList; - @ApiModelProperty("入库类型") - private List intoTypeList; + @ApiModelProperty("供应商id集合") + private List supplierIdList; + @ApiModelProperty("入库类型") + private List intoTypeList; - private String startDate; + @ApiModelProperty("开始日期,格式:yyyy-MM-dd HH:mm:ss") + @Pattern(regexp = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}", message = "开始日期格式不正确,应为yyyy-MM-dd HH:mm:ss") + private String startDate; + @ApiModelProperty("结束日期,格式:yyyy-MM-dd HH:mm:ss") + @Pattern(regexp = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}", message = "结束日期格式不正确,应为yyyy-MM-dd HH:mm:ss") private String endDate; } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceSensorRecordController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceSensorRecordController.java index fad1dbf..5ad4d83 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceSensorRecordController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceSensorRecordController.java @@ -48,8 +48,8 @@ public class KitchenDeviceSensorRecordController extends BaseController { */ @ApiOperation(value = "查询厨房后场设备传感器记录列表") //@RequiresPermissions("kitchen:record:list") - @PostMapping("/list") - public TableDataInfo list(@RequestBody @Valid KitchenDeviceSensorRecord kitchenDeviceSensorRecord) { + @GetMapping("/list") + public TableDataInfo list(@Valid KitchenDeviceSensorRecord kitchenDeviceSensorRecord) { startPage(); List list = kitchenDeviceSensorRecordService.selectKitchenDeviceSensorRecordList(kitchenDeviceSensorRecord); return getDataTable(list); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffFaceServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffFaceServiceImpl.java index 7977ef9..608a5af 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffFaceServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffFaceServiceImpl.java @@ -85,8 +85,8 @@ public class KitchenStaffFaceServiceImpl implements IKitchenStaffFaceService { throw new ServiceException("人脸照片保存失败"); } // //发送mq -// DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(dto.getStaffId().intValue(),"update"); -// MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4); + DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(dto.getStaffId().intValue(),"update"); + MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.MORNING_INSPECTION_DEVICE_UPDATE_PERSONAL_CONFIG_V4); } return AjaxResult.success(); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/report/controller/AccountReportController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/report/controller/AccountReportController.java index 29aae83..7e4a295 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/report/controller/AccountReportController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/report/controller/AccountReportController.java @@ -9,10 +9,7 @@ import com.bonus.common.core.web.page.TableDataInfo; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -75,9 +72,9 @@ public class AccountReportController extends BaseController } @ApiOperation("个人收支汇总") - @PostMapping("/user/income-outcome") + @GetMapping("/user/income-outcome") @ResponseBody - public TableDataInfo userIncomeOutcome(@RequestBody UserIncomeOutcomeParam param) + public TableDataInfo userIncomeOutcome(UserIncomeOutcomeParam param) { startPage(); List list = accReportService.selectUserIncomeOutcome(param); diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicSettingMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicSettingMapper.xml index bc12b3f..cedf48e 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicSettingMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/basic/BasicSettingMapper.xml @@ -19,15 +19,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id, item_name, item_value, item_description, usage_type, create_by, create_time, update_by, update_time from basic_setting - - +