|
|
@@ -26,21 +26,27 @@ public class SmsSydUtil {
|
|
|
|
|
|
private MTPack mtPack;
|
|
|
|
|
|
+ @Value("${sms-syd.user-name:djjx}")
|
|
|
+ private String USER_NAME;
|
|
|
+
|
|
|
+ @Value("${sms-syd.pass-word:yfhzfGSJ}")
|
|
|
+ private String PASS_WORD;
|
|
|
+
|
|
|
// 证号 djjx
|
|
|
// 登录密码 6B1aQety
|
|
|
// 发送密码 yfhzfGSJ
|
|
|
- private Account account = new Account("djjx", "yfhzfGSJ");
|
|
|
+ //private Account account = new Account("djjx", "yfhzfGSJ");
|
|
|
|
|
|
- @Value("${sms-syd.ip}")
|
|
|
- public String SMS_IP = "192.168.32.153";
|
|
|
+ @Value("${sms-syd.ip:192.168.32.153}")
|
|
|
+ public String SMS_IP;
|
|
|
@Value("${sms-syd.down-port:8090}")
|
|
|
- public int DOWN_PORT = 8090;
|
|
|
+ public int DOWN_PORT;
|
|
|
@Value("${sms-syd.up-port:8188}")
|
|
|
- public int UP_PORT = 8188;
|
|
|
+ public int UP_PORT;
|
|
|
|
|
|
// 8090 下发端口 8188 拉取状态报告和上行
|
|
|
- private PostMsg DOWN_PM = new PostMsg(SMS_IP, DOWN_PORT);
|
|
|
- private PostMsg UP_PM = new PostMsg(SMS_IP, UP_PORT);
|
|
|
+ //private PostMsg DOWN_PM = new PostMsg(SMS_IP, DOWN_PORT);
|
|
|
+ //private PostMsg UP_PM = new PostMsg(SMS_IP, UP_PORT);
|
|
|
|
|
|
private static Map<Integer, String> DOWN_MAP;
|
|
|
|
|
|
@@ -127,6 +133,8 @@ public class SmsSydUtil {
|
|
|
}
|
|
|
pack.setMsgs(msgs);
|
|
|
|
|
|
+ Account account = new Account(USER_NAME, PASS_WORD);
|
|
|
+ PostMsg DOWN_PM = new PostMsg(SMS_IP, DOWN_PORT);
|
|
|
GsmsResponse resp = DOWN_PM.post(account, pack);
|
|
|
log.info("四医大短信下发返回结果:" + resp.toString());
|
|
|
if(resp.getResult() == 0){
|
|
|
@@ -153,6 +161,8 @@ public class SmsSydUtil {
|
|
|
return;
|
|
|
}*/
|
|
|
|
|
|
+ Account account = new Account(USER_NAME, PASS_WORD);
|
|
|
+ PostMsg UP_PM = new PostMsg(SMS_IP, UP_PORT);
|
|
|
MOMsg[] mos = UP_PM.getMOMsgs(account, 10);
|
|
|
|
|
|
if (mos != null) {
|