|
@@ -758,14 +758,17 @@ public class SampleXxlJob {
|
|
//对数据进行发送通知
|
|
//对数据进行发送通知
|
|
String taskName = null;
|
|
String taskName = null;
|
|
String titleStr = null;
|
|
String titleStr = null;
|
|
|
|
+ String title = null; //查询是否已经通知时使用的title
|
|
|
|
|
|
int interval = Integer.parseInt(this.getInterval(invoice.getBillingDate(), new Date()));
|
|
int interval = Integer.parseInt(this.getInterval(invoice.getBillingDate(), new Date()));
|
|
|
|
|
|
taskName = "超期收款发票";
|
|
taskName = "超期收款发票";
|
|
if (StringUtils.isNotBlank(invoice.getProgramName())){
|
|
if (StringUtils.isNotBlank(invoice.getProgramName())){
|
|
titleStr = "发票编号为"+ invoice.getNo()+"的项目["+invoice.getProgramName()+"],开票金额为:"+invoice.getAccount() +"元,已超期"+interval+"天,请尽快收款";
|
|
titleStr = "发票编号为"+ invoice.getNo()+"的项目["+invoice.getProgramName()+"],开票金额为:"+invoice.getAccount() +"元,已超期"+interval+"天,请尽快收款";
|
|
|
|
+ title = "发票编号为"+ invoice.getNo()+"的项目["+invoice.getProgramName()+"],开票金额为:"+invoice.getAccount() +"元";
|
|
}else {
|
|
}else {
|
|
- titleStr = "发票编号为"+ invoice.getNo()+",已超期"+interval+"天,请尽快收款";
|
|
|
|
|
|
+ titleStr = "发票编号为"+ invoice.getNo()+",开票金额为:"+invoice.getAccount() +"元,已超期"+interval+"天,请尽快收款";
|
|
|
|
+ title = "发票编号为"+ invoice.getNo()+",开票金额为:"+invoice.getAccount() +"元";
|
|
}
|
|
}
|
|
Set<String> noticeUserSet = new HashSet<String>();
|
|
Set<String> noticeUserSet = new HashSet<String>();
|
|
|
|
|
|
@@ -798,11 +801,12 @@ public class SampleXxlJob {
|
|
for (String noticeUserId : noticeUserList) {
|
|
for (String noticeUserId : noticeUserList) {
|
|
myNotice.setNoticeId(noticeUserId);
|
|
myNotice.setNoticeId(noticeUserId);
|
|
myNotice.setNoticeName(createUser.getName());
|
|
myNotice.setNoticeName(createUser.getName());
|
|
|
|
+ myNotice.setTitle(title);
|
|
//根据taskName和通知人 查询重复数量
|
|
//根据taskName和通知人 查询重复数量
|
|
String myNoticeInfo = JSON.toJSONString(myNotice);
|
|
String myNoticeInfo = JSON.toJSONString(myNotice);
|
|
Map<String,String> map = new HashMap();
|
|
Map<String,String> map = new HashMap();
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
- String jsonInfo = SpringUtil.getBean(IFlowableApi.class).getRepetitionCountBymyNoticeTitle(map);
|
|
|
|
|
|
+ String jsonInfo = SpringUtil.getBean(IFlowableApi.class).getCountBymyNoticeTitle(map);
|
|
MyNoticeList repetitionCountBymyNotice = JSON.parseObject(jsonInfo, new TypeReference<MyNoticeList>() {});
|
|
MyNoticeList repetitionCountBymyNotice = JSON.parseObject(jsonInfo, new TypeReference<MyNoticeList>() {});
|
|
|
|
|
|
if(null == repetitionCountBymyNotice){
|
|
if(null == repetitionCountBymyNotice){
|
|
@@ -810,6 +814,7 @@ public class SampleXxlJob {
|
|
String id = UUID.randomUUID().toString().replace("-", "");
|
|
String id = UUID.randomUUID().toString().replace("-", "");
|
|
myNotice.setId(id);
|
|
myNotice.setId(id);
|
|
myNotice.setRepetitionCount(0);
|
|
myNotice.setRepetitionCount(0);
|
|
|
|
+ myNotice.setTitle(titleStr);
|
|
|
|
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
@@ -817,10 +822,10 @@ public class SampleXxlJob {
|
|
}else{
|
|
}else{
|
|
myNotice.setId(repetitionCountBymyNotice.getId());
|
|
myNotice.setId(repetitionCountBymyNotice.getId());
|
|
myNotice.setRepetitionCount(repetitionCountBymyNotice.getRepetitionCount()+1);
|
|
myNotice.setRepetitionCount(repetitionCountBymyNotice.getRepetitionCount()+1);
|
|
-
|
|
|
|
|
|
+ myNotice.setTitle(titleStr);
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
- SpringUtil.getBean ( IFlowableApi.class ).updateMyNotice(map);
|
|
|
|
|
|
+ SpringUtil.getBean ( IFlowableApi.class ).updateTitleMyNotice2(map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -838,14 +843,19 @@ public class SampleXxlJob {
|
|
//对数据进行发送通知
|
|
//对数据进行发送通知
|
|
String taskName = null;
|
|
String taskName = null;
|
|
String titleStr = null;
|
|
String titleStr = null;
|
|
|
|
+ String title = null; //查询是否已经通知时使用的title
|
|
|
|
|
|
int interval = Integer.parseInt(this.getInterval(invoice.getBillingDate(), new Date()));
|
|
int interval = Integer.parseInt(this.getInterval(invoice.getBillingDate(), new Date()));
|
|
|
|
|
|
taskName = "评估发票超期收款";
|
|
taskName = "评估发票超期收款";
|
|
if (StringUtils.isNotBlank(invoice.getProgramName())){
|
|
if (StringUtils.isNotBlank(invoice.getProgramName())){
|
|
titleStr = "发票编号为"+ invoice.getNo()+"的项目["+invoice.getProgramName()+"],开票金额为:"+invoice.getAccount() +"元,已超期"+interval+"天,请尽快收款";
|
|
titleStr = "发票编号为"+ invoice.getNo()+"的项目["+invoice.getProgramName()+"],开票金额为:"+invoice.getAccount() +"元,已超期"+interval+"天,请尽快收款";
|
|
|
|
+ title = "发票编号为"+ invoice.getNo()+"的项目["+invoice.getProgramName()+"],开票金额为:"+invoice.getAccount() +"元";
|
|
|
|
+
|
|
}else {
|
|
}else {
|
|
- titleStr = "发票编号为"+ invoice.getNo()+",已超期"+interval+"天,请尽快收款";
|
|
|
|
|
|
+ titleStr = "发票编号为"+ invoice.getNo()+",开票金额为:"+invoice.getAccount() +"元,已超期"+interval+"天,请尽快收款";
|
|
|
|
+ title = "发票编号为"+ invoice.getNo()+",开票金额为:"+invoice.getAccount() +"元";
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
Set<String> noticeUserSet = new HashSet<String>();
|
|
Set<String> noticeUserSet = new HashSet<String>();
|
|
@@ -879,11 +889,13 @@ public class SampleXxlJob {
|
|
for (String noticeUserId : noticeUserList) {
|
|
for (String noticeUserId : noticeUserList) {
|
|
myNotice.setNoticeId(noticeUserId);
|
|
myNotice.setNoticeId(noticeUserId);
|
|
myNotice.setNoticeName(createUser.getName());
|
|
myNotice.setNoticeName(createUser.getName());
|
|
|
|
+ myNotice.setTitle(title);
|
|
|
|
+
|
|
//根据taskName和通知人 查询重复数量
|
|
//根据taskName和通知人 查询重复数量
|
|
String myNoticeInfo = JSON.toJSONString(myNotice);
|
|
String myNoticeInfo = JSON.toJSONString(myNotice);
|
|
Map<String,String> map = new HashMap();
|
|
Map<String,String> map = new HashMap();
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
- String jsonInfo = SpringUtil.getBean(IFlowableApi.class).getRepetitionCountBymyNoticeTitle(map);
|
|
|
|
|
|
+ String jsonInfo = SpringUtil.getBean(IFlowableApi.class).getCountBymyNoticeTitle(map);
|
|
MyNoticeList repetitionCountBymyNotice = JSON.parseObject(jsonInfo, new TypeReference<MyNoticeList>() {});
|
|
MyNoticeList repetitionCountBymyNotice = JSON.parseObject(jsonInfo, new TypeReference<MyNoticeList>() {});
|
|
|
|
|
|
if(null == repetitionCountBymyNotice){
|
|
if(null == repetitionCountBymyNotice){
|
|
@@ -891,6 +903,7 @@ public class SampleXxlJob {
|
|
String id = UUID.randomUUID().toString().replace("-", "");
|
|
String id = UUID.randomUUID().toString().replace("-", "");
|
|
myNotice.setId(id);
|
|
myNotice.setId(id);
|
|
myNotice.setRepetitionCount(0);
|
|
myNotice.setRepetitionCount(0);
|
|
|
|
+ myNotice.setTitle(titleStr);
|
|
|
|
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
@@ -898,10 +911,11 @@ public class SampleXxlJob {
|
|
}else{
|
|
}else{
|
|
myNotice.setId(repetitionCountBymyNotice.getId());
|
|
myNotice.setId(repetitionCountBymyNotice.getId());
|
|
myNotice.setRepetitionCount(repetitionCountBymyNotice.getRepetitionCount()+1);
|
|
myNotice.setRepetitionCount(repetitionCountBymyNotice.getRepetitionCount()+1);
|
|
|
|
+ myNotice.setTitle(titleStr);
|
|
|
|
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
myNoticeInfo = JSON.toJSONString(myNotice);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
map.put("myNoticeInfo", myNoticeInfo);
|
|
- SpringUtil.getBean ( IFlowableApi.class ).updateMyNotice(map);
|
|
|
|
|
|
+ SpringUtil.getBean ( IFlowableApi.class ).updateTitleMyNotice2(map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|