public string AddProcessIDTRSConfigAPI(dynamic data) { var jsonData = data.ToString(); var list = JsonConvert.DeserializeObject <List <ProcessIDTransformConfigDTO> >(jsonData); //调用接口匹配 foreach (var item in list) { item.PIS_ProcessID = flowChartDetailService.GetFlowChart_DetailByID(item.FlowChart_Master_UID, item.Binding_Seq, item.Color); } var plantstring = ProcessIDTRSConfigService.AddProcessIDConfigInfo(list); return(plantstring); }
/// <summary> /// 检查FlowChartDetial是否存在 失败的时候返回不存在的绑定序号 /// </summary> /// <param name="data"></param> /// <returns></returns> public string CheckFlowChart_DetailByID(dynamic data) { try { var entity = JsonConvert.DeserializeObject <Machine_CustomerAndStationDTO>(data.ToString()); var flowChart_Master_UID = int.Parse(entity.PIS_Customer_Name); var result = string.Empty; foreach (var item in entity.Storages) { var flowChart_DetailByID = flowChartDetailService.GetFlowChart_DetailByID(flowChart_Master_UID, int.Parse(item.PIS_Station_Name)); if (flowChart_DetailByID == 0) { result = item.PIS_Station_Name; return(string.Format("绑定序号:{0}不存在", result)); } } return(result = "SUCCESS"); } catch (Exception ex) { return("FAilED"); } }