点击按巡检计划逻辑变更

highway
wws 1 year ago
parent 428e203946
commit e8f155136d

@ -264,6 +264,8 @@ public class EquPlanServiceImpl implements IEquPlanService {
if (equCheckItemList.size() > 0) { if (equCheckItemList.size() > 0) {
List<EquPlanDetail> detailList = new ArrayList<>(); List<EquPlanDetail> detailList = new ArrayList<>();
for (EquCheckItem checkItem : equCheckItemList) { for (EquCheckItem checkItem : equCheckItemList) {
// 只需要循环周期一致的检查项
if(checkItem.getItemLoop() == data.getItemLoop() && checkItem.getItemLoopType().equals(data.getItemLoopType())) {
EquPlanDetail detail = new EquPlanDetail(); EquPlanDetail detail = new EquPlanDetail();
BeanUtils.copyProperties(checkItem,detail); BeanUtils.copyProperties(checkItem,detail);
@ -285,6 +287,7 @@ public class EquPlanServiceImpl implements IEquPlanService {
} }
detailList.add(detail); detailList.add(detail);
} }
}
data.setEquPlanDetailList(detailList); data.setEquPlanDetailList(detailList);
data.setItemTempName(itemTempName.toString()); data.setItemTempName(itemTempName.toString());
}else { }else {

@ -182,6 +182,8 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
if (equCheckItemList.size() > 0) { if (equCheckItemList.size() > 0) {
List<EquPlanDetail> detailList = new ArrayList<>(); List<EquPlanDetail> detailList = new ArrayList<>();
for (EquCheckItem checkItem : equCheckItemList) { for (EquCheckItem checkItem : equCheckItemList) {
// 只需要循环周期一致的检查项
if(checkItem.getItemLoop() == data.getItemLoop() && checkItem.getItemLoopType().equals(data.getItemLoopType())) {
EquPlanDetail detail = new EquPlanDetail(); EquPlanDetail detail = new EquPlanDetail();
BeanUtils.copyProperties(checkItem,detail); BeanUtils.copyProperties(checkItem,detail);
@ -203,6 +205,7 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
} }
detailList.add(detail); detailList.add(detail);
} }
}
data.setEquPlanDetailList(detailList); data.setEquPlanDetailList(detailList);
data.setItemTempName(itemTempName.toString()); data.setItemTempName(itemTempName.toString());
}else { }else {

Loading…
Cancel
Save