|
@@ -27,7 +27,7 @@ public class SendWork {
|
|
|
params.put("templateId", "6698");
|
|
|
String[] templateParams = new String[2];
|
|
|
templateParams[0] = phonNumber.getFarmName();
|
|
|
- //templateParams[1] = masssage1;
|
|
|
+ templateParams[1] = masssage1;
|
|
|
params.put("templateParams", templateParams);
|
|
|
String result = client.send(params);
|
|
|
String balance = client.balance();
|
|
@@ -40,6 +40,7 @@ public class SendWork {
|
|
|
alarmHistoryEntity.setEndTime(new Date());
|
|
|
alarmHistoryEntity.setPhoneNumber(phonNumber.getPhoneNumber());
|
|
|
alarmHistoryEntity.setFarmName(phonNumber.getFarmName());
|
|
|
+ alarmHistoryEntity.setPersonName(phonNumber.getUserName());
|
|
|
System.out.println(alarmHistoryEntity);
|
|
|
alarmHistoryService.save(alarmHistoryEntity);
|
|
|
System.out.println("222存储成功");
|
|
@@ -56,7 +57,7 @@ public class SendWork {
|
|
|
params.put("templateId", "6699");
|
|
|
String[] templateParams = new String[2];
|
|
|
templateParams[0] = phonNumber.getFarmName();
|
|
|
- //templateParams[1] = "relay故障";
|
|
|
+ templateParams[1] = "relay故障";
|
|
|
params.put("templateParams", templateParams);
|
|
|
String result = client.send(params);
|
|
|
String balance = client.balance();
|
|
@@ -69,6 +70,7 @@ public class SendWork {
|
|
|
alarmHistoryEntity.setEndTime(new Date());
|
|
|
alarmHistoryEntity.setPhoneNumber(phonNumber.getPhoneNumber());
|
|
|
alarmHistoryEntity.setFarmName(phonNumber.getFarmName());
|
|
|
+ alarmHistoryEntity.setPersonName(phonNumber.getUserName());
|
|
|
System.out.println(alarmHistoryEntity);
|
|
|
alarmHistoryService.save(alarmHistoryEntity);
|
|
|
System.out.println("222存储成功");
|
|
@@ -76,7 +78,6 @@ public class SendWork {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public void send3(String masssage1, List<PhoneNumberEntity> phoneNumberList) throws Exception {
|
|
|
ZhenziSmsClient client = new ZhenziSmsClient("https://sms_developer.zhenzikj.com",
|
|
|
"109928", "2684d129-1946-43fc-9074-93cee1687eb7");
|
|
@@ -86,19 +87,21 @@ public class SendWork {
|
|
|
params.put("templateId", "6700");
|
|
|
String[] templateParams = new String[2];
|
|
|
templateParams[0] = phonNumber.getFarmName();
|
|
|
- //templateParams[1] = "video故障";
|
|
|
+ templateParams[1] = "video故障";
|
|
|
params.put("templateParams", templateParams);
|
|
|
String result = client.send(params);
|
|
|
String balance = client.balance();
|
|
|
System.out.println("333通知号码" + result + balance);
|
|
|
|
|
|
AlarmHistoryEntity alarmHistoryEntity = new AlarmHistoryEntity();
|
|
|
- alarmHistoryEntity.setAlarmType(2);
|
|
|
+ alarmHistoryEntity.setAlarmType(3);
|
|
|
alarmHistoryEntity.setBeginTime(new Date());
|
|
|
alarmHistoryEntity.setFarmCode(phonNumber.getFarmCode());
|
|
|
alarmHistoryEntity.setEndTime(new Date());
|
|
|
alarmHistoryEntity.setPhoneNumber(phonNumber.getPhoneNumber());
|
|
|
+ alarmHistoryEntity.setPersonName(phonNumber.getUserName());
|
|
|
alarmHistoryEntity.setFarmName(phonNumber.getFarmName());
|
|
|
+
|
|
|
System.out.println(alarmHistoryEntity);
|
|
|
alarmHistoryService.save(alarmHistoryEntity);
|
|
|
System.out.println("333存储成功");
|
|
@@ -112,7 +115,7 @@ public class SendWork {
|
|
|
"109928", "2684d129-1946-43fc-9074-93cee1687eb7");
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
params.put("number", "15171709851");
|
|
|
- params.put("templateId", "6663");
|
|
|
+ params.put("templateId", "6699");
|
|
|
String[] templateParams = new String[2];
|
|
|
templateParams[0] = "王江泾";
|
|
|
templateParams[1] = "1";
|