|
|
@ -113,7 +113,13 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@DS("#header.poolName")
|
|
|
|
@DS("#header.poolName")
|
|
|
|
public AjaxResult formatEquItem(List<EquPlanEqu> equPlanEquList) {
|
|
|
|
public AjaxResult formatEquItem(List<EquPlanEqu> equPlanEquList) {
|
|
|
|
return formatEquItemCommon(equPlanEquList, "maintenance", "存在设备未设置保养项!");
|
|
|
|
return formatEquItemCommon(equPlanEquList, "maintenance", "存在设备未设置保养项!",true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public AjaxResult formatEquItemNoCondition(List<EquPlanEqu> equPlanEquList) {
|
|
|
|
|
|
|
|
return formatEquItemCommon(equPlanEquList, "maintenance", "存在设备未设置保养项!",false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -124,7 +130,7 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
|
|
|
|
* @param message
|
|
|
|
* @param message
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private AjaxResult formatEquItemCommon(List<EquPlanEqu> equPlanEquList, String planType, String message) {
|
|
|
|
private AjaxResult formatEquItemCommon(List<EquPlanEqu> equPlanEquList, String planType, String message,Boolean check) {
|
|
|
|
for (EquPlanEqu data : equPlanEquList) {
|
|
|
|
for (EquPlanEqu data : equPlanEquList) {
|
|
|
|
|
|
|
|
|
|
|
|
// 检查项名称临时对象
|
|
|
|
// 检查项名称临时对象
|
|
|
@ -139,7 +145,33 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
|
|
|
|
// 处理检查项信息
|
|
|
|
// 处理检查项信息
|
|
|
|
for (EquCheckItem checkItem : equCheckItemList) {
|
|
|
|
for (EquCheckItem checkItem : equCheckItemList) {
|
|
|
|
// 获取循环周期一致的检查项
|
|
|
|
// 获取循环周期一致的检查项
|
|
|
|
if (checkItem.getItemLoop() == data.getItemLoop() && checkItem.getItemLoopType().equals(data.getItemLoopType())) {
|
|
|
|
if (checkItem.getItemLoop() == data.getItemLoop() && checkItem.getItemLoopType().equals(data.getItemLoopType()) && check) {
|
|
|
|
|
|
|
|
// 创建检查项返回对象
|
|
|
|
|
|
|
|
EquPlanDetail detail = new EquPlanDetail();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(checkItem, detail);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!detail.getItemCode().isEmpty()) {
|
|
|
|
|
|
|
|
// 累加检查项名称(前端信息回显)
|
|
|
|
|
|
|
|
itemTempName.append(detail.getItemName()).append(",");
|
|
|
|
|
|
|
|
// 通过检查项code获取标准信息列表
|
|
|
|
|
|
|
|
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);// 标准列表信息置入检查项
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
detailList.add(detail);// 返回对象添加到返回列表对象
|
|
|
|
|
|
|
|
}else {
|
|
|
|
// 创建检查项返回对象
|
|
|
|
// 创建检查项返回对象
|
|
|
|
EquPlanDetail detail = new EquPlanDetail();
|
|
|
|
EquPlanDetail detail = new EquPlanDetail();
|
|
|
|
BeanUtils.copyProperties(checkItem, detail);
|
|
|
|
BeanUtils.copyProperties(checkItem, detail);
|
|
|
|