点击按巡检计划逻辑变更

highway
wws 10 months ago
parent 55047b2f71
commit 680ea6bbd6

@ -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;
}

@ -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;
}

@ -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;
}

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

@ -46,26 +46,29 @@ public class EquSpotCheckServiceImpl implements IEquSpotCheckService {
if (equCheckItemList.size() > 0) {
List<EquPlanDetail> 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<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode());
if (equCheckItemList.size() > 0) {
List<EquPlanStandard> 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<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode());
if (equCheckItemList.size() > 0) {
List<EquPlanStandard> 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());

@ -21,7 +21,7 @@
</select>
<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
where be.equipment_code in (select wo.equipment_code
from equ_repair_work_order wo

Loading…
Cancel
Save