|
|
|
|
@ -21,6 +21,7 @@ import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.lims.entry.*; |
|
|
|
|
import org.springblade.lims.mapper.InspectionTaskMapper; |
|
|
|
|
import org.springblade.lims.service.*; |
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
@ -43,6 +44,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
private final IInspectionPointService inspectionPointService; |
|
|
|
|
private final IInspectionRecordService inspectionRecordService; |
|
|
|
|
private final IInspectionTaskAbnormalService inspectionTaskAbnormalService; |
|
|
|
|
private final ISysClient sysClient; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<InspectionTask> findPage(InspectionTask entry, Query query) { |
|
|
|
|
@ -119,6 +121,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
entry.setCreateUser(AuthUtil.getUserId()); |
|
|
|
|
entry.setCreateTime(date); |
|
|
|
|
entry.setOriginatorId(AuthUtil.getUserId().toString()); |
|
|
|
|
if(entry.getCreateDept() == null){ |
|
|
|
|
entry.setCreateDept(Long.parseLong(AuthUtil.getDeptId())); |
|
|
|
|
} |
|
|
|
|
baseMapper.insert(entry); |
|
|
|
|
}else{ |
|
|
|
|
entry.setUpdateUser(AuthUtil.getUserId()); |
|
|
|
|
@ -129,8 +134,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public InspectionTask findById(String id) { |
|
|
|
|
InspectionTask entry = this.getById(id); |
|
|
|
|
public InspectionTask findById(String id) {InspectionTask entry = this.getById(id); |
|
|
|
|
if(StringUtils.isNotEmpty(entry.getGroupId())){ |
|
|
|
|
entry.setGroupName(sysClient.getDeptName(Long.parseLong(entry.getGroupId())).getData()); |
|
|
|
|
} |
|
|
|
|
//查询巡检点位
|
|
|
|
|
List<InspectionTaskPoint> taskPointList = inspectionTaskPointService.list(new LambdaQueryWrapper<InspectionTaskPoint>().eq(InspectionTaskPoint::getTaskId,id)); |
|
|
|
|
entry.setTaskPointList(taskPointList); |
|
|
|
|
@ -189,6 +196,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
task.setUpdateTime(new Date()); |
|
|
|
|
task.setUpdateUser(AuthUtil.getUserId()); |
|
|
|
|
task.setExecutorId(AuthUtil.getUserName()); |
|
|
|
|
task.setActFinishTime(new Date()); |
|
|
|
|
this.updateById(task); |
|
|
|
|
//异常巡检点
|
|
|
|
|
if(insertAbnormal){ |
|
|
|
|
|