| | |
| | | import com.ruoyi.task.mapper.ServiceSubtaskMapper; |
| | | import com.ruoyi.task.service.IServiceSubtaskDetailTraceService; |
| | | import com.ruoyi.task.service.IServiceTaskService; |
| | | import com.ruoyi.task.event.FollowupCompletedEventPublisher; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Autowired |
| | | private IServiceSubtaskDetailTraceService traceService; |
| | | |
| | | @Autowired |
| | | private FollowupCompletedEventPublisher followupCompletedEventPublisher; |
| | | |
| | | @Override |
| | | public ServiceSubtask getSubtask(Long subId) { |
| | | return serviceSubtaskMapper.selectServiceSubtaskById(subId); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtask> findCompletedInhospFollowups(String orgid, List<String> serviceTypes, |
| | | java.util.Date startTime, int limit) { |
| | | return serviceSubtaskMapper.selectCompletedInhospFollowups(orgid, serviceTypes, startTime, limit); |
| | | } |
| | | |
| | | @Override |
| | | public int updateSubtask(ServiceSubtask subtask) { |
| | | Boolean updated = serviceSubtaskMapper.updateServiceSubtask(subtask); |
| | | if (Boolean.TRUE.equals(updated) && subtask.getSendstate() != null |
| | | && subtask.getSendstate() == 6 && subtask.getId() != null) { |
| | | followupCompletedEventPublisher.publish(subtask.getId()); |
| | | } |
| | | return Boolean.TRUE.equals(updated) ? 1 : 0; |
| | | } |
| | | |