|
|
|
@ -14,10 +14,7 @@ import com.zdxt.enforcementnos.common.PageParam; |
|
|
|
import com.zdxt.enforcementnos.common.commonenum.*; |
|
|
|
import com.zdxt.enforcementnos.domain.*; |
|
|
|
import com.zdxt.enforcementnos.domain.bo.*; |
|
|
|
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementCommentTaskPageVO; |
|
|
|
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskByCommentStatusPageVO; |
|
|
|
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskDetailVO; |
|
|
|
import com.zdxt.enforcementnos.domain.vo.NosLawEnforcementTaskPageVO; |
|
|
|
import com.zdxt.enforcementnos.domain.vo.*; |
|
|
|
import com.zdxt.enforcementnos.mapper.NosLawEnforcementTaskMapper; |
|
|
|
import com.zdxt.enforcementnos.service.*; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
@ -60,6 +57,9 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem |
|
|
|
@Resource |
|
|
|
private NosLawEnforcementCommentMsgService commentMsgService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private NosLawEnforcementTaskDigitalVoiceLoggingRelationService taskDigitalVoiceLoggingRelationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -299,6 +299,20 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 查询云笔录详情
|
|
|
|
if(DigitalVoiceLoggingStatusEnum.WAITING_CONFIRM.getCode() |
|
|
|
.equals(task.getDigitalVoiceLoggingStatus()) || |
|
|
|
DigitalVoiceLoggingStatusEnum.COMPLETED.getCode().equals(task.getDigitalVoiceLoggingStatus())) { |
|
|
|
LambdaQueryWrapper<NosLawEnforcementTaskDigitalVoiceLoggingRelation> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.eq(NosLawEnforcementTaskDigitalVoiceLoggingRelation::getTaskId, task.getId()); |
|
|
|
NosLawEnforcementTaskDigitalVoiceLoggingRelation relation = taskDigitalVoiceLoggingRelationService.getOne(queryWrapper); |
|
|
|
if(relation != null) { |
|
|
|
vo.setCloudVideo(relation.getCloudVideo()); |
|
|
|
vo.setCloudText(relation.getCloudText()); |
|
|
|
vo.setSuggestion(relation.getSuggestion()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
|
@ -631,6 +645,100 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem |
|
|
|
} |
|
|
|
return TableDataInfo.build(page); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Boolean startDigitalVoiceLogging(String taskId) { |
|
|
|
NosLawEnforcementTask task = this.getById(taskId); |
|
|
|
if (task == null) { |
|
|
|
throw new ServiceException("任务不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!NosLawEnforcementTaskStatusEnum.PENDING_REVIEW.getCode().equals(task.getTaskStatus())) { |
|
|
|
throw new ServiceException("只有待审核的任务可以开启云笔录"); |
|
|
|
} |
|
|
|
|
|
|
|
task.setDigitalVoiceLoggingStatus(DigitalVoiceLoggingStatusEnum.WAITING_SUBMIT.getCode()); |
|
|
|
return this.updateById(task); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public NosLawEnforcementTaskDigitalVoiceLoggingRelationVO getDigitalVoiceLoggingDetail(String taskId) { |
|
|
|
NosLawEnforcementTask task = this.getById(taskId); |
|
|
|
if (task == null) { |
|
|
|
throw new ServiceException("任务不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
LambdaQueryWrapper<NosLawEnforcementTaskDigitalVoiceLoggingRelation> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.eq(NosLawEnforcementTaskDigitalVoiceLoggingRelation::getTaskId, taskId); |
|
|
|
NosLawEnforcementTaskDigitalVoiceLoggingRelation digitalVoiceLogging = |
|
|
|
taskDigitalVoiceLoggingRelationService.getOne(queryWrapper); |
|
|
|
|
|
|
|
if(digitalVoiceLogging == null) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
NosLawEnforcementTaskDigitalVoiceLoggingRelationVO vo = new NosLawEnforcementTaskDigitalVoiceLoggingRelationVO(); |
|
|
|
BeanUtils.copyProperties(digitalVoiceLogging, vo); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Boolean confirmDigitalVoiceLoggingMaterials(NosLawEnforcementTaskDigitalVoiceLoggingBO bo) { |
|
|
|
NosLawEnforcementTask task = this.getById(bo.getTaskId()); |
|
|
|
if (task == null) { |
|
|
|
throw new ServiceException("任务不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!DigitalVoiceLoggingStatusEnum.WAITING_CONFIRM.getCode().equals(task.getDigitalVoiceLoggingStatus())) { |
|
|
|
throw new ServiceException("云笔录状态异常,非待确认状态"); |
|
|
|
} |
|
|
|
|
|
|
|
task.setDigitalVoiceLoggingStatus(DigitalVoiceLoggingStatusEnum.COMPLETED.getCode()); |
|
|
|
|
|
|
|
LambdaQueryWrapper<NosLawEnforcementTaskDigitalVoiceLoggingRelation> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper |
|
|
|
.eq(NosLawEnforcementTaskDigitalVoiceLoggingRelation::getTaskId, bo.getTaskId()) |
|
|
|
.eq(NosLawEnforcementTaskDigitalVoiceLoggingRelation::getId, bo.getId()); |
|
|
|
NosLawEnforcementTaskDigitalVoiceLoggingRelation digitalVoiceLogging = |
|
|
|
taskDigitalVoiceLoggingRelationService.getOne(queryWrapper); |
|
|
|
if(digitalVoiceLogging == null) { |
|
|
|
throw new ServiceException("云笔录材料不存在"); |
|
|
|
} |
|
|
|
digitalVoiceLogging.setSuggestion(bo.getSuggestion()); |
|
|
|
digitalVoiceLogging.setConfirmTime(new Date()); |
|
|
|
taskDigitalVoiceLoggingRelationService.updateById(digitalVoiceLogging); |
|
|
|
|
|
|
|
return this.updateById(task); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Boolean submitDigitalVoiceLoggingMaterials(NosLawEnforcementTaskDigitalVoiceLoggingBO bo) { |
|
|
|
String enterpriseId = LoginHelper.getDeptId(); |
|
|
|
|
|
|
|
LambdaQueryWrapper<NosLawEnforcementTask> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper |
|
|
|
.eq(NosLawEnforcementTask::getId, bo.getTaskId()) |
|
|
|
.eq(NosLawEnforcementTask::getEnterpriseId, enterpriseId); |
|
|
|
NosLawEnforcementTask task = this.getOne(queryWrapper); |
|
|
|
if(task == null) { |
|
|
|
throw new ServiceException("任务不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
if(!DigitalVoiceLoggingStatusEnum.WAITING_SUBMIT.getCode().equals(task.getDigitalVoiceLoggingStatus())) { |
|
|
|
throw new ServiceException("云笔录状态异常,非待提交状态"); |
|
|
|
} |
|
|
|
|
|
|
|
task.setDigitalVoiceLoggingStatus(DigitalVoiceLoggingStatusEnum.WAITING_CONFIRM.getCode()); |
|
|
|
this.updateById(task); |
|
|
|
|
|
|
|
NosLawEnforcementTaskDigitalVoiceLoggingRelation digitalVoiceLogging = new NosLawEnforcementTaskDigitalVoiceLoggingRelation(); |
|
|
|
digitalVoiceLogging.setTaskId(bo.getTaskId()); |
|
|
|
digitalVoiceLogging.setCloudVideo(bo.getCloudVideo()); |
|
|
|
digitalVoiceLogging.setCloudText(bo.getCloudText()); |
|
|
|
return taskDigitalVoiceLoggingRelationService.save(digitalVoiceLogging); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|