Selaa lähdekoodia

增加自贡天府通办、自贡观察对接

tangjiang 4 kuukautta sitten
vanhempi
commit
42e11681a1

+ 14 - 47
src/DataSharing.Host/Controllers/ZiGong/DockingPlatformController.cs

@@ -26,7 +26,7 @@ namespace DataSharing.Host.Controllers.ZiGong
     /// <summary>
     /// 自贡12345天府通办、自贡12345观察
     /// </summary>
-    public class DockingPlatformController: BaseController
+    public class DockingPlatformController : BaseController
     {
         #region 注入
         private readonly IMapper _mapper;
@@ -193,6 +193,7 @@ namespace DataSharing.Host.Controllers.ZiGong
                     data.AreaCode = "519800"; areaName = "高新区";
                     break;
                 default:
+                    data.AreaCode = "510300";
                     break;
             }
             data.Address = "四川省自贡市" + areaName;
@@ -258,7 +259,7 @@ namespace DataSharing.Host.Controllers.ZiGong
             };
             GetOrderList orderList = new()
             {
-                SourceChannelCode = GetChannelCode(accountDto.PlatformSource),
+                SourceChannelCode = accountDto.PlatformSource,
                 No = dto.AcceptCode,
                 Title = dto.Title,
                 Mobile = dto.Mobile,
@@ -271,11 +272,7 @@ namespace DataSharing.Host.Controllers.ZiGong
             };
 
             List<GetOrderMediaDataListDto> listData = [];
-            string strFromType = "IYB";
-            if (accountDto.PlatformSource == "ConvergenceMedia")
-            {
-                strFromType = "ybrmt";
-            }
+            string strFromType = accountDto.PlatformSource;
             //查询旧系统
             Dictionary<string, object> dic = new Dictionary<string, object>
                 {
@@ -290,7 +287,7 @@ namespace DataSharing.Host.Controllers.ZiGong
                     { "CurrentPage", 1},
                     { "PageSize", 500 },
                 };
-            var strUrl = _sharingConfigurationManager.GetYiBinConfig().IYB.QueryOldList + "yb12345/iyb.asmx/GetOrderByListNew";
+            var strUrl = _sharingConfigurationManager.GetZiGongConfig().TFTB.QueryOldList + "zg12345/OrderAccept.asmx/GetOrderByListNew";
             var strResultData = e_SendHttpPostBySync(strUrl, dic);
             if (!string.IsNullOrEmpty(strResultData))
             {
@@ -353,7 +350,7 @@ namespace DataSharing.Host.Controllers.ZiGong
             } };
 
             return OpenResponse.Ok(ConvergenceMediaDeResponse<List<GetOrderMediaDataDto>>.Success(returnData, "成功"));
-            
+
         }
 
         /// <summary>
@@ -393,7 +390,7 @@ namespace DataSharing.Host.Controllers.ZiGong
             };
             GetOrderList orderList = new()
             {
-                SourceChannelCode = GetChannelCode(accountDto.PlatformSource),
+                SourceChannelCode = accountDto.PlatformSource,
                 No = dto.AcceptCode,
                 Title = dto.Title,
                 Mobile = dto.Mobile,
@@ -406,11 +403,7 @@ namespace DataSharing.Host.Controllers.ZiGong
             };
 
             List<GetOrderMediaDataListDto> listData = [];
-            string strFromType = "IYB";
-            if (accountDto.PlatformSource == "ConvergenceMedia")
-            {
-                strFromType = "ybrmt";
-            }
+            string strFromType = accountDto.PlatformSource;
             //查询旧系统
             Dictionary<string, object> dic = new Dictionary<string, object>
                 {
@@ -425,7 +418,7 @@ namespace DataSharing.Host.Controllers.ZiGong
                     { "CurrentPage", 1},
                     { "PageSize", 500 },
                 };
-            var strUrl = _sharingConfigurationManager.GetYiBinConfig().IYB.QueryOldList + "yb12345/iyb.asmx/GetOrderByListNew";
+            var strUrl = _sharingConfigurationManager.GetZiGongConfig().TFTB.QueryOldList + "zg12345/OrderAccept.asmx/GetOrderByListNew";
             var strResultData = e_SendHttpPostBySync(strUrl, dic);
             if (!string.IsNullOrEmpty(strResultData))
             {
@@ -525,7 +518,7 @@ namespace DataSharing.Host.Controllers.ZiGong
                     { "AcceptCode", dto.AcceptCode },
                     { "AcceptPwd", dto.AcceptPwd }
                 };
