Commit 95a1875c2be312e27a07175e611465932c3742ab

Authored by 邱一成
2 parents a949f8e8 11aeb86c
Exists in master

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	cloud/dahua/src/main/java/com/example/dahua/module/GateModule.java
cloud/dahua/src/main/java/com/example/dahua/MyTask.java
... ... @@ -454,7 +454,7 @@ public class MyTask implements ApplicationRunner {
454 454 mqttManager = new MqttManager();
455 455 mqttManager.init();
456 456 }
457   - myScheduledTask.sendMQMess(content);
  457 + myScheduledTask.sendMQMess(content,deviceId);
458 458  
459 459 //记录学生考勤签到记录
460 460 FileUtils.getInstance().writeLogs(content, FileUtils.qiandaoSuccess);
... ...
cloud/dahua/src/main/java/com/example/dahua/async/MyScheduledTask.java
... ... @@ -204,7 +204,7 @@ public class MyScheduledTask {
204 204 // System.out.println("indexLineNum:"+indexLineNum+" ----------readLineNum:"+readLineNum);
205 205 if (indexLineNum >= readLineNum) {
206 206 readLineNum++;
207   - sendMQMess(content);
  207 + sendMQMess(content,"");
208 208 }
209 209  
210 210 }
... ... @@ -235,21 +235,22 @@ public class MyScheduledTask {
235 235  
236 236 }
237 237  
238   - public void sendMQMess(String content) {
  238 + public void sendMQMess(String content,String deviceId) {
239 239 String cardNum = content.substring(content.indexOf("卡号") + 3, content.indexOf("卡号") + 11);
240 240  
241   -// System.out.println("cardNum:" + cardNum);
242   -
243 241 String inOrOut = content.substring(content.indexOf("方向:") + 3, content.indexOf("方向:") + 5).endsWith("进门") ? "0" : "1";
244 242  
245   - String qiandaoDevId = content.substring(content.indexOf("设备") + 3, content.indexOf("设备") + 12);
  243 + //判断是否一体机,发送消息看板
  244 + String qiandaoDevId="";
  245 + if(StringUtils.isEmpty(deviceId)){
  246 + qiandaoDevId = content.substring(content.indexOf("设备") + 3, content.indexOf("设备") + 12);
  247 + }else{
  248 + qiandaoDevId =deviceId;
  249 + }
246 250  
247 251 //获取寝室关联的场景id
248 252 String placeId = userDao.getPlaceIdWithKaoqinDevid(qiandaoDevId);
249 253  
250   -// System.out.println("qiandaoDevId:" + qiandaoDevId);
251   -// System.out.println("placeId:" + placeId);
252   -
253 254 if (null != placeId) {
254 255 //关联的显示看板设备
255 256 List<String> kanbanIds = userDao.getKanBanIdWithPlaceId(placeId);
... ... @@ -272,7 +273,6 @@ public class MyScheduledTask {
272 273 }
273 274 }
274 275  
275   -
276 276 }
277 277  
278 278  
... ...
cloud/dahua/src/main/java/com/example/dahua/module/GateModule.java
1 1 package com.example.dahua.module;
2 2  
3   -import com.example.dahua.MyTask;
4 3 import com.example.dahua.bean.PermissionBean;
5 4 import com.example.dahua.bean.WeekDay;
6 5 import com.example.dahua.bean.WeekTime;
... ... @@ -31,8 +30,6 @@ public class GateModule {
31 30 // 查询句柄
32 31 private static LLong m_lFindHandle = new LLong(0);
33 32  
34   - private final static NetSDKLib.NET_DEVICEINFO_Ex deviceInfo = new NetSDKLib.NET_DEVICEINFO_Ex();
35   -
36 33 /**
37 34 * 订阅实时上传智能分析数据
38 35 *
... ... @@ -57,19 +54,12 @@ public class GateModule {
57 54 return m_hAttachHandle;
58 55 }
59 56  
  57 +
  58 + private static NetSDKLib.NET_DEVICEINFO_Ex deviceInfo;
  59 +
60 60 public static LLong realLoadPic2(int ChannelId, NetSDKLib.fAnalyzerDataCallBack m_AnalyzerDataCB, LLong lLong,String devcieId) {
61 61  
62 62 // final NetSDKLib.NET_DEVICEINFO_Ex deviceInfo = new NetSDKLib.NET_DEVICEINFO_Ex();
63   -//
64   -// Map<String, NetSDKLib.LLong> lLongMap = new MyTask().lLongMap;
65   -// if(lLongMap.isEmpty()){
66   -// for (String key :lLongMap.keySet()){
67   -// if(key.equals(devcieId)){
68   -// lLongMap.
69   -// }
70   -// }
71   -//
72   -// };
73 63  
74 64 // 设备ID
75 65 System.arraycopy(devcieId.getBytes(), 0, deviceInfo.sSerialNumber, 0, devcieId.getBytes().length);
... ... @@ -690,6 +680,16 @@ public class GateModule {
690 680 }
691 681  
692 682 /**
  683 + * 门禁卡记录集信息
  684 + */
  685 + private static NET_RECORDSET_ACCESS_CTL_CARD accessCardInfo;
  686 +
  687 + /**
  688 + * 记录集操作
  689 + */
  690 + private static NET_CTRL_RECORDSET_PARAM update;
  691 +
  692 + /**
693 693 * 修改设备卡信息
694 694 * @param recordNo
695 695 * @param cardNo
... ... @@ -714,7 +714,7 @@ public class GateModule {
714 714 /**
715 715 * 门禁卡记录集信息
716 716 */
717   - NET_RECORDSET_ACCESS_CTL_CARD accessCardInfo = new NET_RECORDSET_ACCESS_CTL_CARD();
  717 +// NET_RECORDSET_ACCESS_CTL_CARD accessCardInfo = new NET_RECORDSET_ACCESS_CTL_CARD();
718 718 // 记录集编号, 修改、删除卡信息必须填写
719 719 accessCardInfo.nRecNo = recordNo;
720 720  
... ... @@ -784,7 +784,8 @@ public class GateModule {
784 784 /**
785 785 * 记录集操作
786 786 */
787   - NET_CTRL_RECORDSET_PARAM update = new NET_CTRL_RECORDSET_PARAM();
  787 +// NET_CTRL_RECORDSET_PARAM update = new NET_CTRL_RECORDSET_PARAM();
  788 +
788 789 update.emType = EM_NET_RECORD_TYPE.NET_RECORD_ACCESSCTLCARD; // 记录集信息类型
789 790 update.pBuf = accessCardInfo.getPointer();
790 791  
... ...
cloud/pom.xml
... ... @@ -35,7 +35,7 @@
35 35 <!-- <module>consumer</module>-->
36 36 <module>haikangface</module>
37 37 <!-- <module>search_independence</module>-->
38   - <!-- <module>search_smartCampus</module>-->
  38 + <module>search_smartCampus</module>
39 39 <!-- <module>search_xiaoan</module>-->
40 40 <!-- <module>mypulsar</module>-->
41 41 <!-- <module>weigeng</module>-->
... ...