|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.jjh.declaration.component;
|
|
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
|
|
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JContacts;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JEnterpriseContact;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JSmartDeclaration;
|
|
|
|
|
import com.ruoyi.jjh.ent.service.JContactsService;
|
|
|
|
|
import com.ruoyi.jjh.ent.service.JEnterpriseContactService;
|
|
|
|
@ -95,22 +96,25 @@ public class TimingRemindImpl implements TimingRemindService {
|
|
|
|
|
*/
|
|
|
|
|
public void getContact(String code, String s) {
|
|
|
|
|
if (isTiming) {
|
|
|
|
|
// List<JEnterpriseContact> list1 = jEnterpriseContactService.lambdaQuery().eq(JEnterpriseContact::getEnterpriseCode, code).list();
|
|
|
|
|
// list1.forEach(y -> {
|
|
|
|
|
// //先添加工单再发送短信
|
|
|
|
|
// //可在导入或者新增的时候将该常用联系人的手机号添加进工单
|
|
|
|
|
// smsAlertsService.enterSms(y.getEnterpriseName(), s, y.getContactPhone());
|
|
|
|
|
// log.info(y.getEnterpriseName() + "发送短信成功!");
|
|
|
|
|
// });
|
|
|
|
|
List<JContacts> list = jContactsService.lambdaQuery().eq(JContacts::getTyshxydm, code)
|
|
|
|
|
.eq(JContacts::getDefaultcontact, "1").list();
|
|
|
|
|
list.forEach(y -> {
|
|
|
|
|
//先添加工单再发送短信
|
|
|
|
|
smsAlertsService.addSsmPhone(y.getYddh());
|
|
|
|
|
//可在导入或者新增的时候将该常用联系人的手机号添加进工单
|
|
|
|
|
smsAlertsService.enterSms(y.getQymc(), s, y.getYddh());
|
|
|
|
|
log.info(y.getQymc() + "发送短信成功!");
|
|
|
|
|
});
|
|
|
|
|
List<JEnterpriseContact> list1 = jEnterpriseContactService.lambdaQuery().eq(JEnterpriseContact::getEnterpriseCode, code).list();
|
|
|
|
|
if (list1 != null && !list1.isEmpty()) {
|
|
|
|
|
list1.forEach(y -> {
|
|
|
|
|
//先添加工单再发送短信
|
|
|
|
|
//可在导入或者新增的时候将该常用联系人的手机号添加进工单
|
|
|
|
|
smsAlertsService.enterSms(y.getEnterpriseName(), s, y.getContactPhone());
|
|
|
|
|
log.info(y.getEnterpriseName() + "发送短信成功!");
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
List<JContacts> list = jContactsService.lambdaQuery().eq(JContacts::getTyshxydm, code)
|
|
|
|
|
.eq(JContacts::getDefaultcontact, "1").list();
|
|
|
|
|
list.forEach(y -> {
|
|
|
|
|
//先添加工单再发送短信
|
|
|
|
|
smsAlertsService.addSsmPhone(y.getYddh());
|
|
|
|
|
//可在导入或者新增的时候将该常用联系人的手机号添加进工单
|
|
|
|
|
smsAlertsService.enterSms(y.getQymc(), s, y.getYddh());
|
|
|
|
|
log.info(y.getQymc() + "发送短信成功!");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -137,10 +141,10 @@ public class TimingRemindImpl implements TimingRemindService {
|
|
|
|
|
sd.setZwId(x.getUserId());
|
|
|
|
|
if (isTiming) {
|
|
|
|
|
if (sd.getProjectId() != null & !x.getPhonenumber().isEmpty()) {
|
|
|
|
|
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个项目自定义通知,请前往工作台查看,"+"登录网址为:https://idp.sipac.gov.cn/bms/#/login", x.getPhonenumber());
|
|
|
|
|
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个项目自定义通知,请前往工作台查看," + "登录网址为:https://idp.sipac.gov.cn/bms/#/login", x.getPhonenumber());
|
|
|
|
|
}
|
|
|
|
|
if (!x.getPhonenumber().isEmpty() & sd.getProjectId() == null) {
|
|
|
|
|
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个全局自定义通知,请前往工作台查看,"+"登录网址为:https://idp.sipac.gov.cn/bms/#/login", x.getPhonenumber());
|
|
|
|
|
smsAlertsService.enterSms("政府人员-" + x.getNickName(), "您有1个全局自定义通知,请前往工作台查看," + "登录网址为:https://idp.sipac.gov.cn/bms/#/login", x.getPhonenumber());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
listAdd.add(sd);
|
|
|
|
|