| 
					
				 | 
			
			
				@ -80,12 +80,15 @@ public class NetDevSdkService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    // http://zhyzh.gongshu.gov.cn:3001/ 开vpn后可以本地调试 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    //IP:10.18.50.18   账号admin  密码Admin12345@    HTTP端口80  HTTPS端口  443  RTSP端口 554 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final int dwPort = 80;//端口号 443 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    private static final int dwPort = 80;//端口号 443 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final int dwPort = 3001;//端口号 443 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String strUserName = "admin";//用户名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String strPassword = "Admin12345@";//密码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String strIPAddr = "10.18.50.18";//ip地址 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String strIPAddr = "zhyzh.gongshu.gov.cn";//ip地址 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    private static final String strIPAddr = "10.18.50.18";//ip地址 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final Integer dwLoginProto = 1; /* 登录协议 0:onvif 1:私有*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final Integer dwDeviceType = 1; /* 设备类型 IPC/NVR */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String baseFaceImg = "https://zhyzh.gongshu.gov.cn/face/"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void init(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        initSDK(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -318,6 +321,11 @@ public class NetDevSdkService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isBlank(idcard)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return "身份证不能为空"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(faceDO.getSynTime())&&faceDO.getSynTime().compareTo(DateUtil.getNextMinute(DateUtil.getStringDate(), -30))>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return "同步时间必须晚于当前时间30分钟"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        do { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String startTime = faceDO.getSynTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(StringUtils.isBlank(startTime)){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -327,7 +335,7 @@ public class NetDevSdkService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                endTime = DateUtil.getNextMinute(startTime, 30);//采集30分钟后的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("startTime="+startTime+",endTime="+endTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info(name+",startTime="+startTime+",endTime="+endTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            NETDEV_ALARM_LOG_COND_LIST_S stFindCond = new NETDEV_ALARM_LOG_COND_LIST_S(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            stFindCond.dwPageRow = 16; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            stFindCond.dwFirstRow = 0; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -378,20 +386,22 @@ public class NetDevSdkService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        stRecordInfo.stCompareInfo.stSnapshotImage.stSmallImage.pcData = new Memory(Common.NETDEMO_PICTURE_SIZE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        stRecordInfo.stCompareInfo.stSnapshotImage.stSmallImage.udwSize = Common.NETDEMO_PICTURE_SIZE; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        stRecordInfo.stCompareInfo.stSnapshotImage.stArea = new NETDEV_FACE_ALARM_IMAGE_AREA_S(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        stRecordInfo.stCompareInfo.pstPersonInfo = new Memory(Common.NETDEMO_PICTURE_SIZE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        bRet = NetDemo.netdevsdk.NETDEV_FindNextFaceRecordDetail(lpFindRecordHandlePointer, stRecordInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if(bRet == true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String passTime = Common.timeStamp2Date(String.valueOf(stRecordInfo.udwPassTime),NetDemo.DateFormat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String strTime = Common.getDate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //nvr 没有大图 String strFileNameBig = NetDemo.strPicturePath  + "_" + "PassTime_"+ stRecordInfo.udwPassTime + "_" + "_" + strTime +"BigImage.jpg"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String strFileNameSmall = NetDemo.strPicturePath + "_" + "PassTime_"+ stRecordInfo.udwPassTime + "_" + strTime +"SmallImage.jpg"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String imgName = "_" + "PassTime_"+ stRecordInfo.udwPassTime + "_" + strTime +"SmallImage.jpg"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String strFileNameSmall = NetDemo.strPicturePath + imgName; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            Common.savePicture(stRecordInfo.stCompareInfo.stSnapshotImage.stSmallImage.pcData, stRecordInfo.stCompareInfo.stSnapshotImage.stSmallImage.udwSize, strFileNameSmall); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            BaseDeviceFaceRecordDO faceRecordDO = new BaseDeviceFaceRecordDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDO.setPatient(patient); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDO.setName(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDO.setPassTime(passTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDO.setImg(strFileNameSmall); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDO.setImg(baseFaceImg+imgName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            faceRecordDao.save(faceRecordDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        else 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -418,7 +428,7 @@ public class NetDevSdkService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            faceDO.setSynTime(endTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            devicePatientFaceDao.save(faceDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }while (endTime.compareTo(DateUtil.getNextMin(DateUtil.getStringDate(), -30))<0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }while (endTime.compareTo(DateUtil.getNextMinute(DateUtil.getStringDate(), -30))<0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |