diff --git a/HJGL_DS/FineUIPro.Web/Global.asax.cs b/HJGL_DS/FineUIPro.Web/Global.asax.cs index 27002d0..b2992b4 100644 --- a/HJGL_DS/FineUIPro.Web/Global.asax.cs +++ b/HJGL_DS/FineUIPro.Web/Global.asax.cs @@ -377,14 +377,28 @@ { if (!string.IsNullOrEmpty(q.MIDWelder_QualifiedProjectCode)) { - if (q.MIDWelder_QualifiedProjectCode.Contains("+")) + if (q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("+") || q.MIDWelder_QualifiedProjectCode.Contains("和")) { - string[] codes = q.MIDWelder_QualifiedProjectCode.Split('+'); + string[] codes = null; + if (q.MIDWelder_QualifiedProjectCode.Contains("+")) + { + codes = q.MIDWelder_QualifiedProjectCode.Split('+'); + } + if (q.MIDWelder_QualifiedProjectCode.Contains("+")) + { + codes = q.MIDWelder_QualifiedProjectCode.Split('+'); + } + if (q.MIDWelder_QualifiedProjectCode.Contains("和")) + { + codes = q.MIDWelder_QualifiedProjectCode.Split('和'); + } + foreach (string c in codes) { var oldCode = from x in Funs.DB.HJGL_BS_WelderQualifiedProject where x.WED_ID == s.First().WED_ID && x.QualifiedProjectCode == c && x.LimitDate.Value.Date == q.MIDWelder_LimitDate.Value.Date select x; if (oldCode.Count() == 0) { + m++; Model.HJGL_BS_WelderQualifiedProject welderQualifiedProject = new Model.HJGL_BS_WelderQualifiedProject(); welderQualifiedProject.WelderQualifiedProjectId = SQLHelper.GetNewID(typeof(Model.HJGL_BS_WelderQualifiedProject)); welderQualifiedProject.WED_ID = s.First().WED_ID; @@ -397,6 +411,7 @@ } else { + k++; string welderQualifiedProjectId = oldCode.First().WelderQualifiedProjectId; DateTime? limitDate = q.MIDWelder_LimitDate; BLL.HJGL_WelderQualifiedProjectService.UpdateWelderQualifiedLimitDate(welderQualifiedProjectId, limitDate, q.MIDWelder_sfxgjgbl, q.MIDWelder_jjsybl, q.MIDWelder_jjsy); @@ -408,6 +423,7 @@ var oldCode = from x in Funs.DB.HJGL_BS_WelderQualifiedProject where x.WED_ID == s.First().WED_ID && x.QualifiedProjectCode == q.MIDWelder_QualifiedProjectCode && x.LimitDate.Value.Date == q.MIDWelder_LimitDate.Value.Date select x; if (oldCode.Count() == 0) { + n++; Model.HJGL_BS_WelderQualifiedProject welderQualifiedProject = new Model.HJGL_BS_WelderQualifiedProject(); welderQualifiedProject.WelderQualifiedProjectId = SQLHelper.GetNewID(typeof(Model.HJGL_BS_WelderQualifiedProject)); welderQualifiedProject.WED_ID = s.First().WED_ID; @@ -420,15 +436,23 @@ } else { + l++; string welderQualifiedProjectId = oldCode.First().WelderQualifiedProjectId; DateTime? limitDate = q.MIDWelder_LimitDate; BLL.HJGL_WelderQualifiedProjectService.UpdateWelderQualifiedLimitDate(welderQualifiedProjectId, limitDate, q.MIDWelder_sfxgjgbl, q.MIDWelder_jjsybl, q.MIDWelder_jjsy); } } + + // 回写表OAM_UesrQualified long welder_ID = q.MIDWelder_ID; bool isSync = true; BLL.HJGL_WelderQualifiedProjectService.UpdateOAWelderQue(welder_ID, isSync); + + //List listStr = new List(); + //listStr.Add(new SqlParameter("@MIDWelder_ID", q.MIDWelder_ID)); + //SqlParameter[] parameter = listStr.ToArray(); + //BLL.SQLHelper.ExecutSql("UPDATE dbo.OAM_UesrQualified SET IsSync=1 WHERE MIDWelder_ID=@MIDWelder_ID", parameter); } } } diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 3c98f31..070a5f8 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -11,7 +11,7 @@ - +