Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 9 months ago
parent
commit
eb1613d46e
  1. 16
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/ai/entity/RobotEntity.java
  2. 10
      hzims-service-api/middle-api/src/main/java/com/hnac/hzims/middle/process/constant/TicketProcessConstant.java
  3. 31
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClient.java
  4. 21
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/feign/ISafeInnerDangerClientFallback.java
  5. 52
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HazardRiskServiceImpl.java
  6. 65
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/HiddenDangerFlowServiceImpl.java
  7. 23
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java
  8. 35
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/dto/robot/RobotInstanceDTO.java
  9. 19
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/IRobotService.java
  10. 79
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java
  11. 45
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotRealDataVO.java
  12. 11
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/constants/ParamConstants.java
  13. 5
      hzims-service/inspect/src/main/resources/db/2.0.0.sql.1
  14. 51
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java
  15. 52
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java
  16. 35
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java
  17. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/controller/DistributeWorkOrderController.java
  18. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/GrabPackageDTO.java
  19. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderContentDTO.java
  20. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/InspectionOrderDTO.java
  21. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderContentDTO.java
  22. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/MaintOrderDTO.java
  23. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OrderPackageDto.java
  24. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/OtherOrderDTO.java
  25. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/Publisher.java
  26. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderAcptDto.java
  27. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderContentDTO.java
  28. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/RepairOrderPrognosisDTO.java
  29. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/dto/TenderDto.java
  30. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/IDistributeWorkOrderService.java
  31. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/workOrder/service/impl/DistributeWorkOrderServiceImpl.java
  32. 25
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/feign/SafeInnerDangerClient.java
  33. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddenDanger/schedule/HiddenDangerPlanSchedule.java
  34. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/controller/RiskCheckController.java
  35. BIN
      hzims-service/ticket/src/main/resources/template/电气操作票.docx

16
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;
/**
* 描述信息
*/

10
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";
}

31
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);
}

21
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;
}
}

52
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("检修任务业务执行异常!");
}
}
}

65
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("隐患排查流程失败");
}
}
}

23
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<List<RobotRealDataVO>> getRealDataByRobotCode(@RequestParam @ApiParam(value = "机器人编号", required = true) String robotCode) {
return R.data(st_robotService.getRealDataByRobotCode(robotCode));
}
}

35
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;
}

19
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<RobotEntity> {
*/
RobotVO getDetailByUserId(Long userId);
/**
* 生成机器人设备实例
* @param device 机器人设备实例DTO
* @return 生成结果
*/
Boolean generateDeviceInstance(RobotInstanceDTO device);
/**
* 获取机器人各项属性实时数据
* @param robotCode 机器人编号
* @return 实时数据
*/
List<RobotRealDataVO> getRealDataByRobotCode(String robotCode);
}

79
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<RobotMapper, RobotEntity> 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<RobotMapper, RobotEntity>
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<Long> saveResult = deviceClient.saveVirtualDevice(req);
Assert.isTrue(saveResult.isSuccess(),() -> {
throw new ServiceException("生成设备实例失败,报错信息为:" + saveResult.getMsg());
});
LambdaUpdateWrapper<RobotEntity> luw = Wrappers.<RobotEntity>lambdaUpdate()
.set(RobotEntity::getIsDeviceInstance, true)
.eq(RobotEntity::getCode, device.getDeviceCode());
return this.update(luw);
}
}
@Override
public List<RobotRealDataVO> getRealDataByRobotCode(String robotCode) {
Result<List<DeviceInstanceAttrVO>> 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<List<List<Map<String, RealDataRedisVO>>>> realDataResult = deviceDataClient.getDeviceRealDataByCodes(Lists.newArrayList(po));
Assert.isTrue(realDataResult.isSuccess(),() -> {
throw new ServiceException("获取设备实例实时数据失败!");
});
List<RobotRealDataVO> 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;
}
}

45
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;
}

11
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";
}

5
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 '设备编号';
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 '是否绑定设备实例';

51
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 = "执行问题处理流程")

52
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<OperDefectStatisticsEntity> queryWrapper = statisticsService.getQueryWrapper(entity);
List<OperDefectStatisticsEntity> list = statisticsService.list(queryWrapper);
long timeMillis1 =System.currentTimeMillis()- timeMillis;
System.out.println("查询对应实例类耗时============================"+ timeMillis1);
List<OperDefectStatisticsExportVO> 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
*/

35
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<IPage<OperAppearanceEntity>> list(OperAppearanceVO phenomenon, Query query) {
LambdaQueryWrapper<OperAppearanceEntity> queryWrapper = operAppearanceService.getQueryWrapper(phenomenon);
IPage<OperAppearanceEntity> pages = operAppearanceService.page(Condition.getPage(query), queryWrapper);
// IPage<OperPhenomenonVO> 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<Void> handleCheckProcess(@RequestBody @ObjectRequiredInvalid(attributes = {"taskId", "processInstanceId", "comment", "flag",
"variables.pass"}, message = "参数不能为空") BladeFlow flow) {
//@DictInvalid(dictKey = "")
return R.status(phenomenonService.handleCheckProcess(flow));
}

2
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无用20240308wxq
*/
@RestController
@AllArgsConstructor
@Slf4j
@RequestMapping("/token/distribute/workOrder")
@Api(value = "派发工单",tags = "派发工单")
@Deprecated
public class DistributeWorkOrderController {
private final IDistributeWorkOrderService distributeWorkOrderService;

1
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("水厂名称")

2
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 {
}

1
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;

1
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;

1
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;

1
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;

1
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;

1
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;

1
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;

1
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;

1
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;

1
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;

2
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 {
/**
* 派发检修任务

1
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;

25
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);
}
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddenDanger/schedule/HiddenDangerPlanSchedule.java

@ -125,7 +125,8 @@ public class HiddenDangerPlanSchedule {
// 已经生成过任务的计划
List<HDPlanEntity> existTaskPlanList = hdPlanService.list(Wrappers.<HDPlanEntity>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)) {

2
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<RiskCheckDTO> req) {
List<RiskCheckEntity> riskCheckList = JSONArray.parseArray(JSON.toJSONString(req), RiskCheckEntity.class);
return R.status(riskCheckService.saveBatch(riskCheckList));
return R.status(riskCheckService.saveOrUpdateBatch(riskCheckList));
}
@DeleteMapping("/delete/{ids}")

BIN
hzims-service/ticket/src/main/resources/template/电气操作票.docx

Binary file not shown.
Loading…
Cancel
Save