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