|
|
@@ -64,7 +64,7 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
@Override
|
|
|
public List<GxtMonthRuntime> selectGxtMonthRuntimeList(GxtMonthRuntime gxtMonthRuntime)
|
|
|
{
|
|
|
- List<GxtWorkOrder> workOrders = getOrdersByPid(gxtMonthRuntime.getDeptName(),null);
|
|
|
+ List<GxtWorkOrder> workOrders = getOrdersByPid(gxtMonthRuntime.getDeptName(),gxtMonthRuntime.getStationName(),null, null);
|
|
|
List<GxtMonthRuntime> result = new ArrayList<>();
|
|
|
if (!workOrders.isEmpty()) {
|
|
|
GxtSafeOperationReward safeOperationReward = new GxtSafeOperationReward();
|
|
|
@@ -91,7 +91,7 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
String runtimeRange = "≥" + fromDays + "天";
|
|
|
if (!result.isEmpty()) {
|
|
|
for (GxtMonthRuntime runtime:result) {
|
|
|
- if (Objects.equals(runtime.getDeptId(), workOrder.getPcsStationPid()) && runtime.getRuntimeRange().equals(runtimeRange)) {
|
|
|
+ if (Objects.equals(runtime.getStationId(), workOrder.getPcsStationId()) && runtime.getRuntimeRange().equals(runtimeRange)) {
|
|
|
isAdd = false;
|
|
|
runtime.setStopNum(runtime.getStopNum()+1);
|
|
|
break;
|
|
|
@@ -102,6 +102,8 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
GxtMonthRuntime addRuntime = new GxtMonthRuntime();
|
|
|
addRuntime.setDeptName(workOrder.getDeptName());
|
|
|
addRuntime.setDeptId(workOrder.getPcsStationPid());
|
|
|
+ addRuntime.setStationId(workOrder.getPcsStationId());
|
|
|
+ addRuntime.setStationName(workOrder.getPcsStationName());
|
|
|
addRuntime.setFromDays(fromDays);
|
|
|
addRuntime.setToDays(toDays);
|
|
|
addRuntime.setRuntimeRange(runtimeRange);
|
|
|
@@ -116,7 +118,7 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
String runtimeRange = "≥" + fromDays + "天";
|
|
|
if (!result.isEmpty()) {
|
|
|
for (GxtMonthRuntime runtime:result) {
|
|
|
- if (Objects.equals(runtime.getDeptId(), workOrder.getPcsStationPid()) && runtime.getRuntimeRange().equals(runtimeRange)) {
|
|
|
+ if (Objects.equals(runtime.getStationId(), workOrder.getPcsStationId()) && runtime.getRuntimeRange().equals(runtimeRange)) {
|
|
|
isAdd = false;
|
|
|
runtime.setRunningNum(runtime.getRunningNum()+1);
|
|
|
break;
|
|
|
@@ -127,6 +129,8 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
GxtMonthRuntime addRuntime = new GxtMonthRuntime();
|
|
|
addRuntime.setDeptName(workOrder.getDeptName());
|
|
|
addRuntime.setDeptId(workOrder.getPcsStationPid());
|
|
|
+ addRuntime.setStationId(workOrder.getPcsStationId());
|
|
|
+ addRuntime.setStationName(workOrder.getPcsStationName());
|
|
|
addRuntime.setFromDays(fromDays);
|
|
|
addRuntime.setToDays(toDays);
|
|
|
addRuntime.setRuntimeRange(runtimeRange);
|
|
|
@@ -152,14 +156,18 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public List<GxtWorkOrder> getOrdersByPid(String searchName,Long pid) {
|
|
|
+ public List<GxtWorkOrder> getOrdersByPid(String deptName, String stationName,Long pid, Long stationId) {
|
|
|
GxtWorkOrder searchOrder = new GxtWorkOrder();
|
|
|
searchOrder.setPcsStationPid(pid);
|
|
|
- searchOrder.setDeptName(searchName);
|
|
|
+ searchOrder.setPcsStationId(stationId);
|
|
|
+ searchOrder.setDeptName(deptName);
|
|
|
+ searchOrder.setPcsStationName(stationName);
|
|
|
addBusinessDataScopeFilter(searchOrder);
|
|
|
GxtWorkOrder searchRepairOrder = new GxtWorkOrder();
|
|
|
searchRepairOrder.setPcsStationPid(pid);
|
|
|
- searchRepairOrder.setDeptName(searchName);
|
|
|
+ searchRepairOrder.setPcsStationId(stationId);
|
|
|
+ searchRepairOrder.setDeptName(deptName);
|
|
|
+ searchRepairOrder.setPcsStationName(stationName);
|
|
|
addBusinessDataScopeFilterRepair(searchRepairOrder);
|
|
|
List<GxtWorkOrder> workOrders = new ArrayList<>();
|
|
|
List<GxtWorkOrder> workOrderList = gxtWorkOrderMapper.selectGxtWorkOrderRunningDaysInfo(searchOrder);
|
|
|
@@ -206,8 +214,8 @@ public class GxtMonthRuntimeServiceImpl implements IGxtMonthRuntimeService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<GxtWorkOrder> getOrders(Long pid,Integer fromDays,Integer toDays,boolean isStop) {
|
|
|
- List<GxtWorkOrder> workOrders = getOrdersByPid(null,pid);
|
|
|
+ public List<GxtWorkOrder> getOrders(Long pid, Long stationId,Integer fromDays,Integer toDays,boolean isStop) {
|
|
|
+ List<GxtWorkOrder> workOrders = getOrdersByPid(null, null, pid, stationId);
|
|
|
List<GxtWorkOrder> result = new ArrayList<>();
|
|
|
if (!workOrders.isEmpty()) {
|
|
|
for (GxtWorkOrder order:workOrders) {
|