diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java index 2f800d9..4a59622 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java @@ -60,4 +60,6 @@ public interface AlarmConstants { Integer STOP = 61; List START_STOP_ALARAM = Arrays.asList(START,STOP); String VIDEO_SCHEDULED_TASK= "VideoScheduledTask"; + + List HZ3000_TYPES = Arrays.asList("0","1","2","3","4","5","6","7","8","9","10","11","12"); } diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java index 80334fb..925293b 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/tabulate/vo/TabulateLevelVo.java @@ -3,6 +3,8 @@ package com.hnac.hzims.alarm.tabulate.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * @author ysj */ @@ -26,4 +28,7 @@ public class TabulateLevelVo { @ApiModelProperty(value = "") private Integer soeType; + + @ApiModelProperty(value = "告警类型") + private String types; } \ No newline at end of file diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java index fd77873..943287e 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/HygienePlanEntity.java @@ -1,6 +1,7 @@ package com.hnac.hzims.safeproduct.entity; import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; @@ -51,10 +52,12 @@ public class HygienePlanEntity extends BaseEntity { @ApiModelProperty("自查计划状态") private String hygienePlanStatus; + @TableField(exist = false) @ExcelProperty(value = "计划开始时间", index = 3) @ApiModelProperty("计划开始时间") private String startTime; + @TableField(exist = false) @ExcelProperty(value = "计划结束时间", index = 4) @ApiModelProperty("计划结束时间") private String endTime; diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TestEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TestEntity.java index 0736f88..354920b 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TestEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TestEntity.java @@ -74,4 +74,7 @@ public class TestEntity extends BaseEntity { @Size(max = 1000, message = "考试附件字段长度不能超过1000") @ApiModelProperty("考试附件") private String filePath; + + @ApiModelProperty("考试方式") + private String testMethod; } diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/TestMethodEnum.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/TestMethodEnum.java new file mode 100644 index 0000000..0e39487 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/enums/TestMethodEnum.java @@ -0,0 +1,31 @@ +package com.hnac.hzims.safeproduct.enums; + +/** + * 考试方式枚举类 + * + * @author liwen + * @date 2024-01-25 + */ +public enum TestMethodEnum { + + ONLINE("ONLINE", "线上"), + OFFLINE("OFFLINE", "线下"), + MIXED("MIXED", "线上+线下"); + + private final String value; + + private final String desc; + + TestMethodEnum(String value, String desc) { + this.value = value; + this.desc = desc; + } + + public String getValue() { + return value; + } + + public String getDesc() { + return desc; + } +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMilesYearVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMilesYearVO.java index 492587d..c73f78e 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMilesYearVO.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/CarMilesYearVO.java @@ -1,5 +1,6 @@ package com.hnac.hzims.safeproduct.vo; +import com.alibaba.excel.annotation.ExcelProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -14,51 +15,67 @@ import java.math.BigDecimal; @ApiModel(value = "年度里程数据VO类") public class CarMilesYearVO { + @ExcelProperty(value = "单位", order = 0) @ApiModelProperty("单位") private String unit; + @ExcelProperty(value = "品牌", order = 2) @ApiModelProperty("品牌") private String carBrand; + @ExcelProperty(value = "车牌号", order = 1) @ApiModelProperty("车牌号") private String plateNumber; + @ExcelProperty(value = "1月", order = 3) @ApiModelProperty("1月里程数") private BigDecimal januaryMiles; + @ExcelProperty(value = "2月", order = 4) @ApiModelProperty("2月里程数") private BigDecimal februaryMiles; + @ExcelProperty(value = "3月", order = 5) @ApiModelProperty("3月里程数") private BigDecimal marchMiles; + @ExcelProperty(value = "4月", order = 6) @ApiModelProperty("4月里程数") private BigDecimal aprilMiles; + @ExcelProperty(value = "5月", order = 7) @ApiModelProperty("5月里程数") private BigDecimal mayMiles; + @ExcelProperty(value = "6月", order = 8) @ApiModelProperty("6月里程数") private BigDecimal juneMiles; + @ExcelProperty(value = "7月", order = 9) @ApiModelProperty("7月里程数") private BigDecimal julyMiles; + @ExcelProperty(value = "8月", order = 10) @ApiModelProperty("8月里程数") private BigDecimal augustMiles; + @ExcelProperty(value = "9月", order = 11) @ApiModelProperty("9月里程数") private BigDecimal septemberMiles; + @ExcelProperty(value = "10月", order = 12) @ApiModelProperty("10月里程数") private BigDecimal octoberMiles; + @ExcelProperty(value = "11月", order = 13) @ApiModelProperty("11月里程数") private BigDecimal novemberMiles; + @ExcelProperty(value = "12月", order = 14) @ApiModelProperty("12月里程数") private BigDecimal decemberMiles; + @ExcelProperty(value = "合计里程/km", order = 15) @ApiModelProperty("合计里程数") private BigDecimal sumMiles; } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java index da112b3..d561b3a 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java @@ -417,8 +417,8 @@ public class EmInfoController extends BladeController { @GetMapping("/hkVideoDevices") @ApiOperationSupport(order = 12) @ApiOperation(value = "海康视频设备获取") - public R> hkVideoDevices() { - return R.data(em_infoService.hkVideoDevices()); + public R> hkVideoDevices(@RequestParam("deptId") Long deptId) { + return R.data(em_infoService.hkVideoDevices(deptId)); } @GetMapping("/select") diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java index 8732f88..662b737 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java @@ -91,7 +91,7 @@ public interface IEmInfoService extends BaseService { List getVideoDeviceByEmCode(EmInfoEntity emInfo); - List hkVideoDevices(); + List hkVideoDevices(Long deptId); List deviceByPath(String emCode); diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java index 6c3b991..160ead5 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java @@ -966,9 +966,13 @@ public class EmInfoServiceImpl extends BaseServiceImpl hkVideoDevices() { - return this.list(Wrappers.lambdaQuery() - .eq(EmInfoEntity::getEmType,4)); + public List hkVideoDevices(Long deptId) { + QueryWrapper queryWrapper= new QueryWrapper<>(); + queryWrapper.lambda().eq(EmInfoEntity::getEmType,4); + if(ObjectUtil.isNotEmpty(deptId)){ + queryWrapper.lambda().eq(EmInfoEntity::getDepartment,deptId); + } + return this.list(queryWrapper); } /** diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java index b21f37d..7e924b5 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/controller/AlarmTabulateController.java @@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; +import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -31,7 +32,7 @@ public class AlarmTabulateController extends BladeController { @GetMapping("/early") @ApiOperationSupport(order = 1) - @ApiOperation(value = "智能预警", notes = "传入查询参数") + @ApiOperation(value = "FDP智能预警", notes = "传入查询参数") public R> early(TabulateEarlyVo param, Query query) { return R.data(tabulateService.early(Condition.getPage(query), param)); } @@ -42,4 +43,18 @@ public class AlarmTabulateController extends BladeController { public R> level(TabulateLevelVo param, Query query) { return R.data(tabulateService.level(Condition.getPage(query), param)); } + + @GetMapping("/video") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "视频告警(海康)", notes = "视频告警(海康)") + public R> video(TabulateLevelVo param, Query query) { + return R.data(tabulateService.video(Condition.getPage(query), param)); + } + + @GetMapping("/hz3000") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "hz3000告警", notes = "hz3000告警") + public R> hz3000(TabulateLevelVo param, Query query) { + return R.data(tabulateService.hz3000(Condition.getPage(query), param)); + } } diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/AlarmTabulateService.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/AlarmTabulateService.java index 6d1b7d6..453a8cd 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/AlarmTabulateService.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/AlarmTabulateService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.alarm.config.vo.AlarmHandleVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; +import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO; import org.springblade.core.mp.support.Query; @@ -15,4 +16,8 @@ public interface AlarmTabulateService { IPage early(IPage page, TabulateEarlyVo param); IPage level(IPage page, TabulateLevelVo param); + + IPage video(IPage page, TabulateLevelVo param); + + IPage hz3000(IPage page, TabulateLevelVo param); } diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java index e21984f..8a1df91 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/tabulate/service/impl/AlarmTabulateServiceImpl.java @@ -1,9 +1,13 @@ package com.hnac.hzims.alarm.tabulate.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.alarm.config.constants.AlarmConstants; import com.hnac.hzims.alarm.tabulate.service.AlarmTabulateService; import com.hnac.hzims.alarm.tabulate.vo.TabulateEarlyVo; import com.hnac.hzims.alarm.tabulate.vo.TabulateLevelVo; +import com.hnac.hzinfo.datasearch.soe.ISoeClient; +import com.hnac.hzinfo.datasearch.soe.domian.SoeData; +import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation; import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient; @@ -13,15 +17,12 @@ import com.hnac.hzinfo.sdk.v5.soe.vo.StbAnalysisVO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; -import org.springblade.core.tool.utils.CollectionUtil; -import org.springblade.core.tool.utils.DateUtil; -import org.springblade.core.tool.utils.StringUtil; +import org.springblade.core.tool.utils.*; import org.springframework.stereotype.Service; +import java.lang.reflect.Array; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author ysj @@ -31,6 +32,8 @@ import java.util.Map; @RequiredArgsConstructor public class AlarmTabulateServiceImpl implements AlarmTabulateService { + private final ISoeClient soeClient; + private final SoeDataClient soeDataClient; private final DeviceDataClient deviceDataClient; @@ -51,7 +54,7 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService { param.setEndTime(LocalDateTime.parse(tabulateEarly.getEndTime(), DateUtil.DATETIME_FORMATTER)); } param.setPage((int) page.getCurrent()); - param.setStation(tabulateEarly.getStationCode()); + param.setStations(Collections.singletonList(tabulateEarly.getStationCode())); param.setPageSize((int) page.getSize()); Result> result = soeDataClient.pageStbAnalysis(param); if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData().getRecords())){ @@ -82,4 +85,56 @@ public class AlarmTabulateServiceImpl implements AlarmTabulateService { page.setRecords((List) data.get("data")); return page; } + + /** + * 视频告警 + * @param page + * @param param + * @return + */ + @Override + public IPage video(IPage page, TabulateLevelVo param) { + Result> result = deviceDataClient.getDeviceSoeData(param.getProjectId(),param.getDimension(),param.getId(),param.getSoeType(),param.getStartTime(),param.getEndTime(), + true,(int) page.getCurrent(),(int)page.getSize()); + if(!result.isSuccess() || MapUtils.isEmpty(result.getData())){ + return page; + } + Map data = result.getData(); + page.setTotal((Long) data.get("total")); + page.setRecords((List) data.get("data")); + return page; + } + + /** + * HZ3000告警 + * @param page + * @param param + * @return + */ + @Override + public IPage hz3000(IPage page, TabulateLevelVo param) { + SoeQueryConditionByStation query = new SoeQueryConditionByStation(); + query.setNeedPage(true); + query.setPage((int) page.getCurrent()); + query.setLimit((int) page.getSize()); + query.setStationIds(Collections.singletonList(param.getProjectId())); + if(StringUtil.isNotBlank(param.getTypes())){ + query.setTypes(Func.toStrList(",",param.getTypes())); + }else { + query.setTypes(AlarmConstants.HZ3000_TYPES); + } + if(StringUtil.isNotBlank(param.getStartTime())){ + query.setBeginTime(LocalDateTime.parse(param.getStartTime(),DateUtil.DATETIME_FORMATTER)); + } + if(StringUtil.isNotBlank(param.getEndTime())){ + query.setEndTime(LocalDateTime.parse(param.getEndTime(), DateUtil.DATETIME_FORMATTER)); + } + Result> result = soeClient.getByStationsAndTime(query); + if(!result.isSuccess() || ObjectUtil.isEmpty(result.getData()) || CollectionUtil.isEmpty(result.getData().getRecords())){ + return page; + } + page.setTotal(result.getData().getTotal()); + page.setRecords(result.getData().getRecords()); + return page; + } } \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java index 2d358a0..d5e1d1a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java @@ -199,4 +199,12 @@ public class StationController extends BladeController { public R> select(@RequestParam(value = "type", required = false) Integer type, @RequestParam(value = "serveType", required = false) Integer serveType) { return R.data(stationService.select(type, serveType)); } + + @ApiLog + @GetMapping("/accessHydropower") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "接入水电站点列表查询", notes = "") + public R> accessHydropower() { + return R.data(stationService.accessHydropower()); + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java index 924cb11..2338e6c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java @@ -127,4 +127,6 @@ public interface IStationService extends BaseService { @Override boolean updateById(StationEntity req); + + List accessHydropower(); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index e73d35a..cbfd039 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -2,6 +2,7 @@ package com.hnac.hzims.operational.station.service.impl; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hnac.hzims.fdp.feign.IQuestionClient; @@ -52,7 +53,6 @@ import org.springframework.util.Assert; import java.util.*; import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import java.util.stream.Collectors; @@ -730,6 +730,19 @@ public class StationServiceImpl extends BaseServiceImpl accessHydropower() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(StationEntity::getDataOrigin,HomePageConstant.DATA_ORIGIN); + queryWrapper.lambda().eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE); + queryWrapper.lambda().eq(StationEntity::getType,HomePageConstant.HYDROPOWER); + return this.list(queryWrapper); + } + + /** * 删除新建站点时绑定的数据(项目、智能诊断站点) * * @param idList id集合 diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java index 9856bec..d025f73 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java @@ -110,8 +110,8 @@ public class ConferenceController extends BladeController { @GetMapping("/recordPage") @ApiImplicitParams({ @ApiImplicitParam(name = "conferencePlanId", value = "会议计划id", dataType = "query", paramType = "string"), - @ApiImplicitParam(name = "actualStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), - @ApiImplicitParam(name = "actualEndTime", value = "计划结束时间", dataType = "query", paramType = "string") + @ApiImplicitParam(name = "actualStartTime", value = "开始时间", dataType = "query", paramType = "string"), + @ApiImplicitParam(name = "actualEndTime", value = "结束时间", dataType = "query", paramType = "string") }) @ApiOperation(value = "会议记录分页") @ApiOperationSupport(order = 10) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java index 73c8b0a..72f5a91 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java @@ -113,8 +113,8 @@ public class RehearsalController extends BladeController { @GetMapping("/rehearsalRecordPage") @ApiImplicitParams({ @ApiImplicitParam(name = "rehearsalPlanId", value = "演练计划id", dataType = "query", paramType = "string"), - @ApiImplicitParam(name = "actualStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), - @ApiImplicitParam(name = "actualEndTime", value = "计划结束时间", dataType = "query", paramType = "string") + @ApiImplicitParam(name = "actualStartTime", value = "开始时间", dataType = "query", paramType = "string"), + @ApiImplicitParam(name = "actualEndTime", value = "结束时间", dataType = "query", paramType = "string") }) @ApiOperation(value = "演练记录分页") @ApiOperationSupport(order = 10) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java index 28b8043..8bbf0ea 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java @@ -124,13 +124,14 @@ public class TrainController extends BladeController { @GetMapping("/trainRecordPage") @ApiImplicitParams({ - @ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string") + @ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string"), + @ApiImplicitParam(name = "startTime", value = "计划开始时间", dataType = "query", paramType = "string"), + @ApiImplicitParam(name = "endTime", value = "计划结束时间", dataType = "query", paramType = "string") }) @ApiOperation(value = "培训记录分页") @ApiOperationSupport(order = 10) public R> trainRecordPage(@ApiIgnore @RequestParam Map param, Query query) { - IPage page = trainRecordService.page(Condition.getPage(query), Condition.getQueryWrapper( - param, TrainRecordEntity.class).lambda().orderByDesc(TrainRecordEntity::getCreateTime)); + IPage page = trainRecordService.trainRecordPage(param, query); return R.data(page); } @@ -173,13 +174,14 @@ public class TrainController extends BladeController { @GetMapping("/testPage") @ApiImplicitParams({ @ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string"), - @ApiImplicitParam(name = "trainRecordId", value = "培训记录id", dataType = "query", paramType = "string") + @ApiImplicitParam(name = "trainRecordId", value = "培训记录id", dataType = "query", paramType = "string"), + @ApiImplicitParam(name = "testName", value = "考试名称", dataType = "query", paramType = "string"), + @ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string") }) @ApiOperation(value = "考试记录分页") @ApiOperationSupport(order = 16) public R> testPage(@ApiIgnore @RequestParam Map param, Query query) { - IPage page = testService.page(Condition.getPage(query), Condition.getQueryWrapper(param, TestEntity.class) - .lambda().orderByDesc(TestEntity::getCreateTime)); + IPage page = testService.testPage(param, query); return R.data(page); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.xml index adf843b..5b98348 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.xml @@ -13,10 +13,10 @@ AND device_id = #{param.deviceId} - AND inspectionTime >= #{param.startTime} + AND inspection_time >= #{param.startTime} - AND inspectionTime <= #{param.endTime} + AND inspection_time <= #{param.endTime} ORDER BY create_time DESC diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.java index 6d65b66..9441e30 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.java @@ -1,11 +1,13 @@ package com.hnac.hzims.safeproduct.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.safeproduct.dto.TestDTO; import com.hnac.hzims.safeproduct.entity.TestEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; +import java.util.Map; /** * 考试记录Mapper类 @@ -22,4 +24,12 @@ public interface TestMapper extends BaseMapper { * @return 考试记录名称列表 */ List getTestNameList(String trainPlanId); + + /** + * 考试记录分页 + * @param param 入参 + * @param page 分页类 + * @return 考试记录数据 + */ + IPage testPage(IPage page, Map param); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml index 7b1556d..65649d1 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml @@ -15,4 +15,27 @@ ORDER BY create_time DESC + + \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java index a268688..5586ec0 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.java @@ -1,12 +1,14 @@ package com.hnac.hzims.safeproduct.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; import com.hnac.hzims.safeproduct.entity.TrainRecordEntity; import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO; import org.apache.ibatis.annotations.Mapper; import java.util.List; +import java.util.Map; /** * 培训记录Mapper类 @@ -30,4 +32,12 @@ public interface TrainRecordMapper extends BaseMapper { * @return 培训记录表VO类 */ TrainRecordDetailVO getTrainRecordDetailById(Long id); + + /** + * 培训记录分页 + * @param param 入参 + * @param page 分页类 + * @return 培训记录数据 + */ + IPage trainRecordPage(IPage page, Map param); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml index e4f15af..b4052fe 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainRecordMapper.xml @@ -27,4 +27,24 @@ t1.is_deleted = 0 AND t1.id = #{id} + + \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestService.java index 83eeeeb..4a59b6e 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestService.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITestService.java @@ -1,11 +1,14 @@ package com.hnac.hzims.safeproduct.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.hnac.hzims.safeproduct.dto.TestDTO; import com.hnac.hzims.safeproduct.entity.TestEntity; +import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import java.util.List; +import java.util.Map; /** * 考试记录服务类 @@ -63,4 +66,12 @@ public interface ITestService extends IService { * @return true-成功,false-失败 */ boolean updateTest(TestEntity testEntity); + + /** + * 考试记录分页 + * @param param 入参 + * @param query 分页类 + * @return 考试记录数据 + */ + IPage testPage(Map param, Query query); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java index 13d443a..57d5d62 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java @@ -1,12 +1,15 @@ package com.hnac.hzims.safeproduct.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; import com.hnac.hzims.safeproduct.entity.TrainRecordEntity; import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO; +import org.springblade.core.mp.support.Query; import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * 培训记录服务类 @@ -64,4 +67,12 @@ public interface ITrainRecordService extends IService { * @return 培训记录表VO类 */ TrainRecordDetailVO getTrainRecordDetailById(Long id); + + /** + * 培训记录分页 + * @param param 入参 + * @param query 分页类 + * @return 培训记录数据 + */ + IPage trainRecordPage(Map param, Query query); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestServiceImpl.java index 5573afa..c40c905 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TestServiceImpl.java @@ -3,6 +3,8 @@ package com.hnac.hzims.safeproduct.service.impl; import cn.hutool.core.date.DatePattern; import com.alibaba.excel.util.CollectionUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hnac.hzims.safeproduct.constants.SafeProductConstant; import com.hnac.hzims.safeproduct.dto.TestDTO; @@ -14,6 +16,7 @@ import com.hnac.hzims.safeproduct.mapper.TrainPlanMapper; import com.hnac.hzims.safeproduct.service.ITestScoreService; import com.hnac.hzims.safeproduct.service.ITestService; import com.hnac.hzims.safeproduct.utils.BaseUtil; +import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -23,6 +26,7 @@ import javax.annotation.Resource; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -175,6 +179,15 @@ public class TestServiceImpl extends ServiceImpl impleme } /** + * 考试记录分页 + */ + @Override + public IPage testPage(Map param, Query query) { + IPage page = new Page<>(query.getCurrent(), query.getSize()); + return baseMapper.testPage(page, param); + } + + /** * 获取成绩列表 * @param testEntity 考试记录实体类 * @param person 参考人员 diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java index a065735..8311679 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java @@ -4,6 +4,8 @@ import cn.afterturn.easypoi.entity.ImageEntity; import cn.hutool.core.date.DatePattern; import com.alibaba.excel.util.CollectionUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hnac.hzims.common.logs.utils.StringUtils; import com.hnac.hzims.safeproduct.constants.SafeProductConstant; @@ -18,6 +20,7 @@ import com.hnac.hzims.safeproduct.service.ITestService; import com.hnac.hzims.safeproduct.service.ITrainRecordService; import com.hnac.hzims.safeproduct.utils.BaseUtil; import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO; +import org.springblade.core.mp.support.Query; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -180,6 +183,15 @@ public class TrainRecordServiceImpl extends ServiceImpl trainRecordPage(Map param, Query query) { + IPage page = new Page<>(query.getCurrent(), query.getSize()); + return baseMapper.trainRecordPage(page, param); + } + + /** * 查询是否存在同月编号 * @param currentMonth 当月 * @return 存在则返回上一编号,否则返回null diff --git a/hzims-service/safeproduct/src/main/resources/template/会议记录表.docx b/hzims-service/safeproduct/src/main/resources/template/会议记录表.docx index e4af627..8671b2f 100644 Binary files a/hzims-service/safeproduct/src/main/resources/template/会议记录表.docx and b/hzims-service/safeproduct/src/main/resources/template/会议记录表.docx differ diff --git a/hzims-service/safeproduct/src/main/resources/template/卫生自查表.docx b/hzims-service/safeproduct/src/main/resources/template/卫生自查表.docx index 80ba5d7..06133d5 100644 Binary files a/hzims-service/safeproduct/src/main/resources/template/卫生自查表.docx and b/hzims-service/safeproduct/src/main/resources/template/卫生自查表.docx differ diff --git a/hzims-service/safeproduct/src/main/resources/template/培训记录表.docx b/hzims-service/safeproduct/src/main/resources/template/培训记录表.docx index 803c532..371a227 100644 Binary files a/hzims-service/safeproduct/src/main/resources/template/培训记录表.docx and b/hzims-service/safeproduct/src/main/resources/template/培训记录表.docx differ diff --git a/hzims-service/safeproduct/src/main/resources/template/演练记录表.docx b/hzims-service/safeproduct/src/main/resources/template/演练记录表.docx index f3c3438..dd5789d 100644 Binary files a/hzims-service/safeproduct/src/main/resources/template/演练记录表.docx and b/hzims-service/safeproduct/src/main/resources/template/演练记录表.docx differ diff --git a/hzims-service/safeproduct/src/main/resources/template/车辆检查表.docx b/hzims-service/safeproduct/src/main/resources/template/车辆检查表.docx index 8868b7d..9f421d7 100644 Binary files a/hzims-service/safeproduct/src/main/resources/template/车辆检查表.docx and b/hzims-service/safeproduct/src/main/resources/template/车辆检查表.docx differ diff --git a/hzims-service/safeproduct/src/main/resources/template/车辆维保记录单.docx b/hzims-service/safeproduct/src/main/resources/template/车辆维保记录单.docx index 9161a20..4d5fd9c 100644 Binary files a/hzims-service/safeproduct/src/main/resources/template/车辆维保记录单.docx and b/hzims-service/safeproduct/src/main/resources/template/车辆维保记录单.docx differ diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java index f1a271d..9fb5eb9 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java @@ -179,6 +179,9 @@ public class WorkTaskServiceImpl extends BaseServiceImpl