Merge branch 'branch20211008'
This commit is contained in:
@@ -4,7 +4,7 @@ public class ProjectCommon {
|
|||||||
/**
|
/**
|
||||||
* 超级管理员
|
* 超级管理员
|
||||||
*/
|
*/
|
||||||
public final static String ADMIN = "admin";
|
// public final static String ADMIN = "admin";
|
||||||
/**
|
/**
|
||||||
* 打包(1:是,0:否)
|
* 打包(1:是,0:否)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ public class RoleCommon {
|
|||||||
/**
|
/**
|
||||||
* 超级管理员
|
* 超级管理员
|
||||||
*/
|
*/
|
||||||
public final static String ADMIN = "admin";
|
// public final static String ADMIN = "admin";
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -110,7 +110,7 @@ public class SendMessageServiceImpl implements SendMessageService {
|
|||||||
String emailPassword = loginUser.getEmailPassword();
|
String emailPassword = loginUser.getEmailPassword();
|
||||||
//如果发件人没有邮箱或邮箱密码则使用admin账户的邮箱密码
|
//如果发件人没有邮箱或邮箱密码则使用admin账户的邮箱密码
|
||||||
if (StringUtils.isBlank(email) || StringUtils.isBlank(emailPassword)) {
|
if (StringUtils.isBlank(email) || StringUtils.isBlank(emailPassword)) {
|
||||||
loginUser = sysBaseAPI.getUserByName("admin");
|
loginUser = sysBaseAPI.getUserByName(env.getProperty("message.systemEmailUser"));
|
||||||
email = loginUser.getEmail();
|
email = loginUser.getEmail();
|
||||||
emailPassword = loginUser.getEmailPassword();
|
emailPassword = loginUser.getEmailPassword();
|
||||||
}
|
}
|
||||||
@@ -505,7 +505,7 @@ public class SendMessageServiceImpl implements SendMessageService {
|
|||||||
String emailPassword = loginUser.getEmailPassword();
|
String emailPassword = loginUser.getEmailPassword();
|
||||||
//如果发件人没有邮箱或邮箱密码则使用admin账户的邮箱密码
|
//如果发件人没有邮箱或邮箱密码则使用admin账户的邮箱密码
|
||||||
if (StringUtils.isBlank(email) || StringUtils.isBlank(emailPassword)) {
|
if (StringUtils.isBlank(email) || StringUtils.isBlank(emailPassword)) {
|
||||||
loginUser = sysBaseAPI.getUserByName("admin");
|
loginUser = sysBaseAPI.getUserByName(env.getProperty("message.systemEmailUser"));
|
||||||
email = loginUser.getEmail();
|
email = loginUser.getEmail();
|
||||||
emailPassword = loginUser.getEmailPassword();
|
emailPassword = loginUser.getEmailPassword();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -279,7 +279,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
|
|||||||
sendMessageDTO.setPhone(PasswordUtil.decrypt(item.getPhone()));
|
sendMessageDTO.setPhone(PasswordUtil.decrypt(item.getPhone()));
|
||||||
}
|
}
|
||||||
HashMap<String,String> map = new HashMap<>();
|
HashMap<String,String> map = new HashMap<>();
|
||||||
sendMessageDTO.setFromUser(RoleCommon.ADMIN);
|
sendMessageDTO.setFromUser(env.getProperty("message.systemEmailUser"));
|
||||||
sendMessageDTO.setToUser(item.getUsername());
|
sendMessageDTO.setToUser(item.getUsername());
|
||||||
sendMessageDTO.setTemplateCode(ManagementMessageEnums.MSG9.getCode());
|
sendMessageDTO.setTemplateCode(ManagementMessageEnums.MSG9.getCode());
|
||||||
sendMessageDTO.setTemplateParam(map);
|
sendMessageDTO.setTemplateParam(map);
|
||||||
|
|||||||
+1
-9
@@ -10,13 +10,5 @@ import com.jero.contract.entity.PayIncomeContractInstallment;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IPayIncomeContractInstallmentService extends IService<PayIncomeContractInstallment> {
|
public interface IPayIncomeContractInstallmentService extends IService<PayIncomeContractInstallment> {
|
||||||
/**
|
|
||||||
* @Description 收入合同每阶段前一周给合同签订单位的企业联系人发送付款提醒
|
|
||||||
* @Author lqt
|
|
||||||
* @Date 2021/9/14
|
|
||||||
* @Param
|
|
||||||
* @Return
|
|
||||||
* @Exception
|
|
||||||
*/
|
|
||||||
void sendSMSIncomeContract();
|
|
||||||
}
|
}
|
||||||
|
|||||||
-9
@@ -11,14 +11,5 @@ import com.jero.contract.entity.PaySpendingContractInstallment;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IPaySpendingContractInstallmentService extends IService<PaySpendingContractInstallment> {
|
public interface IPaySpendingContractInstallmentService extends IService<PaySpendingContractInstallment> {
|
||||||
/**
|
|
||||||
* @Description 支出合同每阶段前一周给合同签订单位的企业联系人发送付款提醒
|
|
||||||
* @Author lqt
|
|
||||||
* @Date 2021/9/14
|
|
||||||
* @Param
|
|
||||||
* @Return
|
|
||||||
* @Exception
|
|
||||||
*/
|
|
||||||
void sendSMSSpendingContract();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
-48
@@ -1,30 +1,10 @@
|
|||||||
package com.jero.contract.service.impl;
|
package com.jero.contract.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.dto.SendMessageDTO;
|
|
||||||
import com.jero.common.enums.CompanyMessageEnums;
|
|
||||||
import com.jero.common.enums.ManagementMessageEnums;
|
|
||||||
import com.jero.common.service.SendMessageService;
|
|
||||||
import com.jero.common.system.api.ISysBaseAPI;
|
|
||||||
import com.jero.common.system.vo.LoginUser;
|
|
||||||
import com.jero.common.util.HuaWeiSmsUtil;
|
|
||||||
import com.jero.common.util.PasswordUtil;
|
|
||||||
import com.jero.contract.entity.PayIncomeContractInstallment;
|
import com.jero.contract.entity.PayIncomeContractInstallment;
|
||||||
import com.jero.contract.mapper.PayIncomeContractInstallmentMapper;
|
import com.jero.contract.mapper.PayIncomeContractInstallmentMapper;
|
||||||
import com.jero.contract.service.IPayIncomeContractInstallmentService;
|
import com.jero.contract.service.IPayIncomeContractInstallmentService;
|
||||||
import com.jero.modules.message.handle.impl.EmailSendMsgHandle;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: pay_income_contract_installment
|
* @Description: pay_income_contract_installment
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
@@ -33,33 +13,5 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PayIncomeContractInstallmentServiceImpl extends ServiceImpl<PayIncomeContractInstallmentMapper, PayIncomeContractInstallment> implements IPayIncomeContractInstallmentService {
|
public class PayIncomeContractInstallmentServiceImpl extends ServiceImpl<PayIncomeContractInstallmentMapper, PayIncomeContractInstallment> implements IPayIncomeContractInstallmentService {
|
||||||
@Resource
|
|
||||||
private PayIncomeContractInstallmentMapper payIncomeContractInstallmentMapper;
|
|
||||||
@Resource
|
|
||||||
private SendMessageService sendMessageService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendSMSIncomeContract() {
|
|
||||||
List<PayIncomeContractInstallment> list = payIncomeContractInstallmentMapper.getIncomeContract();
|
|
||||||
list.forEach(p->{
|
|
||||||
// 发送消息
|
|
||||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
|
||||||
if(!StringUtils.isBlank(p.getPhone())){
|
|
||||||
sendMessageDTO.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
|
||||||
sendMessageDTO.setToUser(PasswordUtil.decrypt(p.getPhone()));
|
|
||||||
}
|
|
||||||
if(!StringUtils.isBlank(p.getEmail())){
|
|
||||||
sendMessageDTO.setEmail(PasswordUtil.decrypt(p.getEmail()));
|
|
||||||
}
|
|
||||||
HashMap<String,String> map = new HashMap<>();
|
|
||||||
map.put("contract",p.getContractName());
|
|
||||||
map.put("num",p.getPhaseName());
|
|
||||||
map.put("amount", String.valueOf(p.getAccountsReceivableAmount()));
|
|
||||||
sendMessageDTO.setFromUser("admin");
|
|
||||||
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG8.getCode());
|
|
||||||
sendMessageDTO.setTemplateParam(map);
|
|
||||||
sendMessageDTO.setBusType("C_OPEN_TYPE8");
|
|
||||||
sendMessageService.SendMessageService(sendMessageDTO);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
-43
@@ -1,24 +1,11 @@
|
|||||||
package com.jero.contract.service.impl;
|
package com.jero.contract.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.dto.SendMessageDTO;
|
|
||||||
import com.jero.common.enums.CompanyMessageEnums;
|
|
||||||
import com.jero.common.service.SendMessageService;
|
|
||||||
import com.jero.common.system.api.ISysBaseAPI;
|
|
||||||
import com.jero.common.util.HuaWeiSmsUtil;
|
|
||||||
import com.jero.common.util.PasswordUtil;
|
|
||||||
import com.jero.contract.entity.PaySpendingContractInstallment;
|
import com.jero.contract.entity.PaySpendingContractInstallment;
|
||||||
import com.jero.contract.mapper.PaySpendingContractInstallmentMapper;
|
import com.jero.contract.mapper.PaySpendingContractInstallmentMapper;
|
||||||
import com.jero.contract.service.IPaySpendingContractInstallmentService;
|
import com.jero.contract.service.IPaySpendingContractInstallmentService;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: pay_spending_contract_installment
|
* @Description: pay_spending_contract_installment
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
@@ -27,35 +14,5 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PaySpendingContractInstallmentServiceImpl extends ServiceImpl<PaySpendingContractInstallmentMapper, PaySpendingContractInstallment> implements IPaySpendingContractInstallmentService {
|
public class PaySpendingContractInstallmentServiceImpl extends ServiceImpl<PaySpendingContractInstallmentMapper, PaySpendingContractInstallment> implements IPaySpendingContractInstallmentService {
|
||||||
@Resource
|
|
||||||
private SendMessageService sendMessageService;
|
|
||||||
@Resource
|
|
||||||
private PaySpendingContractInstallmentMapper paySpendingContractInstallmentMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendSMSSpendingContract() {
|
|
||||||
List<PaySpendingContractInstallment> list = paySpendingContractInstallmentMapper.getSpendingContract();
|
|
||||||
if(!CollectionUtils.isEmpty(list)){
|
|
||||||
list.forEach(p->{
|
|
||||||
// 发送消息
|
|
||||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
|
||||||
if(!StringUtils.isBlank(p.getPhone())){
|
|
||||||
sendMessageDTO.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
|
||||||
sendMessageDTO.setToUser(PasswordUtil.decrypt(p.getPhone()));
|
|
||||||
}
|
|
||||||
if(!StringUtils.isBlank(p.getEmail())){
|
|
||||||
sendMessageDTO.setEmail(PasswordUtil.decrypt(p.getEmail()));
|
|
||||||
}
|
|
||||||
HashMap<String,String> map = new HashMap<>();
|
|
||||||
map.put("contract",p.getContractName());
|
|
||||||
map.put("num",p.getPhaseName());
|
|
||||||
map.put("amount", String.valueOf(p.getAccountsReceivableAmount()));
|
|
||||||
sendMessageDTO.setFromUser("admin");
|
|
||||||
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG8.getCode());
|
|
||||||
sendMessageDTO.setTemplateParam(map);
|
|
||||||
sendMessageDTO.setBusType("C_OPEN_TYPE8");
|
|
||||||
sendMessageService.SendMessageService(sendMessageDTO);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ public class PayWorkingGroupDataFileServiceImpl extends ServiceImpl<PayWorkingGr
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// 发送人为管理员
|
// 发送人为管理员
|
||||||
LoginUser loginUser = sysBaseAPI.getUserByName("admin");
|
LoginUser loginUser = sysBaseAPI.getUserByName(env.getProperty("message.systemEmailUser"));
|
||||||
String fromEmail = loginUser.getEmail();
|
String fromEmail = loginUser.getEmail();
|
||||||
String fromEmailPassword = loginUser.getEmailPassword();
|
String fromEmailPassword = loginUser.getEmailPassword();
|
||||||
String fromEmailNew = PasswordUtil.decrypt(fromEmail);
|
String fromEmailNew = PasswordUtil.decrypt(fromEmail);
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.quartz.JobExecutionException;
|
import org.quartz.JobExecutionException;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -30,6 +33,8 @@ public class RemindersAllJob implements Job {
|
|||||||
private ProjectReceivableNotEqualsPaidService projectReceivableNotEqualsPaidService;
|
private ProjectReceivableNotEqualsPaidService projectReceivableNotEqualsPaidService;
|
||||||
@Resource
|
@Resource
|
||||||
private SendMessageService sendMessageService;
|
private SendMessageService sendMessageService;
|
||||||
|
@Autowired
|
||||||
|
private Environment env;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) {
|
public void execute(JobExecutionContext jobExecutionContext) {
|
||||||
@@ -51,7 +56,7 @@ public class RemindersAllJob implements Job {
|
|||||||
}
|
}
|
||||||
HashMap<String,String> map = new HashMap<>();
|
HashMap<String,String> map = new HashMap<>();
|
||||||
map.put("projectName",p.getChargeProject());
|
map.put("projectName",p.getChargeProject());
|
||||||
sendMessageDTO.setFromUser(ProjectCommon.ADMIN);
|
sendMessageDTO.setFromUser(env.getProperty("message.systemEmailUser"));
|
||||||
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG11.getCode());
|
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG11.getCode());
|
||||||
sendMessageDTO.setTemplateParam(map);
|
sendMessageDTO.setTemplateParam(map);
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
|
|||||||
@@ -321,8 +321,13 @@ standards:
|
|||||||
#两个项目地址必须相同
|
#两个项目地址必须相同
|
||||||
token: Aa123456!!
|
token: Aa123456!!
|
||||||
# uesrname: admin
|
# uesrname: admin
|
||||||
#消息模板替换,系统url,小程序名称
|
|
||||||
message:
|
message:
|
||||||
|
# 小程序,企业端资料下载邮件发送者配置
|
||||||
|
systemEmailUser: 'admin'
|
||||||
|
# 消息模板替换,系统url
|
||||||
systemUrl: http://localhost:3000/
|
systemUrl: http://localhost:3000/
|
||||||
|
# 消息模板替换,小程序名称
|
||||||
wxName: '小程序名称'
|
wxName: '小程序名称'
|
||||||
|
# 消息模板替换,报名url
|
||||||
openPage: http://localhost:3000/signUpEntrance?id
|
openPage: http://localhost:3000/signUpEntrance?id
|
||||||
|
|||||||
Reference in New Issue
Block a user