查询升降机设备列表修改bug

This commit is contained in:
Administrator 2023-06-14 17:51:59 +08:00
parent 709148d9f0
commit 7fb91ac2b1
7 changed files with 37 additions and 24 deletions

View File

@ -4,6 +4,7 @@ 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.mybatis.EntityMap; import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.bigdevice.entity.Lifter; import com.zhgd.xmgl.modules.bigdevice.entity.Lifter;
import com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDto;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAlarmAndDevCountVo; import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAlarmAndDevCountVo;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAndDataInfoVO; import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAndDataInfoVO;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.TodayOperatingStatusStatisticsVo; import com.zhgd.xmgl.modules.bigdevice.entity.vo.TodayOperatingStatusStatisticsVo;
@ -42,8 +43,8 @@ public class LifterController {
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"), @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
}) })
@PostMapping(value = "/list") @PostMapping(value = "/list")
public Result<List<Lifter>> selectLifterList(@RequestBody Map<String, Object> map) { public Result<List<LifterDto>> selectLifterList(@RequestBody Map<String, Object> map) {
List<Lifter> pageList = lifterService.selectLifterList(map); List<LifterDto> pageList = lifterService.selectLifterList(map);
return Result.success(pageList); return Result.success(pageList);
} }

View File

@ -292,22 +292,6 @@ public class Lifter implements Serializable {
@ApiModelProperty(value = "司机列表") @ApiModelProperty(value = "司机列表")
private List<BigDeviceDriverRecord> driverList; private List<BigDeviceDriverRecord> driverList;
/**
* 使用devOnline字段
*/
@Deprecated
@TableField(exist = false)
@ApiModelProperty(value = "设置是否在线1在线0离线", hidden = true)
private java.lang.String devonline;
/**
* 使用enterpriseName字段
*/
@Deprecated
@TableField(exist = false)
@ApiModelProperty(value = "总承包单位企业名称", hidden = true)
private java.lang.String generalContractorsName;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "企业名称")
private java.lang.String enterpriseName; private java.lang.String enterpriseName;

View File

@ -0,0 +1,25 @@
package com.zhgd.xmgl.modules.bigdevice.entity.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.zhgd.xmgl.modules.bigdevice.entity.Lifter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class LifterDto extends Lifter {
/**
* 使用devOnline字段
*/
@Deprecated
@TableField(exist = false)
@ApiModelProperty(value = "设置是否在线1在线0离线", hidden = true)
private java.lang.String devonline;
/**
* 使用enterpriseName字段
*/
@Deprecated
@TableField(exist = false)
@ApiModelProperty(value = "总承包单位企业名称", hidden = true)
private java.lang.String generalContractorsName;
}

View File

@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.bigdevice.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.bigdevice.entity.Lifter; import com.zhgd.xmgl.modules.bigdevice.entity.Lifter;
import com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDto;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAlarmAndDevCountVo; import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAlarmAndDevCountVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -21,7 +22,7 @@ public interface LifterMapper extends BaseMapper<Lifter> {
Integer selectLifterAlarmCurrentDayCount(Map<String, Object> map); Integer selectLifterAlarmCurrentDayCount(Map<String, Object> map);
List<Lifter> selectLifterList(Map<String, Object> map); List<LifterDto> selectLifterList(Map<String, Object> map);
List<EntityMap> selectLifterDevList(Map<String, Object> map); List<EntityMap> selectLifterDevList(Map<String, Object> map);

View File

@ -25,7 +25,7 @@
and cp.company_sn = #{sn} and cp.company_sn = #{sn}
</if> </if>
</select> </select>
<select id="selectLifterList" resultType="com.zhgd.xmgl.modules.bigdevice.entity.Lifter"> <select id="selectLifterList" resultType="com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDto">
SELECT w1.*, SELECT w1.*,
en.enterprise_name general_contractors_name, en.enterprise_name general_contractors_name,
IFNULL(((case IFNULL(((case

View File

@ -5,6 +5,7 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.bigdevice.entity.Lifter; import com.zhgd.xmgl.modules.bigdevice.entity.Lifter;
import com.zhgd.xmgl.modules.bigdevice.entity.LifterAlarm; import com.zhgd.xmgl.modules.bigdevice.entity.LifterAlarm;
import com.zhgd.xmgl.modules.bigdevice.entity.LifterViolation; import com.zhgd.xmgl.modules.bigdevice.entity.LifterViolation;
import com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDto;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAlarmAndDevCountVo; import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAlarmAndDevCountVo;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAndDataInfoVO; import com.zhgd.xmgl.modules.bigdevice.entity.vo.LifterAndDataInfoVO;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.TodayOperatingStatusStatisticsVo; import com.zhgd.xmgl.modules.bigdevice.entity.vo.TodayOperatingStatusStatisticsVo;
@ -34,7 +35,7 @@ public interface ILifterService extends IService<Lifter> {
void deleteProjectLifterData(String projectSn); void deleteProjectLifterData(String projectSn);
List<Lifter> selectLifterList(Map<String, Object> map); List<LifterDto> selectLifterList(Map<String, Object> map);
LifterAlarmAndDevCountVo selectLifterAlarmAndDevCount(Map<String, Object> map); LifterAlarmAndDevCountVo selectLifterAlarmAndDevCount(Map<String, Object> map);

View File

@ -15,13 +15,14 @@ import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
import com.zhgd.xmgl.modules.bigdevice.entity.*; import com.zhgd.xmgl.modules.bigdevice.entity.*;
import com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDataInfoDTO; import com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDataInfoDTO;
import com.zhgd.xmgl.modules.bigdevice.entity.dto.LifterDto;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.*; import com.zhgd.xmgl.modules.bigdevice.entity.vo.*;
import com.zhgd.xmgl.modules.bigdevice.mapper.*; import com.zhgd.xmgl.modules.bigdevice.mapper.*;
import com.zhgd.xmgl.modules.bigdevice.service.ILifterService; import com.zhgd.xmgl.modules.bigdevice.service.ILifterService;
import com.zhgd.xmgl.modules.project.entity.SubdivisionProject;
import com.zhgd.xmgl.util.MessageUtil; import com.zhgd.xmgl.util.MessageUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.springframework.beans.BeanUtils;
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 org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -217,8 +218,8 @@ public class LifterServiceImpl extends ServiceImpl<LifterMapper, Lifter> impleme
} }
@Override @Override
public List<Lifter> selectLifterList(Map<String, Object> map) { public List<LifterDto> selectLifterList(Map<String, Object> map) {
List<Lifter> lifters = lifterMapper.selectLifterList(map); List<LifterDto> lifters = lifterMapper.selectLifterList(map);
lifters.forEach(e -> { lifters.forEach(e -> {
e.setEnterpriseName(e.getGeneralContractorsName()); e.setEnterpriseName(e.getGeneralContractorsName());
e.setDevOnline(Integer.valueOf(e.getDevonline())); e.setDevOnline(Integer.valueOf(e.getDevonline()));