From 459621921ba77d8cc8bf0789209b76d387b820e8 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 27 八月 2025 09:29:44 +0800 Subject: [PATCH] 1.携客云字段优化 2.库位变更——hyx --- service/QC/OaApi.cs | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/service/QC/OaApi.cs b/service/QC/OaApi.cs index 0d83dd4..259a45b 100644 --- a/service/QC/OaApi.cs +++ b/service/QC/OaApi.cs @@ -23,9 +23,13 @@ public class OaApiService : Repository<dynamic> { private readonly HttpClient _httpClient; - private const string AppId = "303233EF-AC39-40C1-8364-AC989C6258A5"; - private const string BaseUrl = "http://192.168.1.149:8099/api/ec/dev/auth/"; - private const string WorkflowUrl = "http://192.168.1.149:8099/api/workflow/paService/doCreateRequest"; + //private const string AppId = "303233EF-AC39-40C1-8364-AC989C6258A5"; + //private const string BaseUrl = "http://192.168.1.149:8099/api/ec/dev/auth/"; + //private const string WorkflowUrl = "http://192.168.1.149:8099/api/workflow/paService/doCreateRequest"; + + private const string AppId = "AB7F0461-89C3-4EAD-B5B5-B7D540617921"; + private const string BaseUrl = "http://192.168.1.20:80/api/ec/dev/auth/"; + private const string WorkflowUrl = "http://192.168.1.20:80/api/workflow/paService/doCreateRequest"; public OaApiService() { @@ -160,7 +164,7 @@ { {"mainData", BuildMainData(queryObj)}, {"requestName", $"IQC寮傚父澶勭疆鍗曟祦绋�-{DateTime.Now:yyyyMMddHHmmss}"}, - {"workflowId", "379"}, + {"workflowId", "600"},//娴嬭瘯锛�379 姝e紡锛�600 //{"otherParams", BuildOtherParams()}, {"detailData", BuildDetailData(queryObj)} }; @@ -199,11 +203,15 @@ // 瀛楁鏄犲皠閰嶇疆锛堝瓧娈靛悕 -> 鏁版嵁搴撳垪鍚嶏級 var fieldMappings = new Dictionary<string, (string Field, string Default)> { + ["sqr"] = ("sqr", "0"), // 榛樿鍊兼敼涓烘暟瀛� + ["sqrq"] = ("sqrq", ""), // 绌哄瓧绗︿覆鐢ㄤ簬鏃ユ湡鏍煎紡鍖� + ["szbm"] = ("szbm", "0"), // 榛樿鍊兼敼涓烘暟瀛� + ["szdw"] = ("szdw", "0"), // 榛樿鍊兼敼涓烘暟瀛� ["ycczdh"] = ("ycczdh", "N/A"), - ["wlbm"] = ("wlbm", "N/A"), + ["lh"] = ("lh", "N/A"), ["khgys"] = ("khgys", "N/A"), ["jzmcwlmc"] = ("jzmcwlmc", "N/A"), - ["dhdhmes"] = ("dhdhmes", "N/A"), + ["dhdhtxt"] = ("dhdhtxt", "N/A"), ["bhgpqxms"] = ("bhgpqxms", "鏃犵己闄锋弿杩�") }; @@ -211,7 +219,16 @@ var result = new JArray(); foreach (var mapping in fieldMappings) { - var value = GetDynamicValue(firstRecord, mapping.Value.Field, mapping.Value.Default); + var value = mapping.Key switch + { + "sqr" or "szbm" or "szdw" => + int.TryParse(GetDynamicValue(firstRecord, mapping.Value.Field, mapping.Value.Default), out int num) + ? num : 0, + "sqrq" => DateTime.TryParse(GetDynamicValue(firstRecord, mapping.Value.Field, ""), out DateTime date) + ? date.ToString("yyyy-MM-dd") + : DateTime.Now.ToString("yyyy-MM-dd"), + _ => GetDynamicValue(firstRecord, mapping.Value.Field, mapping.Value.Default) + }; result.Add(new JObject { ["fieldName"] = mapping.Key, @@ -406,7 +423,7 @@ { new JObject { - ["tableDBName"] = "formtable_main_33_dt1", + ["tableDBName"] = "formtable_main_321_dt1",//娴嬭瘯锛歠ormtable_main_33_dt1 ["workflowRequestTableRecords"] = tableRecords } }; -- Gitblit v1.9.3