You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

685 lines
27 KiB

3 weeks ago
  1. using Newtonsoft.Json;
  2. using NFine.Code;
  3. using NFine.Data.Extensions;
  4. using NFine.Domain._03_Entity.SRM;
  5. using NFine.Repository;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Data;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Net;
  12. using System.IO;
  13. using System.Reflection;
  14. using System.Data.SqlClient;
  15. using UpdateServiceLibrary.Helper;
  16. using System.Net.NetworkInformation;
  17. using System.Net.Sockets;
  18. using System.Web;
  19. namespace NFine.Application.WMS
  20. {
  21. public class SystemUpdateApp : RepositoryFactory<ICSVendor>
  22. {
  23. //public string DownloadFileFolder = @"C:\path\folder";
  24. //public string UpdateFileFolder = @"C:\path\folder2";
  25. public static DataTable Invmes = new DataTable();
  26. PickMaterialApp App = new PickMaterialApp();
  27. DownLoadFileHelper downLoadFileHelper = new DownLoadFileHelper();
  28. FileHelper helper = new FileHelper();
  29. #region 获取更新文件信息
  30. /// <summary>
  31. ///获取更新文件信息
  32. /// </summary>
  33. /// <returns></returns>
  34. public string GetFileList()
  35. {
  36. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',');
  37. string result = String.Empty;
  38. try
  39. {
  40. result = JsonConvert.SerializeObject(GetUpdateFilesDetail().FaBuList);
  41. }
  42. catch (Exception ex)
  43. {
  44. result = ex.Message;
  45. }
  46. return result;
  47. }
  48. #endregion
  49. #region 获取详情信息
  50. /// <summary>
  51. /// 获取详情信息
  52. /// </summary>
  53. /// <returns></returns>
  54. public string GetFilesDetail(string faBuNum)
  55. {
  56. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',');
  57. string result = String.Empty;
  58. try
  59. {
  60. result = JsonConvert.SerializeObject(GetUpdateFilesDetail(faBuNum).FaBuList[0].Files);
  61. }
  62. catch (Exception ex)
  63. {
  64. result = ex.Message;
  65. }
  66. return result;
  67. }
  68. #endregion
  69. #region 获取文件信息
  70. /// <summary>
  71. /// 获取文件信息
  72. /// </summary>
  73. /// <returns></returns>
  74. public JsonData GetUpdateFilesDetail(string faBuNum="")
  75. {
  76. JsonData result;
  77. try
  78. {
  79. string sql = @"SELECT F_FullName,F_Description FROM [dbo].[Sys_SRM_Items] WHERE F_EnCode = 'SystemUpdate'";
  80. var dt = SqlHelper.CmdExecuteDataTable(sql);
  81. if (dt.Rows.Count <= 0)
  82. {
  83. throw new Exception("请先在自定义档案维护客户信息");
  84. }
  85. TypeModel model = new TypeModel
  86. {
  87. CustomerName = dt.Rows[0]["F_FullName"].ToString(),
  88. XTType = "WMS",
  89. FaBuNum = faBuNum
  90. };
  91. string Inputstr = JsonConvert.SerializeObject(model);
  92. string APIURL = dt.Rows[0]["F_Description"].ToString()+ "APIGetFaBuFile";
  93. string jsonString = HttpPost(APIURL, Inputstr);
  94. result = JsonConvert.DeserializeObject<JsonData>(jsonString);
  95. }
  96. catch (Exception ex)
  97. {
  98. throw new Exception(ex.Message);
  99. }
  100. return result;
  101. }
  102. #endregion
  103. #region 接口api解析
  104. /// <summary>
  105. /// 接口api解析
  106. /// </summary>
  107. /// <param name="url">地址</param>
  108. /// <param name="body">参数</param>
  109. /// <returns></returns>
  110. public static string HttpPost(string url, string body)
  111. {
  112. try
  113. {
  114. Encoding encoding = Encoding.UTF8;
  115. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  116. request.Method = "POST";
  117. request.Accept = "application/json, text/javascript, */*"; //"text/html, application/xhtml+xml, */*";
  118. request.ContentType = "application/json; charset=utf-8";
  119. byte[] buffer = encoding.GetBytes(body);
  120. request.ContentLength = buffer.Length;
  121. request.GetRequestStream().Write(buffer, 0, buffer.Length);
  122. HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  123. using (StreamReader reader = new StreamReader(response.GetResponseStream(), encoding))
  124. {
  125. return reader.ReadToEnd();
  126. }
  127. }
  128. catch (WebException ex)
  129. {
  130. throw new Exception(ex.Message);
  131. }
  132. }
  133. #endregion
  134. #region 调用更新接口
  135. /// <summary>
  136. /// 调用更新接口
  137. /// </summary>
  138. /// <returns></returns>
  139. public ResultModel ConfirmDown(string faBuNum)
  140. {
  141. ResultModel result;
  142. try
  143. {
  144. string userName = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName;
  145. string sql = @"SELECT F_FullName,F_Description FROM [dbo].[Sys_SRM_Items] WHERE F_EnCode = 'SystemUpdate'";
  146. string ip1=string.Empty;
  147. var dt = SqlHelper.CmdExecuteDataTable(sql);
  148. if (dt.Rows.Count<=0)
  149. {
  150. throw new Exception("请先在自定义档案维护客户信息");
  151. }
  152. // 获取所有的网络接口
  153. NetworkInterface[] networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
  154. // 遍历所有网络接口,寻找当前活动的接口(即已连接的网络接口)
  155. foreach (NetworkInterface networkInterface in networkInterfaces)
  156. {
  157. // 如果网络接口是活动的(即已连接)
  158. if (networkInterface.OperationalStatus == OperationalStatus.Up)
  159. {
  160. // 获取该接口的所有IP地址信息
  161. UnicastIPAddressInformationCollection ipAddressInfo = networkInterface.GetIPProperties().UnicastAddresses;
  162. // 遍历IP地址信息,寻找IPv4地址
  163. foreach (UnicastIPAddressInformation ip in ipAddressInfo)
  164. {
  165. if (ip.Address.AddressFamily == AddressFamily.InterNetwork)
  166. {
  167. // 输出IPv4地址
  168. ip1= ip.Address.ToString();
  169. // 如果只需要第一个IPv4地址,可以在找到后退出循环
  170. break;
  171. }
  172. }
  173. }
  174. }
  175. ConfirmDownModel model = new ConfirmDownModel
  176. {
  177. CustomerName = dt.Rows[0]["F_FullName"].ToString(),
  178. PersonName = userName,
  179. FaBuNum = faBuNum,
  180. IP1= ip1
  181. };
  182. string Inputstr = JsonConvert.SerializeObject(model);
  183. string APIURL = dt.Rows[0]["F_Description"].ToString()+ "APIConfirmDownFaBuFile";
  184. string jsonString = HttpPost(APIURL, Inputstr);
  185. result = JsonConvert.DeserializeObject<ResultModel>(jsonString);
  186. }
  187. catch (Exception ex)
  188. {
  189. throw new Exception(ex.Message);
  190. }
  191. return result;
  192. }
  193. #endregion
  194. /// <summary>
  195. /// 更新文件
  196. /// </summary>
  197. /// <param name="savePath"></param>
  198. /// <param name="Year"></param>
  199. /// <returns></returns>
  200. public string UpdateFiles(String keyValue)
  201. {
  202. string msg = string.Empty;
  203. //数据获取
  204. try
  205. {
  206. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
  207. string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode;
  208. string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName;
  209. SqlConnection conn = SqlHelper.GetDataCenterConn();
  210. //获取文件版本号
  211. List<string> filesArr = keyValue.Split(',').Where(o=>!o.IsEmpty()).ToList();
  212. string publishPath = System.AppDomain.CurrentDomain.BaseDirectory;
  213. string name = new DirectoryInfo(publishPath).Name + "-WMSBSBackup";
  214. string DownloadFileFolder = Path.Combine(new DirectoryInfo(publishPath).Parent.FullName, name);
  215. if (!Directory.Exists(DownloadFileFolder))
  216. Directory.CreateDirectory(DownloadFileFolder);
  217. // 获取文件夹的DirectoryInfo对象
  218. DirectoryInfo directoryInfo = new DirectoryInfo(DownloadFileFolder);
  219. string folderPrefix = DateTime.Now.ToString("yyyyMMdd"); // 你想要匹配的文件夹前缀
  220. //string newFolderName=string.Empty; // 新文件夹的名称
  221. string newFolderPath = string.Empty;
  222. // 获取所有以指定前缀开头的文件夹
  223. var directories = Directory.GetDirectories(DownloadFileFolder, folderPrefix + "*")
  224. .Select(dir => new DirectoryInfo(dir))
  225. .ToList();
  226. // 如果没有找到任何文件夹,则直接创建新文件夹
  227. if (!directories.Any())
  228. {
  229. newFolderPath = Path.Combine(DownloadFileFolder, folderPrefix + "01");
  230. Directory.CreateDirectory(newFolderPath);
  231. }
  232. else
  233. {
  234. // 解析文件夹名称以获取流水号,并找出最大的流水号
  235. int maxSerialNumber = directories
  236. .Select(dir => int.Parse(dir.Name.Substring(folderPrefix.Length)))
  237. .Max();
  238. // 流水号加1,并创建新文件夹
  239. int newSerialNumber = maxSerialNumber + 1;
  240. newFolderPath = Path.Combine(DownloadFileFolder, $"{folderPrefix}{newSerialNumber:D2}"); // D2表示格式化为两位数
  241. }
  242. Exception exception = null;
  243. Directory.CreateDirectory(newFolderPath);
  244. filesArr.ForEach(faBuNum =>
  245. {
  246. var files = GetUpdateFilesDetail(faBuNum).FaBuList[0].Files;
  247. //List<Files> files = new List<Files>();
  248. //Files f1 = new Files {
  249. // FilePath = "http://119.3.29.177:8013/ReportFile/ProjectFaBuFile/发布文件202403060331541test.sql"
  250. //};
  251. //Files f2 = new Files
  252. //{
  253. // FilePath = "http://119.3.29.177:8013/ReportFile/ProjectFaBuFile/发布文件202403060329051系统更新压缩补丁包.zip"
  254. //};
  255. //files.Add(f1);
  256. //files.Add(f2);
  257. var downloadFolder = Path.Combine(newFolderPath, faBuNum);
  258. if (!Directory.Exists(downloadFolder))
  259. Directory.CreateDirectory(downloadFolder);
  260. var UpdateFileFolder = Path.Combine(downloadFolder, "UnZip");
  261. if (!Directory.Exists(UpdateFileFolder))
  262. Directory.CreateDirectory(UpdateFileFolder);
  263. //备份需要替换的文件
  264. var backUpfolder = Path.Combine(newFolderPath, "Backup");
  265. if (!Directory.Exists(backUpfolder))
  266. Directory.CreateDirectory(backUpfolder);
  267. files.ForEach(info =>
  268. {
  269. var downloadFilePath = Path.Combine(downloadFolder, Path.GetFileName(info.FilePath));
  270. //下载文件
  271. var downLoad = downLoadFileHelper.DownloadFile(info.FilePath, downloadFilePath);
  272. if (!downLoad.IsSuccess)
  273. {
  274. throw new Exception(downLoad.Data.Message);
  275. }
  276. //获取文件的名称
  277. string fileName = Path.GetFileNameWithoutExtension(downloadFilePath);
  278. //获取后缀名
  279. string fileNameExtension = Path.GetExtension(downloadFilePath);
  280. //判断文件名称,进行解压缩操作
  281. if (fileName.EndsWith("系统更新压缩补丁包"))
  282. {
  283. //if (Directory.Exists(UpdateFileFolder))
  284. // Directory.Delete(UpdateFileFolder, true);
  285. var unzip = ZipHelper.Unzip(new FileInfo(downloadFilePath), new DirectoryInfo(UpdateFileFolder));
  286. if (!unzip.IsSuccess)
  287. {
  288. throw new Exception(unzip.Message);
  289. }
  290. //备份需要替换的文件
  291. //var backUpfolder = Path.Combine(new DirectoryInfo(publishPath).Parent.FullName, "Backup");
  292. //if (!Directory.Exists(backUpfolder))
  293. // Directory.CreateDirectory(backUpfolder);
  294. var backupPath = Path.Combine(backUpfolder, DateTime.Now.ToString("yyyyMMddHHmmss")+".zip");
  295. ZipHelper.ZipFile(new DirectoryInfo(publishPath), new FileInfo(backupPath));
  296. //移动替换文件
  297. FileController.MoveFolder(UpdateFileFolder, publishPath);
  298. Directory.Delete(UpdateFileFolder, true);
  299. }
  300. else if (fileNameExtension == ".sql")
  301. {
  302. try
  303. {
  304. //读取文件中的内容,并执行sql语句
  305. string sqlText = File.ReadAllText(downloadFilePath);
  306. //执行sql语句
  307. SqlHelper.CmdExecuteNonQueryLi(sqlText);
  308. }
  309. catch(Exception ex)
  310. {
  311. msg = fileName+ "脚本执行失败,请手动操作\n" + ex;
  312. exception = ex;
  313. }
  314. }
  315. });
  316. //替换成功,调接口
  317. var returnModel = ConfirmDown(faBuNum);
  318. });
  319. if (exception != null)
  320. throw exception;
  321. return msg;
  322. }
  323. catch (Exception ex)
  324. {
  325. throw new Exception(msg+ex.Message);
  326. }
  327. }
  328. #region 更新文件
  329. /// <summary>
  330. /// 更新文件
  331. /// </summary>
  332. /// <param name="uploadedFileName">上传的文件名</param>
  333. /// <param name="fileStream">上传的文件流</param>
  334. /// <param name="savePath">上传文件目标文件夹</param>
  335. /// <returns></returns>
  336. public string UpdateFiles(string uploadedFileName, Stream fileStream,string savePath)
  337. {
  338. string msg = string.Empty;
  339. //数据获取
  340. try
  341. {
  342. SqlConnection conn = SqlHelper.GetDataCenterConn();
  343. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
  344. string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode;
  345. string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName;
  346. #region 校验文件名规则
  347. // 压缩包命名规则 发布客户~系统类型~发布单据号
  348. int index = uploadedFileName.LastIndexOf('.');
  349. var informationArr = Path.GetFileName(uploadedFileName.Substring(0, index)).Split('~');
  350. if (informationArr.Length <= 0)
  351. {
  352. msg = "文件命名规则必须是:发布客户~系统类型~发布单据号,请确认";
  353. return msg;
  354. }
  355. string sql = @"SELECT F_FullName,F_Description FROM [dbo].[Sys_SRM_Items] WHERE F_EnCode = 'SystemUpdate'";
  356. var dt = SqlHelper.CmdExecuteDataTable(sql);
  357. if (dt.Rows.Count <= 0)
  358. {
  359. throw new Exception("请先在自定义档案维护客户信息");
  360. }
  361. if (dt.Rows[0]["F_FullName"].ToString() != informationArr[0])
  362. {
  363. msg = $"更新文件客户名称:{informationArr[0]}和系统客户名称:{dt.Rows[0]["F_FullName"]}不一致";
  364. return msg;
  365. }
  366. if (informationArr[1] != "WMS")
  367. {
  368. msg = $"请确保更新文件系统为WMS";
  369. return msg;
  370. }
  371. #endregion
  372. var uploadfile = Path.Combine(savePath, uploadedFileName);
  373. #region 保存文件
  374. if (!Directory.Exists(savePath))
  375. Directory.CreateDirectory(savePath);
  376. var buff = new byte[1024 * 1024];
  377. int len = 0;
  378. using (var nf = new FileStream(uploadfile, FileMode.OpenOrCreate))
  379. {
  380. while ((len = fileStream.Read(buff, 0, buff.Length)) > 0)
  381. {
  382. nf.Write(buff, 0, len);
  383. nf.Flush();
  384. }
  385. }
  386. #endregion
  387. #region 生成文件解压路径
  388. //获取文件版本号
  389. string faBuNum = informationArr[2];
  390. string publishPath = System.AppDomain.CurrentDomain.BaseDirectory;
  391. string name = new DirectoryInfo(publishPath).Name + "-WMSBSBackup";
  392. string DownloadFileFolder = Path.Combine(new DirectoryInfo(publishPath).Parent.FullName, name);
  393. if (!Directory.Exists(DownloadFileFolder))
  394. Directory.CreateDirectory(DownloadFileFolder);
  395. // 获取文件夹的DirectoryInfo对象
  396. DirectoryInfo directoryInfo = new DirectoryInfo(DownloadFileFolder);
  397. string folderPrefix = DateTime.Now.ToString("yyyyMMdd");
  398. string newFolderPath = string.Empty;
  399. // 获取所有以指定前缀开头的文件夹
  400. var directories = Directory.GetDirectories(DownloadFileFolder, folderPrefix + "*");
  401. // 如果没有找到任何文件夹,则直接创建新文件夹
  402. if (!directories.Any())
  403. {
  404. newFolderPath = Path.Combine(DownloadFileFolder, folderPrefix + "01");
  405. }
  406. else
  407. {
  408. // 解析文件夹名称以获取流水号,并找出最大的流水号
  409. int maxSerialNumber = directories
  410. .Select(dir => int.Parse(Path.GetFileName(dir).Substring(folderPrefix.Length)))
  411. .Max();
  412. // 流水号加1,并创建新文件夹
  413. int newSerialNumber = maxSerialNumber + 1;
  414. newFolderPath = Path.Combine(DownloadFileFolder, $"{folderPrefix}{newSerialNumber:D2}"); // D2表示格式化为两位数
  415. }
  416. Directory.CreateDirectory(newFolderPath);
  417. var downloadFolder = Path.Combine(newFolderPath, faBuNum);
  418. if (!Directory.Exists(downloadFolder))
  419. Directory.CreateDirectory(downloadFolder);
  420. //获取解压下载文件夹
  421. var UnZipFileFolder = Path.Combine(downloadFolder, "UnZip"+ informationArr[0]);
  422. if (!Directory.Exists(UnZipFileFolder))
  423. Directory.CreateDirectory(UnZipFileFolder);
  424. #endregion
  425. var unzipSource = ZipHelper.Unzip(new FileInfo(uploadfile), new DirectoryInfo(UnZipFileFolder));
  426. if (!unzipSource.IsSuccess)
  427. {
  428. throw new Exception(unzipSource.Message);
  429. }
  430. var files = Directory.GetFiles(UnZipFileFolder).ToList();
  431. var UpdateFileFolder = Path.Combine(downloadFolder, "UnZip");
  432. if (!Directory.Exists(UpdateFileFolder))
  433. Directory.CreateDirectory(UpdateFileFolder);
  434. #region 创建备份文件夹
  435. var backUpfolder = Path.Combine(newFolderPath, "Backup");
  436. if (!Directory.Exists(backUpfolder))
  437. Directory.CreateDirectory(backUpfolder);
  438. #endregion
  439. Exception exception = null;
  440. files.ForEach(info =>
  441. {
  442. //获取文件的名称
  443. string fileName = Path.GetFileNameWithoutExtension(info);
  444. //获取后缀名
  445. string fileNameExtension = Path.GetExtension(info);
  446. //判断文件名称,进行解压缩操作
  447. if (fileName.EndsWith("系统更新压缩补丁包"))
  448. {
  449. //if (Directory.Exists(UpdateFileFolder))
  450. // Directory.Delete(UpdateFileFolder, true);
  451. var unzip = ZipHelper.Unzip(new FileInfo(info), new DirectoryInfo(UpdateFileFolder));
  452. if (!unzip.IsSuccess)
  453. {
  454. throw new Exception(unzip.Message);
  455. }
  456. //备份需要替换的文件
  457. var backupPath = Path.Combine(backUpfolder, DateTime.Now.ToString("yyyyMMddHHmmss") + ".zip");
  458. ZipHelper.ZipFile(new DirectoryInfo(publishPath), new FileInfo(backupPath));
  459. //移动替换文件
  460. FileController.MoveFolder(UpdateFileFolder, publishPath);
  461. Directory.Delete(UpdateFileFolder, true);
  462. }
  463. else if (fileNameExtension == ".sql")
  464. {
  465. try
  466. {
  467. //读取文件中的内容,并执行sql语句
  468. string sqlText = File.ReadAllText(info);
  469. //执行sql语句
  470. SqlHelper.CmdExecuteNonQueryLi(sqlText);
  471. }
  472. catch (Exception ex)
  473. {
  474. msg = fileName + "脚本执行失败,请手动操作\n" + ex;
  475. exception = ex;
  476. }
  477. }
  478. //替换成功,调接口
  479. var returnModel = ConfirmDown(faBuNum);
  480. });
  481. if (exception != null)
  482. throw exception;
  483. return msg;
  484. }
  485. catch (Exception ex)
  486. {
  487. throw new Exception(msg + ex.Message);
  488. }
  489. }
  490. #endregion
  491. //深拷贝
  492. #region
  493. public static T DeepCopyByReflect<T>(T obj)
  494. {
  495. if (obj == null)
  496. return obj;
  497. var type = obj.GetType();
  498. //如果是字符串或值类型则直接返回
  499. if (obj is string || type.IsValueType) return obj;
  500. if(type.IsArray)
  501. {
  502. var elementType = Type.GetType(type.FullName.Replace("[]", null));
  503. var array = obj as Array;
  504. var copied = Array.CreateInstance(elementType, array.Length);
  505. for (int idx = 0; idx < copied.Length; idx++)
  506. {
  507. copied.SetValue(DeepCopyByReflect(array.GetValue(idx)), idx);
  508. }
  509. return (T)Convert.ChangeType(copied,type);
  510. }
  511. object retval = Activator.CreateInstance(obj.GetType());
  512. FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic |BindingFlags.Instance | BindingFlags.Static);
  513. foreach (FieldInfo field in fields)
  514. {
  515. try { field.SetValue(retval, DeepCopyByReflect(field.GetValue(obj))); }
  516. catch { }
  517. }
  518. return (T)retval;
  519. }
  520. #endregion
  521. // 定义一个类来表示 JSON 数据的结构
  522. public class JsonData
  523. {
  524. public string IsSuccess { get; set; }
  525. public string Message { get; set; }
  526. public List<JsonDetail> FaBuList { get; set; }
  527. }
  528. public class JsonDetail
  529. {
  530. public string FaBuNum { get; set; }
  531. public string FaBuVersion { get; set; }
  532. public string FaBuContent { get; set; }
  533. public string FaBuRemark { get; set; }
  534. public string ProjectCode { get; set; }
  535. public string FaBuTime { get; set; }
  536. public string ConfirmPerson { get; set; }
  537. public string IsDownloaded { get; set; }
  538. public string DownTime { get; set; }
  539. public string DownPersonName { get; set; }
  540. public List<Files> Files { get; set; }
  541. }
  542. /// <summary>
  543. /// 文件详情
  544. /// </summary>
  545. public class Files
  546. {
  547. public string FileName { get; set; }
  548. public string FilePath { get; set; }
  549. public string FileVersion { get; set; }
  550. }
  551. public class TypeModel
  552. {
  553. /// <summary>
  554. /// 客户名称
  555. /// </summary>
  556. public string CustomerName { get; set; }
  557. /// <summary>
  558. /// 系统名
  559. /// </summary>
  560. public string XTType { get; set; }
  561. /// <summary>
  562. /// 系统名
  563. /// </summary>
  564. public string FaBuNum { get; set; }
  565. }
  566. /// <summary>
  567. /// 回传对象
  568. /// </summary>
  569. public class ConfirmDownModel
  570. {
  571. /// <summary>
  572. /// 客户名称
  573. /// </summary>
  574. public string CustomerName { get; set; }
  575. /// <summary>
  576. /// 发布单号
  577. /// </summary>
  578. public string FaBuNum { get; set; }
  579. /// <summary>
  580. /// 调用电脑接口IP1
  581. /// </summary>
  582. public string IP1 { get; set; }
  583. /// <summary>
  584. ///调用电脑接口IP2
  585. /// </summary>
  586. public string IP2 { get; set; }
  587. /// <summary>
  588. /// 下载人员名称
  589. /// </summary>
  590. public string PersonName { get; set; }
  591. }
  592. /// <summary>
  593. /// 返回对象
  594. /// </summary>
  595. public class ResultModel
  596. {
  597. /// <summary>
  598. /// 是否成功
  599. /// </summary>
  600. public bool IsSuccess { get; set; }
  601. /// <summary>
  602. /// 返回消息
  603. /// </summary>
  604. public string Message { get; set; }
  605. }
  606. }
  607. }