This commit is contained in:
parent
9f7e611850
commit
50b8b37304
|
|
@ -17,6 +17,13 @@
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 省公司短信平台sms-util -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ahsbd</groupId>
|
||||||
|
<artifactId>sms-util</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringCloud Openfeign -->
|
<!-- SpringCloud Openfeign -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ public class PurchaseNoticePersonController extends BaseController {
|
||||||
@ApiOperation(value = "查询等待选择的新购短信通知人员列表")
|
@ApiOperation(value = "查询等待选择的新购短信通知人员列表")
|
||||||
@RequiresPermissions("purchase:person:notice")
|
@RequiresPermissions("purchase:person:notice")
|
||||||
@GetMapping("/listUnSelected")
|
@GetMapping("/listUnSelected")
|
||||||
public TableDataInfo listUnSelected() {
|
public TableDataInfo listUnSelected(PurchaseNoticePerson purchaseNoticePerson) {
|
||||||
List<PurchaseNoticePerson> list = purchaseNoticePersonService.getUnSelectedUserList();
|
List<PurchaseNoticePerson> list = purchaseNoticePersonService.getUnSelectedUserList(purchaseNoticePerson);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.bonus.material.purchase.domain;
|
package com.bonus.material.purchase.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : 阮世耀
|
* @author : 阮世耀
|
||||||
* @version : 1.0
|
* @version : 1.0
|
||||||
|
|
@ -26,6 +30,17 @@ public class PurchaseSignRecord {
|
||||||
|
|
||||||
private String signType;
|
private String signType;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态(1 通过,2 驳回)
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
public PurchaseSignRecord(Long taskId, Long userId, Long orgId) {
|
public PurchaseSignRecord(Long taskId, Long userId, Long orgId) {
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public interface PurchaseNoticePersonMapper {
|
||||||
*
|
*
|
||||||
* @return 等待选择的新购短信通知人员列表
|
* @return 等待选择的新购短信通知人员列表
|
||||||
*/
|
*/
|
||||||
public List<PurchaseNoticePerson> getUnSelectedUserList();
|
public List<PurchaseNoticePerson> getUnSelectedUserList(PurchaseNoticePerson purchaseNoticePerson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增新购短信通知人员
|
* 新增新购短信通知人员
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public interface IPurchaseNoticePersonService {
|
||||||
*
|
*
|
||||||
* @return 等待选择的新购短信通知人员列表
|
* @return 等待选择的新购短信通知人员列表
|
||||||
*/
|
*/
|
||||||
public List<PurchaseNoticePerson> getUnSelectedUserList();
|
public List<PurchaseNoticePerson> getUnSelectedUserList(PurchaseNoticePerson purchaseNoticePerson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量发送短信
|
* 批量发送短信
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ package com.bonus.material.purchase.service.impl;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.ah.sbd.SmsTool;
|
||||||
|
import com.ah.sbd.utils.param.SmsParam;
|
||||||
|
import com.bonus.common.biz.constant.BmConfigItems;
|
||||||
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
||||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
|
|
@ -11,7 +15,10 @@ import com.bonus.common.core.utils.encryption.AesCbcUtils;
|
||||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||||
import com.bonus.common.core.utils.sms.SmsUtils;
|
import com.bonus.common.core.utils.sms.SmsUtils;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.material.countersign.mapper.SignProcessMapper;
|
||||||
import com.bonus.material.part.mapper.PartCheckMapper;
|
import com.bonus.material.part.mapper.PartCheckMapper;
|
||||||
|
import com.bonus.material.purchase.domain.PurchaseSignRecord;
|
||||||
import com.bonus.material.purchase.domain.dto.PurchaseNoticePersonDto;
|
import com.bonus.material.purchase.domain.dto.PurchaseNoticePersonDto;
|
||||||
import com.bonus.material.task.domain.TmTask;
|
import com.bonus.material.task.domain.TmTask;
|
||||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||||
|
|
@ -44,6 +51,9 @@ public class PurchaseNoticePersonServiceImpl implements IPurchaseNoticePersonSer
|
||||||
@Resource
|
@Resource
|
||||||
private PartCheckMapper partCheckMapper;
|
private PartCheckMapper partCheckMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SignProcessMapper signProcessMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购短信通知人员
|
* 查询新购短信通知人员
|
||||||
*
|
*
|
||||||
|
|
@ -79,8 +89,8 @@ public class PurchaseNoticePersonServiceImpl implements IPurchaseNoticePersonSer
|
||||||
* @return 等待选择的新购短信通知人员列表
|
* @return 等待选择的新购短信通知人员列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PurchaseNoticePerson> getUnSelectedUserList() {
|
public List<PurchaseNoticePerson> getUnSelectedUserList(PurchaseNoticePerson purchaseNoticePerson) {
|
||||||
List<PurchaseNoticePerson> userList = purchaseNoticePersonMapper.getUnSelectedUserList();
|
List<PurchaseNoticePerson> userList = purchaseNoticePersonMapper.getUnSelectedUserList(purchaseNoticePerson);
|
||||||
for (PurchaseNoticePerson user : userList) {
|
for (PurchaseNoticePerson user : userList) {
|
||||||
if (null != user.getTelphone() && 11 < user.getTelphone().length()) {
|
if (null != user.getTelphone() && 11 < user.getTelphone().length()) {
|
||||||
user.setTelphone(Sm4Utils.decrypt(user.getTelphone()));
|
user.setTelphone(Sm4Utils.decrypt(user.getTelphone()));
|
||||||
|
|
@ -101,7 +111,9 @@ public class PurchaseNoticePersonServiceImpl implements IPurchaseNoticePersonSer
|
||||||
}
|
}
|
||||||
String splitPhoneNumber = String.join(",", purchaseNoticePersonDto.getPhoneNumbers());
|
String splitPhoneNumber = String.join(",", purchaseNoticePersonDto.getPhoneNumbers());
|
||||||
try {
|
try {
|
||||||
String sendResult = SmsUtils.smsToken(splitPhoneNumber, purchaseNoticePersonDto.getContent(),"");
|
// 省公司短信发送
|
||||||
|
JSONObject sendResult = SmsTool.sendSms(new SmsParam(splitPhoneNumber, purchaseNoticePersonDto.getContent()), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
|
||||||
|
//String sendResult = SmsUtils.smsToken(splitPhoneNumber, purchaseNoticePersonDto.getContent(),"");
|
||||||
if (sendResult != null) {
|
if (sendResult != null) {
|
||||||
// 发送短信后修改任务状态
|
// 发送短信后修改任务状态
|
||||||
if (purchaseNoticePersonDto.getIsPartFlag() != null && purchaseNoticePersonDto.getIsPartFlag() == 0) {
|
if (purchaseNoticePersonDto.getIsPartFlag() != null && purchaseNoticePersonDto.getIsPartFlag() == 0) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
package com.bonus.material.warning;
|
package com.bonus.material.warning;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.ah.sbd.SmsTool;
|
||||||
|
import com.ah.sbd.utils.param.SmsParam;
|
||||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
|
import com.bonus.common.biz.constant.BmConfigItems;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.utils.sms.SmsUtils;
|
import com.bonus.common.core.utils.sms.SmsUtils;
|
||||||
import com.bonus.material.back.domain.BackApplyInfo;
|
import com.bonus.material.back.domain.BackApplyInfo;
|
||||||
|
|
@ -91,7 +95,9 @@ public class ScheduledTasks {
|
||||||
String content = "您好,李勇!您还有退料单未签字,请及时登录系统查看处理,感谢配合!";
|
String content = "您好,李勇!您还有退料单未签字,请及时登录系统查看处理,感谢配合!";
|
||||||
// 发送短信
|
// 发送短信
|
||||||
try {
|
try {
|
||||||
String sendResult = SmsUtils.smsToken(phoneNumber, content, "");
|
//String sendResult = SmsUtils.smsToken(phoneNumber, content, "");
|
||||||
|
// 省公司短信发送
|
||||||
|
JSONObject sendResult = SmsTool.sendSms(new SmsParam(phoneNumber, content), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
|
||||||
if (sendResult != null && !sendResult.isEmpty()) {
|
if (sendResult != null && !sendResult.isEmpty()) {
|
||||||
log.info("短信发送成功: {}", sendResult);
|
log.info("短信发送成功: {}", sendResult);
|
||||||
System.out.println("短信发送成功: " + sendResult);
|
System.out.println("短信发送成功: " + sendResult);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
package com.bonus.material.warning;
|
package com.bonus.material.warning;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.ah.sbd.SmsTool;
|
||||||
|
import com.ah.sbd.utils.param.SmsParam;
|
||||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
|
import com.bonus.common.biz.constant.BmConfigItems;
|
||||||
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
||||||
import com.bonus.common.biz.enums.RepairInputStatusEnum;
|
import com.bonus.common.biz.enums.RepairInputStatusEnum;
|
||||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||||
|
|
@ -110,8 +114,10 @@ public class WashHouseScheduledTasks {
|
||||||
*/
|
*/
|
||||||
private void sendSms(String phoneNumber, String content) {
|
private void sendSms(String phoneNumber, String content) {
|
||||||
try {
|
try {
|
||||||
String sendResult = SmsUtils.smsToken(phoneNumber, content, "");
|
//String sendResult = SmsUtils.smsToken(phoneNumber, content, "");
|
||||||
if (StringUtils.isNotBlank(sendResult)) {
|
// 省公司短信发送
|
||||||
|
JSONObject sendResult = SmsTool.sendSms(new SmsParam(phoneNumber, content), BmConfigItems.ANHUI_COMPANY_SMS_KEY);
|
||||||
|
if (sendResult != null) {
|
||||||
log.info("短信发送成功: {}", sendResult);
|
log.info("短信发送成功: {}", sendResult);
|
||||||
} else {
|
} else {
|
||||||
log.error("短信发送失败,发送结果为空!");
|
log.error("短信发送失败,发送结果为空!");
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
u.nick_name,
|
u.nick_name,
|
||||||
telphone,
|
telphone,
|
||||||
GROUP_CONCAT(r.role_name SEPARATOR '/') as role_name,
|
GROUP_CONCAT(r.role_name SEPARATOR '/') as role_name,
|
||||||
concat( d2.dept_name, '/', d1.dept_name, '/', d.dept_name ) deptName
|
concat( d2.dept_name, '/', d1.dept_name, '/', d.dept_name ) dept_name
|
||||||
FROM
|
FROM
|
||||||
purchase_notice_person pnp
|
purchase_notice_person pnp
|
||||||
LEFT JOIN sys_user u ON pnp.user_id = u.user_id
|
LEFT JOIN sys_user u ON pnp.user_id = u.user_id
|
||||||
|
|
@ -38,6 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN sys_dept d2 ON d1.parent_id = d2.dept_id
|
LEFT JOIN sys_dept d2 ON d1.parent_id = d2.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
u.STATUS = '0'
|
u.STATUS = '0'
|
||||||
|
<if test="userName != null and userName != ''">
|
||||||
|
AND pnp.user_name like concat('%', #{userName}, '%')
|
||||||
|
</if>
|
||||||
GROUP BY pnp.user_id
|
GROUP BY pnp.user_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -66,6 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
user_id
|
user_id
|
||||||
FROM
|
FROM
|
||||||
purchase_notice_person)
|
purchase_notice_person)
|
||||||
|
<if test="userName != null and userName != ''">
|
||||||
|
AND u.user_name like concat('%', #{userName}, '%')
|
||||||
|
</if>
|
||||||
GROUP BY u.user_id
|
GROUP BY u.user_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue