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