Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7eb3937bdb
|
|
@ -152,25 +152,25 @@ public class CookDishes extends BaseEntity {
|
|||
/** 菜品基础单价(分) */
|
||||
@Excel(name = "菜品基础单价(分)")
|
||||
@ApiModelProperty(value = "菜品基础单价(分)")
|
||||
@Max(value = 9999L, message = "菜品价格超过限制")
|
||||
@Max(value = 99999L, message = "菜品价格超过限制")
|
||||
private Long price;
|
||||
|
||||
/** 单位价格 */
|
||||
@Excel(name = "单位价格")
|
||||
@ApiModelProperty(value = "单位价格")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
@Max(value = 99999L, message = "菜品单价超过限制")
|
||||
private Long unitPrice;
|
||||
|
||||
/** 大份单价 */
|
||||
@Excel(name = "大份单价")
|
||||
@ApiModelProperty(value = "大份单价")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
@Max(value = 99999L, message = "菜品单价超过限制")
|
||||
private Long largePrice;
|
||||
|
||||
/** 小份单价 */
|
||||
@Excel(name = "小份单价")
|
||||
@ApiModelProperty(value = "小份单价")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
@Max(value = 99999L, message = "菜品单价超过限制")
|
||||
private Long littlePrice;
|
||||
|
||||
/** 菜品图片url */
|
||||
|
|
@ -331,7 +331,7 @@ public class CookDishes extends BaseEntity {
|
|||
/** 成本价 */
|
||||
@Excel(name = "成本价")
|
||||
@ApiModelProperty(value = "成本价")
|
||||
@Max(value = 9999L, message = "菜品成本价超过限制")
|
||||
@Max(value = 99999L, message = "菜品成本价超过限制")
|
||||
private Long materialCost;
|
||||
|
||||
/** 毛利 */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import javax.validation.constraints.Max;
|
|||
|
||||
/**
|
||||
* 菜品计划菜品关联对象 cook_recipe_dishes
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -37,7 +37,7 @@ public class CookRecipeDishesDTO extends BaseEntity {
|
|||
/** 菜品单价 */
|
||||
@Excel(name = "菜品单价")
|
||||
@ApiModelProperty(value = "菜品单价")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
@Max(value = 99999L, message = "菜品单价超过限制")
|
||||
private Long price;
|
||||
|
||||
/** 菜品售价(优惠价) */
|
||||
|
|
@ -54,13 +54,13 @@ public class CookRecipeDishesDTO extends BaseEntity {
|
|||
/** 供应数量 */
|
||||
@Excel(name = "供应数量")
|
||||
@ApiModelProperty(value = "供应数量")
|
||||
@Max(value = 9999L, message = "供应数量超过限制")
|
||||
@Max(value = 99999L, message = "供应数量超过限制")
|
||||
private Long supplyNum;
|
||||
|
||||
/** 销售数量 */
|
||||
@Excel(name = "销售数量")
|
||||
@ApiModelProperty(value = "销售数量")
|
||||
@Max(value = 9999L, message = "销售数量超过限制")
|
||||
@Max(value = 99999L, message = "销售数量超过限制")
|
||||
private Long saleNum;
|
||||
|
||||
/** 剩余数量 */
|
||||
|
|
@ -71,7 +71,7 @@ public class CookRecipeDishesDTO extends BaseEntity {
|
|||
/** 个人限购数量 */
|
||||
@Excel(name = "个人限购数量")
|
||||
@ApiModelProperty(value = "个人限购数量")
|
||||
@Max(value = 9999L, message = "个人限购数量超过限制")
|
||||
@Max(value = 99999L, message = "个人限购数量超过限制")
|
||||
private Long limitNum;
|
||||
|
||||
/** 厨师id */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.kitchen.domain;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.bonus.canteen.core.kitchen.dto.KitchenVideoDTO;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -107,8 +108,9 @@ public class KitchenDeviceInfo extends Model<KitchenDeviceInfo> {
|
|||
@JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
private String ip;
|
||||
private Integer channel;
|
||||
|
||||
private KitchenVideoDTO kitchenVideoDTO;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.bonus.canteen.core.kitchen.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author xliu
|
||||
* @date 2025/8/28 15:09
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class KitchenVideoDTO {
|
||||
|
||||
private String channel;
|
||||
private String deviceIp;
|
||||
private Integer protocol;
|
||||
private Integer ifControl;
|
||||
private Integer channelNum;
|
||||
private Integer manuFactor;
|
||||
|
||||
private String cameraMsUser;
|
||||
|
||||
private String localRtspUrl;
|
||||
|
||||
private String streamMethod;
|
||||
|
||||
private Integer smartListener;
|
||||
|
||||
private String cameraMsPassword;
|
||||
|
||||
private String cameraStreamMethod;
|
||||
|
||||
private String cameraStreamAddress;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -66,4 +66,6 @@ public interface KitchenSampleDishesRecordMapper {
|
|||
public int handleKitchenSampleDishesTimeOut();
|
||||
|
||||
public List<KitchenSampleDishesRecord> getDishesByStallAndMealtimeType(KitchenSampleDishesRecord kitchenSampleDishesRecord);
|
||||
|
||||
List<KitchenSampleDishesRecord> getLeaveCabinetAbnormal(Integer hour);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord;
|
|||
|
||||
/**
|
||||
* 留样机留样清单Service接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
public interface IKitchenSampleDishesRecordService {
|
||||
/**
|
||||
* 查询留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param recordId 留样机留样清单主键
|
||||
* @return 留样机留样清单
|
||||
*/
|
||||
|
|
@ -20,7 +20,7 @@ public interface IKitchenSampleDishesRecordService {
|
|||
|
||||
/**
|
||||
* 查询留样机留样清单列表
|
||||
*
|
||||
*
|
||||
* @param kitchenSampleDishesRecord 留样机留样清单
|
||||
* @return 留样机留样清单集合
|
||||
*/
|
||||
|
|
@ -28,7 +28,7 @@ public interface IKitchenSampleDishesRecordService {
|
|||
|
||||
/**
|
||||
* 新增留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param kitchenSampleDishesRecord 留样机留样清单
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +36,7 @@ public interface IKitchenSampleDishesRecordService {
|
|||
|
||||
/**
|
||||
* 修改留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param kitchenSampleDishesRecord 留样机留样清单
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +44,7 @@ public interface IKitchenSampleDishesRecordService {
|
|||
|
||||
/**
|
||||
* 批量删除留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param recordIds 需要删除的留样机留样清单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,7 +52,7 @@ public interface IKitchenSampleDishesRecordService {
|
|||
|
||||
/**
|
||||
* 删除留样机留样清单信息
|
||||
*
|
||||
*
|
||||
* @param recordId 留样机留样清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -66,4 +66,6 @@ public interface IKitchenSampleDishesRecordService {
|
|||
public int handleKitchenSampleDishesTimeOut();
|
||||
|
||||
public List<KitchenSampleDishesRecord> getDishesByStallAndMealtimeType(KitchenSampleDishesRecord kitchenSampleDishesRecord);
|
||||
|
||||
List<KitchenSampleDishesRecord> getLeaveCabinetAbnormal(Integer hour);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ import java.net.InetAddress;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.canteen.core.kitchen.dto.KitchenDeviceListDTO;
|
||||
import com.bonus.canteen.core.kitchen.dto.KitchenVideoDTO;
|
||||
import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
|
|
@ -141,6 +143,11 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
if(bean !=null) {
|
||||
throw new ServiceException("改类型设备通道已存在,请检查后重新输入");
|
||||
}
|
||||
|
||||
KitchenVideoDTO videoDTO = kitchenDeviceInfo.getKitchenVideoDTO();
|
||||
if(videoDTO !=null){
|
||||
kitchenDeviceInfo.setDeviceExtendInfo(JSON.toJSONString(videoDTO));
|
||||
}
|
||||
}
|
||||
try {
|
||||
return kitchenDeviceInfoMapper.insertKitchenDeviceInfo(kitchenDeviceInfo);
|
||||
|
|
@ -215,6 +222,10 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
throw new ServiceException("改设备类型 设备通道号已存在");
|
||||
}
|
||||
try {
|
||||
KitchenVideoDTO videoDTO = kitchenDeviceInfo.getKitchenVideoDTO();
|
||||
if(videoDTO !=null){
|
||||
kitchenDeviceInfo.setDeviceExtendInfo(JSON.toJSONString(videoDTO));
|
||||
}
|
||||
return kitchenDeviceInfoMapper.update(kitchenDeviceInfo,
|
||||
Wrappers.<KitchenDeviceInfo>lambdaUpdate()
|
||||
.eq(KitchenDeviceInfo::getDeviceId, kitchenDeviceInfo.getDeviceId()));
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
/**
|
||||
* 留样机留样清单Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
|
|
@ -40,7 +40,7 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
|
||||
/**
|
||||
* 查询留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param recordId 留样机留样清单主键
|
||||
* @return 留样机留样清单
|
||||
*/
|
||||
|
|
@ -51,7 +51,7 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
|
||||
/**
|
||||
* 查询留样机留样清单列表
|
||||
*
|
||||
*
|
||||
* @param kitchenSampleDishesRecord 留样机留样清单
|
||||
* @return 留样机留样清单
|
||||
*/
|
||||
|
|
@ -88,7 +88,7 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
|
||||
/**
|
||||
* 新增留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param kitchenSampleDishesRecord 留样机留样清单
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -106,7 +106,7 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
|
||||
/**
|
||||
* 修改留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param kitchenSampleDishesRecord 留样机留样清单
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -126,7 +126,7 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
|
||||
/**
|
||||
* 批量删除留样机留样清单
|
||||
*
|
||||
*
|
||||
* @param recordIds 需要删除的留样机留样清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -137,7 +137,7 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
|
||||
/**
|
||||
* 删除留样机留样清单信息
|
||||
*
|
||||
*
|
||||
* @param recordId 留样机留样清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -152,6 +152,11 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
return kitchenSampleDishesRecordMapper.handleKitchenSampleDishesTimeOut();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KitchenSampleDishesRecord> getLeaveCabinetAbnormal(Integer hour) {
|
||||
return kitchenSampleDishesRecordMapper.getLeaveCabinetAbnormal(hour);
|
||||
}
|
||||
|
||||
public List<KitchenSampleDishesRecord> getDishesByStallAndMealtimeType(KitchenSampleDishesRecord kitchenSampleDishesRecord) {
|
||||
kitchenSampleDishesRecord.setApplyDate(LocalDate.now());
|
||||
BasicStallMealtime basicStallMealtime = new BasicStallMealtime();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.bonus.canteen.core.kitchen.task;
|
||||
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord;
|
||||
import com.bonus.canteen.core.kitchen.service.IKitchenSampleDishesRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xliu
|
||||
* @date 2025/8/28 15:30
|
||||
*/
|
||||
@Component
|
||||
public class KitchenSampleDishesTsak {
|
||||
|
||||
@Autowired
|
||||
private IKitchenSampleDishesRecordService kitchenSampleDishesRecordService;
|
||||
|
||||
@Scheduled(fixedDelay = 12*60*60*1000)
|
||||
private void sampleDishesStateHandler() {
|
||||
//传入过期时间,可根据数据字典设置查询过期时间
|
||||
Integer hour = 24;
|
||||
List<KitchenSampleDishesRecord> list = kitchenSampleDishesRecordService.getLeaveCabinetAbnormal(hour);
|
||||
for (KitchenSampleDishesRecord record : list) {
|
||||
//根据自己需要的逻辑处理 设置时间、状态、等
|
||||
kitchenSampleDishesRecordService.updateKitchenSampleDishesRecord(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ import javax.validation.constraints.Size;
|
|||
|
||||
/**
|
||||
* 超市对象 supermarket_info
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -80,12 +80,12 @@ public class SupermarketInfo extends BaseEntity {
|
|||
|
||||
/** 最少配送时间(分) */
|
||||
@Excel(name = "最少配送时间", readConverterExp = "分=")
|
||||
@Max(value = 9999L, message = "最少配送时间超过限制")
|
||||
@Max(value = 99999L, message = "最少配送时间超过限制")
|
||||
private Long minDeliveryTime;
|
||||
|
||||
/** 选择时间间隔(分) */
|
||||
@Excel(name = "选择时间间隔", readConverterExp = "分=")
|
||||
@Max(value = 9999L, message = "时间间隔超过限制")
|
||||
@Max(value = 99999L, message = "时间间隔超过限制")
|
||||
private Long selectTimeInterval;
|
||||
|
||||
/** 配送费(元) */
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectKitchenSampleDishesRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord" resultMap="KitchenSampleDishesRecordResult">
|
||||
<include refid="selectKitchenSampleDishesRecordVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="mealtimeType != null "> and mealtime_type = #{mealtimeType}</if>
|
||||
<if test="deviceId != null "> and ksdr.device_id = #{deviceId}</if>
|
||||
<if test="stallId != null "> and ksdr.stall_id = #{stallId}</if>
|
||||
|
|
@ -98,12 +98,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by ksdr.record_id desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectKitchenSampleDishesRecordByRecordId" parameterType="Long" resultMap="KitchenSampleDishesRecordResult">
|
||||
<include refid="selectKitchenSampleDishesRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertKitchenSampleDishesRecord" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord" keyProperty="recordId" useGeneratedKeys="true">
|
||||
insert into kitchen_sample_dishes_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -207,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteKitchenSampleDishesRecordByRecordIds" parameterType="String">
|
||||
delete from kitchen_sample_dishes_record where record_id in
|
||||
delete from kitchen_sample_dishes_record where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
|
|
@ -268,4 +268,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where
|
||||
crd.detail_type = 2 and crd.apply_date = #{applyDate} and bs.stall_id = #{stallId} and crd.mealtime_type = #{mealtimeType}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
<select id="getLeaveCabinetAbnormal" resultMap="KitchenSampleDishesRecordResult">
|
||||
<include refid="selectKitchenSampleDishesRecordVo"/>
|
||||
where enter_cabinet_time is not null and leave_cabinet_time is null
|
||||
and TIMESTAMPDIFF(HOUR, enter_cabinet_time, NOW()) > 12
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue