wtt
2026-04-10 6d29ebf5ea086e862a5a7ca513e45af2be69a011
WebAPI/Controllers/Êý¾Ýͬ²½/¶¤¶¤Í¬²½/DD_DataSynchronizationController.cs
@@ -3309,7 +3309,7 @@
                    oItem.HDeptName = deptNameAndGroupName[1];
                    oItem.HGroupName = deptNameAndGroupName[deptNameAndGroupName.Length-1];
                    //主管-负责人
                    string HManagerValue = getProcessInstanceResponse.Body.Result.FormComponentValues[9].Value;//获取的名字含后缀英文
                    string HManagerValue = getProcessInstanceResponse.Body.Result.FormComponentValues[5].Value;//获取的名字含后缀英文
                    string pattern = @"[\u4e00-\u9fff]+"; // ä¸­æ–‡å­—符的Unicode范围
                    MatchCollection matches = Regex.Matches(HManagerValue, pattern);
@@ -3336,18 +3336,34 @@
                        HDeptID = ds.Tables[0].Rows[0]["HDeptID"].ToString();
                    }
                    oItem.HDeptID = int.Parse(HDeptID);
                    ds = oCN.RunProcReturn("select * from Gy_Group with(nolock)  where HName='" + oItem.HGroupName + "'", "Gy_Group");
                    //班组为提交人的班组
                    //ds = oCN.RunProcReturn("select * from Gy_Group with(nolock)  where HName='" + oItem.HGroupName + "'", "Gy_Group");
                    //string HGroupID = "0";
                    //if (ds.Tables[0].Rows.Count > 0)
                    //{
                    //    HGroupID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                    //}
                    //oItem.HGroupID = int.Parse(HGroupID);
                    string input = getProcessInstanceResponse.Body.Result.Title;
                    int index = input.IndexOf("提交");
                    string HGroupEmpName = "";
                    if (index > 0)
                    {
                        HGroupEmpName = input.Substring(0, index).Trim();//截取提交人名称即班组长名称
                    }
                    ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where HName='" + HGroupEmpName + "'", "Gy_Employee");
                    string HGroupID = "0";
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        HGroupID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        HGroupID = ds.Tables[0].Rows[0]["HGroupID"].ToString();
                    }
                    oItem.HGroupID = int.Parse(HGroupID);
                    //反序列化明细内容
                    string tableFieldValue = getProcessInstanceResponse.Body.Result.FormComponentValues[11].Value;
                    string tableFieldValue = getProcessInstanceResponse.Body.Result.FormComponentValues[7].Value;
                    List<Row> rows = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Row>>(tableFieldValue);
                    ExtValue extValue = Newtonsoft.Json.JsonConvert.DeserializeObject<ExtValue>(getProcessInstanceResponse.Body.Result.FormComponentValues[11].ExtValue);
                    ExtValue extValue = Newtonsoft.Json.JsonConvert.DeserializeObject<ExtValue>(getProcessInstanceResponse.Body.Result.FormComponentValues[7].ExtValue);
                    oItem.HBatchNo = rows[0].RowValue[1].Value.ToString();//批次号-订单号码
                    //任务描述-任务类型+工作内容
                    oItem.HExplanation = getProcessInstanceResponse.Body.Result.FormComponentValues[2].Value + "-" + rows[0].RowValue[0].Value;