判断设备是否需要点检

master
zpl 3 years ago
parent 951b6df3ff
commit 9d653a1a66

@ -10,6 +10,7 @@ import com.foreverwin.mesnac.common.service.InspectionItemService;
import com.foreverwin.mesnac.equip.mapper.ResourceInspectTaskMapper;
import com.foreverwin.mesnac.equip.model.*;
import com.foreverwin.mesnac.equip.service.*;
import com.foreverwin.mesnac.meapi.mapper.ResrceMapper;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import com.foreverwin.mesnac.meapi.service.UserGroupService;
import com.foreverwin.modular.core.exception.BusinessException;
@ -59,6 +60,8 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
public ResourceInspectTaskParamService resourceInspectTaskParamService;
@Autowired
public ResourceInspectTaskMapper resourceInspectTaskMapper;
@Autowired
public ResrceMapper resrceMapper;
@Override
public IPage<ResourceInspectPlan> selectPage(FrontPage<ResourceInspectPlan> frontPage, ResourceInspectPlan resourceInspectPlan) {
@ -274,6 +277,11 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
continue;
}
String resourceNo = equip.getResourceNo();
// 设备是否点检
String inspectByResrce = resrceMapper.isInspectByResrce(site, resourceNo);
if (inspectByResrce != null && inspectByResrce.equals("N")){
continue;
}
/**
* handle
* bug
@ -401,7 +409,11 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
if (newInspectTask.getTaskCreateDate().isAfter(indateEnd)){
return;
}
// 设备s是否点检
String inspectByResrce = resrceMapper.isInspectByResrce(site, resrce);
if (inspectByResrce != null && inspectByResrce.equals("N")){
return;
}
ResourceInspectTask inspectTask = setResourceInspectTask(inspectPlan, newInspectTask, -1);
List<String> nextNumber = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_INSPECT_TASK, 1);
inspectTask.setTaskNo(nextNumber.get(0));

Loading…
Cancel
Save