点击按巡检计划逻辑变更

highway
wws 12 months ago
parent 55047b2f71
commit 680ea6bbd6

@ -82,6 +82,26 @@ public class EquPlanDetail extends BaseEntity {
private String itemTools; 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() { public String getItemTools() {
return itemTools; return itemTools;
} }

@ -66,6 +66,26 @@ public class EquPlanEqu extends BaseEntity {
private String spareOnList; 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() { public String getSpareOnList() {
return spareOnList; return spareOnList;
} }

@ -82,6 +82,26 @@ public class EquPlanStandard extends BaseEntity {
private String itemTools; 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() { public String getItemMethod() {
return itemMethod; return itemMethod;
} }

@ -365,6 +365,8 @@ public class EquPlanServiceImpl implements IEquPlanService {
List<EquPlanStandard> standardList = equPlanStandardMapper.selectEquPlanStandardListByParentCode(detail.getId()); List<EquPlanStandard> standardList = equPlanStandardMapper.selectEquPlanStandardListByParentCode(detail.getId());
for (EquPlanStandard standard : standardList) { for (EquPlanStandard standard : standardList) {
standard.setShowFlag(true); standard.setShowFlag(true);
standard.setItemLoop(detail.getItemLoop());
standard.setItemLoopType(detail.getItemLoopType());
} }
// 置入标准 // 置入标准

@ -46,26 +46,29 @@ public class EquSpotCheckServiceImpl implements IEquSpotCheckService {
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) {
EquPlanDetail detail = new EquPlanDetail(); // 只需要循环周期一致的检查项
BeanUtils.copyProperties(checkItem,detail); if(checkItem.getItemLoop() == data.getItemLoop() && checkItem.getItemLoopType().equals(data.getItemLoopType())) {
EquPlanDetail detail = new EquPlanDetail();
if (!detail.getItemCode().isEmpty()) { BeanUtils.copyProperties(checkItem,detail);
itemTempName.append(detail.getItemName()).append(",");
// 获取检查项详情list if (!detail.getItemCode().isEmpty()) {
List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode()); itemTempName.append(detail.getItemName()).append(",");
if (equCheckItemList.size() > 0) { // 获取检查项详情list
List<EquPlanStandard> standardList = new ArrayList<>(); List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode());
for (EquCheckItemDetail standardTemp : equCheckItemDetailList) { if (equCheckItemList.size() > 0) {
EquPlanStandard standard = new EquPlanStandard(); List<EquPlanStandard> standardList = new ArrayList<>();
BeanUtils.copyProperties(standardTemp,standard); for (EquCheckItemDetail standardTemp : equCheckItemDetailList) {
EquPlanStandard standard = new EquPlanStandard();
standard.setShowFlag(true); BeanUtils.copyProperties(standardTemp,standard);
standardList.add(standard);
standard.setShowFlag(true);
standardList.add(standard);
}
detail.setEquPlanStandardList(standardList);
} }
detail.setEquPlanStandardList(standardList);
} }
detailList.add(detail);
} }
detailList.add(detail);
} }
data.setEquPlanDetailList(detailList); data.setEquPlanDetailList(detailList);
data.setItemTempName(itemTempName.toString()); data.setItemTempName(itemTempName.toString());

@ -21,7 +21,7 @@
</select> </select>
<select id="selectEquipmentList" resultType="com.op.device.domain.vo.IEquipmentVO"> <select id="selectEquipmentList" resultType="com.op.device.domain.vo.IEquipmentVO">
select be.equipment_code AS 'equipmentCode', be.equipment_name AS 'equipmentName' select be.equipment_code AS 'equipmentCode', be.equipment_name AS 'equipmentName',be.equipment_status AS 'equipmentStatus'
from base_equipment be from base_equipment be
where be.equipment_code in (select wo.equipment_code where be.equipment_code in (select wo.equipment_code
from equ_repair_work_order wo from equ_repair_work_order wo

Loading…
Cancel
Save