diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/ai/entity/RobotEntity.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/ai/entity/RobotEntity.java index 3a02a3c..e179398 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/ai/entity/RobotEntity.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/ai/entity/RobotEntity.java @@ -11,6 +11,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + +import javax.validation.constraints.NotBlank; import java.util.Date; import java.time.LocalDateTime; @@ -28,6 +30,10 @@ public class RobotEntity extends TenantEntity { private static final long serialVersionUID = 4503880134032836625L; + @ApiModelProperty(value = "站点编号") + @QueryField(condition = SqlCondition.EQUAL) + private String stationCode; + /** * 机器人用户ID */ @@ -35,11 +41,16 @@ public class RobotEntity extends TenantEntity { @ApiModelProperty(value = "机器人用户ID") private Long userId; + @ApiModelProperty("机器人编号") + @QueryField(condition = SqlCondition.LIKE) + private String code; + /** * 机器人带的摄像头ID */ @QueryField(condition = SqlCondition.EQUAL) @ApiModelProperty(value = "机器人带的摄像头ID, 多个摄像头通过 , 隔开") + @NotBlank private String cameraId; /** @@ -47,8 +58,13 @@ public class RobotEntity extends TenantEntity { */ @QueryField(condition = SqlCondition.LIKE) @ApiModelProperty(value = "机器人名称") + @NotBlank(message = "巡检机器人名称不能为空") private String name; + @ApiModelProperty(value = "是否绑定设备实例") + @QueryField(condition = SqlCondition.EQUAL) + private Boolean isDeviceInstance; + /** * 描述信息 */ diff --git a/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/constant/TicketProcessConstant.java b/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/constant/TicketProcessConstant.java index e4a7222..d0b79d3 100644 --- a/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/constant/TicketProcessConstant.java +++ b/hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/constant/TicketProcessConstant.java @@ -64,4 +64,14 @@ public class TicketProcessConstant { * 线下工作票 */ public static final String OFFLINE_WORK_TICKET = "offlineWorkTicket"; + /** + * 隐患流程标识 + */ + public static final String HIDDEN_DANGER_CHECK = "hiddenDangerCheck"; + + + /** + * 风险排查标识 + */ + public static final String HAZARD_RISK = "hazard_risk"; } diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClient.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClient.java new file mode 100644 index 0000000..c2aa068 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClient.java @@ -0,0 +1,31 @@ +package com.hnac.hzims.safeproduct.feign; + +import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; +import com.hnac.hzims.safeproduct.Constants; +import org.springblade.core.tool.api.R; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + + +/** + * @author xiashandong + * @created 2021/6/10 15:21 + **/ +@FeignClient( + value = Constants.APP_NAME, + fallback = ISafeInnerDangerClientFallback.class +) +public interface ISafeInnerDangerClient { + + String API_PREFIX = "/feign/hiddenDangerStart"; + + String SAVE_HIDDENDANGER = API_PREFIX + "/saveHiddenDanger"; + + + @PostMapping(SAVE_HIDDENDANGER) + R saveDefect(@RequestBody ProcessWorkFlowResponse processWorkFlowResponse); + + + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClientFallback.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClientFallback.java new file mode 100644 index 0000000..b5a84ad --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClientFallback.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.safeproduct.feign; + +import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Component; + + +/** + * @author ysj + */ +@Slf4j +@Component +public class ISafeInnerDangerClientFallback implements ISafeInnerDangerClient { + + @Override + public R saveDefect(ProcessWorkFlowResponse processWorkFlowResponse) { + log.error("远程调用失败,接口:" + SAVE_HIDDENDANGER); + return null; + } +} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HazardRiskServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HazardRiskServiceImpl.java new file mode 100644 index 0000000..640b8a7 --- /dev/null +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HazardRiskServiceImpl.java @@ -0,0 +1,52 @@ +package com.hnac.hzims.middle.processflow.strategy.serviceimpl; + +import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; +import com.hnac.hzims.middle.processflow.service.ProcessDictService; +import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService; +import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; +import com.hnac.hzims.safeproduct.risk.feign.IHazardRiskClient; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Service; + +import static com.hnac.hzims.middle.process.constant.TicketProcessConstant.HAZARD_RISK; + +/** + * @author ysj + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class HazardRiskServiceImpl extends ProcessAbstractService { + + private final IHazardRiskClient hazardRiskClient; + + private final ProcessDictService processDictService; + + + /** + * 消息确认 + * @param flowQueue + * @return + */ + @Override + public Boolean isWorkflowProcess(WorkflowQueue flowQueue) { + String dictValue = processDictService.selectDictValueByKey(HAZARD_RISK); + return dictValue.equals(flowQueue.getProcessDefinitionKey()); + } + + /** + * 调用检修业务处理 + * @param response + */ + @Override + public void calculate(ProcessWorkFlowResponse response) { + R defect = hazardRiskClient.listener(response); + if (!defect.isSuccess()) { + throw new ServiceException("检修任务业务执行异常!"); + + } + } +} diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HiddenDangerFlowServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HiddenDangerFlowServiceImpl.java new file mode 100644 index 0000000..c3c6d28 --- /dev/null +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HiddenDangerFlowServiceImpl.java @@ -0,0 +1,65 @@ +package com.hnac.hzims.middle.processflow.strategy.serviceimpl; + +import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; +import com.hnac.hzims.middle.processflow.service.ProcessDictService; +import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService; +import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; +import com.hnac.hzims.safeproduct.feign.ISafeInnerDangerClient; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Service; + +import static com.hnac.hzims.middle.process.constant.TicketProcessConstant.HIDDEN_DANGER_CHECK; + +/** + * 隐患排查 + * + * @Author ty + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/9/18 9:04 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class HiddenDangerFlowServiceImpl extends ProcessAbstractService { + + + private final ProcessDictService processDictService; + + + private final ISafeInnerDangerClient iSafeInnerDangerClient; + + /** + * 设置执行那种实现类 + * + * @param flowQueue + * @return + */ + @Override + public Boolean isWorkflowProcess(WorkflowQueue flowQueue) { + String dictValue = processDictService.selectDictValueByKey(HIDDEN_DANGER_CHECK); + if (dictValue.equals(flowQueue.getProcessDefinitionKey())) { + log.info("已执行隐患排查工作流程环节操作~~~~"); + return true; + } + log.error("未执行隐患排查流程环节操作,请联系管理员~~~~"); + return false; + } + + + /** + * 隐患排查业务方法 + * + * @param response + */ + @Override + public void calculate(ProcessWorkFlowResponse response) { + R dealtDutyRecFlow = iSafeInnerDangerClient.saveDefect(response); + if (!dealtDutyRecFlow.isSuccess()){ + throw new ServiceException("隐患排查流程失败"); + } + } +} diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java index 8454994..12cec92 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java @@ -7,26 +7,35 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzinfo.inspect.ai.dto.robot.RobotInstanceDTO; import com.hnac.hzinfo.inspect.ai.vo.robot.RobotAiReturnData; +import com.hnac.hzinfo.inspect.ai.vo.robot.RobotRealDataVO; import com.hnac.hzinfo.inspect.ai.vo.robot.RobotServerTaskParam; +import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; +import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient; +import com.hnac.hzinfo.sdk.v5.device.vo.VirtualDeviceDTO; import io.swagger.annotations.*; import lombok.AllArgsConstructor; import javax.validation.Valid; import lombok.SneakyThrows; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.oss.OssTemplate; import org.springblade.core.oss.model.BladeFile; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; import com.hnac.hzinfo.inspect.ai.entity.RobotEntity; import com.hnac.hzinfo.inspect.ai.service.IRobotService; + +import java.util.List; import java.util.Map; /** @@ -80,6 +89,7 @@ public class RobotController extends BladeController { @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入st_robot") public R save(@Valid @RequestBody RobotEntity st_robot) { + st_robot.setCode("robot"+CodeUtils.randomCode()); return R.status(st_robotService.save(st_robot)); } @@ -131,6 +141,17 @@ public class RobotController extends BladeController { return R.data(bladeFile); } + @PostMapping("/generateDeviceInstance") + @ApiOperationSupport(order = 10) + @ApiOperation(value = "生成机器人设备实例", notes = "生成机器人设备实例") + public R generateDeviceInstance(@RequestBody @Validated RobotInstanceDTO device) { + return R.status(st_robotService.generateDeviceInstance(device)); + } - + @PostMapping("/getRealDataByRobotCode") + @ApiOperationSupport(order = 11) + @ApiOperation(value = "获取机器人各项属性实时数据", notes = "获取机器人各项属性实时数据") + public R> getRealDataByRobotCode(@RequestParam @ApiParam(value = "机器人编号", required = true) String robotCode) { + return R.data(st_robotService.getRealDataByRobotCode(robotCode)); + } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/dto/robot/RobotInstanceDTO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/dto/robot/RobotInstanceDTO.java new file mode 100644 index 0000000..9091112 --- /dev/null +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/dto/robot/RobotInstanceDTO.java @@ -0,0 +1,35 @@ +package com.hnac.hzinfo.inspect.ai.dto.robot; + + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +@Data +@EqualsAndHashCode +@ApiModel(value = "机器人设备实例DTO对象",description = "机器人设备实例DTO对象") +public class RobotInstanceDTO implements Serializable { + + @ApiModelProperty("设备编号") + @NotBlank(message = "机器人编号不能为空") + private String deviceCode; + + @ApiModelProperty("机器人名称") + @NotBlank(message = "机器人名称不能为空") + private String deviceName; + + @ApiModelProperty("模型标识") + private String modelSignage; + + @ApiModelProperty("站点编号") + @NotBlank(message = "站点编号不能为空") + private String projectId; + + @ApiModelProperty("标准设备需要传入密钥") + private String secretKey; + +} diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/IRobotService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/IRobotService.java index 61a2397..e05d8fc 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/IRobotService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/IRobotService.java @@ -1,9 +1,15 @@ package com.hnac.hzinfo.inspect.ai.service; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import com.hnac.hzinfo.inspect.ai.dto.robot.RobotInstanceDTO; import com.hnac.hzinfo.inspect.ai.vo.RobotVO; +import com.hnac.hzinfo.inspect.ai.vo.robot.RobotRealDataVO; +import com.hnac.hzinfo.sdk.v5.device.vo.VirtualDeviceDTO; import org.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.ai.entity.RobotEntity; +import java.util.List; + /** * 服务类 * @@ -18,4 +24,17 @@ public interface IRobotService extends BaseService { */ RobotVO getDetailByUserId(Long userId); + /** + * 生成机器人设备实例 + * @param device 机器人设备实例DTO + * @return 生成结果 + */ + Boolean generateDeviceInstance(RobotInstanceDTO device); + + /** + * 获取机器人各项属性实时数据 + * @param robotCode 机器人编号 + * @return 实时数据 + */ + List getRealDataByRobotCode(String robotCode); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java index c3c14ef..372ca23 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java @@ -1,15 +1,45 @@ package com.hnac.hzinfo.inspect.ai.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.google.common.collect.Lists; +import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; +import com.hnac.hzinfo.datasearch.analyse.IAnalyseInstanceClient; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import com.hnac.hzinfo.datasearch.device.IDeviceClient; +import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; +import com.hnac.hzinfo.inspect.ai.dto.robot.RobotInstanceDTO; import com.hnac.hzinfo.inspect.ai.vo.RobotVO; +import com.hnac.hzinfo.inspect.ai.vo.robot.RobotRealDataVO; import com.hnac.hzinfo.inspect.ai.wrapper.RobotWrapper; +import com.hnac.hzinfo.inspect.constants.ParamConstants; +import com.hnac.hzinfo.sdk.core.response.Result; +import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient; +import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient; +import com.hnac.hzinfo.sdk.v5.device.po.DeviceRealDataPO; +import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceAttrVO; +import com.hnac.hzinfo.sdk.v5.device.vo.RealDataRedisVO; +import com.hnac.hzinfo.sdk.v5.device.vo.VirtualDeviceDTO; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; import com.hnac.hzinfo.inspect.ai.entity.RobotEntity; import com.hnac.hzinfo.inspect.ai.mapper.RobotMapper; import com.hnac.hzinfo.inspect.ai.service.IRobotService; import org.springblade.core.mp.support.Condition; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringUtil; +import org.springblade.system.cache.ParamCache; import org.springframework.stereotype.Service; +import org.springframework.util.Assert; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 服务实现类 @@ -18,8 +48,13 @@ import org.springframework.stereotype.Service; */ @Service @AllArgsConstructor +@Slf4j public class RobotServiceImpl extends BaseServiceImpl implements IRobotService { + private final DeviceClient deviceClient; + private final IAnalyseDataSearchClient analyseDataSearchClient; + private final DeviceDataClient deviceDataClient; + /** * 根据用户id 获取 机器人信息 * @param userId @@ -35,4 +70,48 @@ public class RobotServiceImpl extends BaseServiceImpl RobotVO re = RobotWrapper.build().entityVO(robot); return re; } + + @Override + public Boolean generateDeviceInstance(RobotInstanceDTO device) { + if(deviceClient.isDeviceCodeExist(device.getDeviceCode()).getData()) { + throw new ServiceException("该机器人已经创建过设备实例,无需再创建!"); + } + else { + String modelSignage = ParamCache.getValue(ParamConstants.ROBOT_MODEL_CODE); + device.setModelSignage(Func.isNotEmpty(device.getModelSignage()) ? device.getModelSignage() : modelSignage); + VirtualDeviceDTO req = BeanUtil.copy(device, VirtualDeviceDTO.class); + req.setIsStandard(1); + req.setProtocolSignage("standard"); + R saveResult = deviceClient.saveVirtualDevice(req); + Assert.isTrue(saveResult.isSuccess(),() -> { + throw new ServiceException("生成设备实例失败,报错信息为:" + saveResult.getMsg()); + }); + LambdaUpdateWrapper luw = Wrappers.lambdaUpdate() + .set(RobotEntity::getIsDeviceInstance, true) + .eq(RobotEntity::getCode, device.getDeviceCode()); + return this.update(luw); + } + } + + @Override + public List getRealDataByRobotCode(String robotCode) { + Result> attrResult = deviceClient.getDeviceInstaceAttrsByDeviceCodes(Lists.newArrayList(robotCode)); + Assert.isTrue(attrResult.isSuccess(),() -> { + throw new ServiceException("获取设备实例物模型失败!"); + }); + DeviceRealDataPO po = new DeviceRealDataPO(); + po.setDeviceCode(robotCode); + po.setSignages(attrResult.getData().stream().map(DeviceInstanceAttrVO::getSignage).collect(Collectors.toList())); + Result>>> realDataResult = deviceDataClient.getDeviceRealDataByCodes(Lists.newArrayList(po)); + Assert.isTrue(realDataResult.isSuccess(),() -> { + throw new ServiceException("获取设备实例实时数据失败!"); + }); + List result = realDataResult.getData().stream() + .flatMap(l -> l.stream()) + .flatMap(m -> m.entrySet().stream().map(k -> BeanUtil.copy(m.get(k), RobotRealDataVO.class))) + .collect(Collectors.toList()); + return result; + } + + } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotRealDataVO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotRealDataVO.java new file mode 100644 index 0000000..d3561c7 --- /dev/null +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotRealDataVO.java @@ -0,0 +1,45 @@ +package com.hnac.hzinfo.inspect.ai.vo.robot; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.hnac.hzinfo.sdk.v5.device.vo.RealDataRedisVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +@Data +@EqualsAndHashCode +public class RobotRealDataVO extends RealDataRedisVO implements Serializable { + @ApiModelProperty("数据上送时间") + private String ts; + + @ApiModelProperty("实时数据") + private String v; + + @ApiModelProperty("上送数据质量,0为有效") + private String q; + + @JsonIgnore + private String n; + + @ApiModelProperty("物模型属性ID") + private String attrId; + + @JsonIgnore + private String realId; + + @JsonIgnore + private Long attrType; + + @ApiModelProperty("物模型属性标识") + @JsonIgnore + private String signage; + + @ApiModelProperty("物模型属性名称") + private String attrName; + + @ApiModelProperty("启停状态") + private Integer state; +} diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/constants/ParamConstants.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/constants/ParamConstants.java new file mode 100644 index 0000000..3f306d1 --- /dev/null +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/constants/ParamConstants.java @@ -0,0 +1,11 @@ +package com.hnac.hzinfo.inspect.constants; + +public interface ParamConstants { + + /**机器人模型编号**/ + String ROBOT_MODEL_CODE = "robot.model.code"; + + /**机器人状态属性**/ + String ROBOT_DEVICE_ATTR_ENABLE = "robot.device.attr.enable"; + +} diff --git a/hzims-service/inspect/src/main/resources/db/2.0.0.sql.1 b/hzims-service/inspect/src/main/resources/db/2.0.0.sql.1 index bedd5d8..11f6355 100644 --- a/hzims-service/inspect/src/main/resources/db/2.0.0.sql.1 +++ b/hzims-service/inspect/src/main/resources/db/2.0.0.sql.1 @@ -7,4 +7,7 @@ alter table `hz_st_ex_task` add column `video_start_time` datetime default null alter table `hz_st_ex_task` add column `video_end_time` datetime default null comment '视频录制开始时间'; alter table `hz_st_ex_task` add column `video_url` varchar(255) default null comment '手动录制视频地址'; -- 巡检摄像头管理添加设备编号 -alter table `hz_st_camera_info` add column `em_code` varchar(50) default null comment '设备编号'; \ No newline at end of file +alter table `hz_st_camera_info` add column `em_code` varchar(50) default null comment '设备编号'; +alter table `hz_st_robot` add column `code` varchar(50) default null comment '机器人编号'; +alter table `hz_st_robot` add column `station_code` varchar(50) default null comment '站点编号'; +alter table `hz_st_robot` add column `is_device_instance` tinyint(2) default 0 comment '是否绑定设备实例'; \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java index b1d5fac..c5eba9b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java @@ -72,57 +72,6 @@ public class OperDefectController extends BladeController { return R.data(page); } - - /* - */ -/** - * 新增 代码自定义代号 - */ /* - - @PostMapping("/save") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入defect") - public R save(@Valid @RequestBody OperDefectEntity defect) { - return R.status(defectService.save(defect)); - } - - */ -/** - * 修改 代码自定义代号 - */ /* - - @PostMapping("/update") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入defect") - public R update(@Valid @RequestBody OperDefectEntity defect) { - return R.status(defectService.updateById(defect)); - } - - */ -/** - * 新增或修改 代码自定义代号 - */ /* - - @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入defect") - public R submit(@Valid @RequestBody OperDefectEntity defect) { - return R.status(defectService.saveOrUpdate(defect)); - } -*/ - - - /* */ - - /** - * 删除 代码自定义代号 - */ /* - @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(defectService.deleteLogic(Func.toLongList(ids))); - }*/ @PostMapping("/handleProcess") @ApiOperationSupport(order = 4) @ApiOperation(value = "执行问题处理流程", notes = "执行问题处理流程") diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java index 9290f04..ed687cd 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java @@ -107,12 +107,6 @@ public class OperDefectStatisticsController extends BladeController { public void exportDefectList(HttpServletResponse response,@RequestBody OperDefectStatisticsVO entity) { try { long timeMillis = System.currentTimeMillis(); -// if(ObjectUtil.isEmpty(entity.getCreateTime())&&ObjectUtil.isEmpty(entity.getCreateEndTime())){ -// LocalDateTime date = LocalDateTime.now(); -// LocalDateTime firstDay = date.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0); -// entity.setCreateTime(Date.from(firstDay.atZone(ZoneId.systemDefault()).toInstant())); -// entity.setCreateEndTime(new Date()); -// } response.setContentType("application/vnd.ms-excel"); response.setCharacterEncoding("UTF-8"); // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 @@ -121,18 +115,14 @@ public class OperDefectStatisticsController extends BladeController { LambdaQueryWrapper queryWrapper = statisticsService.getQueryWrapper(entity); List list = statisticsService.list(queryWrapper); long timeMillis1 =System.currentTimeMillis()- timeMillis; - System.out.println("查询对应实例类耗时============================"+ timeMillis1); List defectStatisticsExportVO = statisticsService.getDefectStatisticsExportVO(list); long timeMillis2 =System.currentTimeMillis()- timeMillis; - System.out.println("参数转换耗时============================"+ timeMillis2); if(defectStatisticsExportVO!=null && defectStatisticsExportVO.size()>0){ - System.out.println("---------------- size = " + defectStatisticsExportVO.size()); // 这里需要设置不关闭流 EasyExcel.write(response.getOutputStream(), OperDefectStatisticsExportVO.class).autoCloseStream(Boolean.FALSE).sheet("缺陷统计报表") .doWrite(defectStatisticsExportVO); } } catch (Exception e) { - System.out.println("exportExcel = " + e); // 重置response response.reset(); response.setContentType("application/json"); @@ -162,48 +152,6 @@ public class OperDefectStatisticsController extends BladeController { } /** - * 新增 代码自定义代号 - *//* - @PostMapping("/save") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入statistics") - public R save(@Valid @RequestBody OperDefectStatisticsEntity statistics) { - return R.status(statisticsService.save(statistics)); - } - - *//** - * 修改 代码自定义代号 - *//* - @PostMapping("/update") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入statistics") - public R update(@Valid @RequestBody OperDefectStatisticsEntity statistics) { - return R.status(statisticsService.updateById(statistics)); - } - - *//** - * 新增或修改 代码自定义代号 - *//* - @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入statistics") - public R submit(@Valid @RequestBody OperDefectStatisticsEntity statistics) { - return R.status(statisticsService.saveOrUpdate(statistics)); - } - - - *//** - * 删除 代码自定义代号 - *//* - @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(statisticsService.deleteLogic(Func.toLongList(ids))); - }*/ - - - /** * 巡检任务统计 * @return */ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java index 11c37b0..ebf3a27 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java @@ -79,43 +79,9 @@ public class OperPhenomenonController extends BladeController { public R> list(OperAppearanceVO phenomenon, Query query) { LambdaQueryWrapper queryWrapper = operAppearanceService.getQueryWrapper(phenomenon); IPage pages = operAppearanceService.page(Condition.getPage(query), queryWrapper); -// IPage vos = OperPhenomenonWrapper.build().pageVO(pages); return R.data(pages); } - - //此端口弃用20230621 -// /** -// * 新增 代码自定义代号 -// */ -// @PostMapping("/save") -// @ApiOperationSupport(order = 4) -// @ApiOperation(value = "提交现象,现象提交后不能修改", notes = "传入phenomenon") -// public R save(@Valid @RequestBody OperPhenomenonEntity phenomenon) { -// return R.data(phenomenonService.submit(phenomenon)); -// } - - /* */ /** - * 修改 代码自定义代号 - */ /* - @PostMapping("/update") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入phenomenon") - public R update(@Valid @RequestBody OperPhenomenonEntity phenomenon) { - return R.status(phenomenonService.updateById(phenomenon)); - } - - */ /** - * 新增或修改 代码自定义代号 - */ /* - @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入phenomenon") - public R submit(@Valid @RequestBody OperPhenomenonEntity phenomenon) { - return R.status(phenomenonService.saveOrUpdate(phenomenon)); - }*/ - - /** * 删除 代码自定义代号 */ @@ -131,7 +97,6 @@ public class OperPhenomenonController extends BladeController { @ApiOperation(value = "处理问题甄别流程", notes = "处理问题甄别流程") public R handleCheckProcess(@RequestBody @ObjectRequiredInvalid(attributes = {"taskId", "processInstanceId", "comment", "flag", "variables.pass"}, message = "参数不能为空") BladeFlow flow) { - //@DictInvalid(dictKey = "") return R.status(phenomenonService.handleCheckProcess(flow)); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/controller/DistributeWorkOrderController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/controller/DistributeWorkOrderController.java index 8734551..545f392 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/controller/DistributeWorkOrderController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/controller/DistributeWorkOrderController.java @@ -18,12 +18,14 @@ import java.util.List; /** * @author hx + * 和水务进行对接,IMS无用。20240308,wxq */ @RestController @AllArgsConstructor @Slf4j @RequestMapping("/token/distribute/workOrder") @Api(value = "派发工单",tags = "派发工单") +@Deprecated public class DistributeWorkOrderController { private final IDistributeWorkOrderService distributeWorkOrderService; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/GrabPackageDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/GrabPackageDTO.java index b080213..d04aa71 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/GrabPackageDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/GrabPackageDTO.java @@ -8,6 +8,7 @@ import java.util.List; @Data @ApiModel(value = "抢单受理参数对象",description = "抢单受理参数对象") +@Deprecated public class GrabPackageDTO { @ApiModelProperty("水厂名称") diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderContentDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderContentDTO.java index 5c64490..2f37e47 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderContentDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderContentDTO.java @@ -1,4 +1,4 @@ package com.hnac.hzims.operational.workOrder.dto; - +@Deprecated public class InspectionOrderContentDTO { } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderDTO.java index 9b9842e..7b1ba6c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderDTO.java @@ -8,6 +8,7 @@ import java.util.List; @Data @ApiModel(value = "巡检工单列表",description = "巡检工单列表") +@Deprecated public class InspectionOrderDTO { @ApiModelProperty("异常设备数") private Integer equAbnormal; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderContentDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderContentDTO.java index d73d82e..d537027 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderContentDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderContentDTO.java @@ -8,6 +8,7 @@ import lombok.Data; @ApiModel(value = "MaintOrderContentDTO对象",description = "MaintOrderContentDTO对象") @Data +@Deprecated public class MaintOrderContentDTO { @ApiModelProperty("润滑内容") private String content; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderDTO.java index a610e28..777ce37 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderDTO.java @@ -10,6 +10,7 @@ import java.util.List; @Data @ApiModel(value = "MaintOrderDTO对象",description = "MaintOrderDTO对象") +@Deprecated public class MaintOrderDTO { @ApiModelProperty("所属大区") private String belongArea; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OrderPackageDto.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OrderPackageDto.java index 815ce60..65e0771 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OrderPackageDto.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OrderPackageDto.java @@ -13,6 +13,7 @@ import java.util.List; */ @Data @ApiModel(value = "工单包受理对象", description = "工单包受理对象") +@Deprecated public class OrderPackageDto { @ApiModelProperty("竞标主键ID") private String id; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OtherOrderDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OtherOrderDTO.java index da82f3e..8604051 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OtherOrderDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OtherOrderDTO.java @@ -7,6 +7,7 @@ import lombok.Data; @Data @ApiModel(value = "OtherOrderDTO对象",description = "OtherOrderDTO对象") +@Deprecated public class OtherOrderDTO { @ApiModelProperty("工单类型 5防腐工单6大修工单7重置工单8临时通用工单") private String orderType; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/Publisher.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/Publisher.java index a3f6dcf..e1c7ac8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/Publisher.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/Publisher.java @@ -6,6 +6,7 @@ import lombok.Data; @Data @ApiModel(value = "发布人信息", description = "发布人信息") +@Deprecated public class Publisher { @ApiModelProperty("联系地址") private String contactAddress; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderAcptDto.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderAcptDto.java index 01a0425..ef7a68d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderAcptDto.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderAcptDto.java @@ -10,6 +10,7 @@ import java.util.List; @Data @ApiModel(value = "RepairOrderAcptDto对象", description = "RepairOrderAcptDto对象") +@Deprecated public class RepairOrderAcptDto { @ApiModelProperty("报修人") private String createUser; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderContentDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderContentDTO.java index a7a8075..eb7fccc 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderContentDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderContentDTO.java @@ -8,6 +8,7 @@ import lombok.Data; @Data @ApiModel(value = "RepairOrderContentDTO对象",description = "RepairOrderContentDTO对象") +@Deprecated public class RepairOrderContentDTO { @ApiModelProperty("报修人") private String createUser; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderPrognosisDTO.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderPrognosisDTO.java index bfbf258..cc5b967 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderPrognosisDTO.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderPrognosisDTO.java @@ -6,6 +6,7 @@ import lombok.Data; @Data @ApiModel(value = "RepairOrderPrognosisDTO对象",description = "RepairOrderPrognosisDTO对象") +@Deprecated public class RepairOrderPrognosisDTO { @ApiModelProperty("故障原因描述") private String cause; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/TenderDto.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/TenderDto.java index e6d3ccb..2454662 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/TenderDto.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/TenderDto.java @@ -10,6 +10,7 @@ import java.util.List; @Data @ApiModel(value = "招标信息",description = "招标信息") +@Deprecated public class TenderDto { @ApiModelProperty("备注") private String orderRemark; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/IDistributeWorkOrderService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/IDistributeWorkOrderService.java index bb5caa8..77e7955 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/IDistributeWorkOrderService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/IDistributeWorkOrderService.java @@ -3,7 +3,7 @@ package com.hnac.hzims.operational.workOrder.service; import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; import com.hnac.hzims.operational.defect.entity.OperDefectEntity; import org.springblade.core.tool.api.R; - +@Deprecated public interface IDistributeWorkOrderService { /** * 派发检修任务 diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java index d7d25f8..059bdec 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java @@ -44,6 +44,7 @@ import java.util.Set; @Slf4j @RequiredArgsConstructor @Service +@Deprecated public class DistributeWorkOrderServiceImpl implements IDistributeWorkOrderService { private final IEmInfoClient emInfoClient; private final ISysClient sysClient; diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/SafeInnerDangerClient.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/SafeInnerDangerClient.java new file mode 100644 index 0000000..7d4edb1 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/SafeInnerDangerClient.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.safeproduct.feign; + + +import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; +import com.hnac.hzims.safeproduct.flow.service.IInnerDangerFlowService; +import lombok.AllArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@AllArgsConstructor +public class SafeInnerDangerClient implements ISafeInnerDangerClient { + + private IInnerDangerFlowService service; + + + @PostMapping(SAVE_HIDDENDANGER) + @Override + public R saveDefect(@RequestBody ProcessWorkFlowResponse processWorkFlowResponse) { + return service.listenAndUpdateDefect(processWorkFlowResponse); + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddenDanger/schedule/HiddenDangerPlanSchedule.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddenDanger/schedule/HiddenDangerPlanSchedule.java index 844116b..94c1f56 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddenDanger/schedule/HiddenDangerPlanSchedule.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddenDanger/schedule/HiddenDangerPlanSchedule.java @@ -125,7 +125,8 @@ public class HiddenDangerPlanSchedule { // 已经生成过任务的计划 List existTaskPlanList = hdPlanService.list(Wrappers.lambdaQuery() .eq(HDPlanEntity::getStatus, Constants.PlanStatusEnum.HAVE.getStatus()) - .eq(HDPlanEntity::getNextGenerateTaskTime,LocalDateTime.of(currentDate,LocalTime.MIN)) + .ge(HDPlanEntity::getNextGenerateTaskTime,LocalDateTime.of(currentDate,LocalTime.MIN)) + .le(HDPlanEntity::getNextGenerateTaskTime,LocalDateTime.of(currentDate,LocalTime.MAX)) .eq(HDPlanEntity::getEnable,true) ); if(CollectionUtil.isNotEmpty(existTaskPlanList)) { diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/controller/RiskCheckController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/controller/RiskCheckController.java index 9a1686e..17ae357 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/controller/RiskCheckController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/controller/RiskCheckController.java @@ -58,7 +58,7 @@ public class RiskCheckController extends BladeController { @ApiOperationSupport(order = 2) public R saveOrUpdateBatch(@RequestBody @Valid List req) { List riskCheckList = JSONArray.parseArray(JSON.toJSONString(req), RiskCheckEntity.class); - return R.status(riskCheckService.saveBatch(riskCheckList)); + return R.status(riskCheckService.saveOrUpdateBatch(riskCheckList)); } @DeleteMapping("/delete/{ids}") diff --git a/hzims-service/ticket/src/main/resources/template/电气操作票.docx b/hzims-service/ticket/src/main/resources/template/电气操作票.docx index 2a8cc1b..3872249 100644 Binary files a/hzims-service/ticket/src/main/resources/template/电气操作票.docx and b/hzims-service/ticket/src/main/resources/template/电气操作票.docx differ