升降机调整
This commit is contained in:
parent
ec5d15d185
commit
07ffa451e6
@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.LifterEntDto;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.LifterProjectDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.Lifter;
|
import com.zhgd.xmgl.modules.wisdom.entity.Lifter;
|
||||||
import com.zhgd.xmgl.modules.wisdom.service.ILifterService;
|
import com.zhgd.xmgl.modules.wisdom.service.ILifterService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -56,7 +56,7 @@ public class GovLifterController {
|
|||||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/engineeringPage")
|
@PostMapping(value = "/engineeringPage")
|
||||||
public Result<IPage<EngineeringPageDto>> engineeringPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<LifterEntDto>> engineeringPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
return Result.success(lifterService.engineeringPageList(map));
|
return Result.success(lifterService.engineeringPageList(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ public class GovLifterController {
|
|||||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/projectPage")
|
@PostMapping(value = "/projectPage")
|
||||||
public Result<IPage<ProjectPageDto>> projectPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<LifterProjectDto>> projectPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
return Result.success(lifterService.projectPageList(map));
|
return Result.success(lifterService.projectPageList(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
package com.zhgd.xmgl.modules.basicdata.controller.government;
|
package com.zhgd.xmgl.modules.basicdata.controller.government;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.jeecg.common.util.PageUtil;
|
import com.zhgd.jeecg.common.util.PageUtil;
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.constant.ParamConstants;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.TowerCraneAlarm;
|
import com.zhgd.xmgl.modules.wisdom.entity.TowerCraneAlarm;
|
||||||
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneAlarmService;
|
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneAlarmService;
|
||||||
import com.zhgd.xmgl.modules.wisdom.statistics.TowerCraneAlarmStat;
|
import com.zhgd.xmgl.modules.wisdom.statistics.TowerCraneAlarmStat;
|
||||||
@ -64,6 +67,9 @@ public class GovTowerCraneAlarmController {
|
|||||||
if (dayRange != null) {
|
if (dayRange != null) {
|
||||||
queryWrapper.lambda().between(TowerCraneAlarm::getCreateTime, DateUtil.offsetDay(new Date(), dayRange), DateUtil.endOfDay(new Date()));
|
queryWrapper.lambda().between(TowerCraneAlarm::getCreateTime, DateUtil.offsetDay(new Date(), dayRange), DateUtil.endOfDay(new Date()));
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(MapUtils.getString(map, ParamConstants.PROJECT_SN))) {
|
||||||
|
queryWrapper.lambda().eq(TowerCraneAlarm::getEngineeringSn, StrUtil.EMPTY);
|
||||||
|
}
|
||||||
queryWrapper.lambda().orderByDesc(TowerCraneAlarm::getCreateTime);
|
queryWrapper.lambda().orderByDesc(TowerCraneAlarm::getCreateTime);
|
||||||
IPage<TowerCraneAlarm> pageList = towerCraneAlarmService.page(page, queryWrapper);
|
IPage<TowerCraneAlarm> pageList = towerCraneAlarmService.page(page, queryWrapper);
|
||||||
return Result.success(pageList);
|
return Result.success(pageList);
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneEntDto;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneProjectDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
||||||
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneService;
|
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -54,7 +54,7 @@ public class GovTowerCraneController {
|
|||||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/engineeringPage")
|
@PostMapping(value = "/engineeringPage")
|
||||||
public Result<IPage<EngineeringPageDto>> engineeringPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<TowerCraneEntDto>> engineeringPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
return Result.success(towerCraneService.engineeringPageList(map));
|
return Result.success(towerCraneService.engineeringPageList(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ public class GovTowerCraneController {
|
|||||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/projectPage")
|
@PostMapping(value = "/projectPage")
|
||||||
public Result<IPage<ProjectPageDto>> projectPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<TowerCraneProjectDto>> projectPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
return Result.success(towerCraneService.projectPageList(map));
|
return Result.success(towerCraneService.projectPageList(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,17 @@
|
|||||||
package com.zhgd.xmgl.modules.basicdata.controller.government;
|
package com.zhgd.xmgl.modules.basicdata.controller.government;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.jeecg.common.util.PageUtil;
|
import com.zhgd.jeecg.common.util.PageUtil;
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.constant.ParamConstants;
|
||||||
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneCurrentDataDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneCurrentDataDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneOperationDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneOperationDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
||||||
@ -20,6 +23,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@ -65,6 +69,9 @@ public class GovTowerCraneCurrentDataController {
|
|||||||
public Result<IPage<TowerCraneCurrentData>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<TowerCraneCurrentData>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
QueryWrapper<TowerCraneCurrentData> queryWrapper = QueryGenerator.initPageQueryWrapper(TowerCraneCurrentData.class, map);
|
QueryWrapper<TowerCraneCurrentData> queryWrapper = QueryGenerator.initPageQueryWrapper(TowerCraneCurrentData.class, map);
|
||||||
Page<TowerCraneCurrentData> page = PageUtil.getPage(map);
|
Page<TowerCraneCurrentData> page = PageUtil.getPage(map);
|
||||||
|
if (StringUtils.isNotBlank(MapUtils.getString(map, ParamConstants.PROJECT_SN))) {
|
||||||
|
queryWrapper.lambda().eq(TowerCraneCurrentData::getEngineeringSn, StrUtil.EMPTY);
|
||||||
|
}
|
||||||
IPage<TowerCraneCurrentData> pageList = towerCraneCurrentDataService.page(page, queryWrapper);
|
IPage<TowerCraneCurrentData> pageList = towerCraneCurrentDataService.page(page, queryWrapper);
|
||||||
return Result.success(pageList);
|
return Result.success(pageList);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.quality.entity;
|
package com.zhgd.xmgl.modules.quality.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -95,6 +92,7 @@ public class CheckAcceptPlan implements Serializable {
|
|||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "实际完成时间")
|
@ApiModelProperty(value = "实际完成时间")
|
||||||
|
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||||
private Date completeDate;
|
private Date completeDate;
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.zhgd.xmgl.modules.wisdom.dto;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "升降机工程信息(DTO)", description = "LifterEntDto")
|
||||||
|
public class LifterEntDto extends EngineeringPageDto {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "接入塔吊总数")
|
||||||
|
private Integer deviceNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "今日报警次数")
|
||||||
|
private Integer alarmNum;
|
||||||
|
}
|
||||||
@ -19,7 +19,7 @@ public class LifterOperationDto implements Serializable {
|
|||||||
@ApiModelProperty(value = "本次运行最大载重百分比")
|
@ApiModelProperty(value = "本次运行最大载重百分比")
|
||||||
private String loadRatio;
|
private String loadRatio;
|
||||||
|
|
||||||
@ApiModelProperty(value = "高度比")
|
@ApiModelProperty(value = "高度百分比")
|
||||||
private String heightRatio;
|
private String heightRatio;
|
||||||
|
|
||||||
@ApiModelProperty(value = "运行速度")
|
@ApiModelProperty(value = "运行速度")
|
||||||
@ -46,7 +46,7 @@ public class LifterOperationDto implements Serializable {
|
|||||||
@ApiModelProperty(value = "设备编号")
|
@ApiModelProperty(value = "设备编号")
|
||||||
private String devNumber;
|
private String devNumber;
|
||||||
|
|
||||||
@ApiModelProperty(value = "升降机备案号")
|
@ApiModelProperty(value = "升降机备案编号")
|
||||||
private String filingNumber;
|
private String filingNumber;
|
||||||
|
|
||||||
@ApiModelProperty(value = "安装时间")
|
@ApiModelProperty(value = "安装时间")
|
||||||
|
|||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.zhgd.xmgl.modules.wisdom.dto;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "升降机项目信息(DTO)", description = "LifterProjectDto")
|
||||||
|
public class LifterProjectDto extends ProjectPageDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "接入塔吊总数")
|
||||||
|
private Integer deviceNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "今日报警次数")
|
||||||
|
private Integer alarmNum;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.zhgd.xmgl.modules.wisdom.dto;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "塔吊工程信息(DTO)", description = "TowerCraneEntDto")
|
||||||
|
public class TowerCraneEntDto extends EngineeringPageDto {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "接入塔吊总数")
|
||||||
|
private Integer deviceNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "今日报警次数")
|
||||||
|
private Integer alarmNum;
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.zhgd.xmgl.modules.wisdom.dto;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "塔吊项目信息(DTO)", description = "TowerCraneProjectDto")
|
||||||
|
public class TowerCraneProjectDto extends ProjectPageDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "接入塔吊总数")
|
||||||
|
private Integer deviceNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "今日报警次数")
|
||||||
|
private Integer alarmNum;
|
||||||
|
}
|
||||||
@ -2,8 +2,8 @@ package com.zhgd.xmgl.modules.wisdom.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.LifterEntDto;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
import com.zhgd.xmgl.modules.wisdom.dto.LifterProjectDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.Lifter;
|
import com.zhgd.xmgl.modules.wisdom.entity.Lifter;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -16,7 +16,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface ILifterService extends IService<Lifter> {
|
public interface ILifterService extends IService<Lifter> {
|
||||||
|
|
||||||
Page<EngineeringPageDto> engineeringPageList(Map<String, Object> map);
|
Page<LifterEntDto> engineeringPageList(Map<String, Object> map);
|
||||||
|
|
||||||
Page<ProjectPageDto> projectPageList(Map<String, Object> map);
|
Page<LifterProjectDto> projectPageList(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package com.zhgd.xmgl.modules.wisdom.service;
|
package com.zhgd.xmgl.modules.wisdom.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneEntDto;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneProjectDto;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface ITowerCraneService extends IService<TowerCrane> {
|
public interface ITowerCraneService extends IService<TowerCrane> {
|
||||||
|
|
||||||
Page<EngineeringPageDto> engineeringPageList(Map<String, Object> map);
|
Page<TowerCraneEntDto> engineeringPageList(Map<String, Object> map);
|
||||||
|
|
||||||
Page<ProjectPageDto> projectPageList(Map<String, Object> map);
|
Page<TowerCraneProjectDto> projectPageList(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,24 @@
|
|||||||
package com.zhgd.xmgl.modules.wisdom.service.impl;
|
package com.zhgd.xmgl.modules.wisdom.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
import com.zhgd.jeecg.common.util.PageUtil;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.IProjectService;
|
import com.zhgd.xmgl.modules.basicdata.service.IProjectService;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.dto.LifterEntDto;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.dto.LifterProjectDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.Lifter;
|
import com.zhgd.xmgl.modules.wisdom.entity.Lifter;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.entity.LifterAlarm;
|
||||||
import com.zhgd.xmgl.modules.wisdom.mapper.LifterMapper;
|
import com.zhgd.xmgl.modules.wisdom.mapper.LifterMapper;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.service.ILifterAlarmService;
|
||||||
import com.zhgd.xmgl.modules.wisdom.service.ILifterService;
|
import com.zhgd.xmgl.modules.wisdom.service.ILifterService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.Date;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,13 +36,34 @@ public class LifterServiceImpl extends ServiceImpl<LifterMapper, Lifter> impleme
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IProjectService projectService;
|
private IProjectService projectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ILifterAlarmService lifterAlarmService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<EngineeringPageDto> engineeringPageList(Map<String, Object> map) {
|
public Page<LifterEntDto> engineeringPageList(Map<String, Object> map) {
|
||||||
return engineeringService.pageListForSuperior(map);
|
Page<LifterEntDto> lifterEntDtoPage = PageUtil.copyProperties(engineeringService.pageListForSuperior(map), LifterEntDto.class);
|
||||||
|
lifterEntDtoPage.getRecords().stream().forEach(e -> {
|
||||||
|
e.setDeviceNum(this.count(Wrappers.<Lifter>lambdaQuery()
|
||||||
|
.eq(Lifter::getEngineeringSn, e.getEngineeringSn())));
|
||||||
|
e.setAlarmNum(lifterAlarmService.count(Wrappers.<LifterAlarm>lambdaQuery()
|
||||||
|
.eq(LifterAlarm::getEngineeringSn, e.getEngineeringSn())
|
||||||
|
.between(LifterAlarm::getCreateTime, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()))));
|
||||||
|
});
|
||||||
|
return lifterEntDtoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ProjectPageDto> projectPageList(Map<String, Object> map) {
|
public Page<LifterProjectDto> projectPageList(Map<String, Object> map) {
|
||||||
return projectService.pageListForGov(map);
|
Page<LifterProjectDto> lifterProjectDtoPage = PageUtil.copyProperties(projectService.pageListForGov(map), LifterProjectDto.class);
|
||||||
|
lifterProjectDtoPage.getRecords().stream().forEach(e -> {
|
||||||
|
e.setDeviceNum(this.count(Wrappers.<Lifter>lambdaQuery()
|
||||||
|
.eq(Lifter::getProjectSn, e.getProjectSn())
|
||||||
|
.eq(Lifter::getEngineeringSn, StrUtil.EMPTY)));
|
||||||
|
e.setAlarmNum(lifterAlarmService.count(Wrappers.<LifterAlarm>lambdaQuery()
|
||||||
|
.eq(LifterAlarm::getProjectSn, e.getProjectSn())
|
||||||
|
.eq(LifterAlarm::getEngineeringSn, StrUtil.EMPTY)
|
||||||
|
.between(LifterAlarm::getCreateTime, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()))));
|
||||||
|
});
|
||||||
|
return lifterProjectDtoPage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,24 @@
|
|||||||
package com.zhgd.xmgl.modules.wisdom.service.impl;
|
package com.zhgd.xmgl.modules.wisdom.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
import com.zhgd.jeecg.common.util.PageUtil;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.IProjectService;
|
import com.zhgd.xmgl.modules.basicdata.service.IProjectService;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneEntDto;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.dto.TowerCraneProjectDto;
|
||||||
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
import com.zhgd.xmgl.modules.wisdom.entity.TowerCrane;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.entity.TowerCraneAlarm;
|
||||||
import com.zhgd.xmgl.modules.wisdom.mapper.TowerCraneMapper;
|
import com.zhgd.xmgl.modules.wisdom.mapper.TowerCraneMapper;
|
||||||
|
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneAlarmService;
|
||||||
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneService;
|
import com.zhgd.xmgl.modules.wisdom.service.ITowerCraneService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.Date;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,20 +30,40 @@ import java.util.Map;
|
|||||||
@Service
|
@Service
|
||||||
public class TowerCraneServiceImpl extends ServiceImpl<TowerCraneMapper, TowerCrane> implements ITowerCraneService {
|
public class TowerCraneServiceImpl extends ServiceImpl<TowerCraneMapper, TowerCrane> implements ITowerCraneService {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IEngineeringService engineeringService;
|
private IEngineeringService engineeringService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectService projectService;
|
private IProjectService projectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITowerCraneAlarmService towerCraneAlarmService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<EngineeringPageDto> engineeringPageList(Map<String, Object> map) {
|
public Page<TowerCraneEntDto> engineeringPageList(Map<String, Object> map) {
|
||||||
return engineeringService.pageListForSuperior(map);
|
Page<TowerCraneEntDto> towerCraneEntDtoPage = PageUtil.copyProperties(engineeringService.pageListForSuperior(map), TowerCraneEntDto.class);
|
||||||
|
towerCraneEntDtoPage.getRecords().stream().forEach(e -> {
|
||||||
|
e.setDeviceNum(this.count(Wrappers.<TowerCrane>lambdaQuery()
|
||||||
|
.eq(TowerCrane::getEngineeringSn, e.getEngineeringSn())));
|
||||||
|
e.setAlarmNum(towerCraneAlarmService.count(Wrappers.<TowerCraneAlarm>lambdaQuery()
|
||||||
|
.eq(TowerCraneAlarm::getEngineeringSn, e.getEngineeringSn())
|
||||||
|
.between(TowerCraneAlarm::getCreateTime, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()))));
|
||||||
|
});
|
||||||
|
return towerCraneEntDtoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ProjectPageDto> projectPageList(Map<String, Object> map) {
|
public Page<TowerCraneProjectDto> projectPageList(Map<String, Object> map) {
|
||||||
return projectService.pageListForGov(map);
|
Page<TowerCraneProjectDto> towerCraneEntDtoPage = PageUtil.copyProperties(projectService.pageListForGov(map), TowerCraneProjectDto.class);
|
||||||
|
towerCraneEntDtoPage.getRecords().stream().forEach(e -> {
|
||||||
|
e.setDeviceNum(this.count(Wrappers.<TowerCrane>lambdaQuery()
|
||||||
|
.eq(TowerCrane::getProjectSn, e.getProjectSn())
|
||||||
|
.eq(TowerCrane::getEngineeringSn, StrUtil.EMPTY)));
|
||||||
|
e.setAlarmNum(towerCraneAlarmService.count(Wrappers.<TowerCraneAlarm>lambdaQuery()
|
||||||
|
.eq(TowerCraneAlarm::getProjectSn, e.getProjectSn())
|
||||||
|
.eq(TowerCraneAlarm::getEngineeringSn, StrUtil.EMPTY)
|
||||||
|
.between(TowerCraneAlarm::getCreateTime, DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()))));
|
||||||
|
});
|
||||||
|
return towerCraneEntDtoPage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user