| | |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | return serviceSubtaskAnswerMapper.deleteServiceSubtaskAnswerById(id); |
| | | } |
| | | |
| | | /** |
| | | * 保存问卷答案 (异步处理,快速返回) |
| | | * |
| | | * @param serviceSubTaskAnswerReq 答案请求 |
| | | * @param flag 标志位 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | @Async("threadPoolTaskExecutor") |
| | | public Integer saveQuestionAnswer(ServiceSubTaskAnswerReq serviceSubTaskAnswerReq, Long flag) { |
| | | String threadName = Thread.currentThread().getName(); |
| | | log.info("[{}] 开始异步处理保存问卷答案", threadName); |
| | | try { |
| | | //参数解密 |
| | | Long tid = null; |
| | | Long pid = null; |
| | |
| | | log.error("将该key和value从redis中,serviceSubtask的值为--------:{}", serviceSubtask); |
| | | if (score != null && !score.isEmpty()) serviceSubtask.setScore(score); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | | //修改住院满意度状态(避免重复查询) |
| | | if (serviceSubtask.getServiceType() != null && "6".equals(serviceSubtask.getServiceType())) { |
| | | Long inhospid = serviceSubtask.getInhospid(); |
| | | if (inhospid != null) { |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setInhospMydFlag("1"); |
| | | patMedInhosp.setInhospid(inhospid); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | } |
| | | } |
| | | |
| | | //将当前发送状态改成 9 完成(缓存 preachform 查询) |
| | | String currentPreachform = serviceSubtask.getCurrentPreachform(); |
| | |
| | | } |
| | | |
| | | } |
| | | log.info("[{}] 完成异步处理保存问卷答案", Thread.currentThread().getName()); |
| | | return 1; |
| | | } catch (Exception e) { |
| | | log.error("[{}] 异步处理保存问卷答案发生异常 : {},请求的对象为:{}", Thread.currentThread().getName(), e.getMessage(), e,serviceSubTaskAnswerReq); |
| | | throw new RuntimeException("保存问卷答案失败", e); |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | public Integer saveQuestionDetail(ServiceSubTaskCacheReq serviceSubTaskCacheReq, Long flag) { |
| | | Long tid = Long.valueOf(serviceSubTaskCacheReq.getParam1()); |
| | |
| | | subtaskDetailTrace.setDutyDeptPersonName(svyTaskTemplateScriptVO.getDutyDeptPersonName()); |
| | | subtaskDetailTrace.setReportDeptPersonCode(svyTaskTemplateScriptVO.getReportDeptPersonCode()); |
| | | subtaskDetailTrace.setReportDeptPersonName(svyTaskTemplateScriptVO.getReportDeptPersonName()); |
| | | subtaskDetailTrace.setCirculationDeptPersonCode(svyTaskTemplateScriptVO.getCirculationDeptPersonCode()); |
| | | subtaskDetailTrace.setCirculationDeptPersonName(svyTaskTemplateScriptVO.getCirculationDeptPersonName()); |
| | | |
| | | Long existTraceId = existingTraceIdMap.get(subtaskDetailTrace.getScriptid()); |
| | | if (existTraceId != null) { |