ZAP漏洞修复

This commit is contained in:
jjLv 2025-08-29 18:46:11 +08:00
parent 7eb3937bdb
commit 87f918fce4
24 changed files with 420 additions and 93 deletions

View File

@ -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};
}
}
}

View File

@ -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()) {

View File

@ -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<AllocRecipeStallVO> list = cookRecipeService.selectCookRecipeList4Current(content);
return getDataTable(list);

View File

@ -0,0 +1,93 @@
package com.bonus.canteen.core.healthmachine.bean;
public class BaseUserResponse<T> {
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<T>
* @param <T> 响应数据类型
*/
public static <T> BaseUserResponse<T> success(T data) {
return new BaseUserResponse<>(true, 200, "操作成功", "操作成功", 200, data);
}
/**
* 快速创建失败响应的方法
* @param message 失败信息
* @param resCode 失败状态码
* @return BaseUserResponse<T>
* @param <T> 响应数据类型
*/
public static <T> BaseUserResponse<T> failure(String message, int resCode) {
return new BaseUserResponse<>(false, resCode, message, message, resCode, null);
}
}

View File

@ -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;
}

View File

@ -0,0 +1,66 @@
package com.bonus.canteen.core.healthmachine.bean;
import lombok.Data;
@Data
public class BodyResponse<T> {
/**
* 通信状态码 (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 <T> BodyResponse<T> success(T data) {
BodyResponse<T> response = new BodyResponse<>();
response.setData(data);
return response;
}
// 快速创建失败响应
public static <T> BodyResponse<T> fail(String returnMsg, int resCode, String message) {
BodyResponse<T> 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;
}
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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<UserData> 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<BodyMeasurement> physicalExaminationDataUpload(@RequestBody @Valid BodyMeasurement dto) {
System.out.println("dto = " + dto);
return BodyResponse.success(dto);
}
}

View File

@ -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<ImsInventoryVO> list = imsInventoryService.selectImsInventoryList(imsInventoryQuery);

View File

@ -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<Inquiry> list = inquiryService.selectInquiryList(inquiry);
return getDataTable(list);

View File

@ -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);

View File

@ -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<ReportInventoryOutDetailVO> list = reportInventoryBaseService.pageInventoryOutIntoFlowing(content);
return getDataTable(list);

View File

@ -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<Long> warehouseIdList;
@ApiModelProperty("货品名称")
private String materialName;
@ApiModelProperty("货品类别id集合")
private List<Long> categoryIdList;
@ApiModelProperty("出库类型")
private List<Integer> outTypeList;
@ApiModelProperty("单据编号")
private String recordId;
@ApiModelProperty("区域id集合")
private List<Long> areaIdList;
@ApiModelProperty("仓库id集合")
private List<Long> warehouseIdList;
@ApiModelProperty("货品名称")
private String materialName;
@ApiModelProperty("货品类别id集合")
private List<Long> categoryIdList;
@ApiModelProperty("出库类型")
private List<Integer> outTypeList;
@ApiModelProperty("单据编号")
private String recordId;
@ApiModelProperty("区域id集合")
private List<Long> areaIdList;
@ApiModelProperty("供应商id集合")
private List<Long> supplierIdList;
@ApiModelProperty("入库类型")
private List<Integer> intoTypeList;
@ApiModelProperty("供应商id集合")
private List<Long> supplierIdList;
@ApiModelProperty("入库类型")
private List<Integer> 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;
}

View File

@ -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<KitchenDeviceSensorRecord> list = kitchenDeviceSensorRecordService.selectKitchenDeviceSensorRecordList(kitchenDeviceSensorRecord);
return getDataTable(list);

View File

@ -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();
}

View File

@ -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<UserIncomeOutcomeVO> list = accReportService.selectUserIncomeOutcome(param);

View File

@ -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
</sql>
<select id="selectBasicSettingList" parameterType="com.bonus.canteen.core.basic.domain.BasicSetting" resultMap="BasicSettingResult">
<include refid="selectBasicSettingVo"/>
<where>
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
<if test="itemValue != null and itemValue != ''"> and item_value = #{itemValue}</if>
<if test="itemDescription != null and itemDescription != ''"> and item_description like concat('%', #{itemDescription}, '%')</if>
</where>
</select>
<select id="selectBasicSettingList" parameterType="com.bonus.canteen.core.basic.domain.BasicSetting" resultMap="BasicSettingResult">
<include refid="selectBasicSettingVo"/>
<where>
<if test="itemName != null and itemName.trim() != ''">
and item_name like concat('%', #{itemName}, '%')
</if>
<if test="itemValue != null and itemValue.trim() != ''">
and item_value = #{itemValue}
</if>
<if test="itemDescription != null and itemDescription.trim() != ''">
and item_description like concat('%', #{itemDescription}, '%')
</if>
</where>
</select>
<select id="selectBasicSettingById" parameterType="Long" resultMap="BasicSettingResult">
<include refid="selectBasicSettingVo"/>
where id = #{id}

View File

@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectCookRecipeVo"/>
<where>
ba.del_flag = '0' and bc.del_flag = '0' and bs.del_flag = '0' and cr.del_flag = '0'
<if test="recipeName != null and recipeName != ''"> and cr.recipe_name like concat('%', #{recipeName}, '%')</if>
<if test="recipeName != null and recipeName.trim() != ''"> and cr.recipe_name like concat('%', #{recipeName,jdbcType=VARCHAR}, '%')</if>
<if test="recipeType != null "> and cr.recipe_type = #{recipeType}</if>
<if test="stallId != null "> and cr.stall_id = #{stallId}</if>
<if test="canteenId != null "> and cr.canteen_id = #{canteenId}</if>
@ -423,7 +423,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN basic_canteen t2 ON t1.canteen_id = t2.canteen_id
LEFT JOIN basic_area t3 ON t2.area_id = t3.area_id
where t1.del_flag = '0' and t2.del_flag = '0' and t3.del_flag = '0'
<if test="recipeName !=null and recipeName !=''">
<if test="recipeName !=null and recipeName.trim() !=''">
AND EXISTS (
select null
from cook_recipe_bind_app t4 INNER JOIN cook_recipe t5 on t4.recipe_id = t5.recipe_id

View File

@ -64,13 +64,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{materialTypeId}
</foreach>
</if>
<if test="materialName != null and materialName != ''">
and cm.material_name like CONCAT('%',#{materialName},'%')
<if test="materialName != null and materialName.trim() != ''">
and cm.material_name like CONCAT('%',#{materialName,jdbcType=VARCHAR},'%')
</if>
<if test="materialCode != null and materialCode != ''">
<if test="materialCode != null and materialCode.trim() != ''">
and cm.material_code = #{materialCode}
</if>
<if test="barCode != null and barCode != ''">
<if test="barCode != null and barCode.trim() != ''">
and cm.bar_code = #{barCode}
</if>
<if test="startDateTime != null">

View File

@ -126,14 +126,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (aa.inquiry_code like CONCAT('%',#{searchValue},'%') or aa.title like CONCAT('%',#{searchValue},'%')
)
</if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '1'"> and aa.status = 1 </if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '2'"> and aa.status = 3 </if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '3'"> and aa.status = 4 </if>
<if test="inquiryState != null and inquiryState != '' and inquiryState == '4'"> and aa.status = 5 </if>
<if test="status != null and status != '' and status == '1'"> and aa.status = 4 </if>
<if test="status != null and status != '' and status == '2'"> and aa.status = 5 </if>
<if test="orderStatus != null and orderStatus != '' and orderStatus == '1'"> and aa.status = 1 </if>
<if test="orderStatus != null and orderStatus != '' and orderStatus == '2'"> and aa.status != 1</if>
<if test="inquiryState != null and inquiryState.trim() != '' and inquiryState == '1'.toString()"> and aa.status = 1 </if>
<if test="inquiryState != null and inquiryState.trim() != '' and inquiryState == '2'.toString()"> and aa.status = 3 </if>
<if test="inquiryState != null and inquiryState.trim() != '' and inquiryState == '3'.toString()"> and aa.status = 4 </if>
<if test="inquiryState != null and inquiryState.trim() != '' and inquiryState == '4'.toString()"> and aa.status = 5 </if>
<if test="status != null and status != '' and status == '1'.toString()"> and aa.status = 4 </if>
<if test="status != null and status != '' and status == '2'.toString()"> and aa.status = 5 </if>
<if test="orderStatus != null and orderStatus.trim() != '' and orderStatus == '1'.toString()"> and aa.status = 1 </if>
<if test="orderStatus != null and orderStatus.trim() != '' and orderStatus == '2'.toString()"> and aa.status != 1</if>
<if test="startTime != null "> and aa.start_time >= #{startTime} </if>
<if test="endTime != null "> and #{endTime}>=aa.start_time </if>
</where>

View File

@ -52,22 +52,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectPurchasePlanVo"/>
<where>
ipp.del_flag = '0'
<if test="planCode != null and planCode != ''"> and ipp.plan_code like CONCAT('%',#{planCode},'%')</if>
<if test="planCode != null and planCode.trim() != ''"> and ipp.plan_code like CONCAT('%',#{planCode,jdbcType=VARCHAR},'%')</if>
<if test="status != null "> and ipp.status = #{status}</if>
<if test="purchaseDate != null "> and ipp.purchase_date = #{purchaseDate}</if>
<if test="purchaseUserId != null "> and ipp.purchase_user_id = #{purchaseUserId}</if>
<if test="productionPlanId != null and productionPlanId != ''"> and ipp.production_plan_id = #{productionPlanId}</if>
<if test="approveStatus != null "> and ipp.approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and ipp.process_instance_id = #{processInstanceId}</if>
<if test="relatePlanIds != null and relatePlanIds != ''"> and ipp.relate_plan_ids = #{relatePlanIds}</if>
<if test="relatePlanIds != null and relatePlanIds.trim() != ''"> and ipp.relate_plan_ids = #{relatePlanIds}</if>
<if test="areaId != null "> and ipp.area_id = #{areaId}</if>
<if test="canteenId != null "> and ipp.canteen_id = #{canteenId}</if>
<if test="stallId != null and stallId != ''"> and ipp.stall_id = #{stallId}</if>
<if test="stallId != null and stallId.trim() != ''"> and ipp.stall_id = #{stallId}</if>
<if test="purchaseBudgetTotal != null "> and ipp.purchase_budget_total = #{purchaseBudgetTotal}</if>
<if test="supplierIds != null and supplierIds != ''"> and ipp.supplier_ids = #{supplierIds}</if>
<if test="approveBy != null and approveBy != ''"> and ipp.approve_by = #{approveBy}</if>
<if test="supplierIds != null and supplierIds.trim() != ''"> and ipp.supplier_ids = #{supplierIds}</if>
<if test="approveBy != null and approveBy.trim() != ''"> and ipp.approve_by = #{approveBy}</if>
<if test="approveTime != null "> and ipp.approve_time = #{approveTime}</if>
<if test="approveRemark != null and approveRemark != ''"> and ipp.approve_remark = #{approveRemark}</if>
<if test="approveRemark != null and approveRemark.trim() != ''"> and ipp.approve_remark = #{approveRemark}</if>
<if test="ifMerge != null "> and ipp.if_merge = #{ifMerge}</if>
<if test="deliverGoodsDate != null "> and ipp.deliver_goods_date = #{deliverGoodsDate}</if>
<if test="startDateTime != null">

View File

@ -292,16 +292,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join basic_area aa on dw.area_id = aa.area_id
LEFT JOIN ims_supplier ds ON de.supplier_id = ds.supplier_id
where de.record_type=2
<if test="param.startDate != null">
<if test="param.startDate != null and param.startDate.trim() != ''">
and de.record_date <![CDATA[ >= ]]> #{param.startDate}
</if>
<if test="param.endDate != null">
<if test="param.endDate != null and param.endDate.trim() != ''">
and de.record_date <![CDATA[ <= ]]> #{param.endDate}
</if>
<if test="param.recordId != null and param.recordId != ''">
<if test="param.recordId != null and param.recordId.trim() != ''">
and de.record_id like concat('%', #{param.recordId}, '%')
</if>
<if test="param.materialName != null and param.materialName != ''">
<if test="param.materialName != null and param.materialName.trim() != ''">
and (mm.material_name like concat('%', #{param.materialName}, '%')
or mm.material_code like concat('%', #{param.materialName}, '%')
)
@ -370,10 +370,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join basic_area aa on aa.area_id = dw.area_id
LEFT JOIN ims_supplier ds ON de.supplier_id = ds.supplier_id
where de.record_type=1
<if test="param.startDate != null">
<if test="param.startDate != null and param.startDate.trim() != ''">
and de.record_date <![CDATA[ >= ]]> #{param.startDate}
</if>
<if test="param.endDate != null">
<if test="param.endDate != null and param.endDate.trim() != ''">
and de.record_date <![CDATA[ <= ]]> #{param.endDate}
</if>
<if test="param.supplierIdList != null and param.supplierIdList.size() > 0">
@ -383,7 +383,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{supplierId}
</foreach>
</if>
<if test="param.materialName != null and param.materialName != ''">
<if test="param.materialName != null and param.materialName.trim() != ''">
and (mm.material_name like concat('%', #{param.materialName}, '%')
or mm.material_code like concat('%', #{param.materialName}, '%')
)
@ -402,7 +402,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{intoType}
</foreach>
</if>
<if test="param.recordId != null and param.recordId != ''">
<if test="param.recordId != null and param.recordId.trim() != ''">
and de.record_id like concat('%', #{param.recordId}, '%')
</if>
<if test="param.areaIdList != null and param.areaIdList.size() > 0">

View File

@ -44,11 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="batchNo != null "> and batch_no = #{batchNo}</if>
<if test="deviceId != null "> and kdsr.device_id = #{deviceId}</if>
<if test="deviceType != null "> and kdsr.device_type = #{deviceType}</if>
<if test="measureCode != null and measureCode != ''"> and kdsr.measure_code = #{measureCode}</if>
<if test="measureData != null and measureData != ''"> and measure_data like CONCAT('%',#{measureData},'%')</if>
<if test="measureCode != null and measureCode.trim() != ''"> and kdsr.measure_code = #{measureCode}</if>
<if test="measureData != null and measureData.trim() != ''"> and measure_data like CONCAT('%',#{measureData},'%')</if>
<if test="gatewayDeviceId != null "> and gateway_device_id = #{gatewayDeviceId}</if>
<if test="deviceTime != null "> and device_time = #{deviceTime}</if>
<if test="subPlace != null "> and kdsr.sub_place = #{subPlace}</if>
<if test="subPlace != null and subPlace.trim() != '' "> and kdsr.sub_place = #{subPlace}</if>
<if test="canteenId != null "> and kdsr.canteen_id = #{canteenId}</if>
<if test="areaId != null "> and kdsr.area_id = #{areaId}</if>
<if test="deviceTypes != null and deviceTypes.size() > 0">
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{deviceType}
</foreach>
</if>
<if test="keyWord !=null and keyWord != 'null'">
<if test="keyWord !=null and keyWord != 'null' and keyWord.trim() != ''">
and (kdi.device_name like CONCAT('%',#{keyWord},'%')
or kdi.device_no like CONCAT('%',#{keyWord},'%')
or kdsr.sub_place like CONCAT('%',#{keyWord},'%')
@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
)
</if>
<if test="searchValue != null and searchValue != ''">
<if test="searchValue != null and searchValue.trim() != ''">
and (kdi.device_no like CONCAT('%',#{searchValue},'%')
or kdi.device_name like CONCAT('%',#{searchValue},'%')
)