| | |
| | | public string HOriginator; //å起人 |
| | | public string HTitle; //åæ®æ é¢ |
| | | |
| | | public string HInstanceStatus; //å®ä¾ç¶æ |
| | | |
| | | //åæ®å
容 |
| | | public string HEmployeeID; //æåID |
| | |
| | | // err ä¸å«æ code å message 屿§ï¼å¯å¸®å©å¼åå®ä½é®é¢ |
| | | } |
| | | msg = "é误代ç " + err.Code + "ï¼" + err.Message; |
| | | return false; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è·å 宿 æ ¹æ®æµç¨å®ä¾IDè·åæµç¨å®ä¾ |
| | | public bool getInstanceStatusByInstanceID__YiDa(string appType, string systemToken, string userID, string instanceID, ref GetInstanceByIdResponse response, ref string msg) |
| | | { |
| | | AlibabaCloud.SDK.Dingtalkyida_1_0.Client client = CreateClient5(); |
| | | AlibabaCloud.SDK.Dingtalkyida_1_0.Models.GetInstanceByIdHeaders getInstanceByIdHeaders = new AlibabaCloud.SDK.Dingtalkyida_1_0.Models.GetInstanceByIdHeaders(); |
| | | getInstanceByIdHeaders.XAcsDingtalkAccessToken = this.accessToken; |
| | | AlibabaCloud.SDK.Dingtalkyida_1_0.Models.GetInstanceByIdRequest getInstanceByIdRequest = new AlibabaCloud.SDK.Dingtalkyida_1_0.Models.GetInstanceByIdRequest |
| | | { |
| | | SystemToken = systemToken, |
| | | Language = "12", |
| | | UserId = userID, |
| | | AppType = appType, |
| | | }; |
| | | try |
| | | { |
| | | GetInstanceByIdResponse getInstanceByIdResponse = client.GetInstanceByIdWithOptions(instanceID, getInstanceByIdRequest, getInstanceByIdHeaders, new AlibabaCloud.TeaUtil.Models.RuntimeOptions()); |
| | | response = getInstanceByIdResponse; |
| | | return true; |
| | | } |
| | | catch (TeaException err) |
| | | { |
| | | if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message)) |
| | | { |
| | | // err ä¸å«æ code å message 屿§ï¼å¯å¸®å©å¼åå®ä½é®é¢ |
| | | } |
| | | msg = err.Message; |
| | | return false; |
| | | } |
| | | catch (Exception _err) |
| | | { |
| | | TeaException err = new TeaException(new Dictionary<string, object> |
| | | { |
| | | { "message", _err.Message } |
| | | }); |
| | | if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message)) |
| | | { |
| | | // err ä¸å«æ code å message 屿§ï¼å¯å¸®å©å¼åå®ä½é®é¢ |
| | | } |
| | | msg = _err.Message; |
| | | return false; |
| | | } |
| | | } |
| | |
| | | oItem.HCloseConfirm = response.Body.Result[i].FormData["selectField_ltpe6mdd"].ToString().Replace("'", ""); |
| | | } |
| | | |
| | | //è·åå®ä¾ç¶æ |
| | | GetInstanceByIdResponse response1 = new GetInstanceByIdResponse(); |
| | | if(getInstanceStatusByInstanceID__YiDa(appType, systemToken, userID, oItem.HInstanceID, ref response1, ref msg) == false) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | oItem.HInstanceStatus = response1.Body.InstanceStatus; |
| | | if(oItem.HInstanceStatus == "RUNNING") |
| | | { |
| | | oItem.HInstanceStatus = "è¿è¡ä¸"; |
| | | }else if(oItem.HInstanceStatus== "TERMINATED") |
| | | { |
| | | oItem.HInstanceStatus = "å·²ç»æ¢"; |
| | | } |
| | | else if (oItem.HInstanceStatus == "COMPLETED") |
| | | { |
| | | oItem.HInstanceStatus = "已宿"; |
| | | } |
| | | else if (oItem.HInstanceStatus == "ERROR") |
| | | { |
| | | oItem.HInstanceStatus = "å¼å¸¸"; |
| | | } |
| | | |
| | | lsmain.Add(oItem); |
| | | } |
| | | catch (Exception e) |
| | |
| | | ",HCheckLevel,HCheckArea,HPhoto_NoSatisfyRequire,HDescription_NoSatisfyRequire,HQuestionType,HRequire_ModifyDate,HEmployeeID_Duty,HEmployee_Duty" + |
| | | ",HQuestionIsNoModify" + |
| | | ",HReason_NoModify,HReasonAnalysis,HMethod_Modify" + |
| | | ",HDate_Achieve,HFile_Evidence,HCloseConfirm" + |
| | | ",HDate_Achieve,HFile_Evidence,HCloseConfirm,HInstanceStatus" + |
| | | ") " + |
| | | "values(" + |
| | | "'" + oItem.HMakerID + "'" + |
| | |
| | | "," + (oItem.HDate_Achieve==null?"null":"'"+ oItem.HDate_Achieve+ "'") + "" + |
| | | ",'" + (oItem.HFile_Evidence==null?"": oItem.HFile_Evidence) + "'" + |
| | | ",'" + (oItem.HCloseConfirm==null?"": oItem.HCloseConfirm) + "'" + |
| | | |
| | | ",'" + (oItem.HInstanceStatus==null?"":oItem.HInstanceStatus) + "'" + |
| | | ")"; |
| | | |
| | | oCN.RunProc(sql_main); |