|
|
@ -3,6 +3,7 @@ package utils; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.ruoyi.code.camera.domain.CameraNetFtp; |
|
|
|
import com.ruoyi.code.camera.domain.CameraNetFtp; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import com.sun.jna.NativeLong; |
|
|
|
import com.sun.jna.NativeLong; |
|
|
|
import com.sun.jna.Pointer; |
|
|
|
import com.sun.jna.Pointer; |
|
|
|
import com.sun.jna.Structure; |
|
|
|
import com.sun.jna.Structure; |
|
|
@ -3451,7 +3452,7 @@ public class run_device_cfg implements ActionListener, ListSelectionListener { |
|
|
|
int uFtpPort = 22; |
|
|
|
int uFtpPort = 22; |
|
|
|
String szUserName = "test"; |
|
|
|
String szUserName = "test"; |
|
|
|
String szPassword = "test123"; |
|
|
|
String szPassword = "test123"; |
|
|
|
boolean result = setDeviceFtpCfg(loginID, bRealtimeEnable, bOfflineEnable, szAddress, uFtpPort, szUserName, szPassword); |
|
|
|
boolean result = setDeviceFtpCfg(loginID, bRealtimeEnable, bOfflineEnable, szAddress, uFtpPort, szUserName, szPassword,""); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("result = " + result); |
|
|
|
System.out.println("result = " + result); |
|
|
|
} |
|
|
|
} |
|
|
@ -3625,9 +3626,11 @@ public class run_device_cfg implements ActionListener, ListSelectionListener { |
|
|
|
* @param szPassword 密码 |
|
|
|
* @param szPassword 密码 |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public boolean setDeviceFtpCfg(NativeLong loginID, int bRealtimeEnable,int bOfflineEnable,String szAddress,int uFtpPort,String szUserName,String szPassword){ |
|
|
|
public boolean setDeviceFtpCfg(NativeLong loginID, int bRealtimeEnable,int bOfflineEnable,String szAddress,int uFtpPort,String szUserName,String szPassword,String szPathRule){ |
|
|
|
//上传图片路径规则
|
|
|
|
//上传图片路径规则
|
|
|
|
String szPathRule = "/%n/%Y/%M/%D/%Y_%M_%D_%h_%m_%s.jpg"; |
|
|
|
if(StringUtils.isBlank(szPathRule)) { |
|
|
|
|
|
|
|
szPathRule = "/%n/%Y-%M-%D/%Y_%M_%D_%h_%m_%s.jpg"; |
|
|
|
|
|
|
|
} |
|
|
|
byte[] szPathRuleBytes = getNewArray(160,DataUtils.sdk_data_stringToByteArray(szPathRule,GlobalTool.getEncodeType())); |
|
|
|
byte[] szPathRuleBytes = getNewArray(160,DataUtils.sdk_data_stringToByteArray(szPathRule,GlobalTool.getEncodeType())); |
|
|
|
//路径编码类型
|
|
|
|
//路径编码类型
|
|
|
|
int emPathEncodeType = 0; |
|
|
|
int emPathEncodeType = 0; |
|
|
|