-                var strUrl = _sharingConfigurationManager.GetYiBinConfig().IYB.QueryOldList + "yb12345/iyb.asmx/GetOrderDetailNew";
+                var strUrl = _sharingConfigurationManager.GetZiGongConfig().TFTB.QueryOldList + "zg12345/OrderAccept.asmx/GetOrderDetailNew";
                 var strResultData = e_SendHttpPostBySync(strUrl, dic);
                 if (!string.IsNullOrEmpty(strResultData))
                 {
@@ -546,7 +539,7 @@ namespace DataSharing.Host.Controllers.ZiGong
                 {
                     No = dto.AcceptCode,
                     Password = dto.AcceptPwd,
-                    SourceChannelCode = GetChannelCode(accountDto.PlatformSource)
+                    SourceChannelCode = accountDto.PlatformSource,
                 };
                 var result = await _fwClient.RequestNoTokenAsync<HotlineClientDataSharingResponse<OrderDto>>("api/v1/DataSharing/get_order_detail_by_no_pwd",
                     "Post", System.Text.Json.JsonSerializer.Serialize(getOrder));
@@ -744,7 +737,7 @@ namespace DataSharing.Host.Controllers.ZiGong
             {
                 No = dto.AcceptCode,
                 Password = dto.AcceptPwd,
-                SourceChannelCode = GetChannelCode(accountDto.PlatformSource)
+                SourceChannelCode = accountDto.PlatformSource,
             };
             var result = await _fwClient.RequestNoTokenAsync<HotlineClientDataSharingResponse<List<WorkflowTraceDto>>>("api/v1/DataSharing/get_workflow_by_no_pwd",
                 "Post", System.Text.Json.JsonSerializer.Serialize(getOrder));
@@ -802,7 +795,7 @@ namespace DataSharing.Host.Controllers.ZiGong
                 return OpenResponse.Ok(ConvergenceMediaDeResponse<string>.Failed("编号、密码不能为空!", "0", "失败"));
 
             var dataRaw = await _dsReceiveMediaDataRepository.GetAsync(p => p.OrderCode == AcceptCode, HttpContext.RequestAborted);
-       
+
             IFormFileCollection files = formData.Files;//等价于Request.Form.Files
 
             List<FileDto> fileDtos = new();
@@ -837,10 +830,6 @@ namespace DataSharing.Host.Controllers.ZiGong
             return OpenResponse.Ok(ConvergenceMediaDeResponse<string>.Success("", "上传成功"));
         }
 
-
-
-
-
         #region 私有方法-将文件转化为文件流
 
         /// <summary>
@@ -869,28 +858,6 @@ namespace DataSharing.Host.Controllers.ZiGong
             return getFiles;
         }
 
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="platformSource"></param>
-        /// <returns></returns>
-        private string GetChannelCode(string platformSource)
-        {
-            var sourceChannelCode = "";
-            switch (platformSource)
-            {
-                case "ZGTFTB":
-                    sourceChannelCode = "TFTB001";
-                    break;
-                case "ZGGC":
-                    sourceChannelCode = "observe";
-                    break;
-                default:
-                    break;
-            }
-            return sourceChannelCode;
-        }
-
         /// <summary>
         /// 将文件流上传到附件服务器    
         /// </summary>
@@ -993,6 +960,6 @@ namespace DataSharing.Host.Controllers.ZiGong
         }
         #endregion
 
-       
+
     }
 }

+ 5 - 0
src/DataSharing.Host/config/appsettings.Development.json

@@ -218,6 +218,11 @@
         "PushOpinion": "api/v1/CityDataExchange/city_exchange_add_opinion"
       },
 
+      //自贡天府通办获取数据
+      "TFTB": {
+        "QueryOldList": "http://172.16.27.1:8086/"
+      },
+
       //新老数据交换配置
       "SendDataOld": {
         "AddressUrl": "http://10.10.110.195:8066/",

+ 5 - 0
src/DataSharing.Host/config/appsettings.json

@@ -224,6 +224,11 @@
         "PushOpinion": "api/v1/CityDataExchange/city_exchange_add_opinion"
       },
 
+      //自贡天府通办获取数据
+      "TFTB": {
+        "QueryOldList": "http://172.16.27.1:8086/"
+      },
+
       //新老数据交换配置
       "SendDataOld": {
         "AddressUrl": "http://10.10.110.195:8066/",

+ 11 - 0
src/DataSharing/ChannelConfiguration.cs

@@ -356,6 +356,17 @@
         public bool IsSend { get; set; }
     }
 
+    /// <summary>
+    /// 查询公开数据
+    /// </summary>
+    public class ConfigurationTFTB
+    {
+        /// <summary>
+        /// 请求的址
+        /// </summary>
+        public string QueryOldList { get; set; } = string.Empty;
+    }
+
     /// <summary>
     /// 写入工单数据
     /// </summary>

+ 5 - 0
src/DataSharing/SharingConfiguration.cs

@@ -106,6 +106,11 @@
         /// 新老数据交换
         /// </summary>
         public ConfigurationSendDataOld SendDataOld { get; set; }
+
+        /// <summary>
+        /// 查询历史数据
+        /// </summary>
+        public ConfigurationTFTB TFTB { get; set; }
     }
 
     /// <summary>