|
@@ -6,11 +6,13 @@ package com.jeeplus.modules.cmcandidate.service;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
+import com.jeeplus.common.config.Global;
|
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
|
import com.jeeplus.modules.cmcandidate.entity.*;
|
|
import com.jeeplus.modules.cmcandidate.entity.*;
|
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
|
import net.sf.json.JSONArray;
|
|
import net.sf.json.JSONArray;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
@@ -240,4 +242,36 @@ public class CmCandidateTrackService extends CrudService<CmCandidateTrackMapper,
|
|
|
j.setMsg("分配成功");
|
|
j.setMsg("分配成功");
|
|
|
return j;
|
|
return j;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 每天凌晨两点执行任务:90天未跟进丢入公海
|
|
|
|
|
+ */
|
|
|
|
|
+ @Scheduled(cron = "0 45 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("到期未联系,自动移入公海");
|
|
|
|
|
+ this.save(cmCandidateTrack);
|
|
|
|
|
+
|
|
|
|
|
+ //新增归属表
|
|
|
|
|
+ cmCandidateBelongDetail.setCandidateTrackId(Integer.parseInt(track.getId()));
|
|
|
|
|
+ cmCandidateBelongDetail.setBelongOwner("0");
|
|
|
|
|
+ cmCandidateBelongDetail.setBelongUser("");
|
|
|
|
|
+ cmCandidateBelongDetail.setBelongTime(new Date());
|
|
|
|
|
+ cmCandidateBelongDetail.setAssignmentBy("系统");
|
|
|
|
|
+ cmCandidateBelongDetail.setBelongReason("到期未联系,自动移入公海");
|
|
|
|
|
+ cmCandidateBelongDetailService.save(cmCandidateBelongDetail);// 更新
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|