diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanDetail.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanDetail.java index 3dc3daf1..17ad616f 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanDetail.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanDetail.java @@ -82,6 +82,26 @@ public class EquPlanDetail extends BaseEntity { private String itemTools; + private String itemLoopType; + + private int itemLoop; + + public String getItemLoopType() { + return itemLoopType; + } + + public void setItemLoopType(String itemLoopType) { + this.itemLoopType = itemLoopType; + } + + public int getItemLoop() { + return itemLoop; + } + + public void setItemLoop(int itemLoop) { + this.itemLoop = itemLoop; + } + public String getItemTools() { return itemTools; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java index dbc4c85b..99ac57ef 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanEqu.java @@ -66,6 +66,26 @@ public class EquPlanEqu extends BaseEntity { private String spareOnList; + private int itemLoop; + + private String itemLoopType; + + public int getItemLoop() { + return itemLoop; + } + + public void setItemLoop(int itemLoop) { + this.itemLoop = itemLoop; + } + + public String getItemLoopType() { + return itemLoopType; + } + + public void setItemLoopType(String itemLoopType) { + this.itemLoopType = itemLoopType; + } + public String getSpareOnList() { return spareOnList; } diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanStandard.java b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanStandard.java index 37d7bbc0..93be774d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanStandard.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/EquPlanStandard.java @@ -82,6 +82,26 @@ public class EquPlanStandard extends BaseEntity { private String itemTools; + private int itemLoop; + + private String itemLoopType; + + public int getItemLoop() { + return itemLoop; + } + + public void setItemLoop(int itemLoop) { + this.itemLoop = itemLoop; + } + + public String getItemLoopType() { + return itemLoopType; + } + + public void setItemLoopType(String itemLoopType) { + this.itemLoopType = itemLoopType; + } + public String getItemMethod() { return itemMethod; } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java index d72e0b73..cecda23b 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquPlanServiceImpl.java @@ -365,6 +365,8 @@ public class EquPlanServiceImpl implements IEquPlanService { List standardList = equPlanStandardMapper.selectEquPlanStandardListByParentCode(detail.getId()); for (EquPlanStandard standard : standardList) { standard.setShowFlag(true); + standard.setItemLoop(detail.getItemLoop()); + standard.setItemLoopType(detail.getItemLoopType()); } // 置入标准 diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquSpotCheckServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquSpotCheckServiceImpl.java index 869c5b83..7301bc0a 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/EquSpotCheckServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/EquSpotCheckServiceImpl.java @@ -46,26 +46,29 @@ public class EquSpotCheckServiceImpl implements IEquSpotCheckService { if (equCheckItemList.size() > 0) { List detailList = new ArrayList<>(); for (EquCheckItem checkItem : equCheckItemList) { - EquPlanDetail detail = new EquPlanDetail(); - BeanUtils.copyProperties(checkItem,detail); - - if (!detail.getItemCode().isEmpty()) { - itemTempName.append(detail.getItemName()).append(","); - // 获取检查项详情list - List equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode()); - if (equCheckItemList.size() > 0) { - List standardList = new ArrayList<>(); - for (EquCheckItemDetail standardTemp : equCheckItemDetailList) { - EquPlanStandard standard = new EquPlanStandard(); - BeanUtils.copyProperties(standardTemp,standard); - - standard.setShowFlag(true); - standardList.add(standard); + // 只需要循环周期一致的检查项 + if(checkItem.getItemLoop() == data.getItemLoop() && checkItem.getItemLoopType().equals(data.getItemLoopType())) { + EquPlanDetail detail = new EquPlanDetail(); + BeanUtils.copyProperties(checkItem,detail); + + if (!detail.getItemCode().isEmpty()) { + itemTempName.append(detail.getItemName()).append(","); + // 获取检查项详情list + List equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode()); + if (equCheckItemList.size() > 0) { + List standardList = new ArrayList<>(); + for (EquCheckItemDetail standardTemp : equCheckItemDetailList) { + EquPlanStandard standard = new EquPlanStandard(); + BeanUtils.copyProperties(standardTemp,standard); + + standard.setShowFlag(true); + standardList.add(standard); + } + detail.setEquPlanStandardList(standardList); } - detail.setEquPlanStandardList(standardList); } + detailList.add(detail); } - detailList.add(detail); } data.setEquPlanDetailList(detailList); data.setItemTempName(itemTempName.toString()); diff --git a/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml index 27dfd636..e47ea09b 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml @@ -21,7 +21,7 @@