From 97387ce2ef5fc1ca3867ea85bc1cf87f5974121c Mon Sep 17 00:00:00 2001 From: guo Date: Mon, 18 Dec 2023 14:10:55 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GantryCraneApiController.java | 4 +-- .../GantryCraneWorkCycleController.java | 15 +++++++-- .../vo/CountGantryCraneWorkCycleVo.java | 17 ++++++++++ .../mapper/GantryCraneWorkCycleMapper.java | 4 +++ .../mapper/xml/GantryCraneWorkCycleMapper.xml | 13 ++++++++ .../IBigDeviceDiscloseRecordService.java | 19 ++--------- .../service/IGantryCraneWorkCycleService.java | 33 +++++++++++++++++++ .../impl/GantryCraneWorkCycleServiceImpl.java | 9 ++++- .../xmgl/modules/project/entity/Project.java | 2 ++ .../service/impl/ProjectServiceImpl.java | 1 + .../SmartBeamFieldSaveBeamPedestalMapper.xml | 2 +- 11 files changed, 96 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/bigdevice/entity/vo/CountGantryCraneWorkCycleVo.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IGantryCraneWorkCycleService.java diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneApiController.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneApiController.java index d25bf944b..8b63cfc76 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneApiController.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneApiController.java @@ -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 addGantryCraneAlarm(@RequestBody GantryCraneAlarm gantryCraneAlarm) { - log.info("addGantryCraneAlarm:", JSON.toJSONString(gantryCraneAlarm)); + log.info("addGantryCraneAlarm:{}", JSON.toJSONString(gantryCraneAlarm)); gantryCraneAlarmService.saveGantryCraneAlarm(gantryCraneAlarm); return Result.ok(); } diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneWorkCycleController.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneWorkCycleController.java index a4a431f71..4a64ad018 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneWorkCycleController.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/controller/GantryCraneWorkCycleController.java @@ -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 countGantryCraneWorkCycle(@ApiIgnore @RequestBody HashMap paramMap) { + return Result.success(gantryCraneWorkCycleService.countGantryCraneWorkCycle(paramMap)); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/entity/vo/CountGantryCraneWorkCycleVo.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/entity/vo/CountGantryCraneWorkCycleVo.java new file mode 100644 index 000000000..bfad26df8 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/entity/vo/CountGantryCraneWorkCycleVo.java @@ -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 副钩循环; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/GantryCraneWorkCycleMapper.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/GantryCraneWorkCycleMapper.java index a2b9c757e..207721ccd 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/GantryCraneWorkCycleMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/GantryCraneWorkCycleMapper.java @@ -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 selectGantryCraneWorkCycleList(Map map); List countGantryCraneWorkCycleNumEveryday(Map map); + + CountGantryCraneWorkCycleVo countGantryCraneWorkCycle(HashMap paramMap); } diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/xml/GantryCraneWorkCycleMapper.xml b/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/xml/GantryCraneWorkCycleMapper.xml index dc52cb9ac..d4b06fa3d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/xml/GantryCraneWorkCycleMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/mapper/xml/GantryCraneWorkCycleMapper.xml @@ -41,4 +41,17 @@ group by x + + diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IBigDeviceDiscloseRecordService.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IBigDeviceDiscloseRecordService.java index 3eca16150..88c3b06db 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IBigDeviceDiscloseRecordService.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IBigDeviceDiscloseRecordService.java @@ -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 map); EntityMap selectBigDeviceDiscloseRecordById(Map map); - - /** - * @Description: 龙门吊工作循环 - * @author: pds - * @date: 2021-08-10 - * @version: V1.0 - */ - interface IGantryCraneWorkCycleService extends IService { - - IPage queryGantryCraneWorkCyclePageList(Map map); - - List selectGantryCraneWorkCycleList(Map map); - - void saveGantryCraneWorkCycle(GantryCraneWorkCycle gantryCraneWorkCycle); - - List countGantryCraneWorkCycleNumEveryday(Map map); - } } diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IGantryCraneWorkCycleService.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IGantryCraneWorkCycleService.java new file mode 100644 index 000000000..ae353f8af --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/IGantryCraneWorkCycleService.java @@ -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 { + + IPage queryGantryCraneWorkCyclePageList(Map map); + + List selectGantryCraneWorkCycleList(Map map); + + void saveGantryCraneWorkCycle(GantryCraneWorkCycle gantryCraneWorkCycle); + + List countGantryCraneWorkCycleNumEveryday(Map map); + + CountGantryCraneWorkCycleVo countGantryCraneWorkCycle(HashMap paramMap); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/GantryCraneWorkCycleServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/GantryCraneWorkCycleServiceImpl.java index 6b941e4d7..f82b8a0d3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/GantryCraneWorkCycleServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/GantryCraneWorkCycleServiceImpl.java @@ -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 implements IBigDeviceDiscloseRecordService.IGantryCraneWorkCycleService { +public class GantryCraneWorkCycleServiceImpl extends ServiceImpl implements IGantryCraneWorkCycleService { @Autowired private GantryCraneWorkCycleMapper gantryCraneWorkCycleMapper; @Autowired @@ -75,4 +77,9 @@ public class GantryCraneWorkCycleServiceImpl extends ServiceImpl paramMap) { + return baseMapper.countGantryCraneWorkCycle(paramMap); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java b/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java index 694e05308..70ae47ad3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java +++ b/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java @@ -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 = "天气信息") diff --git a/src/main/java/com/zhgd/xmgl/modules/project/service/impl/ProjectServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/project/service/impl/ProjectServiceImpl.java index ccc40f0cb..8c5e8a0cf 100644 --- a/src/main/java/com/zhgd/xmgl/modules/project/service/impl/ProjectServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/project/service/impl/ProjectServiceImpl.java @@ -326,6 +326,7 @@ public class ProjectServiceImpl extends ServiceImpl impl project.setProjectSn(p.getProjectSn()); project.setExtend1(p.getExtend1()); project.setExtend2(p.getExtend2()); + project.setExtend3(p.getExtend3()); return project; } diff --git a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml index 5c2b1aa29..73085a25f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/smartbeamfield/mapper/xml/SmartBeamFieldSaveBeamPedestalMapper.xml @@ -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}