|
@@ -1,10 +1,16 @@
|
|
|
package com.jpsoft.smart;
|
|
|
|
|
|
+import com.jpsoft.smart.modules.base.dao.PersonInfoDAO;
|
|
|
import com.jpsoft.smart.modules.base.dao.WarningPusherDAO;
|
|
|
import com.jpsoft.smart.modules.base.dto.PersonDeviceLogDTO;
|
|
|
import com.jpsoft.smart.modules.base.entity.DeviceInfo;
|
|
|
+import com.jpsoft.smart.modules.base.entity.PersonDeviceLog;
|
|
|
+import com.jpsoft.smart.modules.base.entity.PersonInfo;
|
|
|
import com.jpsoft.smart.modules.base.entity.WarningPusher;
|
|
|
+import com.jpsoft.smart.modules.base.service.PersonDeviceLogService;
|
|
|
+import com.jpsoft.smart.modules.base.service.impl.PersonDeviceLogServiceImpl;
|
|
|
import com.jpsoft.smart.modules.common.dto.MessageResult;
|
|
|
+import com.jpsoft.smart.modules.common.utils.WechatMessageUtil;
|
|
|
import com.jpsoft.smart.modules.lapi.service.ILapiService;
|
|
|
import com.jpsoft.smart.modules.lapi.vo.LapiMsgResult;
|
|
|
import com.jpsoft.smart.modules.lapi.vo.LapiResult;
|
|
@@ -16,6 +22,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -32,6 +39,14 @@ public class LApiTest {
|
|
|
@Autowired
|
|
|
private WarningPusherDAO warningPusherDAO;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PersonInfoDAO personInfoDAO;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private PersonDeviceLogServiceImpl personDeviceLogService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@Test
|
|
|
public void testKeepLive(){
|
|
|
try {
|
|
@@ -174,7 +189,7 @@ public class LApiTest {
|
|
|
String ids = "c6083b40-6025-11ea-9760-f0761c318e92,5cebd719-9e0e-4f0b-8414-4d7abe430ebf";
|
|
|
List<String> idList = Arrays.asList(ids.split(","));
|
|
|
|
|
|
- List<WarningPusher> list = warningPusherDAO.findByIdList(idList);
|
|
|
+ List<WarningPusher> list = warningPusherDAO.findByCompanyIdList(idList);
|
|
|
|
|
|
System.out.println(list);
|
|
|
} catch (Exception e) {
|
|
@@ -185,9 +200,16 @@ public class LApiTest {
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
- public void testIsSuccessAddPerson(){
|
|
|
+ public void testSendTemperatureAlarmsyncTask(){
|
|
|
try {
|
|
|
|
|
|
+ // WechatMessageUtil.sendTemperatureAlarmInfo("oLowyuOQ9ULF3LUGt6h3fTrsnbVE","荆鹏软件_门房考勤机","wx0b3c41a903053808","43557bd62f77b0c3d6670e991872f0e7","Mg9Ldk_kaoHAUwXFHEatrGugTlOz3yrMmMk7VoBca4M");
|
|
|
+ PersonDeviceLog personDeviceLog = new PersonDeviceLog();
|
|
|
+ personDeviceLog.setDeviceNo("210235C4C33203000165");
|
|
|
+ personDeviceLog.setPersonId(11622);
|
|
|
+ personDeviceLog.setRecordTime(new Date());
|
|
|
+ personDeviceLog.setId("000733db-2945-4a1f-862f-86c24b50f84c");
|
|
|
+ personDeviceLogService.sendTemperatureAlarmsyncTask(personDeviceLog);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|