Merge remote-tracking branch 'origin/master'

master
zhaoxiaolin 2 months ago
commit bdb7dc69c0

@ -1,5 +1,6 @@
package com.op.device.controller; package com.op.device.controller;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.*; import com.op.device.domain.*;
import com.op.device.service.IDeviceInterfaceService; import com.op.device.service.IDeviceInterfaceService;
@ -27,7 +28,8 @@ public class DeviceInterfaceController {
* @return * @return
*/ */
@GetMapping("/getRepairWorkOrder") @GetMapping("/getRepairWorkOrder")
public AjaxResult getRepairWorkOrder() { public AjaxResult getRepairWorkOrder(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getRepairWorkOrder(); return deviceInterfaceService.getRepairWorkOrder();
} }
@ -38,6 +40,7 @@ public class DeviceInterfaceController {
*/ */
@GetMapping("/getEquipmentInfo") @GetMapping("/getEquipmentInfo")
public AjaxResult getEquipmentInfo(EquOperation equOperation) { public AjaxResult getEquipmentInfo(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getEquipmentInfo(equOperation); return deviceInterfaceService.getEquipmentInfo(equOperation);
} }
@ -48,6 +51,7 @@ public class DeviceInterfaceController {
*/ */
@GetMapping("/getRepairQuantity") @GetMapping("/getRepairQuantity")
public AjaxResult getRepairQuantity(EquOperation equOperation) { public AjaxResult getRepairQuantity(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getRepairQuantity(equOperation); return deviceInterfaceService.getRepairQuantity(equOperation);
} }
@ -59,6 +63,7 @@ public class DeviceInterfaceController {
*/ */
@GetMapping("/equipmentStability") @GetMapping("/equipmentStability")
public AjaxResult getEquipmentStabilityList(EquOperation equOperation) { public AjaxResult getEquipmentStabilityList(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getEquipmentStabilityList(equOperation); return deviceInterfaceService.getEquipmentStabilityList(equOperation);
} }
@ -70,6 +75,7 @@ public class DeviceInterfaceController {
*/ */
@GetMapping("/equipmentIntactRate") @GetMapping("/equipmentIntactRate")
public AjaxResult getEquipmentIntactRate(EquOperation equOperation) { public AjaxResult getEquipmentIntactRate(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getEquipmentIntactRate(equOperation); return deviceInterfaceService.getEquipmentIntactRate(equOperation);
} }
@ -79,6 +85,7 @@ public class DeviceInterfaceController {
*/ */
@GetMapping("/getDeviceRefreshTime") @GetMapping("/getDeviceRefreshTime")
public AjaxResult getDeviceRefreshTime(EquOperation equOperation) { public AjaxResult getDeviceRefreshTime(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getDeviceRefreshTime(equOperation); return deviceInterfaceService.getDeviceRefreshTime(equOperation);
} }

@ -190,6 +190,8 @@ public class EquOperation extends BaseEntity {
//设备看板维修质量 mttr //设备看板维修质量 mttr
private String mttr; private String mttr;
private String poolName;
public String getCreateTimeStart() { public String getCreateTimeStart() {
return createTimeStart; return createTimeStart;
} }
@ -497,6 +499,14 @@ public class EquOperation extends BaseEntity {
return mttr; return mttr;
} }
public void setPoolName(String poolName) {
this.poolName = poolName;
}
public String getPoolName() {
return poolName;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -34,11 +34,12 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
* @return * @return
*/ */
@Override @Override
@DS("#header.poolName") // @DS("#header.poolName")
public AjaxResult getRepairWorkOrder() { public AjaxResult getRepairWorkOrder() {
List<IRepairWorkOrderVO> workOrderVOList = deviceInterfaceMapper.selectEquRepairWorkOrderList(); List<IRepairWorkOrderVO> workOrderVOList = deviceInterfaceMapper.selectEquRepairWorkOrderList();
if(workOrderVOList != null){ if(workOrderVOList != null){
for (IRepairWorkOrderVO orderVO : workOrderVOList) { for (IRepairWorkOrderVO orderVO : workOrderVOList) {
if(orderVO != null){
if(orderVO.getWorkHandle() != null){ if(orderVO.getWorkHandle() != null){
if (orderVO.getWorkHandle().equals("0")) { if (orderVO.getWorkHandle().equals("0")) {
orderVO.setWorkHandle("立即"); orderVO.setWorkHandle("立即");
@ -48,6 +49,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
} }
} }
} }
}
return success(workOrderVOList); return success(workOrderVOList);
} }
@ -61,7 +63,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
* @return * @return
*/ */
@Override @Override
@DS("#header.poolName") // @DS("#header.poolName")
public AjaxResult getEquipmentInfo(EquOperation equOperation) { public AjaxResult getEquipmentInfo(EquOperation equOperation) {
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){ if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
//默认时间 //默认时间
@ -81,7 +83,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
* @return * @return
*/ */
@Override @Override
@DS("#header.poolName") // @DS("#header.poolName")
public AjaxResult getRepairQuantity(EquOperation equOperation) { public AjaxResult getRepairQuantity(EquOperation equOperation) {
equOperation.setCreateTime(DateUtils.getNowDate()); equOperation.setCreateTime(DateUtils.getNowDate());
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){ if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
@ -101,7 +103,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
* *
*/ */
@Override @Override
@DS("#header.poolName") // @DS("#header.poolName")
public AjaxResult getEquipmentStabilityList(EquOperation equOperation) { public AjaxResult getEquipmentStabilityList(EquOperation equOperation) {
equOperation.setCreateTime(DateUtils.getNowDate()); equOperation.setCreateTime(DateUtils.getNowDate());
if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){ if((equOperation.getStartTime() == null) && (equOperation.getEndTime() == null)){
@ -119,7 +121,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
* *
*/ */
@Override @Override
@DS("#header.poolName") // @DS("#header.poolName")
public AjaxResult getEquipmentIntactRate(EquOperation equOperation) { public AjaxResult getEquipmentIntactRate(EquOperation equOperation) {
//查询所有设备(设备停用的除外) //查询所有设备(设备停用的除外)
equOperation.setCreateTime(DateUtils.getNowDate()); equOperation.setCreateTime(DateUtils.getNowDate());

Loading…
Cancel
Save