|
|
@ -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());
|
|
|
|