bug修复

This commit is contained in:
guo 2023-12-18 14:10:55 +08:00
parent 59f71c8740
commit 97387ce2ef
11 changed files with 96 additions and 23 deletions

View File

@ -30,7 +30,7 @@ public class GantryCraneApiController {
@Autowired
private IGantryCraneCurrentDataService gantryCraneCurrentDataService;
@Autowired
private IBigDeviceDiscloseRecordService.IGantryCraneWorkCycleService gantryCraneWorkCycleService;
private IGantryCraneWorkCycleService gantryCraneWorkCycleService;
@Autowired
private IGantryCraneAlarmService gantryCraneAlarmService;
@Autowired
@ -68,7 +68,7 @@ public class GantryCraneApiController {
@ApiOperation(value = "添加龙门吊报警数据表信息", notes = "添加龙门吊报警数据表信息", httpMethod = "POST")
@PostMapping(value = "/addGantryCraneAlarm")
public Result<GantryCraneAlarm> addGantryCraneAlarm(@RequestBody GantryCraneAlarm gantryCraneAlarm) {
log.info("addGantryCraneAlarm:", JSON.toJSONString(gantryCraneAlarm));
log.info("addGantryCraneAlarm:{}", JSON.toJSONString(gantryCraneAlarm));
gantryCraneAlarmService.saveGantryCraneAlarm(gantryCraneAlarm);
return Result.ok();
}

View File

@ -5,8 +5,9 @@ import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.base.entity.vo.TrendVo;
import com.zhgd.xmgl.modules.bigdevice.entity.GantryCraneWorkCycle;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.CountGantryCraneWorkCycleVo;
import com.zhgd.xmgl.modules.bigdevice.service.IBigDeviceDiscloseRecordService;
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
import com.zhgd.xmgl.modules.bigdevice.service.IGantryCraneWorkCycleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -38,7 +39,7 @@ import java.util.Map;
@Api(tags = "龙门吊工作循环")
public class GantryCraneWorkCycleController {
@Autowired
private IBigDeviceDiscloseRecordService.IGantryCraneWorkCycleService gantryCraneWorkCycleService;
private IGantryCraneWorkCycleService gantryCraneWorkCycleService;
/**
* 分页列表查询
@ -134,5 +135,15 @@ public class GantryCraneWorkCycleController {
return result;
}
@ApiOperation(value = "作业统计", notes = "作业统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "devSn", value = "设备编号", dataType = "String", paramType = "body", required = false),
@ApiImplicitParam(name = "projectSn", value = "项目sn", dataType = "String", paramType = "body", required = false),
@ApiImplicitParam(name = "type", value = "查询天数1今天、2累积所有", dataType = "Integer", paramType = "body", required = true),
})
@PostMapping(value = "/countGantryCraneWorkCycle")
public Result<CountGantryCraneWorkCycleVo> countGantryCraneWorkCycle(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
return Result.success(gantryCraneWorkCycleService.countGantryCraneWorkCycle(paramMap));
}
}

View File

@ -0,0 +1,17 @@
package com.zhgd.xmgl.modules.bigdevice.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.checkerframework.checker.units.qual.C;
@Data
public class CountGantryCraneWorkCycleVo {
//@ApiModelProperty("工作时长(小时)")
//@ApiModelProperty("主钩循环(次)")
//@ApiModelProperty("吊钩载重(吨)")
//@ApiModelProperty("副钩循环(次)")
//private String workTimeCount;
//private String 主钩循环;
//private String 吊钩载重;
//private String 副钩循环;
}

View File

@ -1,11 +1,13 @@
package com.zhgd.xmgl.modules.bigdevice.mapper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.base.entity.vo.TrendVo;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.CountGantryCraneWorkCycleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.zhgd.xmgl.modules.bigdevice.entity.GantryCraneWorkCycle;
@ -25,4 +27,6 @@ public interface GantryCraneWorkCycleMapper extends BaseMapper<GantryCraneWorkCy
List<EntityMap> selectGantryCraneWorkCycleList(Map<String, Object> map);
List<TrendVo> countGantryCraneWorkCycleNumEveryday(Map<String, Object> map);
CountGantryCraneWorkCycleVo countGantryCraneWorkCycle(HashMap<String, Object> paramMap);
}

View File

@ -41,4 +41,17 @@
</if>
group by x
</select>
<select id="countGantryCraneWorkCycle"
resultType="com.zhgd.xmgl.modules.bigdevice.entity.vo.CountGantryCraneWorkCycleVo">
select ifnull(sum(ifnull(work_time,0))/3600,0) workTimeCount
from gantry_crane_work_cycle
where 1=1
<if test="projectSn != null and projectSn != ''">
and project_sn = #{projectSn}
</if>
<if test="devSn != null and devSn != ''">
and dev_sn = #{devSn}
</if>
</select>
</mapper>

View File

@ -6,7 +6,9 @@ import com.zhgd.xmgl.base.entity.vo.TrendVo;
import com.zhgd.xmgl.modules.bigdevice.entity.BigDeviceDiscloseRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhgd.xmgl.modules.bigdevice.entity.GantryCraneWorkCycle;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.CountGantryCraneWorkCycleVo;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -27,21 +29,4 @@ public interface IBigDeviceDiscloseRecordService extends IService<BigDeviceDiscl
void deleteBigDeviceDiscloseRecord(Map<String, Object> map);
EntityMap selectBigDeviceDiscloseRecordById(Map<String, Object> map);
/**
* @Description: 龙门吊工作循环
* @author pds
* @date 2021-08-10
* @version V1.0
*/
interface IGantryCraneWorkCycleService extends IService<GantryCraneWorkCycle> {
IPage<EntityMap> queryGantryCraneWorkCyclePageList(Map<String, Object> map);
List<EntityMap> selectGantryCraneWorkCycleList(Map<String, Object> map);
void saveGantryCraneWorkCycle(GantryCraneWorkCycle gantryCraneWorkCycle);
List<TrendVo> countGantryCraneWorkCycleNumEveryday(Map<String, Object> map);
}
}

View File

@ -0,0 +1,33 @@
package com.zhgd.xmgl.modules.bigdevice.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.base.entity.vo.TrendVo;
import com.zhgd.xmgl.modules.bigdevice.entity.GantryCraneWorkCycle;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.CountGantryCraneWorkCycleVo;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description: 龙门吊工作循环
* @author pds
* @date 2021-08-10
* @version V1.0
*/
public interface IGantryCraneWorkCycleService extends IService<GantryCraneWorkCycle> {
IPage<EntityMap> queryGantryCraneWorkCyclePageList(Map<String, Object> map);
List<EntityMap> selectGantryCraneWorkCycleList(Map<String, Object> map);
void saveGantryCraneWorkCycle(GantryCraneWorkCycle gantryCraneWorkCycle);
List<TrendVo> countGantryCraneWorkCycleNumEveryday(Map<String, Object> map);
CountGantryCraneWorkCycleVo countGantryCraneWorkCycle(HashMap<String, Object> paramMap);
}

View File

@ -9,9 +9,11 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.base.entity.vo.TrendVo;
import com.zhgd.xmgl.modules.bigdevice.entity.GantryCrane;
import com.zhgd.xmgl.modules.bigdevice.entity.GantryCraneWorkCycle;
import com.zhgd.xmgl.modules.bigdevice.entity.vo.CountGantryCraneWorkCycleVo;
import com.zhgd.xmgl.modules.bigdevice.mapper.GantryCraneMapper;
import com.zhgd.xmgl.modules.bigdevice.mapper.GantryCraneWorkCycleMapper;
import com.zhgd.xmgl.modules.bigdevice.service.IBigDeviceDiscloseRecordService;
import com.zhgd.xmgl.modules.bigdevice.service.IGantryCraneWorkCycleService;
import com.zhgd.xmgl.util.DateUtils;
import com.zhgd.xmgl.util.MessageUtil;
import org.apache.commons.collections.MapUtils;
@ -29,7 +31,7 @@ import java.util.*;
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class GantryCraneWorkCycleServiceImpl extends ServiceImpl<GantryCraneWorkCycleMapper, GantryCraneWorkCycle> implements IBigDeviceDiscloseRecordService.IGantryCraneWorkCycleService {
public class GantryCraneWorkCycleServiceImpl extends ServiceImpl<GantryCraneWorkCycleMapper, GantryCraneWorkCycle> implements IGantryCraneWorkCycleService {
@Autowired
private GantryCraneWorkCycleMapper gantryCraneWorkCycleMapper;
@Autowired
@ -75,4 +77,9 @@ public class GantryCraneWorkCycleServiceImpl extends ServiceImpl<GantryCraneWork
}
return TrendVo.fillTrendVos(trendVos, days, "MM-dd");
}
@Override
public CountGantryCraneWorkCycleVo countGantryCraneWorkCycle(HashMap<String, Object> paramMap) {
return baseMapper.countGantryCraneWorkCycle(paramMap);
}
}

View File

@ -283,6 +283,8 @@ public class Project implements Serializable {
private String extend1;
@ApiModelProperty(value = "拓展字段2")
private String extend2;
@ApiModelProperty(value = "拓展字段3")
private String extend3;
@ApiModelProperty(value = "中建四局指挥中心BIM")
private String bimCommandCenterUrl;
@ApiModelProperty(value = "天气信息")

View File

@ -326,6 +326,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
project.setProjectSn(p.getProjectSn());
project.setExtend1(p.getExtend1());
project.setExtend2(p.getExtend2());
project.setExtend3(p.getExtend3());
return project;
}

View File

@ -7,7 +7,7 @@
join smart_beam_field_beam_to_save_beam_pedestal sbfbtsbp
on sbfbtsbp.smart_beam_field_save_beam_pedestal_id = sbfsbp.id
join smart_beam_field_beam sbfb on sbfbtsbp.smart_beam_field_beam_id = sbfb.id
join smart_beam_field_bridge_section sbfbs on sbfbtsbp.smart_beam_field_beam_id = sbfbs.id
join smart_beam_field_bridge_section sbfbs on sbfb.smart_beam_field_bridge_section_id = sbfbs.id
where sbfsbp.id = #{smartBeamFieldSaveBeamPedestalId}
</select>