From 5352c4784fb6a1f4103ed408e289ef1a417e2108 Mon Sep 17 00:00:00 2001 From: Frane Date: Mon, 6 Jun 2022 09:20:51 +0800 Subject: [PATCH] =?UTF-8?q?20220606=20=E4=BF=AE=E6=94=B9=E9=81=97=E6=BC=8F?= =?UTF-8?q?=20=E8=B5=9B=E9=BC=8E=E5=85=AC=E5=8F=B8=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=AD=97=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SGGLDB_V2022-06-01-001.sql | 0 .../SGGLDB_V2022-06-01-001修改明细.txt | 4 + .../API/HSSE/APISeDinMonthReportService.cs | 154 +- SGGL/BLL/API/HSSE/APITestRecordService.cs | 33 +- SGGL/BLL/Common/Const.cs | 4 +- SGGL/BLL/Common/PrinterDocService.cs | 10 +- .../ZHGL/RealName/RealNameMonitorService.cs | 13 +- SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 1484 +++++++++-------- .../Manager/ManagerMonth_SeDinEdit.aspx.cs | 56 +- SGGL/FineUIPro.Web/common/mainProject.aspx.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport10Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport11Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport12Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport1Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport2Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport3Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport4Item.cs | 2 +- .../HSSE/SeDinMonthReport4OtherItem.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport5Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport6Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport7Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport8Item.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport8ItemItem.cs | 2 +- .../APIItem/HSSE/SeDinMonthReport9Item.cs | 2 +- .../SeDinMonthReport9ItemRectification.cs | 2 +- .../HSSE/SeDinMonthReport9ItemSpecial.cs | 2 +- .../HSSE/SeDinMonthReport9ItemStoppage.cs | 2 +- .../APIItem/HSSE/SeDinMonthReportItem.cs | 2 +- .../HSSE/SeDinMonthReportController.cs | 70 +- .../Controllers/HSSE/TestRecordController.cs | 20 + 30 files changed, 975 insertions(+), 911 deletions(-) rename DataBase/版本日志/{ => 已更新脚本}/SGGLDB_V2022-06-01-001.sql (100%) create mode 100644 DataBase/版本日志/已更新脚本/SGGLDB_V2022-06-01-001修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2022-06-01-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2022-06-01-001.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2022-06-01-001.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2022-06-01-001.sql diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2022-06-01-001修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2022-06-01-001修改明细.txt new file mode 100644 index 00000000..3e329265 --- /dev/null +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2022-06-01-001修改明细.txt @@ -0,0 +1,4 @@ +--ADD BY Yanghongwei 2022-06-01 +1、修改Global页面调用定时器方法、修改现场考勤导入列表及导入方法。 +2、人员考试计划新增单独获取考生ID、考生姓名集合。 +--END \ No newline at end of file diff --git a/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs b/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs index b7432b5e..73e5075d 100644 --- a/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs +++ b/SGGL/BLL/API/HSSE/APISeDinMonthReportService.cs @@ -5,13 +5,13 @@ using System; namespace BLL { /// - /// 赛鼎月报 + /// 中国五环月报 /// public static class APISeDinMonthReportService { - #region 获取赛鼎月报列表信息 + #region 获取中国五环月报列表信息 /// - /// 获取赛鼎月报列表信息 + /// 获取中国五环月报列表信息 /// /// /// @@ -56,10 +56,10 @@ namespace BLL } #endregion - #region 获取赛鼎月报初始化页面 - #region 获取赛鼎月报初始化页面 --0、封面 + #region 获取中国五环月报初始化页面 + #region 获取中国五环月报初始化页面 --0、封面 /// - /// 获取赛鼎月报初始化页面 --封面 + /// 获取中国五环月报初始化页面 --封面 /// /// /// @@ -81,9 +81,9 @@ namespace BLL return newItem; } #endregion - #region 获取赛鼎月报初始化页面 --1、项目信息 + #region 获取中国五环月报初始化页面 --1、项目信息 /// - /// 获取赛鼎月报初始化页面 --1、项目信息 + /// 获取中国五环月报初始化页面 --1、项目信息 /// /// /// @@ -124,9 +124,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --2、项目安全工时统计 + #region 获取中国五环月报初始化页面 --2、项目安全工时统计 /// - /// 获取赛鼎月报初始化页面 --2、项目安全工时统计 + /// 获取中国五环月报初始化页面 --2、项目安全工时统计 /// /// /// @@ -203,9 +203,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --3、项目HSE事故、事件统计 + #region 获取中国五环月报初始化页面 --3、项目HSE事故、事件统计 /// - /// 获取赛鼎月报初始化页面 --3、项目HSE事故、事件统计 + /// 获取中国五环月报初始化页面 --3、项目HSE事故、事件统计 /// /// /// @@ -266,9 +266,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --4、本月人员投入情况 + #region 获取中国五环月报初始化页面 --4、本月人员投入情况 /// - /// 获取赛鼎月报初始化页面 --4、本月人员投入情况 + /// 获取中国五环月报初始化页面 --4、本月人员投入情况 /// /// /// @@ -358,7 +358,7 @@ namespace BLL #endregion /// - /// 获取赛鼎公司人员信息统计 + /// 获取中国五环公司人员信息统计 /// /// /// @@ -390,9 +390,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --5、本月大型、特种设备投入情况 + #region 获取中国五环月报初始化页面 --5、本月大型、特种设备投入情况 /// - /// 获取赛鼎月报初始化页面 --5、本月大型、特种设备投入情况 + /// 获取中国五环月报初始化页面 --5、本月大型、特种设备投入情况 /// /// /// @@ -451,9 +451,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --6、安全生产费用投入情况 + #region 获取中国五环月报初始化页面 --6、安全生产费用投入情况 /// - /// 获取赛鼎月报初始化页面 --6、安全生产费用投入情况 + /// 获取中国五环月报初始化页面 --6、安全生产费用投入情况 /// /// /// @@ -486,9 +486,9 @@ namespace BLL return getLists; } #endregion - #region 获取赛鼎月报初始化页面 --7、项目HSE培训统计 + #region 获取中国五环月报初始化页面 --7、项目HSE培训统计 /// - /// 获取赛鼎月报初始化页面 --7、项目HSE培训统计 + /// 获取中国五环月报初始化页面 --7、项目HSE培训统计 /// /// /// @@ -537,9 +537,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --8、项目HSE会议统计 + #region 获取中国五环月报初始化页面 --8、项目HSE会议统计 /// - /// 获取赛鼎月报初始化页面 --8、项目HSE会议统计 + /// 获取中国五环月报初始化页面 --8、项目HSE会议统计 /// /// /// @@ -628,9 +628,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --9、项目HSE检查统计 + #region 获取中国五环月报初始化页面 --9、项目HSE检查统计 /// - /// 获取赛鼎月报初始化页面 --9、项目HSE检查统计 + /// 获取中国五环月报初始化页面 --9、项目HSE检查统计 /// /// /// @@ -802,9 +802,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --10、项目奖惩情况统计 + #region 获取中国五环月报初始化页面 --10、项目奖惩情况统计 /// - /// 获取赛鼎月报初始化页面 --10、项目奖惩情况统计 + /// 获取中国五环月报初始化页面 --10、项目奖惩情况统计 /// /// /// @@ -865,9 +865,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --11、项目危大工程施工情况 + #region 获取中国五环月报初始化页面 --11、项目危大工程施工情况 /// - /// 获取赛鼎月报初始化页面 --11、项目危大工程施工情况 + /// 获取中国五环月报初始化页面 --11、项目危大工程施工情况 /// /// /// @@ -898,9 +898,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --12、项目应急演练情况 + #region 获取中国五环月报初始化页面 --12、项目应急演练情况 /// - /// 获取赛鼎月报初始化页面 --12、项目应急演练情况 + /// 获取中国五环月报初始化页面 --12、项目应急演练情况 /// /// /// @@ -936,10 +936,10 @@ namespace BLL #endregion #endregion - #region 获取赛鼎月报详细 - #region 获取赛鼎月报详细 --0、封面 + #region 获取中国五环月报详细 + #region 获取中国五环月报详细 --0、封面 /// - /// 获取赛鼎月报详细 + /// 获取中国五环月报详细 /// /// /// @@ -980,9 +980,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --1、项目信息 + #region 获取中国五环月报详细 --1、项目信息 /// - /// 获取赛鼎月报详细 --1、项目信息 + /// 获取中国五环月报详细 --1、项目信息 /// /// /// @@ -1018,9 +1018,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --2、项目安全工时统计 + #region 获取中国五环月报详细 --2、项目安全工时统计 /// - /// 获取赛鼎月报详细 --2、项目安全工时统计 + /// 获取中国五环月报详细 --2、项目安全工时统计 /// /// /// @@ -1055,9 +1055,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --3、项目HSE事故、事件统计 + #region 获取中国五环月报详细 --3、项目HSE事故、事件统计 /// - /// 获取赛鼎月报详细 + /// 获取中国五环月报详细 /// /// /// @@ -1113,9 +1113,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --4、本月人员投入情况 + #region 获取中国五环月报详细 --4、本月人员投入情况 /// - /// 获取赛鼎月报详细 --4、本月人员投入情况 + /// 获取中国五环月报详细 --4、本月人员投入情况 /// /// /// @@ -1149,7 +1149,7 @@ namespace BLL } /// - /// 获取赛鼎月报详细 --4、赛鼎公司人员信息统计 + /// 获取中国五环月报详细 --4、中国五环公司人员信息统计 /// /// /// @@ -1182,9 +1182,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --5、本月大型、特种设备投入情况 + #region 获取中国五环月报详细 --5、本月大型、特种设备投入情况 /// - /// 获取赛鼎月报详细 --5、本月大型、特种设备投入情况 + /// 获取中国五环月报详细 --5、本月大型、特种设备投入情况 /// /// /// @@ -1225,9 +1225,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --6、安全生产费用投入情况 + #region 获取中国五环月报详细 --6、安全生产费用投入情况 /// - /// 获取赛鼎月报详细 --6、安全生产费用投入情况 + /// 获取中国五环月报详细 --6、安全生产费用投入情况 /// /// /// @@ -1272,9 +1272,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --7、项目HSE培训统计 + #region 获取中国五环月报详细 --7、项目HSE培训统计 /// - /// 获取赛鼎月报详细 --7、项目HSE培训统计 + /// 获取中国五环月报详细 --7、项目HSE培训统计 /// /// /// @@ -1312,9 +1312,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --8、项目HSE会议统计 + #region 获取中国五环月报初始化页面 --8、项目HSE会议统计 /// - /// 获取赛鼎月报初始化页面 --8、项目HSE会议统计 + /// 获取中国五环月报初始化页面 --8、项目HSE会议统计 /// /// /// @@ -1373,9 +1373,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报初始化页面 --9、项目HSE检查统计 + #region 获取中国五环月报初始化页面 --9、项目HSE检查统计 /// - /// 获取赛鼎月报初始化页面 --9、项目HSE检查统计 + /// 获取中国五环月报初始化页面 --9、项目HSE检查统计 /// /// /// @@ -1495,9 +1495,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --10、项目HSE培训统计 + #region 获取中国五环月报详细 --10、项目HSE培训统计 /// - /// 获取赛鼎月报详细 --10、项目HSE培训统计 + /// 获取中国五环月报详细 --10、项目HSE培训统计 /// /// /// @@ -1547,9 +1547,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --11、项目危大工程施工情况 + #region 获取中国五环月报详细 --11、项目危大工程施工情况 /// - /// 获取赛鼎月报详细 --11、项目危大工程施工情况 + /// 获取中国五环月报详细 --11、项目危大工程施工情况 /// /// /// @@ -1581,9 +1581,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --12、项目应急演练情况 + #region 获取中国五环月报详细 --12、项目应急演练情况 /// - /// 获取赛鼎月报详细 --12、项目应急演练情况 + /// 获取中国五环月报详细 --12、项目应急演练情况 /// /// /// @@ -1629,9 +1629,9 @@ namespace BLL } } #endregion - #region 获取赛鼎月报详细 --13、14、本月HSE活动综述、下月HSE工作计划 + #region 获取中国五环月报详细 --13、14、本月HSE活动综述、下月HSE工作计划 /// - /// 获取赛鼎月报详细 + /// 获取中国五环月报详细 /// /// /// @@ -1669,7 +1669,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport0(Model.SeDinMonthReportItem newItem) { @@ -1759,7 +1759,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport1(Model.SeDinMonthReport1Item newItem) { @@ -1809,7 +1809,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport2(Model.SeDinMonthReport2Item newItem) { @@ -1857,7 +1857,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport3(Model.SeDinMonthReportItem newItem) { @@ -1914,7 +1914,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport4(Model.SeDinMonthReportItem newItem) { @@ -1959,9 +1959,9 @@ namespace BLL } /// - /// 保存SeDin_MonthReport 赛鼎公司人员信息统计 + /// 保存SeDin_MonthReport 中国五环公司人员信息统计 /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport4Other(Model.SeDinMonthReport4OtherItem newItem) { @@ -1998,7 +1998,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport5(Model.SeDinMonthReportItem newItem) { @@ -2053,7 +2053,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport6(Model.SeDinMonthReport6Item newItem) { @@ -2102,7 +2102,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport7(Model.SeDinMonthReport7Item newItem) { @@ -2143,7 +2143,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport8(Model.SeDinMonthReport8Item newItem) { @@ -2208,7 +2208,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport9(Model.SeDinMonthReport9Item newItem) { @@ -2339,7 +2339,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport10(Model.SeDinMonthReport10Item newItem) { @@ -2393,7 +2393,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport11(Model.SeDinMonthReport11Item newItem) { @@ -2435,7 +2435,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport12(Model.SeDinMonthReport12Item newItem) { @@ -2505,7 +2505,7 @@ namespace BLL /// /// 保存SeDin_MonthReport /// - /// 赛鼎月报 + /// 中国五环月报 /// public static string SaveSeDinMonthReport13(Model.SeDinMonthReportItem newItem) { diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index f1e5e716..9e902065 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -40,7 +40,7 @@ namespace BLL return getDataLists; } } - + /// /// 根据TestPlanId获取考试人员列表 /// @@ -51,14 +51,43 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { string name = string.Empty; - var getManList = db.Training_TestRecord.Where(x => x.TestPlanId == testPlanId).Select(x => x.TestManId).Distinct(); + var getManList = db.Training_TestRecord.Where(x => x.TestPlanId == testPlanId).Select(x => x.TestManId); if (getManList.Count() > 0) { name = PersonService.getPersonsPersonIds(getManList.ToList()); } + return name; } } + + /// + /// 根据TestPlanId获取考试人员列表 + /// + /// + /// 考试人员 + public static List getTestRecordTestManListByTestPlanId(string testPlanId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + string name = string.Empty; + var getManList = db.Training_TestRecord.Where(x => x.TestPlanId == testPlanId).Select(x => x.TestManId); + if (getManList.Count() > 0) + { + return (from x in getManList + join y in db.SitePerson_Person on x equals y.PersonId + select new Model.PersonItem + { + PersonId=y.PersonId, + PersonName=y.PersonName, + }).ToList(); + } + else + { + return null; + } + } + } #endregion #region 根据试卷ID获取试卷记录详细 diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index fc4bdba3..a4c25c62 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -1904,7 +1904,7 @@ namespace BLL /// public const string ProjectRectifyNoticeMenuId = "0038D764-D628-46F0-94FF-D0A22C3C45A3"; /// - /// 隐患整改单(赛鼎) + /// 隐患整改单(中国五环) /// public const string ProjectRectifyNoticesMenuId = "C3B6B222-44DC-46F3-B783-B1FC0F743C48"; /// @@ -2232,7 +2232,7 @@ namespace BLL public const string ProjectManagerWeekMenuId = "AE118E9C-C309-43B7-A198-8CA90A8D98EB"; /// - /// 月报(赛鼎) + /// 月报(中国五环) /// public const string ProjectManagerMonth_SeDinMenuId = "D0EC3002-E1FA-457D-AC3B-4C7B2D71DD82"; /// diff --git a/SGGL/BLL/Common/PrinterDocService.cs b/SGGL/BLL/Common/PrinterDocService.cs index 68dbc3a2..89cdc9f5 100644 --- a/SGGL/BLL/Common/PrinterDocService.cs +++ b/SGGL/BLL/Common/PrinterDocService.cs @@ -730,11 +730,11 @@ sb.Append(""); } #endregion - #region 4、赛鼎公司人员信息统计 + #region 4、中国五环公司人员信息统计 sb.Append(""); sb.Append(""); sb.AppendFormat(" " - , "赛鼎公司人员信息统计"); + , "中国五环公司人员信息统计"); sb.Append(""); sb.Append(""); @@ -1412,7 +1412,7 @@ sb.Append(""); sb.Append("
{0}
"); sb.Append(""); - sb.AppendFormat(" ", "赛鼎工程有限公司" + ProjectService.GetProjectNameByProjectId(getTestRecord.ProjectId)); + sb.AppendFormat(" ", "中国五环工程有限公司" + ProjectService.GetProjectNameByProjectId(getTestRecord.ProjectId)); sb.Append(""); sb.Append(""); var getTrainTypeName = (from x in db.Training_TestPlan @@ -1675,7 +1675,7 @@ sb.Append("
{0}{0}
"); sb.Append(""); sb.AppendFormat(" ", imgStrUrl); - sb.AppendFormat(" ", "赛鼎工程有限公司"); + sb.AppendFormat(" ", "中国五环工程有限公司"); string imgStrQRUrl1 = ""; sb.AppendFormat(" ", imgStrQRUrl1); sb.Append(""); @@ -1718,7 +1718,7 @@ sb.Append("
{0}{0}{0}{0}
"); sb.Append(""); sb.AppendFormat(" ", imgStrUrl); - sb.AppendFormat(" ", "赛鼎工程有限公司"); + sb.AppendFormat(" ", "中国五环工程有限公司"); string imgStrQRUrl2 = ""; sb.AppendFormat(" ", imgStrQRUrl2); sb.Append(""); diff --git a/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs b/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs index 7d95ef17..886d17e2 100644 --- a/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs +++ b/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs @@ -58,16 +58,13 @@ namespace BLL { foreach (var item in getRProjects) { - var getSynchroSet = Funs.DB.RealName_SynchroSet.FirstOrDefault(x => x.ProCode == item.JTproCode); + var getSynchroSet = Funs.DB.RealName_SynchroSet.FirstOrDefault(x => x.ProCode == item.ProCode); if (getSynchroSet != null && !string.IsNullOrEmpty(item.JTproCode)) { - SynchroSetService.PushProCollCompany(item.JTproCode); - //SynchroSetService.PushCollTeam(item.ProCode); - //SynchroSetService.getCollTeam(item.ProCode); - //SynchroSetService.PushPersons(Const.BtnAdd, item.JTproCode, null); - //SynchroSetService.PushPersons(Const.BtnModify, item.JTproCode, null); - SynchroSetService.PushAttendance(item.JTproCode); - SynchroSetService.updatePersonsExitTime(item.JTproCode); + SynchroSetService.InsertRealNamePushLog(null, item.ProCode, "实名制定时器", "sucess", "200", item.ProName, "成功", null); + SynchroSetService.PushProCollCompany(item.ProCode); + SynchroSetService.PushAttendance(item.ProCode); + SynchroSetService.updatePersonsExitTime(item.ProCode); } } } diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index 1c9f309d..1c90b237 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -123,12 +123,14 @@ namespace BLL /// public static void DeleteSynchroSetById(string SynchroSetId) { - Model.SGGLDB db = Funs.DB; - Model.RealName_SynchroSet SynchroSet = db.RealName_SynchroSet.FirstOrDefault(e => e.SynchroSetId == SynchroSetId); - if (SynchroSet != null) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - db.RealName_SynchroSet.DeleteOnSubmit(SynchroSet); - db.SubmitChanges(); + Model.RealName_SynchroSet SynchroSet = db.RealName_SynchroSet.FirstOrDefault(e => e.SynchroSetId == SynchroSetId); + if (SynchroSet != null) + { + db.RealName_SynchroSet.DeleteOnSubmit(SynchroSet); + db.SubmitChanges(); + } } } @@ -138,12 +140,14 @@ namespace BLL /// public static void DeleteSynchroSetByUnitId(string unitId) { - Model.SGGLDB db = Funs.DB; - Model.RealName_SynchroSet SynchroSet = db.RealName_SynchroSet.FirstOrDefault(e => e.UnitId == unitId); - if (SynchroSet != null) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - db.RealName_SynchroSet.DeleteOnSubmit(SynchroSet); - db.SubmitChanges(); + Model.RealName_SynchroSet SynchroSet = db.RealName_SynchroSet.FirstOrDefault(e => e.UnitId == unitId); + if (SynchroSet != null) + { + db.RealName_SynchroSet.DeleteOnSubmit(SynchroSet); + db.SubmitChanges(); + } } } #endregion @@ -156,24 +160,27 @@ namespace BLL public static string getaccess_token(string proCode) { string access_token = string.Empty; - Model.RealName_SynchroSet getToken = new Model.RealName_SynchroSet(); - if (!string.IsNullOrEmpty(proCode)) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - getToken = Funs.DB.RealName_SynchroSet.FirstOrDefault(x => x.ProCode == proCode); - } - else - { - getToken = Funs.DB.RealName_SynchroSet.FirstOrDefault(x => x.Tokenendtime > DateTime.Now); - } - if (getToken != null) - { - if (getToken.Tokenendtime > DateTime.Now) + Model.RealName_SynchroSet getToken = new Model.RealName_SynchroSet(); + if (!string.IsNullOrEmpty(proCode)) { - access_token = getToken.Token; + getToken = db.RealName_SynchroSet.FirstOrDefault(x => x.ProCode == proCode); } else { - access_token = SaveToken(getToken); + getToken = db.RealName_SynchroSet.FirstOrDefault(x => x.Tokenendtime > DateTime.Now); + } + if (getToken != null) + { + if (getToken.Tokenendtime > DateTime.Now) + { + access_token = getToken.Token; + } + else + { + access_token = SaveToken(getToken); + } } } return access_token; @@ -192,7 +199,7 @@ namespace BLL string pushContent = string.Empty; string clientId = SynchroSet.ClientId; string userName = SynchroSet.UserName; - string password = Funs.EncryptionPassword(SynchroSet.Password); + string password = Funs.EncryptionPassword(SynchroSet.Password); string timestamp = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now.AddMinutes(-4)); string sign = Funs.EncryptionPassword(clientId + userName + password + timestamp); var getToken = new @@ -203,9 +210,9 @@ namespace BLL timestamp, sign }; - string contenttype = "application/json;charset=utf-8"; - pushContent= JsonConvert.SerializeObject(getToken); - var returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/auth/accessToken", "POST", contenttype, null,pushContent); + string contenttype = "application/json;charset=utf-8"; + pushContent = JsonConvert.SerializeObject(getToken); + var returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/auth/accessToken", "POST", contenttype, null, pushContent); if (!string.IsNullOrEmpty(returndata)) { JObject obj = JObject.Parse(returndata); @@ -216,7 +223,7 @@ namespace BLL SynchroSet.Tokenendtime = DateTime.Now.AddHours(12); SynchroSet.Timestamp = Funs.GetNewDateTime(timestamp); SaveSynchroSet(SynchroSet); - InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", obj["success"].ToString(), obj["code"].ToString(), obj["message"].ToString(),access_token, pushContent); + InsertRealNamePushLog(null, SynchroSet.ProCode, "获取凭证", obj["success"].ToString(), obj["code"].ToString(), obj["message"].ToString(), access_token, pushContent); } else { @@ -272,89 +279,91 @@ namespace BLL /// public static string getBasicData(string type) { - try + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - Model.SGGLDB db = Funs.DB; - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getDict"; - var dictTypeCode = new + try { - dictTypeCode = type - }; - Hashtable newToken = new Hashtable + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getDict"; + var dictTypeCode = new + { + dictTypeCode = type + }; + Hashtable newToken = new Hashtable { { "token", getaccess_token(null) } }; - pushContent = JsonConvert.SerializeObject(dictTypeCode); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - if (Convert.ToBoolean(obj["success"].ToString())) + pushContent = JsonConvert.SerializeObject(dictTypeCode); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) { - data = obj["data"].ToString(); - JArray arr = JArray.Parse(data); - foreach (var item in arr) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + if (Convert.ToBoolean(obj["success"].ToString())) { - string dictCode = item["dictCode"].ToString(); - string name = item["dictName"].ToString(); - if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(dictCode)) + data = obj["data"].ToString(); + JArray arr = JArray.Parse(data); + foreach (var item in arr) { - var getBasicData = db.RealName_BasicData.FirstOrDefault(x => x.DictCode == dictCode && x.DictTypeCode == type); - if (getBasicData != null) + string dictCode = item["dictCode"].ToString(); + string name = item["dictName"].ToString(); + if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(dictCode)) { - getBasicData.DictName = name; - db.SubmitChanges(); - } - else - { - Model.RealName_BasicData newBasicData = new Model.RealName_BasicData + var getBasicData = db.RealName_BasicData.FirstOrDefault(x => x.DictCode == dictCode && x.DictTypeCode == type); + if (getBasicData != null) { - BasicDataId = SQLHelper.GetNewID(), - DictTypeCode = type, - DictCode = dictCode, - DictName = name - }; - db.RealName_BasicData.InsertOnSubmit(newBasicData); - db.SubmitChanges(); - } - - if (type == "LAB_WORK_TYPE") - { - var getWorkPost = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostCode == dictCode); - if (getWorkPost == null) + getBasicData.DictName = name; + db.SubmitChanges(); + } + else { - Model.Base_WorkPost newWorkPost = new Model.Base_WorkPost + Model.RealName_BasicData newBasicData = new Model.RealName_BasicData { - WorkPostId = SQLHelper.GetNewID(), - WorkPostCode = dictCode, - WorkPostName = name, - PostType = "3", - Remark = "来源实名制系统" + BasicDataId = SQLHelper.GetNewID(), + DictTypeCode = type, + DictCode = dictCode, + DictName = name }; - Funs.DB.Base_WorkPost.InsertOnSubmit(newWorkPost); - Funs.DB.SubmitChanges(); + db.RealName_BasicData.InsertOnSubmit(newBasicData); + db.SubmitChanges(); + } + + if (type == "LAB_WORK_TYPE") + { + var getWorkPost = db.Base_WorkPost.FirstOrDefault(x => x.WorkPostCode == dictCode); + if (getWorkPost == null) + { + Model.Base_WorkPost newWorkPost = new Model.Base_WorkPost + { + WorkPostId = SQLHelper.GetNewID(), + WorkPostCode = dictCode, + WorkPostName = name, + PostType = "3", + Remark = "来源实名制系统" + }; + db.Base_WorkPost.InsertOnSubmit(newWorkPost); + db.SubmitChanges(); + } } } } } } + InsertRealNamePushLog(null, null, "获取基础字典[" + type + "]", sucess, code, mess, data, pushContent); + return mess; + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "获取基础字典", "SynchroSetService.getBasicData"); + return ""; } - InsertRealNamePushLog(null, null, "获取基础字典[" + type + "]", sucess, code, mess,data,pushContent); - return mess; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "获取基础字典", "SynchroSetService.getBasicData"); - return ""; } } #endregion @@ -366,8 +375,7 @@ namespace BLL /// /// public static string getCountry() - { - Model.SGGLDB db = Funs.DB; + { string mess = string.Empty; string sucess = string.Empty; string code = string.Empty; @@ -391,31 +399,34 @@ namespace BLL { data = obj["data"].ToString(); JArray arr = JArray.Parse(data); - foreach (var item in arr) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string countryId = item["countryId"].ToString(); - string cname = item["cname"].ToString(); - string name = item["name"].ToString(); - if (!string.IsNullOrEmpty(countryId)) + foreach (var item in arr) { - var getCountry = db.RealName_Country.FirstOrDefault(x => x.CountryId == countryId); - if (getCountry != null) + string countryId = item["countryId"].ToString(); + string cname = item["cname"].ToString(); + string name = item["name"].ToString(); + if (!string.IsNullOrEmpty(countryId)) { - getCountry.Cname = cname; - getCountry.Name = name; - db.SubmitChanges(); - } - else - { - Model.RealName_Country newCountry = new Model.RealName_Country + var getCountry = db.RealName_Country.FirstOrDefault(x => x.CountryId == countryId); + if (getCountry != null) { - ID = SQLHelper.GetNewID(), - CountryId = countryId, - Cname = cname, - Name = name - }; - db.RealName_Country.InsertOnSubmit(newCountry); - db.SubmitChanges(); + getCountry.Cname = cname; + getCountry.Name = name; + db.SubmitChanges(); + } + else + { + Model.RealName_Country newCountry = new Model.RealName_Country + { + ID = SQLHelper.GetNewID(), + CountryId = countryId, + Cname = cname, + Name = name + }; + db.RealName_Country.InsertOnSubmit(newCountry); + db.SubmitChanges(); + } } } } @@ -531,33 +542,36 @@ namespace BLL { data = obj["data"].ToString(); JArray arr = JArray.Parse(data); - foreach (var item in arr) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string JTproCode = item["proCode"].ToString(); - string proName = item["proName"].ToString(); - string proShortName = item["proShortName"].ToString(); - if (!string.IsNullOrEmpty(proCode)) + foreach (var item in arr) { - var getProject = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode); - if (getProject != null) + string JTproCode = item["proCode"].ToString(); + string proName = item["proName"].ToString(); + string proShortName = item["proShortName"].ToString(); + if (!string.IsNullOrEmpty(proCode)) { - getProject.ProName = proName; - getProject.ProShortName = proShortName; - getProject.JTproCode = JTproCode; - Funs.DB.SubmitChanges(); - } - else - { - Model.RealName_Project newProject = new Model.RealName_Project + var getProject = db.RealName_Project.FirstOrDefault(x => x.ProCode == proCode); + if (getProject != null) { - ID = SQLHelper.GetNewID(), - ProCode = proCode, - JTproCode=JTproCode, - ProName = proName, - ProShortName = proShortName - }; - Funs.DB.RealName_Project.InsertOnSubmit(newProject); - Funs.DB.SubmitChanges(); + getProject.ProName = proName; + getProject.ProShortName = proShortName; + getProject.JTproCode = JTproCode; + db.SubmitChanges(); + } + else + { + Model.RealName_Project newProject = new Model.RealName_Project + { + ID = SQLHelper.GetNewID(), + ProCode = proCode, + JTproCode = JTproCode, + ProName = proName, + ProShortName = proShortName + }; + db.RealName_Project.InsertOnSubmit(newProject); + db.SubmitChanges(); + } } } } @@ -576,37 +590,37 @@ namespace BLL /// public static string getCollTeam(string proCode) { - try + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getCollTeam"; - var getProjects = from x in Funs.DB.RealName_Project where proCode == null || x.ProCode == proCode select x; - foreach (var citem in getProjects) + try { - var getProject = new + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + string url = Funs.RealNameApiUrl + "/foreignApi/baseData/getCollTeam"; + var getProjects = from x in db.RealName_Project where proCode == null || x.ProCode == proCode select x; + foreach (var citem in getProjects) { - proCode = RealName_ProjectService.GeJTproCodeByproCode(citem.ProCode), - }; - Hashtable newToken = new Hashtable + var getProject = new + { + proCode = RealName_ProjectService.GeJTproCodeByproCode(citem.ProCode), + }; + Hashtable newToken = new Hashtable { { "token", getaccess_token(citem.ProCode) } }; - pushContent = JsonConvert.SerializeObject(getProject); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - if (Convert.ToBoolean(obj["success"].ToString())) + pushContent = JsonConvert.SerializeObject(getProject); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + if (Convert.ToBoolean(obj["success"].ToString())) { data = obj["data"].ToString(); JArray arr = JArray.Parse(data); @@ -655,23 +669,23 @@ namespace BLL } } } + else + { + InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess, data, pushContent); + } } else { InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess, data, pushContent); } } - else - { - InsertRealNamePushLog(null, proCode, "获取施工队数据", sucess, code, mess, data, pushContent); - } + return mess; + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "获取施工队数据", "SynchroSetService.getCollTeam"); + return ""; } - return mess; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "获取施工队数据", "SynchroSetService.getCollTeam"); - return ""; } } #endregion @@ -684,54 +698,56 @@ namespace BLL /// public static string PushCollCompany() { - Model.SGGLDB db = Funs.DB; - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - string url = Funs.RealNameApiUrl + "/foreignApi/accept/collCompany"; - var getUnit = (from x in db.Base_Unit - where !x.RealNamePushTime.HasValue && x.CollCropCode != null && x.CollCropCode != "" - select x).Take(200).ToList(); - if (getUnit.Count() > 0) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var listObject = new + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + string url = Funs.RealNameApiUrl + "/foreignApi/accept/collCompany"; + var getUnit = (from x in db.Base_Unit + where !x.RealNamePushTime.HasValue && x.CollCropCode != null && x.CollCropCode != "" + select x).Take(200).ToList(); + if (getUnit.Count() > 0) { - list = getUnit.Select(x => new { collCompanyName = x.UnitName, collCropCode = x.CollCropCode, isChina = x.IsChina }) - }; - Hashtable newToken = new Hashtable + var listObject = new + { + list = getUnit.Select(x => new { collCompanyName = x.UnitName, collCropCode = x.CollCropCode, isChina = x.IsChina }) + }; + Hashtable newToken = new Hashtable { { "token", getaccess_token(null) } }; - pushContent = JsonConvert.SerializeObject(listObject); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (Convert.ToBoolean(obj["success"].ToString())) + pushContent = JsonConvert.SerializeObject(listObject); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) { - foreach (var item in getUnit) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (Convert.ToBoolean(obj["success"].ToString())) { - item.RealNamePushTime = DateTime.Now; - Funs.DB.SubmitChanges(); + foreach (var item in getUnit) + { + item.RealNamePushTime = DateTime.Now; + db.SubmitChanges(); + } } } + + InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent); + } + else + { + mess = "没有符合条件的数据!"; } - InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent); + return mess; } - else - { - mess = "没有符合条件的数据!"; - } - - return mess; } #endregion @@ -743,81 +759,83 @@ namespace BLL /// public static string PushProCollCompany(string proCode) { - Model.SGGLDB db = Funs.DB; - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - - string url = Funs.RealNameApiUrl + "/foreignApi/accept/proCollCompany"; - var getProjectUnits = (from x in db.Project_ProjectUnit - join y in db.Base_Project on x.ProjectId equals y.ProjectId - join z in db.RealName_Project on y.JTProjectCode equals z.ProCode - join u in db.Base_Unit on x.UnitId equals u.UnitId - where z.ProCode != null && !x.RealNamePushTime.HasValue && x.UnitType != null - && (proCode == null || y.JTProjectCode == proCode) && x.IsSynchro == true - && u.CollCropCode != null && u.CollCropCode != "" - select new - { - unitId=x.UnitId, - proCode = z.JTproCode, - collCropCode = u.CollCropCode, - collCropType = db.Sys_Const.First(t => t.GroupId == ConstValue.Group_ProjectUnitType && t.ConstValue == x.UnitType).Remark, - entryTime = string.Format("{0:yyyy-MM-dd}", x.InTime), - exitTime = string.Format("{0:yyyy-MM-dd}", x.OutTime), - linkName = u.LinkName, - idcardType = u.IdcardType, - idcardNumber = u.IdcardNumber, - linkMobile = u.LinkMobile, - collCropStatus = u.CollCropStatus, - x.RealNamePushTime, - x.ProjectUnitId, - }).Take(200).ToList(); - if (getProjectUnits.Count() > 0) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var listObject = new + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + + string url = Funs.RealNameApiUrl + "/foreignApi/accept/proCollCompany"; + var getProjectUnits = (from x in db.Project_ProjectUnit + join y in db.Base_Project on x.ProjectId equals y.ProjectId + join z in db.RealName_Project on y.JTProjectCode equals z.ProCode + join u in db.Base_Unit on x.UnitId equals u.UnitId + where z.ProCode != null && !x.RealNamePushTime.HasValue && x.UnitType != null + && (proCode == null || y.JTProjectCode == proCode) && x.IsSynchro == true + && u.CollCropCode != null && u.CollCropCode != "" + select new + { + unitId = x.UnitId, + proCode = z.JTproCode, + collCropCode = u.CollCropCode, + collCropType = db.Sys_Const.First(t => t.GroupId == ConstValue.Group_ProjectUnitType && t.ConstValue == x.UnitType).Remark, + entryTime = string.Format("{0:yyyy-MM-dd}", x.InTime), + exitTime = string.Format("{0:yyyy-MM-dd}", x.OutTime), + linkName = u.LinkName, + idcardType = u.IdcardType, + idcardNumber = u.IdcardNumber, + linkMobile = u.LinkMobile, + collCropStatus = u.CollCropStatus, + x.RealNamePushTime, + x.ProjectUnitId, + }).Take(200).ToList(); + if (getProjectUnits.Count() > 0) { - list = getProjectUnits.Select(x => new { x.proCode, x.collCropCode, x.collCropType, x.entryTime, x.exitTime, x.linkName, x.idcardType, x.idcardNumber, x.linkMobile, x.collCropStatus, }) - }; - Hashtable newToken = new Hashtable + var listObject = new + { + list = getProjectUnits.Select(x => new { x.proCode, x.collCropCode, x.collCropType, x.entryTime, x.exitTime, x.linkName, x.idcardType, x.idcardNumber, x.linkMobile, x.collCropStatus, }) + }; + Hashtable newToken = new Hashtable { { "token", getaccess_token(proCode) } }; - PushCollCompany(getProjectUnits.Select(x => x.unitId).Distinct().ToList(), newToken); - pushContent = JsonConvert.SerializeObject(listObject); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (Convert.ToBoolean(obj["success"].ToString())) + PushCollCompany(getProjectUnits.Select(x => x.unitId).Distinct().ToList(), newToken); + pushContent = JsonConvert.SerializeObject(listObject); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) { - foreach (var item in getProjectUnits) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (Convert.ToBoolean(obj["success"].ToString())) { - var getPUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectUnitId == item.ProjectUnitId); - if (getPUnit != null) + foreach (var item in getProjectUnits) { - getPUnit.RealNamePushTime = DateTime.Now; - db.SubmitChanges(); + var getPUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectUnitId == item.ProjectUnitId); + if (getPUnit != null) + { + getPUnit.RealNamePushTime = DateTime.Now; + db.SubmitChanges(); + } } } } + + InsertRealNamePushLog(null, proCode, "推送项目参建企业数据", sucess, code, mess, data, pushContent); + } + else + { + mess = "没有符合条件的数据!"; } - InsertRealNamePushLog(null, proCode, "推送项目参建企业数据", sucess, code, mess, data, pushContent); + return mess; } - else - { - mess = "没有符合条件的数据!"; - } - - return mess; } /// @@ -827,42 +845,44 @@ namespace BLL /// public static void PushCollCompany(List unitIdLists, Hashtable newToken) { - Model.SGGLDB db = Funs.DB; - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - string url = Funs.RealNameApiUrl + "/foreignApi/accept/collCompany"; - var getUnit = (from x in db.Base_Unit - where unitIdLists.Contains(x.UnitId) && !x.RealNamePushTime.HasValue - select x).ToList(); - if (getUnit.Count() > 0) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var listObject = new + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + string url = Funs.RealNameApiUrl + "/foreignApi/accept/collCompany"; + var getUnit = (from x in db.Base_Unit + where unitIdLists.Contains(x.UnitId) && !x.RealNamePushTime.HasValue + select x).ToList(); + if (getUnit.Count() > 0) { - list = getUnit.Select(x => new { collCompanyName = x.UnitName, collCropCode = x.CollCropCode, isChina = x.IsChina }) - }; - pushContent = JsonConvert.SerializeObject(listObject); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (Convert.ToBoolean(obj["success"].ToString())) + var listObject = new { - foreach (var item in getUnit) + list = getUnit.Select(x => new { collCompanyName = x.UnitName, collCropCode = x.CollCropCode, isChina = x.IsChina }) + }; + pushContent = JsonConvert.SerializeObject(listObject); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) + { + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (Convert.ToBoolean(obj["success"].ToString())) { - item.RealNamePushTime = DateTime.Now; - db.SubmitChanges(); + foreach (var item in getUnit) + { + item.RealNamePushTime = DateTime.Now; + db.SubmitChanges(); + } } } + InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent); } - InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent); } } #endregion @@ -873,62 +893,62 @@ namespace BLL /// /// public static string PushCollTeam(string proCode) - { - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - - string url = Funs.RealNameApiUrl + "/foreignApi/accept/collTeam"; - var getCollTeam = (from x in Funs.DB.ProjectData_TeamGroup - join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId - join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode - join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId - join s in Funs.DB.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson - from s in jonPerson.DefaultIfEmpty() - where z.ProCode != null && !x.RealNamePushTime.HasValue && x.TeamTypeId != null - && (proCode == null || y.JTProjectCode == proCode) - && u.CollCropCode != null && u.CollCropCode != "" - select new - { - proCode = z.JTproCode, - collCropCode = u.CollCropCode, - teamType = x.TeamTypeId, - teamName = x.TeamGroupName, - thirdTeamCode = x.TeamGroupId, - entryTime = string.Format("{0:yyyy-MM-dd}", x.EntryTime), - exitTime = string.Format("{0:yyyy-MM-dd}", x.ExitTime), - teamLeaderName = s.PersonName, - teamLeaderIdcardType = s.IdcardType, - teamLeaderIdcardNumber = s.IdentityCard, - teamLeaderMobile = s.Telephone, - x.RealNamePushTime, - x.TeamGroupId, - }).Take(200).ToList(); - if (getCollTeam.Count() > 0) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var listObject = new + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + + string url = Funs.RealNameApiUrl + "/foreignApi/accept/collTeam"; + var getCollTeam = (from x in db.ProjectData_TeamGroup + join y in db.Base_Project on x.ProjectId equals y.ProjectId + join z in db.RealName_Project on y.JTProjectCode equals z.ProCode + join u in db.Base_Unit on x.UnitId equals u.UnitId + join s in db.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson + from s in jonPerson.DefaultIfEmpty() + where z.ProCode != null && !x.RealNamePushTime.HasValue && x.TeamTypeId != null + && (proCode == null || y.JTProjectCode == proCode) + && u.CollCropCode != null && u.CollCropCode != "" + select new + { + proCode = z.JTproCode, + collCropCode = u.CollCropCode, + teamType = x.TeamTypeId, + teamName = x.TeamGroupName, + thirdTeamCode = x.TeamGroupId, + entryTime = string.Format("{0:yyyy-MM-dd}", x.EntryTime), + exitTime = string.Format("{0:yyyy-MM-dd}", x.ExitTime), + teamLeaderName = s.PersonName, + teamLeaderIdcardType = s.IdcardType, + teamLeaderIdcardNumber = s.IdentityCard, + teamLeaderMobile = s.Telephone, + x.RealNamePushTime, + x.TeamGroupId, + }).Take(200).ToList(); + if (getCollTeam.Count() > 0) { - list = getCollTeam.Select(x => new { x.proCode, x.collCropCode, x.teamType, x.teamName, x.thirdTeamCode, x.entryTime, x.exitTime, x.teamLeaderName, x.teamLeaderIdcardType, x.teamLeaderIdcardNumber, x.teamLeaderMobile }) - }; - Hashtable newToken = new Hashtable + var listObject = new + { + list = getCollTeam.Select(x => new { x.proCode, x.collCropCode, x.teamType, x.teamName, x.thirdTeamCode, x.entryTime, x.exitTime, x.teamLeaderName, x.teamLeaderIdcardType, x.teamLeaderIdcardNumber, x.teamLeaderMobile }) + }; + Hashtable newToken = new Hashtable { { "token", getaccess_token(proCode) } }; - pushContent = JsonConvert.SerializeObject(listObject); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) + pushContent = JsonConvert.SerializeObject(listObject); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) { foreach (var item in getCollTeam) { @@ -941,15 +961,15 @@ namespace BLL } } } + InsertRealNamePushLog(null, proCode, "推送项目部/施工队", sucess, code, mess, data, pushContent); + } + else + { + mess = "没有符合条件的数据!"; } - InsertRealNamePushLog(null, proCode, "推送项目部/施工队", sucess, code, mess, data, pushContent); - } - else - { - mess = "没有符合条件的数据!"; - } - return mess; + return mess; + } } #endregion @@ -958,101 +978,101 @@ namespace BLL /// 推送人员数据 /// /// - public static string PushPersons(string type, string proCode,string identityCard) + public static string PushPersons(string type, string proCode, string identityCard) { - try + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - - string contenttype = "application/json;charset=unicode"; - var getData = (from x in Funs.DB.SitePerson_Person - join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId - join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode - join p in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } - join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId - join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId - where (identityCard == null || x.IdentityCard == identityCard) - && y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK ==true && v.TeamId.HasValue - && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue) - || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue - && x.HeadImage != null && x.HeadImage.Length > 0)) - && p.IsSynchro == true - select new - { - name = x.PersonName, - idcardType = "SHENFEN_ZHENGJIAN", - idcardNumber = x.IdentityCard, - idcardStartDate = x.IdcardStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate) : null, - idcardEndDate = x.IdcardEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate) : null, - idcardForever = "Y", - politicsStatus = x.PoliticsStatus, - eduLevel = x.EduLevel, - maritalStatus = x.MaritalStatus, - sex = (x.Sex == "2" ? "F" : "M"), - idcardAddress = x.IdcardAddress, - homeAddress = x.Address, - birthday = x.Birthday.HasValue ? string.Format("{0:yyyy-MM-dd}", x.Birthday) : null, - nation = x.Nation, - countryCode = x.CountryCode, - provinceCode = x.ProvinceCode, - //positiveIdcardImage = db.AttachFile.First(t => (x.PersonId + "#1") == t.ToKeyId).ImageByte, - //negativeIdcardImage = db.AttachFile.First(t => (x.PersonId + "#5") == t.ToKeyId).ImageByte, - headImage = x.HeadImage, - proCode = z.JTproCode, - teamId = v.TeamId, - mobile = x.Telephone, - teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), - userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), - workType = w.WorkPostCode, - isLeave = x.OutTime.HasValue ? "Y" : "N", - entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, - exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, - x.RealNameAddTime, - x.RealNameUpdateTime, - x.PersonId, - }).Take(200).ToList(); - if (getData.Count() > 0) + try { - string returndata = string.Empty; - Hashtable newToken = new Hashtable + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + + string contenttype = "application/json;charset=unicode"; + var getData = (from x in db.SitePerson_Person + join y in db.Base_Project on x.ProjectId equals y.ProjectId + join z in db.RealName_Project on y.JTProjectCode equals z.ProCode + join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } + join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId + join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId + where (identityCard == null || x.IdentityCard == identityCard) + && y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK == true && v.TeamId.HasValue + && ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue) + || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue + && x.HeadImage != null && x.HeadImage.Length > 0)) + && p.IsSynchro == true + select new + { + name = x.PersonName, + idcardType = "SHENFEN_ZHENGJIAN", + idcardNumber = x.IdentityCard, + idcardStartDate = x.IdcardStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate) : null, + idcardEndDate = x.IdcardEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate) : null, + idcardForever = "Y", + politicsStatus = x.PoliticsStatus, + eduLevel = x.EduLevel, + maritalStatus = x.MaritalStatus, + sex = (x.Sex == "2" ? "F" : "M"), + idcardAddress = x.IdcardAddress, + homeAddress = x.Address, + birthday = x.Birthday.HasValue ? string.Format("{0:yyyy-MM-dd}", x.Birthday) : null, + nation = x.Nation, + countryCode = x.CountryCode, + provinceCode = x.ProvinceCode, + //positiveIdcardImage = db.AttachFile.First(t => (x.PersonId + "#1") == t.ToKeyId).ImageByte, + //negativeIdcardImage = db.AttachFile.First(t => (x.PersonId + "#5") == t.ToKeyId).ImageByte, + headImage = x.HeadImage, + proCode = z.JTproCode, + teamId = v.TeamId, + mobile = x.Telephone, + teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), + userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), + workType = w.WorkPostCode, + isLeave = x.OutTime.HasValue ? "Y" : "N", + entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, + exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, + x.RealNameAddTime, + x.RealNameUpdateTime, + x.PersonId, + }).Take(200).ToList(); + if (getData.Count() > 0) + { + string returndata = string.Empty; + Hashtable newToken = new Hashtable { { "token", getaccess_token(proCode) } }; - if (type == Const.BtnModify) - { - var updatelistObject = new + if (type == Const.BtnModify) { - list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) - }; + var updatelistObject = new + { + list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) + }; - pushContent = JsonConvert.SerializeObject(updatelistObject); - returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, pushContent); - } - else - { - var addlistObject = new + pushContent = JsonConvert.SerializeObject(updatelistObject); + returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, pushContent); + } + else { - list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.headImage, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) - }; + var addlistObject = new + { + list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.headImage, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) + }; - pushContent = JsonConvert.SerializeObject(addlistObject); - returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent); - } + pushContent = JsonConvert.SerializeObject(addlistObject); + returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent); + } - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()) ) + if (!string.IsNullOrEmpty(returndata)) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) { foreach (var item in getData) { @@ -1069,21 +1089,21 @@ namespace BLL } } } + + InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); + } + else + { + mess = "没有符合条件的数据!"; } - InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); + return mess; } - else + catch (Exception ex) { - mess = "没有符合条件的数据!"; + ErrLogInfo.WriteLog(ex, "推送人员数据", "SynchroSetService.PushPersons"); + return ""; } - - return mess; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "推送人员数据", "SynchroSetService.PushPersons"); - return ""; } } @@ -1097,92 +1117,92 @@ namespace BLL /// public static string PushPersonsByIdentityCard(string type, string proCode, string identityCard,bool isLog) { - try + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - var getData = (from x in Funs.DB.SitePerson_Person - join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId - join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode - join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId - join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId - join p in Funs.DB.Project_ProjectUnit on new { x.UnitId,x.ProjectId } equals new { p.UnitId,p.ProjectId } - where x.IdentityCard == identityCard && y.JTProjectCode == proCode - && v.TeamId.HasValue && z.JTproCode != null - && ((type ==Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || type == Const.BtnModify) - && p.IsSynchro == true - select new - { - name = x.PersonName, - idcardType ="SHENFEN_ZHENGJIAN", - idcardNumber = x.IdentityCard, - idcardStartDate = x.IdcardStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate) : null, - idcardEndDate = x.IdcardEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate) : null, - idcardForever = "Y", - politicsStatus = x.PoliticsStatus, - eduLevel = x.EduLevel, - maritalStatus = x.MaritalStatus, - sex = (x.Sex == "2" ? "F" : "M"), - idcardAddress = x.IdcardAddress, - homeAddress = x.Address, - birthday = x.Birthday.HasValue ? string.Format("{0:yyyy-MM-dd}", x.Birthday) : null, - nation = x.Nation, - countryCode = x.CountryCode, - provinceCode = x.ProvinceCode, - headImage = x.HeadImage, - proCode = z.JTproCode, - teamId = v.TeamId, - mobile = x.Telephone, - teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), - userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), - workType = w.WorkPostCode, - isLeave = x.OutTime.HasValue ? "Y" : "N", - entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, - exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, - x.RealNameAddTime, - x.RealNameUpdateTime, - x.PersonId, - }).ToList(); - if (getData.Count() > 0) + try { - string returndata = string.Empty; - Hashtable newToken = new Hashtable + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + var getData = (from x in db.SitePerson_Person + join y in db.Base_Project on x.ProjectId equals y.ProjectId + join z in db.RealName_Project on y.JTProjectCode equals z.ProCode + join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId + join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId + join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId } + where x.IdentityCard == identityCard && y.JTProjectCode == proCode + && v.TeamId.HasValue && z.JTproCode != null + && ((type == Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || type == Const.BtnModify) + && p.IsSynchro == true + select new + { + name = x.PersonName, + idcardType = "SHENFEN_ZHENGJIAN", + idcardNumber = x.IdentityCard, + idcardStartDate = x.IdcardStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate) : null, + idcardEndDate = x.IdcardEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate) : null, + idcardForever = "Y", + politicsStatus = x.PoliticsStatus, + eduLevel = x.EduLevel, + maritalStatus = x.MaritalStatus, + sex = (x.Sex == "2" ? "F" : "M"), + idcardAddress = x.IdcardAddress, + homeAddress = x.Address, + birthday = x.Birthday.HasValue ? string.Format("{0:yyyy-MM-dd}", x.Birthday) : null, + nation = x.Nation, + countryCode = x.CountryCode, + provinceCode = x.ProvinceCode, + headImage = x.HeadImage, + proCode = z.JTproCode, + teamId = v.TeamId, + mobile = x.Telephone, + teamLeaderFlag = (v.GroupLeaderId == x.PersonId ? "Y" : "N"), + userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"), + workType = w.WorkPostCode, + isLeave = x.OutTime.HasValue ? "Y" : "N", + entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, + exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, + x.RealNameAddTime, + x.RealNameUpdateTime, + x.PersonId, + }).ToList(); + if (getData.Count() > 0) + { + string returndata = string.Empty; + Hashtable newToken = new Hashtable { { "token", getaccess_token(proCode) } }; - if (type == Const.BtnModify) - { - var updatelistObject = new + if (type == Const.BtnModify) { - list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) - }; - pushContent = JsonConvert.SerializeObject(updatelistObject); - returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, pushContent); - } - else - { - var addlistObject = new + var updatelistObject = new + { + list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) + }; + pushContent = JsonConvert.SerializeObject(updatelistObject); + returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersons", "POST", contenttype, newToken, pushContent); + } + else { - list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.headImage, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) - }; - pushContent = JsonConvert.SerializeObject(addlistObject); - returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent); - } + var addlistObject = new + { + list = getData.Select(x => new { x.name, x.idcardType, x.idcardNumber, x.idcardStartDate, x.idcardEndDate, x.idcardForever, x.politicsStatus, x.eduLevel, x.maritalStatus, x.sex, x.idcardAddress, x.homeAddress, x.birthday, x.nation, x.countryCode, x.provinceCode, x.headImage, x.proCode, x.teamId, x.mobile, x.teamLeaderFlag, x.userType, x.workType, x.isLeave, x.entryTime, x.exitTime }) + }; + pushContent = JsonConvert.SerializeObject(addlistObject); + returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent); + } - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()) && code == "200") + if (!string.IsNullOrEmpty(returndata)) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString()) && code == "200") { foreach (var item in getData) { @@ -1198,12 +1218,9 @@ namespace BLL } } } - } - else - { - if (data.Contains("历史项目进退场时间重合") || data.Contains("已推送")) + else { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + if (data.Contains("历史项目进退场时间重合") || data.Contains("已推送")) { foreach (var item in getData) { @@ -1222,31 +1239,28 @@ namespace BLL } } } - } - else if (data.Contains("人员不存在")) - { - SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, proCode, identityCard, isLog); - } - else - { - if (isLog) + else if (data.Contains("人员不存在")) { - InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); + SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, proCode, identityCard, isLog); + } + else + { + if (isLog) + { + InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); + } } } } - } - else - { - if (isLog) + else { - InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); + if (isLog) + { + InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent); + } } - } - if (data.Contains("已存在") || mess.Contains("已存在")) - { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + if (data.Contains("已存在") || mess.Contains("已存在")) { foreach (var item in getData) { @@ -1265,18 +1279,18 @@ namespace BLL } } } - } - else - { - mess = "没有符合条件的数据!"; - } + else + { + mess = "没有符合条件的数据!"; + } - return mess; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "推送人员数据", "SynchroSetService.PushPersons"); - return ""; + return mess; + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "推送人员数据", "SynchroSetService.PushPersons"); + return ""; + } } } @@ -1286,59 +1300,59 @@ namespace BLL /// public static string updatePersonsExitTime(string proCode) { - try + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - string contenttype = "application/json;charset=unicode"; - int okcount = 0; - var getData = (from x in Funs.DB.SitePerson_Person - join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId - join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode - where y.JTProjectCode == proCode && x.OutTime.HasValue - && !x.RealNameUpdateTime.HasValue - && x.RealNameAddTime.HasValue - select new - { - idcardNumber = x.IdentityCard, - proCode=z.JTproCode, - entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, - exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, - x.RealNameAddTime, - x.RealNameUpdateTime, - name = x.PersonName, - x.PersonId, - }); - if (getData.Count() > 0) + try { - foreach (var itemData in getData) + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + string contenttype = "application/json;charset=unicode"; + int okcount = 0; + var getData = (from x in db.SitePerson_Person + join y in db.Base_Project on x.ProjectId equals y.ProjectId + join z in db.RealName_Project on y.JTProjectCode equals z.ProCode + where y.JTProjectCode == proCode && x.OutTime.HasValue + && !x.RealNameUpdateTime.HasValue + && x.RealNameAddTime.HasValue + select new + { + idcardNumber = x.IdentityCard, + proCode = z.JTproCode, + entryTime = x.InTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.InTime) : null, + exitTime = x.OutTime.HasValue ? string.Format("{0:yyyy-MM-dd}", x.OutTime) : null, + x.RealNameAddTime, + x.RealNameUpdateTime, + name = x.PersonName, + x.PersonId, + }); + if (getData.Count() > 0) { - string returndata = string.Empty; - Hashtable newToken = new Hashtable + foreach (var itemData in getData) + { + string returndata = string.Empty; + Hashtable newToken = new Hashtable { { "token", getaccess_token(proCode) } }; - var getItemList = getData.Where(x => x.idcardNumber == itemData.idcardNumber).ToList(); - var addlistObject = new - { - list = getItemList.Select(x => new { x.idcardNumber, x.proCode, x.entryTime, x.exitTime, x.name }) - }; - pushContent = JsonConvert.SerializeObject(addlistObject); - returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersonsExitTime", "POST", contenttype, newToken, pushContent); - - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) + var getItemList = getData.Where(x => x.idcardNumber == itemData.idcardNumber).ToList(); + var addlistObject = new { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + list = getItemList.Select(x => new { x.idcardNumber, x.proCode, x.entryTime, x.exitTime, x.name }) + }; + pushContent = JsonConvert.SerializeObject(addlistObject); + returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/updatePersonsExitTime", "POST", contenttype, newToken, pushContent); + + if (!string.IsNullOrEmpty(returndata)) + { + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) { var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == itemData.PersonId); if (getPerson != null) @@ -1350,33 +1364,33 @@ namespace BLL getPerson.RealNameUpdateTime = DateTime.Now; db.SubmitChanges(); } + okcount++; + } + else + { + mess += itemData.name + "退场失败"; } - okcount++; } - else + + if (okcount > 0) { - mess += itemData.name + "退场失败"; + mess += "退场成功人数" + okcount.ToString(); } - } - - if (okcount > 0) - { - mess += "退场成功人数"+okcount.ToString(); - } InsertRealNamePushLog(null, proCode, "推送更新离岗人员", sucess, code, mess, data, pushContent); + } + } + else + { + mess = "没有符合条件的数据!"; } - } - else - { - mess = "没有符合条件的数据!"; - } - return mess; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "推送未更新离岗人员", "SynchroSetService.updatePersonsExitTime"); - return "推送人员异常"; + return mess; + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "推送未更新离岗人员", "SynchroSetService.updatePersonsExitTime"); + return "推送人员异常"; + } } } #endregion @@ -1388,80 +1402,80 @@ namespace BLL /// public static string PushAttendance(string proCode) { - try + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string mess = string.Empty; - string sucess = string.Empty; - string code = string.Empty; - string data = string.Empty; - string pushContent = string.Empty; - //string contenttype = "application/json;charset=unicode"; - string url = Funs.RealNameApiUrl + "/foreignApi/accept/attendance"; - var getData = (from x in Funs.DB.RealName_PersonInOutNow - join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId - join v in Funs.DB.ProjectData_TeamGroup on p.TeamGroupId equals v.TeamGroupId - join r in Funs.DB.RealName_CollTeam on v.TeamId equals r.TeamId - join z in Funs.DB.RealName_Project on x.ProCode equals z.ProCode - join pu in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { pu.UnitId, pu.ProjectId } - where x.IdcardNumber != null && x.IdcardType != null && x.ChangeTime.HasValue - && (proCode == null || x.ProCode == proCode) && p.HeadImage != null && p.HeadImage.Length > 0 - && v.TeamId.HasValue && p.HeadImage != null && r.TeamId.HasValue - && p.IsCardNoOK ==true && z.JTproCode != null - && (!p.OutTime.HasValue || p.OutTime > x.ChangeTime) - && !x.RealNamePushTime.HasValue - && pu.IsSynchro == true - orderby x.ChangeTime descending - select new - { - p.PersonId, - proCode = z.JTproCode, - name = x.Name, - idcardType = x.IdcardType, - idcardNumber = x.IdcardNumber, - checkType = x.CheckType, - checkTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", x.ChangeTime), - dierction = x.IsIn == true ? "JINCHANG_JINCHU" : "TUICHANG_JINCHU", - checkWay = x.CheckWay, - checkLocation = x.CheckLocation, - longitude = x.Longitude, - latitude = x.Latitude, - x.RealNamePushTime, - x.PersonInOutId, - v.TeamGroupId, - }).Take(200).ToList(); - if (getData.Count() > 0) + try { - var listObject = new + string mess = string.Empty; + string sucess = string.Empty; + string code = string.Empty; + string data = string.Empty; + string pushContent = string.Empty; + //string contenttype = "application/json;charset=unicode"; + string url = Funs.RealNameApiUrl + "/foreignApi/accept/attendance"; + var getData = (from x in db.RealName_PersonInOutNow + join p in db.SitePerson_Person on x.PersonId equals p.PersonId + join v in db.ProjectData_TeamGroup on p.TeamGroupId equals v.TeamGroupId + join r in db.RealName_CollTeam on v.TeamId equals r.TeamId + join z in db.RealName_Project on x.ProCode equals z.ProCode + join pu in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { pu.UnitId, pu.ProjectId } + where x.IdcardNumber != null && x.IdcardType != null && x.ChangeTime.HasValue + && (proCode == null || x.ProCode == proCode) && p.HeadImage != null && p.HeadImage.Length > 0 + && v.TeamId.HasValue && p.HeadImage != null && r.TeamId.HasValue + && p.IsCardNoOK == true && z.JTproCode != null + && (!p.OutTime.HasValue || p.OutTime > x.ChangeTime) + && !x.RealNamePushTime.HasValue + && pu.IsSynchro == true + orderby x.ChangeTime descending + select new + { + p.PersonId, + proCode = z.JTproCode, + name = x.Name, + idcardType = x.IdcardType, + idcardNumber = x.IdcardNumber, + checkType = x.CheckType, + checkTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", x.ChangeTime), + dierction = x.IsIn == true ? "JINCHANG_JINCHU" : "TUICHANG_JINCHU", + checkWay = x.CheckWay, + checkLocation = x.CheckLocation, + longitude = x.Longitude, + latitude = x.Latitude, + x.RealNamePushTime, + x.PersonInOutId, + v.TeamGroupId, + }).Take(200).ToList(); + if (getData.Count() > 0) { - list = getData.Select(x => new { x.proCode, x.name, x.idcardType, x.idcardNumber, x.checkType, x.checkTime, x.dierction, x.checkWay, x.checkLocation, x.longitude, x.latitude }) - }; - Hashtable newToken = new Hashtable + var listObject = new + { + list = getData.Select(x => new { x.proCode, x.name, x.idcardType, x.idcardNumber, x.checkType, x.checkTime, x.dierction, x.checkWay, x.checkLocation, x.longitude, x.latitude }) + }; + Hashtable newToken = new Hashtable { { "token", getaccess_token(proCode) } }; - - addTeam(getData.Select(x => x.TeamGroupId).Distinct().ToList(), newToken); - getTeam(proCode, newToken); - var getPersonS = getData.Select(x => x.idcardNumber).Distinct().ToList(); - foreach (var pitem in getPersonS) - { - PushPersonsByIdentityCard(Const.BtnAdd, proCode, pitem, false); - PushPersonsByIdentityCard(Const.BtnModify, proCode, pitem, false); - } + addTeam(getData.Select(x => x.TeamGroupId).Distinct().ToList(), newToken); + getTeam(proCode, newToken); - pushContent = JsonConvert.SerializeObject(listObject); - var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", null, newToken, pushContent); - if (!string.IsNullOrEmpty(returndata)) - { - JObject obj = JObject.Parse(returndata); - mess = obj["message"].ToString(); - code = obj["code"].ToString(); - sucess = obj["success"].ToString(); - data = obj["data"].ToString(); - if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) + var getPersonS = getData.Select(x => x.idcardNumber).Distinct().ToList(); + foreach (var pitem in getPersonS) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + PushPersonsByIdentityCard(Const.BtnAdd, proCode, pitem, false); + PushPersonsByIdentityCard(Const.BtnModify, proCode, pitem, false); + } + + pushContent = JsonConvert.SerializeObject(listObject); + var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", null, newToken, pushContent); + if (!string.IsNullOrEmpty(returndata)) + { + JObject obj = JObject.Parse(returndata); + mess = obj["message"].ToString(); + code = obj["code"].ToString(); + sucess = obj["success"].ToString(); + data = obj["data"].ToString(); + if (obj["success"] != null && Convert.ToBoolean(obj["success"].ToString())) { foreach (var item in getData) { @@ -1475,15 +1489,12 @@ namespace BLL } } } - } - InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent); - if (data.Contains("无法入场") || mess.Contains("班组")) - { - foreach (var item in getData) + InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent); + if (data.Contains("无法入场") || mess.Contains("班组")) { - if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber)) + foreach (var item in getData) { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber)) { var getPersonInOutNow = db.RealName_PersonInOutNow.FirstOrDefault(x => x.IdcardNumber == item.idcardNumber); if (getPersonInOutNow != null) @@ -1496,18 +1507,18 @@ namespace BLL } } } - } - else - { - mess = "没有符合条件的数据!"; - } + else + { + mess = "没有符合条件的数据!"; + } - return mess; - } - catch (Exception ex) - { - ErrLogInfo.WriteLog(ex, "推送考勤数据", "SynchroSetService.PushAttendance"); - return ""; + return mess; + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "推送考勤数据", "SynchroSetService.PushAttendance"); + return ""; + } } } @@ -1575,36 +1586,39 @@ namespace BLL /// public static void addTeam(List teamGroupIds, Hashtable newToken) { - var getCollTeam = (from x in Funs.DB.ProjectData_TeamGroup - join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId - join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode - join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId - join s in Funs.DB.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson - from s in jonPerson.DefaultIfEmpty() - where teamGroupIds.Contains(x.TeamGroupId) && z.JTproCode != null - select new - { - proCode = z.JTproCode, - collCropCode = u.CollCropCode, - teamType = x.TeamTypeId, - teamName = x.TeamGroupName, - thirdTeamCode = x.TeamGroupId, - entryTime = string.Format("{0:yyyy-MM-dd}", x.EntryTime), - exitTime = string.Format("{0:yyyy-MM-dd}", x.ExitTime), - teamLeaderName = s.PersonName, - teamLeaderIdcardType = s.IdcardType, - teamLeaderIdcardNumber = s.IdentityCard, - teamLeaderMobile = s.Telephone, - x.RealNamePushTime, - x.TeamGroupId, - }).ToList(); - if (getCollTeam.Count() > 0) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var listObject = new + var getCollTeam = (from x in db.ProjectData_TeamGroup + join y in db.Base_Project on x.ProjectId equals y.ProjectId + join z in db.RealName_Project on y.JTProjectCode equals z.ProCode + join u in db.Base_Unit on x.UnitId equals u.UnitId + join s in db.SitePerson_Person on x.GroupLeaderId equals s.PersonId into jonPerson + from s in jonPerson.DefaultIfEmpty() + where teamGroupIds.Contains(x.TeamGroupId) && z.JTproCode != null + select new + { + proCode = z.JTproCode, + collCropCode = u.CollCropCode, + teamType = x.TeamTypeId, + teamName = x.TeamGroupName, + thirdTeamCode = x.TeamGroupId, + entryTime = string.Format("{0:yyyy-MM-dd}", x.EntryTime), + exitTime = string.Format("{0:yyyy-MM-dd}", x.ExitTime), + teamLeaderName = s.PersonName, + teamLeaderIdcardType = s.IdcardType, + teamLeaderIdcardNumber = s.IdentityCard, + teamLeaderMobile = s.Telephone, + x.RealNamePushTime, + x.TeamGroupId, + }).ToList(); + if (getCollTeam.Count() > 0) { - list = getCollTeam.Select(x => new { x.proCode, x.collCropCode, x.teamType, x.teamName, x.thirdTeamCode, x.entryTime, x.exitTime, x.teamLeaderName, x.teamLeaderIdcardType, x.teamLeaderIdcardNumber, x.teamLeaderMobile }) - }; - BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/collTeam", "POST", null, newToken, JsonConvert.SerializeObject(listObject)); + var listObject = new + { + list = getCollTeam.Select(x => new { x.proCode, x.collCropCode, x.teamType, x.teamName, x.thirdTeamCode, x.entryTime, x.exitTime, x.teamLeaderName, x.teamLeaderIdcardType, x.teamLeaderIdcardNumber, x.teamLeaderMobile }) + }; + BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/collTeam", "POST", null, newToken, JsonConvert.SerializeObject(listObject)); + } } } diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs index 8d536d3a..4342b148 100644 --- a/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Manager/ManagerMonth_SeDinEdit.aspx.cs @@ -624,9 +624,9 @@ namespace FineUIPro.Web.HSSE.Manager #region 保存页面信息方法 #region 保存 MonthReport0 封面 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public string SaveSeDinMonthReport0(string type) { @@ -681,9 +681,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport1、项目信息 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport1() { @@ -706,9 +706,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport2、项目安全工时统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport2() @@ -730,9 +730,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport3、项目HSE事故、事件统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport3() { @@ -801,9 +801,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport4、本月人员投入情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport4() @@ -852,9 +852,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport5、本月大型、特种设备投入情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport5() { @@ -900,9 +900,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport6、安全生产费用投入情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport6() { @@ -934,9 +934,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport7、项目HSE培训统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport7() { @@ -961,9 +961,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport8、项目HSE会议统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport8() { @@ -1005,9 +1005,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport9、项目HSE检查统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport9() @@ -1116,9 +1116,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport10、项目奖惩情况统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport10() { @@ -1155,9 +1155,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport11、项目危大工程施工情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport11() { @@ -1176,9 +1176,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport12、项目应急演练情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport12() @@ -1222,9 +1222,9 @@ namespace FineUIPro.Web.HSSE.Manager #endregion #region 保存 MonthReport13、14、本月HSE活动综述、下月HSE工作计划 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// public void SaveSeDinMonthReport13() { diff --git a/SGGL/FineUIPro.Web/common/mainProject.aspx.cs b/SGGL/FineUIPro.Web/common/mainProject.aspx.cs index ba609ff8..a9d1e4b6 100644 --- a/SGGL/FineUIPro.Web/common/mainProject.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainProject.aspx.cs @@ -171,7 +171,7 @@ namespace FineUIPro.Web.common var persons = from x in db.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true select x; var posts = (from x in persons join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId - select y).Distinct().ToList(); + select y).Distinct(); Model.SingleSerie s = new Model.SingleSerie(); List listdata = new List(); //木工 diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport10Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport10Item.cs index 80290dfc..64954871 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport10Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport10Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --10、项目奖惩情况统计 + /// 中国五环月报信息项 --10、项目奖惩情况统计 /// public class SeDinMonthReport10Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport11Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport11Item.cs index 4a9848b4..280ed508 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport11Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport11Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --11、项目危大工程施工情况 + /// 中国五环月报信息项 --11、项目危大工程施工情况 /// public class SeDinMonthReport11Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport12Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport12Item.cs index 6c51b98f..32447d82 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport12Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport12Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --12、项目应急演练情况 + /// 中国五环月报信息项 --12、项目应急演练情况 /// public class SeDinMonthReport12Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport1Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport1Item.cs index 04d119df..dcd78c0e 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport1Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport1Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --1、项目信息 + /// 中国五环月报信息项 --1、项目信息 /// public class SeDinMonthReport1Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport2Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport2Item.cs index a53a4ce8..eed79896 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport2Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport2Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --2、项目安全工时统计 + /// 中国五环月报信息项 --2、项目安全工时统计 /// public class SeDinMonthReport2Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport3Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport3Item.cs index c1486168..bbc3aa4d 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport3Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport3Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --3、项目HSE事故、事件统计 + /// 中国五环月报信息项 --3、项目HSE事故、事件统计 /// public class SeDinMonthReport3Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport4Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport4Item.cs index 2a16a53e..9a37a6a7 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport4Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport4Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --4、本月人员投入情况 + /// 中国五环月报信息项 --4、本月人员投入情况 /// public class SeDinMonthReport4Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport4OtherItem.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport4OtherItem.cs index 7be60d2e..5493ebd8 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport4OtherItem.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport4OtherItem.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --4、赛鼎公司人员信息统计表 + /// 中国五环月报信息项 --4、中国五环公司人员信息统计表 /// public class SeDinMonthReport4OtherItem { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport5Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport5Item.cs index 122c512c..ea098fb8 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport5Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport5Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --5、本月大型、特种设备投入情况 + /// 中国五环月报信息项 --5、本月大型、特种设备投入情况 /// public class SeDinMonthReport5Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport6Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport6Item.cs index 0791b497..473eba7b 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport6Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport6Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --6、安全生产费用投入情况 + /// 中国五环月报信息项 --6、安全生产费用投入情况 /// public class SeDinMonthReport6Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport7Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport7Item.cs index c4473602..43cdf9a2 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport7Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport7Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --7、项目HSE培训统计 + /// 中国五环月报信息项 --7、项目HSE培训统计 /// public class SeDinMonthReport7Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport8Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport8Item.cs index 9296b701..dc6896be 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport8Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport8Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --8、项目HSE会议统计 + /// 中国五环月报信息项 --8、项目HSE会议统计 /// public class SeDinMonthReport8Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport8ItemItem.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport8ItemItem.cs index dae929bf..7784ca6a 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport8ItemItem.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport8ItemItem.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --8、项目HSE会议统计(班前会) + /// 中国五环月报信息项 --8、项目HSE会议统计(班前会) /// public class SeDinMonthReport8ItemItem { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9Item.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9Item.cs index c057cc44..4dcd5beb 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9Item.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9Item.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --9、项目HSE检查统计 + /// 中国五环月报信息项 --9、项目HSE检查统计 /// public class SeDinMonthReport9Item { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemRectification.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemRectification.cs index 8521cba3..5ada6f21 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemRectification.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemRectification.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --9、项目HSE检查统计-隐患整改单 + /// 中国五环月报信息项 --9、项目HSE检查统计-隐患整改单 /// public class SeDinMonthReport9ItemRectification { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemSpecial.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemSpecial.cs index 22820a76..bdda64f2 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemSpecial.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemSpecial.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --9、项目HSE检查统计-专项检查 + /// 中国五环月报信息项 --9、项目HSE检查统计-专项检查 /// public class SeDinMonthReport9ItemSpecial { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemStoppage.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemStoppage.cs index 621abe29..7b1bc82d 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemStoppage.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReport9ItemStoppage.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 --9、项目HSE检查统计-停工令 + /// 中国五环月报信息项 --9、项目HSE检查统计-停工令 /// public class SeDinMonthReport9ItemStoppage { diff --git a/SGGL/Model/APIItem/HSSE/SeDinMonthReportItem.cs b/SGGL/Model/APIItem/HSSE/SeDinMonthReportItem.cs index 2b9c7f7c..60c06cf3 100644 --- a/SGGL/Model/APIItem/HSSE/SeDinMonthReportItem.cs +++ b/SGGL/Model/APIItem/HSSE/SeDinMonthReportItem.cs @@ -6,7 +6,7 @@ using System.Text; namespace Model { /// - /// 赛鼎月报信息项 + /// 中国五环月报信息项 /// public class SeDinMonthReportItem { diff --git a/SGGL/WebAPI/Controllers/HSSE/SeDinMonthReportController.cs b/SGGL/WebAPI/Controllers/HSSE/SeDinMonthReportController.cs index d092e091..eadf4973 100644 --- a/SGGL/WebAPI/Controllers/HSSE/SeDinMonthReportController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/SeDinMonthReportController.cs @@ -7,13 +7,13 @@ using System.Web.Http; namespace WebAPI.Controllers { /// - /// 赛鼎月报 + /// 中国五环月报 /// public class SeDinMonthReportController : ApiController { - #region 获取赛鼎月报列表信息 + #region 获取中国五环月报列表信息 /// - /// 获取赛鼎月报列表信息 + /// 获取中国五环月报列表信息 /// /// 项目ID /// 月份 @@ -42,9 +42,9 @@ namespace WebAPI.Controllers } #endregion - #region 获取赛鼎月报详细信息 + #region 获取中国五环月报详细信息 /// - /// 根据主键ID获取赛鼎月报 + /// 根据主键ID获取中国五环月报 /// /// 项目ID /// 月份 @@ -197,12 +197,12 @@ namespace WebAPI.Controllers } #endregion - #region 保存赛鼎月报信息 + #region 保存中国五环月报信息 #region 保存 MonthReport0 封面 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport0([FromBody] Model.SeDinMonthReportItem newItem) @@ -223,9 +223,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport1、项目信息 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport1([FromBody] Model.SeDinMonthReport1Item newItem) @@ -254,9 +254,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport2、项目安全工时统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport2([FromBody] Model.SeDinMonthReport2Item newItem) @@ -285,9 +285,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport3、项目HSE事故、事件统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport3([FromBody] Model.SeDinMonthReportItem newItem) @@ -316,9 +316,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport4、本月人员投入情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport4([FromBody] Model.SeDinMonthReportItem newItem) @@ -347,9 +347,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport5、本月大型、特种设备投入情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport5([FromBody] Model.SeDinMonthReportItem newItem) @@ -378,9 +378,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport6、安全生产费用投入情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport6([FromBody] Model.SeDinMonthReport6Item newItem) @@ -409,9 +409,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport7、项目HSE培训统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport7([FromBody] Model.SeDinMonthReport7Item newItem) @@ -440,9 +440,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport8、项目HSE会议统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport8([FromBody] Model.SeDinMonthReport8Item newItem) @@ -471,9 +471,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport9、项目HSE检查统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport9([FromBody] Model.SeDinMonthReport9Item newItem) @@ -502,9 +502,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport10、项目奖惩情况统计 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport10([FromBody] Model.SeDinMonthReport10Item newItem) @@ -533,9 +533,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport11、项目危大工程施工情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport11([FromBody] Model.SeDinMonthReport11Item newItem) @@ -564,9 +564,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport12、项目应急演练情况 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport12([FromBody] Model.SeDinMonthReport12Item newItem) @@ -595,9 +595,9 @@ namespace WebAPI.Controllers #endregion #region 保存 MonthReport13、14、本月HSE活动综述、下月HSE工作计划 /// - /// 保存赛鼎月报 + /// 保存中国五环月报 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthReport13([FromBody] Model.SeDinMonthReportItem newItem) @@ -622,7 +622,7 @@ namespace WebAPI.Controllers /// /// 汇总到HSE数据 /// - /// 赛鼎月报 + /// 中国五环月报 /// [HttpPost] public Model.ResponeData SaveSeDinMonthHSEDataCollect([FromBody] Model.SeDinMonthReportItem newItem) diff --git a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs index 0a922c0d..aa826890 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs @@ -50,6 +50,26 @@ namespace WebAPI.Controllers } return responeData; } + + /// + /// 获取考生 + /// + /// + /// + public Model.ResponeData getTestRecordTestManListByTestPlanId(string testPlanId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APITestRecordService.getTestRecordTestManListByTestPlanId(testPlanId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } #endregion #region 根据试卷ID获取试卷记录详细
{0}{0}{0}{0}