Browse Source

#HZ100C修改

zhongwei
yang_shj 1 year ago
parent
commit
87a9a720b6
  1. 6
      hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java
  2. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java
  3. 6
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

6
hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java

@ -70,17 +70,17 @@ public class ParamServiceImpl implements IParamService {
public List<ParamTreeVO> recall(String emCode,String stationCode) { public List<ParamTreeVO> recall(String emCode,String stationCode) {
List<ParamTreeVO> result = Lists.newArrayList(); List<ParamTreeVO> result = Lists.newArrayList();
// 获取设备物模型中是参数的属性 // 获取设备物模型中是参数的属性
Result<List<DeviceInstanceAttrVO>> paramDeviceAttrR = deviceDataClient.getIsParamDeviceAttr(emCode); R<List<DeviceInstanceAttrVO>> paramDeviceAttrR = deviceClient.getOnlineAttr(emCode);
Assert.isTrue(paramDeviceAttrR.isSuccess() && CollectionUtil.isNotEmpty(paramDeviceAttrR.getData()),() -> { Assert.isTrue(paramDeviceAttrR.isSuccess() && CollectionUtil.isNotEmpty(paramDeviceAttrR.getData()),() -> {
throw new ServiceException("获取设备实例物模型属性失败!"); throw new ServiceException("获取设备实例物模型属性失败!");
}); });
// 获取实时数据 // 获取实时数据
List<String> signageList = paramDeviceAttrR.getData().stream().map(DeviceInstanceAttrVO::getSignage).filter(StringUtil::isNotBlank).collect(Collectors.toList()); List<String> signageList = paramDeviceAttrR.getData().stream().filter(o->StringUtil.isNotBlank(o.getSignage()) && StringUtil.isNotBlank(o.getFacDeviceAttrId())).map(DeviceInstanceAttrVO::getSignage).collect(Collectors.toList());
Result<DeviceDataDTO> realDataR = deviceDataClient.getDeviceRealDataByCode(emCode, signageList); Result<DeviceDataDTO> realDataR = deviceDataClient.getDeviceRealDataByCode(emCode, signageList);
Assert.isTrue(realDataR.isSuccess(),() -> { Assert.isTrue(realDataR.isSuccess(),() -> {
throw new ServiceException("参数召回获取实时数据失败"); throw new ServiceException("参数召回获取实时数据失败");
}); });
Map<ParamGroupVO, List<ParamVO>> paramGroupVOListMap = paramDeviceAttrR.getData().stream().map(this::convert).collect(Collectors.groupingBy(p -> { Map<ParamGroupVO, List<ParamVO>> paramGroupVOListMap = paramDeviceAttrR.getData().stream().filter(o->StringUtil.isNotBlank(o.getFacDeviceAttrId())).map(this::convert).collect(Collectors.groupingBy(p -> {
ParamGroupVO paramGroupVO = new ParamGroupVO(); ParamGroupVO paramGroupVO = new ParamGroupVO();
paramGroupVO.setGroupId(String.valueOf(p.getModelClassifyId())); paramGroupVO.setGroupId(String.valueOf(p.getModelClassifyId()));
paramGroupVO.setGroupName(p.getModelClassifyName()); paramGroupVO.setGroupName(p.getModelClassifyName());

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -423,10 +423,10 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
like(ImsDutyRecEntity::getLeftProblem, vo.getLeftProblem()); like(ImsDutyRecEntity::getLeftProblem, vo.getLeftProblem());
} }
if (StringUtil.isNotBlank(vo.getStartDate())) { if (StringUtil.isNotBlank(vo.getStartDate())) {
ge(ImsDutyRecEntity::getAcceptTime, vo.getStartDate()); ge(ImsDutyRecEntity::getExecTime, vo.getStartDate());
} }
if (StringUtil.isNotBlank(vo.getEndDate())) { if (StringUtil.isNotBlank(vo.getEndDate())) {
le(ImsDutyRecEntity::getAcceptTime, vo.getEndDate()); le(ImsDutyRecEntity::getExecTime, vo.getEndDate());
} }
if (ObjectUtil.isNotEmpty(vo.getCreateDept())) { if (ObjectUtil.isNotEmpty(vo.getCreateDept())) {
eq(ImsDutyRecEntity::getCreateDept, vo.getCreateDept()); eq(ImsDutyRecEntity::getCreateDept, vo.getCreateDept());

6
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

@ -252,6 +252,12 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
if (StringUtils.isNotEmpty(req.getFlowTaskName())) { if (StringUtils.isNotEmpty(req.getFlowTaskName())) {
lqw.eq(WorkTicketInfoEntity::getFlowTaskName, req.getFlowTaskName()); lqw.eq(WorkTicketInfoEntity::getFlowTaskName, req.getFlowTaskName());
} }
if (StringUtils.isNotEmpty(req.getStartTime())) {
lqw.ge(WorkTicketInfoEntity::getCreateTime, req.getStartTime());
}
if (StringUtils.isNotEmpty(req.getEndTime())) {
lqw.le(WorkTicketInfoEntity::getCreateTime, req.getEndTime());
}
lqw.orderByDesc(WorkTicketInfoEntity::getCreateTime).orderByDesc(WorkTicketInfoEntity::getUpdateTime); lqw.orderByDesc(WorkTicketInfoEntity::getCreateTime).orderByDesc(WorkTicketInfoEntity::getUpdateTime);
IPage<WorkTicketInfoEntity> pages = this.page(Condition.getPage(query), lqw); IPage<WorkTicketInfoEntity> pages = this.page(Condition.getPage(query), lqw);
//数据转换 //数据转换

Loading…
Cancel
Save