数据库表更改,设备相关接口、系统首页统计接口修改
This commit is contained in:
parent
981bbdbe6d
commit
4169cf7d3a
|
|
@ -56,7 +56,7 @@ public class KitchenDeviceInfoController extends BaseController {
|
||||||
@GetMapping("/select")
|
@GetMapping("/select")
|
||||||
public AjaxResult select(KitchenDeviceListDTO kitchenDeviceInfo) {
|
public AjaxResult select(KitchenDeviceListDTO kitchenDeviceInfo) {
|
||||||
try{
|
try{
|
||||||
List<KitchenDeviceInfo> list = kitchenDeviceInfoService.selectKitchenDeviceInfoSelect(kitchenDeviceInfo);
|
List<KitchenDeviceListVO> list = kitchenDeviceInfoService.selectKitchenDeviceInfoSelect(kitchenDeviceInfo);
|
||||||
return success(list);
|
return success(list);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
return error(e.getMessage());
|
return error(e.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,10 @@ public class KitchenDeviceInfo extends Model<KitchenDeviceInfo> {
|
||||||
/** 所在位置 */
|
/** 所在位置 */
|
||||||
@Excel(name = "所在位置")
|
@Excel(name = "所在位置")
|
||||||
@ApiModelProperty(value = "所在位置")
|
@ApiModelProperty(value = "所在位置")
|
||||||
private String subPlace;
|
private Integer subPlace;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在位置名称")
|
||||||
|
private String subPlaceName;
|
||||||
|
|
||||||
/** 设备是否在线 1 在线 2 离线 */
|
/** 设备是否在线 1 在线 2 离线 */
|
||||||
@Excel(name = "设备是否在线 1 在线 2 离线")
|
@Excel(name = "设备是否在线 1 在线 2 离线")
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.kitchen.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -14,12 +15,16 @@ import java.time.LocalDateTime;
|
||||||
@ToString
|
@ToString
|
||||||
public class IndexHomePageDTO {
|
public class IndexHomePageDTO {
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate deviceStartTime; // 当前时间
|
private LocalDate deviceStartTime; // 当前时间
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate deviceEndTime; // 厨房名称
|
private LocalDate deviceEndTime; // 厨房名称
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate sampleStartTime; // 留样机开始时间
|
private LocalDate sampleStartTime; // 留样机开始时间
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate sampleEndTime; // 留样机结束时间
|
private LocalDate sampleEndTime; // 留样机结束时间
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public interface IKitchenDeviceInfoService extends IService<KitchenDeviceInfo> {
|
||||||
*/
|
*/
|
||||||
public int deleteKitchenDeviceInfoByDeviceId(Long deviceId);
|
public int deleteKitchenDeviceInfoByDeviceId(Long deviceId);
|
||||||
|
|
||||||
List<KitchenDeviceInfo> selectKitchenDeviceInfoSelect(KitchenDeviceListDTO kitchenDeviceInfo);
|
List<KitchenDeviceListVO> selectKitchenDeviceInfoSelect(KitchenDeviceListDTO kitchenDeviceInfo);
|
||||||
|
|
||||||
Map<Integer, String> deviceType();
|
Map<Integer, String> deviceType();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -203,15 +203,16 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<KitchenDeviceInfo> selectKitchenDeviceInfoSelect(KitchenDeviceListDTO kitchenDeviceInfo) {
|
public List<KitchenDeviceListVO> selectKitchenDeviceInfoSelect(KitchenDeviceListDTO kitchenDeviceInfo) {
|
||||||
return kitchenDeviceInfoMapper.selectList(
|
// return kitchenDeviceInfoMapper.selectList(
|
||||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
// Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||||
.like(StringUtils.isNotEmpty(kitchenDeviceInfo.getDeviceName()), KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName())
|
// .like(StringUtils.isNotEmpty(kitchenDeviceInfo.getDeviceName()), KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName())
|
||||||
.like(StringUtils.isNotEmpty(kitchenDeviceInfo.getDeviceNo()), KitchenDeviceInfo::getDeviceNo, kitchenDeviceInfo.getDeviceNo())
|
// .like(StringUtils.isNotEmpty(kitchenDeviceInfo.getDeviceNo()), KitchenDeviceInfo::getDeviceNo, kitchenDeviceInfo.getDeviceNo())
|
||||||
.like(StringUtils.isNotEmpty(kitchenDeviceInfo.getDeviceSn()), KitchenDeviceInfo::getDeviceSn, kitchenDeviceInfo.getDeviceSn())
|
// .like(StringUtils.isNotEmpty(kitchenDeviceInfo.getDeviceSn()), KitchenDeviceInfo::getDeviceSn, kitchenDeviceInfo.getDeviceSn())
|
||||||
.eq(kitchenDeviceInfo.getDeviceType() != 0, KitchenDeviceInfo::getDeviceType, kitchenDeviceInfo.getDeviceType())
|
// .eq(kitchenDeviceInfo.getDeviceType() != 0, KitchenDeviceInfo::getDeviceType, kitchenDeviceInfo.getDeviceType())
|
||||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key()) // 仅查询未删除的设备
|
// .eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key()) // 仅查询未删除的设备
|
||||||
);
|
// );
|
||||||
|
return kitchenDeviceInfoMapper.selectKitchenDeviceInfoList(kitchenDeviceInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,6 @@ public class KitchenHomePageerviceImpl implements IKitchenHomePageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
indexHomePageInformationVO.setDeviceCount(Integer.valueOf(deviceInfoCount.toString()));
|
indexHomePageInformationVO.setDeviceCount(Integer.valueOf(deviceInfoCount.toString()));
|
||||||
|
|
||||||
indexHomePageInformationVO.setEmployeeViolation(employeeViolation);
|
indexHomePageInformationVO.setEmployeeViolation(employeeViolation);
|
||||||
indexHomePageInformationVO.setEnvironmentalAlarm(environmentaAlarm);
|
indexHomePageInformationVO.setEnvironmentalAlarm(environmentaAlarm);
|
||||||
indexHomePageInformationVO.setHistoricalWarningCount(historicalWarningCount);
|
indexHomePageInformationVO.setHistoricalWarningCount(historicalWarningCount);
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,9 @@ public class KitchenDeviceListVO {
|
||||||
@ApiModelProperty(value = "所在位置")
|
@ApiModelProperty(value = "所在位置")
|
||||||
private String subPlace;
|
private String subPlace;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在位置名称")
|
||||||
|
private String subPlaceName;
|
||||||
|
|
||||||
/** 设备是否在线 1 在线 2 离线 */
|
/** 设备是否在线 1 在线 2 离线 */
|
||||||
@ApiModelProperty(value = "设备是否在线 1 在线 2 离线")
|
@ApiModelProperty(value = "设备是否在线 1 在线 2 离线")
|
||||||
private Integer deviceNetworkState;
|
private Integer deviceNetworkState;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue