md
This commit is contained in:
parent
cca0c0c640
commit
b0e5b7757e
@ -266,5 +266,14 @@
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea:1.1.14" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Maven: com.mascloud:massdk:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../emis-biz/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
@ -225,5 +225,14 @@
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea-util:0.2.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:tea:1.1.14" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Maven: com.mascloud:massdk:1.0.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
BIN
emis-biz/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar
Normal file
BIN
emis-biz/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar
Normal file
Binary file not shown.
@ -105,6 +105,14 @@
|
||||
<version>1.1.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mascloud</groupId>
|
||||
<artifactId>massdk</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/masmgc.sdk.sms-1.0.3-SNAPSHOT.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fastreport</groupId>-->
|
||||
|
||||
@ -42,6 +42,7 @@ package com.xdadan.erp.emis.service;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillFeeitemService;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillService;
|
||||
import com.xdadan.erp.emis.service.sms.AliyunSMSService;
|
||||
import com.xdadan.erp.emis.service.sms.CMCCSMSService;
|
||||
import com.xdadan.erp.emis.utils.HTTPHelperV3;
|
||||
import com.xdadan.erp.emis.utils.Kd100Helper;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
@ -148,6 +149,9 @@ public class EmisBaseService {
|
||||
@Autowired
|
||||
private AliyunSMSService aliyunSMSService;
|
||||
|
||||
@Autowired
|
||||
private CMCCSMSService cmccSMSService;
|
||||
|
||||
@Autowired
|
||||
private EmisSiteSettleRecordMapper emisSiteSettleRecordMapper;
|
||||
|
||||
@ -1325,6 +1329,7 @@ public class EmisBaseService {
|
||||
|
||||
aliyunSMSService.sendMessage("探路速运", dt.getPhone(),"SMS_465316363", jObjParam.toJSONString());
|
||||
|
||||
// cmccSMSService.sendMessage(DBUtil.getSeqNoByLen(10),dt.getPhone(),dt.getContent());
|
||||
}
|
||||
// 签收短信
|
||||
else if ("2".equals(dt.getSmsType())) {
|
||||
@ -1336,7 +1341,8 @@ public class EmisBaseService {
|
||||
jObjParam.put("Nationalcity",nationalcity);
|
||||
jObjParam.put("name",dt.getBillCode());
|
||||
|
||||
aliyunSMSService.sendMessage("探路速运", dt.getPhone(), "SMS_465341331", jObjParam.toJSONString());
|
||||
// aliyunSMSService.sendMessage("探路速运", dt.getPhone(), "SMS_465341331", jObjParam.toJSONString());
|
||||
// cmccSMSService.sendMessage(DBUtil.getSeqNoByLen(10),dt.getPhone(),dt.getContent());
|
||||
|
||||
}
|
||||
// 问题件
|
||||
@ -1358,6 +1364,8 @@ public class EmisBaseService {
|
||||
jObjParam.put("time",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,waybill.getEstimateDate()));
|
||||
|
||||
aliyunSMSService.sendMessage("探路速运", dt.getPhone(),"SMS_465386407", jObjParam.toJSONString());
|
||||
// cmccSMSService.sendMessage(DBUtil.getSeqNoByLen(10),dt.getPhone(),dt.getContent());
|
||||
|
||||
}
|
||||
else{
|
||||
continue;
|
||||
|
||||
@ -1285,6 +1285,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL,"月结客户不存在");
|
||||
}
|
||||
emisWaybillSave.setCustName(emisMonthCustomerUser.getCustName());
|
||||
emisWaybillSave.setPayee(emisMonthCustomerUser.getPayee());
|
||||
emisWaybillSave.setSalesmen(emisMonthCustomerUser.getSalesmen());
|
||||
}
|
||||
|
||||
// 保存客户收件、寄件地址,开单不要关联客户地址数据
|
||||
|
||||
@ -0,0 +1,133 @@
|
||||
package com.xdadan.erp.emis.service.sms;
|
||||
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mascloud.model.MoModel;
|
||||
import com.mascloud.model.StatusReportModel;
|
||||
import com.mascloud.sdkclient.Client;
|
||||
import com.mascloud.util.JsonUtil;
|
||||
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.system.service.ISysConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中国移动短信
|
||||
*/
|
||||
@Slf4j
|
||||
@Service("CMCCSMSService")
|
||||
public class CMCCSMSService {
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
*/
|
||||
public int sendMessage(String seqNo,String phone,String content) throws EmisBizError {
|
||||
String jsonParamStr=configService.selectConfigByKey("sys.cmcc.sms");
|
||||
JSONObject jObjAliyunParam=JSONObject.parseObject(jsonParamStr);
|
||||
String url=jObjAliyunParam.getString("url");
|
||||
String userAccount=jObjAliyunParam.getString("userAccount");
|
||||
String password=jObjAliyunParam.getString("password");
|
||||
String ecname=jObjAliyunParam.getString("ecname");
|
||||
String signCode=jObjAliyunParam.getString("signCode");
|
||||
|
||||
/*
|
||||
SDK java http://112.35.4.197:15000
|
||||
单位名称:接口联调账号
|
||||
用户名 :JStlz
|
||||
密 码 :Passwd@#123
|
||||
签名编码:bM16CfN2B
|
||||
服务代码:10657204006
|
||||
黑名单 普通短信 有发送能力
|
||||
时效:1个月 10条/天
|
||||
{
|
||||
"url":"http://112.35.4.197:15000",
|
||||
"userAccount":"JStlz",
|
||||
"password":"Passwd@#123",
|
||||
"ecname":"接口联调账号",
|
||||
"ecname":"接口联调账号",
|
||||
"signCode":"bM16CfN2B",
|
||||
"serviceCode":"10657204006",
|
||||
"desc":"黑名单 普通短信 有发送能力",
|
||||
"timeDesc":"1个月 10条/天"
|
||||
}
|
||||
*/
|
||||
|
||||
return innerSendNormal(seqNo,
|
||||
url,userAccount,password,ecname,signCode,
|
||||
phone,content);
|
||||
}
|
||||
|
||||
public static int innerSendNormal(
|
||||
String seqNo,
|
||||
String url,String userAccount,String password,
|
||||
String ecname,String signCode,String phone,String content
|
||||
) throws EmisBizError {
|
||||
try {
|
||||
|
||||
Client client = Client.getInstance( );
|
||||
// 登录地址需另外提供
|
||||
boolean isLoggedin = client.login( url, userAccount, password, ecname );
|
||||
if( !isLoggedin ) {
|
||||
log.error("移动短信渠道登录失败");
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL,"移动短信渠道登录失败");
|
||||
}
|
||||
|
||||
// 普通短信
|
||||
int rst = client.sendDSMS( new String[]{phone}, content, seqNo, 1, signCode, null, true );
|
||||
|
||||
// 获取状态报告——开始
|
||||
List<StatusReportModel> statusReportlist = client.getReport( );
|
||||
log.error( "===>移动短信渠道发送状态==>:" + JSON.toJSONString( statusReportlist ) );
|
||||
// 获取状态报告——结束
|
||||
|
||||
//
|
||||
if(rst==1) {
|
||||
return 1;
|
||||
// if ("OK".equals(response.getBody().getCode())) {
|
||||
// } else {
|
||||
// throw new EmisBizError(EmisBizErrorType.FAIL,response.getBody().getMessage());
|
||||
// }
|
||||
}else{
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL,"短信渠道发送错误");
|
||||
}
|
||||
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL,"短信渠道异常");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String url="http://112.35.4.197:15000";
|
||||
String userAccount="JStlz";
|
||||
String password="Passwd@#123";
|
||||
String ecname="接口联调账号";
|
||||
String phoneNumbers="13815412745";
|
||||
String signCode="bM16CfN2B";
|
||||
|
||||
String content="尊敬的客户:您寄往越南的包裹已寄出,运单号T123。如有疑问,详询服务热线4000257080,感谢您使用探路速运!";
|
||||
|
||||
try {
|
||||
|
||||
int ret = innerSendNormal("1",
|
||||
url,userAccount,password,ecname,signCode,
|
||||
phoneNumbers,content);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -61,11 +61,22 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.2.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.3.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.3.14" level="project" />
|
||||
@ -77,6 +88,7 @@
|
||||
<orderEntry type="library" name="Maven: com.github.oshi:oshi-core:6.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:5.10.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.java.dev.jna:jna-platform:5.10.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
|
||||
<orderEntry type="module" module-name="emis-wms" />
|
||||
<orderEntry type="library" name="Maven: com.xdadan:emis-common:1.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.16" level="project" />
|
||||
@ -85,14 +97,6 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.0" level="project" />
|
||||
@ -102,7 +106,6 @@
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.12.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.12.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.12.6" level="project" />
|
||||
@ -214,9 +217,6 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.7.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.8.0" level="project" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user