Browse Source

fix: 工作票站点机构筛选

zhongwei
haungxing 4 months ago
parent
commit
804ad760c8
  1. 14
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/RealTimeDataServerImpl.java
  2. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/dto/WorkTicketInfoDto.java
  3. 13
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

14
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/RealTimeDataServerImpl.java

@ -39,18 +39,18 @@ public class RealTimeDataServerImpl implements RealTimeDataServer {
@Override
public R<List<FieldsData>> getData(RealDataSearchPO po) {
R<List<FieldsData>> res = analyseDataSearchClient.getRealDataByAnalyzeCode(po);
String msg = res.getMsg();
if ("操作成功".equals(msg)) {
if(res.isSuccess()) {
R<List<FieldsData>> realDataResult = analyseDataSearchClient.getRealDataByAnalyzeCode(po);
List<FieldsData> data = Lists.newArrayList();
if(realDataResult.isSuccess()) {
data.addAll(realDataResult.getData());
return R.data(realDataResult.getData());
}
else {
return R.data(Lists.newArrayList());
}
if (CollectionUtil.isNotEmpty(data)) {
return R.data(data);
}
else {
return R.data(Lists.newArrayList());
}
return R.fail(msg);
}
@Override

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/dto/WorkTicketInfoDto.java

@ -64,4 +64,7 @@ public class WorkTicketInfoDto extends WorkTicketInfoEntity implements Serializa
@ApiModelProperty("创建人")
private String createUserName;
@ApiModelProperty("站点机构ID")
private Long stationDeptId;
}

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

@ -62,6 +62,9 @@ import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.flow.core.vo.ComleteTask;
import org.springblade.system.cache.DictCache;
import org.springblade.system.entity.Dept;
import org.springblade.system.feign.IDeptClient;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient;
@ -114,6 +117,7 @@ public class WorkTicketInfoServiceImpl extends ServiceImpl<WorkTicketInfoMapper,
private final WorkTicketFinishServiceImpl workTicketFinishService;
private final TicketInfoDangerService ticketInfoDangerService;
private final IEmInfoClient emInfoClient;
private final ISysClient sysClient;
/**
* 生成两票编号锁
@ -264,6 +268,15 @@ public class WorkTicketInfoServiceImpl extends ServiceImpl<WorkTicketInfoMapper,
if (StringUtils.isNotEmpty(req.getEndTime())) {
lqw.le(WorkTicketInfoEntity::getCreateTime, req.getEndTime());
}
if (Func.isNotEmpty(req.getStationDeptId())) {
R<Dept> deptR = sysClient.getDept(req.getStationDeptId());
if(deptR.isSuccess() && Func.isNotEmpty(deptR.getData()) && Func.isNotEmpty(deptR.getData().getStationId())) {
lqw.eq(WorkTicketInfoEntity::getSignage,deptR.getData().getStationId());
}
else {
lqw.eq(WorkTicketInfoEntity::getCreateDept,req.getStationDeptId());
}
}
lqw.orderByDesc(WorkTicketInfoEntity::getCreateTime).orderByDesc(WorkTicketInfoEntity::getUpdateTime);
IPage<WorkTicketInfoEntity> pages = this.page(Condition.getPage(query), lqw);
//数据转换

Loading…
Cancel
Save