|
|
@@ -104,8 +104,27 @@ public class PatentTask {
|
|
|
flag=true;
|
|
|
status = 5;
|
|
|
s5.add(p.getId().toString());
|
|
|
- }else if(count<0&&p.getSalesmanRemind()==1) {
|
|
|
+ }else if(count<0) {
|
|
|
s6.add(p.getId().toString());
|
|
|
+ if (p.getSalesmanRemind()==0){
|
|
|
+ Notice n = new Notice();
|
|
|
+ n.setId(UUID.randomUUID().toString());
|
|
|
+ n.setCreateTime(date);
|
|
|
+ n.setReaded(0);// 未读
|
|
|
+ n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
|
|
|
+ PatentNewLog pl = new PatentNewLog();
|
|
|
+ StringBuffer str =new StringBuffer();
|
|
|
+ str.append("专利编号[").append(p.getPatentNo()).append("],名称[").append(p.getName()).append("],email[")
|
|
|
+ .append(p.getEmail().trim()).append("]").append("提醒结束时间已超过,但未做提醒!!!请悉知。");
|
|
|
+ pl.setContent(str.toString());
|
|
|
+ pl.setCreateTime(new Date());
|
|
|
+ pl.setPid(p.getId());
|
|
|
+ logList.add(pl);
|
|
|
+ n.setAid(p.getAid());
|
|
|
+ n.setNoticeType(NoticeStatus.TASK_PATENT_REMIND.getCode());
|
|
|
+ n.setContent(str.toString());
|
|
|
+ nlist.add(n);
|
|
|
+ }
|
|
|
}
|
|
|
if (flag) {
|
|
|
Notice n = new Notice();
|
|
|
@@ -160,7 +179,7 @@ public class PatentTask {
|
|
|
updatePatentNew(s3,3);
|
|
|
updatePatentNew(s4,4);
|
|
|
updatePatentNew(s5,5);
|
|
|
- pushPatentNewStatus(s6);
|
|
|
+ patentNewService.pushResetPatentNew(s6);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
LoggerUtils.debug(getClass(), "=====================专利提醒失败======================");
|
|
|
@@ -174,20 +193,6 @@ public class PatentTask {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void pushPatentNewStatus(List<String> s6) throws InterruptedException {
|
|
|
- List<PatentNewLog> logs = new ArrayList<>();
|
|
|
- for (String string : s6) {
|
|
|
- PatentNewLog log=new PatentNewLog();
|
|
|
- log.setContent("超过时间重置状态并计算下一年");
|
|
|
- log.setCreateTime(new Date());
|
|
|
- log.setPid(Integer.valueOf(string));
|
|
|
- logs.add(log);
|
|
|
- }
|
|
|
- pushPatentLog(logs);
|
|
|
- patentNewService.pushResetPatentNew(s6);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
private void pushNotice(List<Notice> nlist) throws InterruptedException {
|