|
|
@@ -1,60 +0,0 @@
|
|
|
-package com.jeeplus.modules.cmcandidate.timeTask;
|
|
|
-
|
|
|
-
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-
|
|
|
-import javafx.beans.property.IntegerProperty;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import com.jeeplus.modules.cmcandidate.entity.CmCandidateBelongDetail;
|
|
|
-import com.jeeplus.modules.cmcandidate.entity.CmCandidateTrack;
|
|
|
-import com.jeeplus.modules.cmcandidate.mapper.CmCandidateTrackMapper;
|
|
|
-import com.jeeplus.modules.cmcandidate.service.CmCandidateBelongDetailService;
|
|
|
-import com.jeeplus.modules.cmcandidate.service.CmCandidateTrackService;
|
|
|
-import com.jeeplus.common.config.Global;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
-@Component
|
|
|
-public class TimeTask {
|
|
|
- @Autowired
|
|
|
- private CmCandidateTrackMapper cmCandidateTrackMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private CmCandidateTrackService cmCandidateTrackService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private CmCandidateBelongDetailService cmCandidateBelongDetailService;
|
|
|
- /**
|
|
|
- * 每天凌晨两点执行任务:90天未跟进丢入公海
|
|
|
- */
|
|
|
- @Scheduled(cron = "0 30 10 * * ?")
|
|
|
- @Transactional
|
|
|
- public void candidatetToSea(CmCandidateTrack cmCandidateTrack, CmCandidateBelongDetail cmCandidateBelongDetail) {
|
|
|
- List<CmCandidateTrack> list = cmCandidateTrackMapper.findBeyondContactDaysTrack(Integer.parseInt(Global.getCrmAutoDate()));
|
|
|
- if(list!=null && list.size()>0) {
|
|
|
- for(CmCandidateTrack track:list) {
|
|
|
- //更新track表
|
|
|
- cmCandidateTrack.setId(track.getId());
|
|
|
- cmCandidateTrack.setBelongOwner("0");
|
|
|
- cmCandidateTrack.setBelongUser("");
|
|
|
- cmCandidateTrack.setBeginBelongTime(new Date());
|
|
|
- cmCandidateTrack.setAssignmentBy("系统");
|
|
|
- cmCandidateTrack.setBelongReason("到期未联系,自动移入公海");
|
|
|
- cmCandidateTrackService.save(cmCandidateTrack);
|
|
|
-
|
|
|
- //新增归属表
|
|
|
- cmCandidateBelongDetail.setCandidateTrackId(Integer.parseInt(track.getId()));
|
|
|
- cmCandidateBelongDetail.setBelongOwner("0");
|
|
|
- cmCandidateBelongDetail.setBelongUser("");
|
|
|
- cmCandidateBelongDetail.setBelongTime(new Date());
|
|
|
- cmCandidateBelongDetail.setAssignmentBy("系统");
|
|
|
- cmCandidateBelongDetail.setBelongReason("到期未联系,自动移入公海");
|
|
|
- cmCandidateBelongDetailService.save(cmCandidateBelongDetail);// 更新
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|