|
|
|
@ -111,48 +111,48 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public AjaxResult getTodayTask(PDADTO pdadto) {
|
|
|
|
|
List<EquOrder> orderList = equOrderMapper.selectTodayTask(pdadto);
|
|
|
|
|
List<EquOrder> handleList = new ArrayList<>();
|
|
|
|
|
long nowTime = DateUtils.getNowDate().getTime();
|
|
|
|
|
long dayMs = 86400000l;
|
|
|
|
|
long hourMs = 1000 * 60 * 60;
|
|
|
|
|
if (orderList != null) {
|
|
|
|
|
for (EquOrder order : orderList) {
|
|
|
|
|
long diff = nowTime - order.getCreateTime().getTime();
|
|
|
|
|
switch (order.getPlanLoopType()) {
|
|
|
|
|
case "hour":
|
|
|
|
|
if (diff < 1000 * 60 * 60 * Long.valueOf(order.getPlanLoop())) {
|
|
|
|
|
handleList.add(order);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "day":
|
|
|
|
|
if (diff < (dayMs * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
handleList.add(order);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "week":
|
|
|
|
|
if (diff < (dayMs * 7 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
handleList.add(order);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "month":
|
|
|
|
|
if (diff < (dayMs * 30 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
handleList.add(order);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "season":
|
|
|
|
|
if (diff < (dayMs * 30 * 3 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
handleList.add(order);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "year":
|
|
|
|
|
if (diff < (dayMs * 365 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
handleList.add(order);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success(handleList);
|
|
|
|
|
// List<EquOrder> handleList = new ArrayList<>();
|
|
|
|
|
// long nowTime = DateUtils.getNowDate().getTime();
|
|
|
|
|
// long dayMs = 86400000l;
|
|
|
|
|
// long hourMs = 1000 * 60 * 60;
|
|
|
|
|
// if (orderList != null) {
|
|
|
|
|
// for (EquOrder order : orderList) {
|
|
|
|
|
// long diff = nowTime - order.getCreateTime().getTime();
|
|
|
|
|
// switch (order.getPlanLoopType()) {
|
|
|
|
|
// case "hour":
|
|
|
|
|
// if (diff < 1000 * 60 * 60 * Long.valueOf(order.getPlanLoop())) {
|
|
|
|
|
// handleList.add(order);
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case "day":
|
|
|
|
|
// if (diff < (dayMs * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
// handleList.add(order);
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case "week":
|
|
|
|
|
// if (diff < (dayMs * 7 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
// handleList.add(order);
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case "month":
|
|
|
|
|
// if (diff < (dayMs * 30 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
// handleList.add(order);
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case "season":
|
|
|
|
|
// if (diff < (dayMs * 30 * 3 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
// handleList.add(order);
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case "year":
|
|
|
|
|
// if (diff < (dayMs * 365 * Long.valueOf(order.getPlanLoop()))) {
|
|
|
|
|
// handleList.add(order);
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
return success(orderList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1211,4 +1211,17 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
List<EquFaultReason> list = equFaultReasonMapper.selectEquFaultReasonList(equFaultReason);
|
|
|
|
|
return success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询备品备件
|
|
|
|
|
*
|
|
|
|
|
* @param
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public AjaxResult selectSpareDetailBySpareCode(String spareCode) {
|
|
|
|
|
SparePartsLedger list = sparePartsLedgerMapper.selectSpareDetailBySpareCode(spareCode);
|
|
|
|
|
return success(list);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|