| | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.sangeshenbian.dao.ComplaintAuditRecordMapper; |
| | | import com.panzhihua.sangeshenbian.model.dto.ComplaintTimeout; |
| | | import com.panzhihua.sangeshenbian.model.entity.Complaint; |
| | | import com.panzhihua.sangeshenbian.model.entity.MessageNotification; |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemUser; |
| | | import com.panzhihua.sangeshenbian.model.entity.WorkOrderItemConfig; |
| | | import com.panzhihua.sangeshenbian.model.entity.*; |
| | | import com.panzhihua.sangeshenbian.service.*; |
| | | import com.panzhihua.sangeshenbian.utils.AliSmsUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | private final ISystemUserService systemUserService;; |
| | | private final UserService userService; |
| | | private final IMessageNotificationService messageNotificationService; |
| | | private final IComplaintCommentService complaintCommentService; |
| | | |
| | | /** |
| | | * 诉求超时处理(每天凌晨两点执行) |
| | |
| | | complaintService.updateBatchById(complaintList); |
| | | messageNotificationService.saveBatch(messageNotificationList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 自动完成诉求评价 |
| | | */ |
| | | @Scheduled(cron = "0 1 0 * * ?") |
| | | public void automaticEvaluation() { |
| | | // 诉求超时提醒 |
| | | List<Complaint> complaintList = complaintService.getTimeoutAndNotComment(); |
| | | for (Complaint complaint : complaintList) { |
| | | ComplaintComment complaintComment = new ComplaintComment(); |
| | | complaintComment.setComplaintId(complaint.getId()); |
| | | complaintComment.setRate(2); |
| | | complaintComment.setContent("满意"); |
| | | complaintComment.setDelFlag(0); |
| | | complaintCommentService.save(complaintComment); |
| | | } |
| | | } |
| | | |
| | | |
| | | // 诉求超时处理 |
| | | private void timeOutHandle(WorkOrderItemConfig config,Integer demandProcessingTime) { |