1
This commit is contained in:
@@ -81,6 +81,9 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_16.0.0.0__89845dcd8080cc91\新建文件夹\Microsoft.SQLServer.ManagedDTS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MiniExcel, Version=1.38.0.0, Culture=neutral, PublicKeyToken=e7310002a53eac39, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MiniExcel.1.38.0\lib\net45\MiniExcel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -122,6 +125,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||
@@ -548,6 +552,13 @@
|
||||
<Compile Include="HSSE\Environmental\EnvironmentalMonitoringService.cs" />
|
||||
<Compile Include="HSSE\Environmental\UnexpectedEnvironmentalService.cs" />
|
||||
<Compile Include="HSSE\Epidemic\Epidemic_MaterialService.cs" />
|
||||
<Compile Include="HSSE\Examine\MinusScoreSituationService.cs" />
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeetingService.cs" />
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivitiesService.cs" />
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservationService.cs" />
|
||||
<Compile Include="HSSE\Examine\BonusScoreSituationService.cs" />
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperienceService.cs" />
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlanService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\FinalFileListService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\HSEFinalFileListService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\OtherDocumentListService.cs" />
|
||||
@@ -678,6 +689,12 @@
|
||||
<Compile Include="HSSE\OccupationHealth\PhysicalExaminationService.cs" />
|
||||
<Compile Include="HSSE\Perfomance\PerfomanceRecordService.cs" />
|
||||
<Compile Include="HSSE\Perfomance\PersonPerfomanceService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingStandardService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingMethodService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingTeachersService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingCourseService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingRoleService.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingCategoryService.cs" />
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentPersonQualityService.cs" />
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentQualityAuditDetailService.cs" />
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentQualityService.cs" />
|
||||
|
||||
+148
-62
@@ -6,10 +6,12 @@ using System.Text;
|
||||
namespace BLL
|
||||
{
|
||||
public static class Const
|
||||
{ /// <summary>
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间书签(用于筛选数据范围)
|
||||
/// </summary>
|
||||
public static DateTime DtmarkTime = DateTime.Parse("2023-01-01");
|
||||
|
||||
public const string SYHSE_PromiseMenuId = "3712B547-06B1-4D54-80B8-1358D222CB23";
|
||||
public const string SYHSE_BaseMenuId = "FEC432D0-FBE5-47B9-8E21-B259D96525E6";
|
||||
public const string SYHSE_HiddenDangersMenuId = "7C30F10B-868C-418A-A729-5568DFA1719B";
|
||||
@@ -22,6 +24,7 @@ namespace BLL
|
||||
/// 焊条发放回收纪录
|
||||
/// </summary>
|
||||
public const string HJGL_ElectrodeRecoveryReportId = "13";
|
||||
|
||||
#region 焊接材料
|
||||
/// <summary>
|
||||
/// 焊丝烘烤记录
|
||||
@@ -67,6 +70,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string HJGL_EWeldRHRecordMenuId = "5BADA90D-EB19-47DE-6666-CA22517AF415";
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 焊接日报导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
@@ -143,9 +147,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string CheckReport4Id = "111";
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 热处理管理
|
||||
/// </summary>
|
||||
@@ -238,6 +239,7 @@ namespace BLL
|
||||
/// 施工区域
|
||||
/// </summary>
|
||||
public const string WorkAreaMenuId = "F7BED9C2-49D7-478D-BD65-E3916F1152F8";
|
||||
|
||||
#region 基础信息
|
||||
/// <summary>
|
||||
/// 焊接耗材
|
||||
@@ -457,7 +459,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string HJGL_TestApplicationTemplateUrl = "File\\Excel\\HJGL_DataIn\\焊工考试申请导入模板.xls";
|
||||
|
||||
|
||||
#region 工程签证确认单流程定义
|
||||
|
||||
///// <summary>
|
||||
@@ -486,20 +487,17 @@ namespace BLL
|
||||
public static string ConfirmForm_Complete = "4";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 密级
|
||||
/// </summary>
|
||||
public const string SecretLevelMenuId = "45B0DFE5-4A86-4F84-9C4B-FB753986D383";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工程签证申请/评审表
|
||||
/// </summary>
|
||||
public const string VisaApplicationMenuId = "C4ED62E6-3D2D-4DD9-937D-2AA039032B79";
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目管理
|
||||
/// </summary>
|
||||
@@ -784,7 +782,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
//public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglA56Ux1q0sZF0WCFLfK70Cs";
|
||||
public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglF9s6bk6eyV0WVrT5tqFq8I";
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 按钮描述
|
||||
@@ -940,7 +938,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string ProjectState_3 = "3";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 项目单位类型
|
||||
/// <summary>
|
||||
/// 总包
|
||||
@@ -953,15 +951,15 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 监理
|
||||
/// </summary>
|
||||
public const string ProjectUnitType_3 = "3";
|
||||
public const string ProjectUnitType_3 = "3";
|
||||
/// <summary>
|
||||
/// 业主
|
||||
/// </summary>
|
||||
public const string ProjectUnitType_4 = "4";
|
||||
public const string ProjectUnitType_4 = "4";
|
||||
/// <summary>
|
||||
/// 检测单位
|
||||
/// </summary>
|
||||
public const string ProjectUnitType_5 = "6";
|
||||
public const string ProjectUnitType_5 = "6";
|
||||
|
||||
/// <summary>
|
||||
/// 其他
|
||||
@@ -1006,7 +1004,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSE工程师岗位Id
|
||||
/// </summary>
|
||||
public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e";
|
||||
public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e";
|
||||
|
||||
/// <summary>
|
||||
/// HSE经理岗位Id
|
||||
@@ -1337,7 +1335,7 @@ namespace BLL
|
||||
/// 党建群团
|
||||
/// </summary>
|
||||
public const string Menu_Party = "Menu_Party";
|
||||
|
||||
|
||||
/*项目*/
|
||||
/// <summary>
|
||||
/// 项目设置
|
||||
@@ -1727,6 +1725,81 @@ namespace BLL
|
||||
public const string ProjectProjectMapMenuId = "F266456A-991F-45A3-BCD6-CF2515D71E39";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 岗位培训
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训类别
|
||||
/// </summary>
|
||||
public const string PostTrainingCategoryMenuId = "465786B2-AD20-483A-A082-B2C944BE998F";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训课程
|
||||
/// </summary>
|
||||
public const string PostTrainingCourseMenuId = "95D9ABD4-4E58-4BAE-AFE1-7F31EF4DF467";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public const string PostTrainingStandardMenuId = "7BCA5AD9-D0FB-4850-A9D1-88364008984D";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训角色
|
||||
/// </summary>
|
||||
public const string PostTrainingRoleMenuId = "50F80CAF-08BA-4A16-9EF8-76DF0A8078CF";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训方式
|
||||
/// </summary>
|
||||
public const string PostTrainingMethodMenuId = "919853EB-A8FA-4BE5-9964-70F43E000961";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训教资
|
||||
/// </summary>
|
||||
public const string PostTrainingTeachersMenuId = "026F0A23-AECD-4BB8-8504-1EB8CB9151C0";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region HSE绩效考核
|
||||
|
||||
/// <summary>
|
||||
/// 考核加分情况
|
||||
/// </summary>
|
||||
public const string BonusScoreSituationMenuId = "6957A732-BA33-499E-AB32-DB1F73BEA8CE";
|
||||
|
||||
/// <summary>
|
||||
/// 考核扣分情况
|
||||
/// </summary>
|
||||
public const string MinusScoreSituationMenuId = "0BCE76EA-319F-47BF-913A-A32735641F5C";
|
||||
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// </summary>
|
||||
public const string PersonalSafetyActionPlanMenuId = "7DD00BEF-821D-4996-ADF8-695139F201B4";
|
||||
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// </summary>
|
||||
public const string SharingOfSafetyExperienceMenuId = "D5FC7B12-0E81-482C-8B29-A9F43DF05D1F";
|
||||
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public const string LeadershipJoinHomeworkAnalysisMeetingMenuId = "05F4AC73-1BA2-4FF2-AAED-292DF5E44412";
|
||||
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public const string CoConstructionActivitiesMenuId = "D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E";
|
||||
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public const string BehavioralSafetyObservationMenuId = "5049BB69-A75F-47D4-ABF3-DAA719D05C74";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 公共资源
|
||||
#region 安全合规
|
||||
/// <summary>
|
||||
@@ -1758,8 +1831,8 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSSE安全组织架构图
|
||||
/// </summary>
|
||||
public const string HSSESafeOrganizePicMenuId = "9D2E1FEB-5E3D-4E37-9C11-0F6BABE8BA8F";
|
||||
|
||||
public const string HSSESafeOrganizePicMenuId = "9D2E1FEB-5E3D-4E37-9C11-0F6BABE8BA8F";
|
||||
|
||||
/// <summary>
|
||||
/// 安全管理机构
|
||||
/// </summary>
|
||||
@@ -2005,7 +2078,7 @@ namespace BLL
|
||||
public const string ServerSafeUnitReportMenuId = "2C673125-AAA4-4F41-A827-0F04DFE55DED";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 企业安全大检查
|
||||
/// <summary>
|
||||
/// 安全监督检查报告
|
||||
@@ -2229,20 +2302,24 @@ namespace BLL
|
||||
|
||||
#region 项目菜单
|
||||
|
||||
/// <summary>
|
||||
/// 看板数据维护
|
||||
/// </summary>
|
||||
public const string ProjectBoardDataMenuId = "087F4FAF-3B00-462A-9040-4CB3556F8177";
|
||||
|
||||
#region 安全体系
|
||||
/// <summary>
|
||||
/// 安全组织机构
|
||||
/// </summary>
|
||||
public const string ProjectSafetyOrganizationMenuId = "1EDD072E-473A-4CDB-A2D3-E401C146B2B2";
|
||||
public const string ProjectSafetyOrganizationMenuId = "1EDD072E-473A-4CDB-A2D3-E401C146B2B2";
|
||||
/// <summary>
|
||||
/// 安全体系
|
||||
/// </summary>
|
||||
public const string ProjectSafetySystemMenuId = "21C779D6-269B-4CB7-AFFB-F59958AC0EF0";
|
||||
public const string ProjectSafetySystemMenuId = "21C779D6-269B-4CB7-AFFB-F59958AC0EF0";
|
||||
/// <summary>
|
||||
/// 安全制度
|
||||
/// </summary>
|
||||
public const string ProjectSafetyInstitutionMenuId = "9D04CD8B-575C-4854-B8B0-F90CEEB75815";
|
||||
public const string ProjectSafetyInstitutionMenuId = "9D04CD8B-575C-4854-B8B0-F90CEEB75815";
|
||||
/// <summary>
|
||||
/// 安全管理组织机构
|
||||
/// </summary>
|
||||
@@ -2300,7 +2377,7 @@ namespace BLL
|
||||
/// 车辆管理
|
||||
/// </summary>
|
||||
public const string VehicleMenuId = "E1D76B04-9A28-436D-BA49-83AC80B36B0C";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一般机具设备资质
|
||||
/// </summary>
|
||||
@@ -2471,8 +2548,8 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 现场人员统计
|
||||
/// </summary>
|
||||
public const string PersonStatisticMenuId = "7D36E853-CC79-48B9-9E7F-E34797B4E87E";
|
||||
|
||||
public const string PersonStatisticMenuId = "7D36E853-CC79-48B9-9E7F-E34797B4E87E";
|
||||
|
||||
/// <summary>
|
||||
/// 人员变化
|
||||
/// </summary>
|
||||
@@ -2511,7 +2588,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 培训考试记录
|
||||
/// </summary>
|
||||
public const string ProjectTrainTestRecordMenuId1= "10736CAC-A343-4D73-9D03-E6A3D1909A7B";
|
||||
public const string ProjectTrainTestRecordMenuId1 = "10736CAC-A343-4D73-9D03-E6A3D1909A7B";
|
||||
/// <summary>
|
||||
/// 模拟考试
|
||||
/// </summary>
|
||||
@@ -2538,7 +2615,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 安全技术交底
|
||||
/// </summary>
|
||||
public const string ProjectHSETechnicalMenuId = "49485F7E-8E71-4EED-87B4-BF6CC180C69C";
|
||||
public const string ProjectHSETechnicalMenuId = "49485F7E-8E71-4EED-87B4-BF6CC180C69C";
|
||||
/// <summary>
|
||||
/// 作业票申请
|
||||
/// </summary>
|
||||
@@ -2613,7 +2690,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSSE专项检查
|
||||
/// </summary>
|
||||
public const string ProjectCheckSpecialMenuId = "1B08048F-93ED-4E84-AE65-DB7917EA2DFB";
|
||||
public const string ProjectCheckSpecialMenuId = "1B08048F-93ED-4E84-AE65-DB7917EA2DFB";
|
||||
/// <summary>
|
||||
/// HSSE综合检查
|
||||
/// </summary>
|
||||
@@ -2629,11 +2706,11 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 开工前HSSE检查
|
||||
/// </summary>
|
||||
public const string ProjectCheckWorkMenuId = "9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F";
|
||||
public const string ProjectCheckWorkMenuId = "9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F";
|
||||
/// <summary>
|
||||
/// 季节性/节假日HSSE检查
|
||||
/// </summary>
|
||||
public const string ProjectCheckHolidayMenuId = "0D23A707-ADA0-4C2B-9665-611134243529";
|
||||
public const string ProjectCheckHolidayMenuId = "0D23A707-ADA0-4C2B-9665-611134243529";
|
||||
/// <summary>
|
||||
/// 危险因素统计分析
|
||||
/// </summary>
|
||||
@@ -2751,11 +2828,11 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSSE月例会
|
||||
/// </summary>
|
||||
public const string ProjectMonthMeetingMenuId = "D5DD5EBD-A5F2-4A43-BA4C-E9A242B43684";
|
||||
public const string ProjectMonthMeetingMenuId = "D5DD5EBD-A5F2-4A43-BA4C-E9A242B43684";
|
||||
/// <summary>
|
||||
/// HSSE专题会议
|
||||
/// </summary>
|
||||
public const string ProjectSpecialMeetingMenuId = "BB6CEC48-283B-46AD-BEDD-F964D261698F";
|
||||
public const string ProjectSpecialMeetingMenuId = "BB6CEC48-283B-46AD-BEDD-F964D261698F";
|
||||
/// <summary>
|
||||
/// 其他会议记录
|
||||
/// </summary>
|
||||
@@ -2847,11 +2924,11 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 合同HSE费用及支付台账
|
||||
/// </summary>
|
||||
public const string ProjectCostLedgerMenuId = "19C1370F-92C0-4E31-87B4-8BADA74113E4";
|
||||
public const string ProjectCostLedgerMenuId = "19C1370F-92C0-4E31-87B4-8BADA74113E4";
|
||||
/// <summary>
|
||||
/// HSSE费用统计表
|
||||
/// </summary>
|
||||
public const string TC_CostMenuId = "89B42B7B-8AEE-4199-923E-81A602FC77E0";
|
||||
public const string TC_CostMenuId = "89B42B7B-8AEE-4199-923E-81A602FC77E0";
|
||||
/// <summary>
|
||||
/// HSSE物资管理
|
||||
/// </summary>
|
||||
@@ -2859,11 +2936,11 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 物资入库管理
|
||||
/// </summary>
|
||||
public const string GoodsIn2MenuId = "FDA02FCA-4E23-469E-AB26-2D625D0E579A";
|
||||
public const string GoodsIn2MenuId = "FDA02FCA-4E23-469E-AB26-2D625D0E579A";
|
||||
/// <summary>
|
||||
/// 物资出库管理
|
||||
/// </summary>
|
||||
public const string GoodsOut2MenuId = "881D6FE5-C281-4DA8-80CD-D7C6624796FC";
|
||||
public const string GoodsOut2MenuId = "881D6FE5-C281-4DA8-80CD-D7C6624796FC";
|
||||
/// <summary>
|
||||
/// 物资库存管理
|
||||
/// </summary>
|
||||
@@ -2890,19 +2967,19 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSSE检查类别设置
|
||||
/// </summary>
|
||||
public const string CheckTypeSetMenuId = "7353F3C1-0EAF-4DB7-86B4-93E3B96805F8";
|
||||
public const string CheckTypeSetMenuId = "7353F3C1-0EAF-4DB7-86B4-93E3B96805F8";
|
||||
/// <summary>
|
||||
/// HSSE行政管理检查记录
|
||||
/// </summary>
|
||||
public const string ManageCheckMenuId = "A25EB19A-F06E-4AAF-A589-E2B8F7FA7857";
|
||||
public const string ManageCheckMenuId = "A25EB19A-F06E-4AAF-A589-E2B8F7FA7857";
|
||||
/// <summary>
|
||||
/// 现场车辆管理
|
||||
/// </summary>
|
||||
public const string CarManagerMenuId = "CF82805A-84BE-400A-B939-83F7612D76F5";
|
||||
public const string CarManagerMenuId = "CF82805A-84BE-400A-B939-83F7612D76F5";
|
||||
/// <summary>
|
||||
/// 现场驾驶员管理
|
||||
/// </summary>
|
||||
public const string DriverManagerMenuId = "754C23CA-F1BC-4F44-9D34-B185099EDCA0";
|
||||
public const string DriverManagerMenuId = "754C23CA-F1BC-4F44-9D34-B185099EDCA0";
|
||||
/// <summary>
|
||||
/// 职业健康管理
|
||||
/// </summary>
|
||||
@@ -2917,7 +2994,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 月度安全评比
|
||||
/// </summary>
|
||||
public const string ProjectMonthlyRatingMenuId = "293FD782-7B39-4F0F-A826-CA790A70CCC7";
|
||||
public const string ProjectMonthlyRatingMenuId = "293FD782-7B39-4F0F-A826-CA790A70CCC7";
|
||||
/// <summary>
|
||||
/// 全国安全月
|
||||
/// </summary>
|
||||
@@ -2931,7 +3008,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string ProjectOtherActivitiesMenuId = "446D702B-F0C1-4D12-A862-0B8317D95928";
|
||||
#endregion
|
||||
|
||||
|
||||
#region 职业健康
|
||||
/// <summary>
|
||||
/// 危害检测
|
||||
@@ -2977,7 +3054,7 @@ namespace BLL
|
||||
/// HSSE管理周报
|
||||
/// </summary>
|
||||
public const string ProjectManagerWeekMenuId = "AE118E9C-C309-43B7-A198-8CA90A8D98EB";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 月报(赛鼎)
|
||||
/// </summary>
|
||||
@@ -3025,7 +3102,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 企业安全管理资料
|
||||
/// </summary>
|
||||
public const string ProjectSafetyDataMenuId = "54A3E23A-DAC7-484B-8C97-40AD785688FC";
|
||||
public const string ProjectSafetyDataMenuId = "54A3E23A-DAC7-484B-8C97-40AD785688FC";
|
||||
/// <summary>
|
||||
/// HSSE日志暨管理数据收集
|
||||
/// </summary>
|
||||
@@ -3059,7 +3136,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string ProjectHSEDiaryMenuId = "8E5B4A8E-B06E-4C8A-A2C8-1091A9BCAF72";
|
||||
#endregion
|
||||
|
||||
|
||||
#region HSSE绩效评价管理
|
||||
/// <summary>
|
||||
/// HSSE分包方绩效评价
|
||||
@@ -3144,27 +3221,27 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// HSSE宣传活动
|
||||
/// </summary>
|
||||
public const string ProjectPromotionalActivitiesMenuId = "16092FE7-938B-4713-8084-4FBFA030F386";
|
||||
public const string ProjectPromotionalActivitiesMenuId = "16092FE7-938B-4713-8084-4FBFA030F386";
|
||||
/// <summary>
|
||||
/// 项目图片
|
||||
/// </summary>
|
||||
public const string ProjectPictureMenuId = "B58179BE-FE6E-4E91-84FC-D211E4692354";
|
||||
public const string ProjectPictureMenuId = "B58179BE-FE6E-4E91-84FC-D211E4692354";
|
||||
/// <summary>
|
||||
/// 一般来文管理
|
||||
/// </summary>
|
||||
public const string ReceiveFileManagerMenuId = "4F5C00F3-DA7D-4B2D-B1EF-310DFFCA77DD";
|
||||
public const string ReceiveFileManagerMenuId = "4F5C00F3-DA7D-4B2D-B1EF-310DFFCA77DD";
|
||||
/// <summary>
|
||||
/// 项目文件夹
|
||||
/// </summary>
|
||||
public const string ProjectFolderMenuId = "05C6C2AF-3B0B-4BF0-A8CE-1FC15DAC3C54";
|
||||
public const string ProjectFolderMenuId = "05C6C2AF-3B0B-4BF0-A8CE-1FC15DAC3C54";
|
||||
/// <summary>
|
||||
/// 文件柜1
|
||||
/// </summary>
|
||||
public const string ProjectFileCabinetAMenuId = "C69B7409-BE1E-4754-AC90-57B56EEE198B";
|
||||
public const string ProjectFileCabinetAMenuId = "C69B7409-BE1E-4754-AC90-57B56EEE198B";
|
||||
/// <summary>
|
||||
/// 文件柜2
|
||||
/// </summary>
|
||||
public const string ProjectFileCabinetBMenuId = "200019A4-E24F-4C87-8C52-9970F78DBF73";
|
||||
public const string ProjectFileCabinetBMenuId = "200019A4-E24F-4C87-8C52-9970F78DBF73";
|
||||
/// <summary>
|
||||
/// 信息统计
|
||||
/// </summary>
|
||||
@@ -3539,6 +3616,16 @@ namespace BLL
|
||||
/// Excel附件路径
|
||||
/// </summary>
|
||||
public const string ExcelUrl = "File\\Excel\\Temp\\";
|
||||
|
||||
/// <summary>
|
||||
/// 岗位培训课程
|
||||
/// </summary>
|
||||
public const string PostTrainingCourseTemplateUrl = "File\\Excel\\DataIn\\岗位培训课程导入模板.xlsx";
|
||||
/// <summary>
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public const string PostTrainingStandardTemplateUrl = "File\\Excel\\DataIn\\岗位培训标准导入模板.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 数据导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
@@ -3813,19 +3900,19 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表
|
||||
/// </summary>
|
||||
public const string Information_AccidentCauseReportId = "2";
|
||||
public const string Information_AccidentCauseReportId = "2";
|
||||
/// <summary>
|
||||
/// 安全生产数据季报
|
||||
/// </summary>
|
||||
public const string Information_SafetyQuarterlyReportId = "3";
|
||||
public const string Information_SafetyQuarterlyReportId = "3";
|
||||
/// <summary>
|
||||
/// 应急演练开展情况季报表
|
||||
/// </summary>
|
||||
public const string Information_DrillConductedQuarterlyReportId = "4";
|
||||
public const string Information_DrillConductedQuarterlyReportId = "4";
|
||||
/// <summary>
|
||||
/// 应急演练工作计划半年报表
|
||||
/// </summary>
|
||||
public const string Information_DrillPlanHalfYearReportId = "5";
|
||||
public const string Information_DrillPlanHalfYearReportId = "5";
|
||||
/// <summary>
|
||||
/// 培训记录
|
||||
/// </summary>
|
||||
@@ -3833,7 +3920,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 环境危险源辨识与评价打印报表
|
||||
/// </summary>
|
||||
public const string EnvironmentalRiskReportId = "12";
|
||||
public const string EnvironmentalRiskReportId = "12";
|
||||
/// <summary>
|
||||
/// 环境危险源辨识与评价(重要环境因素)打印报表
|
||||
/// </summary>
|
||||
@@ -3841,7 +3928,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 职业健康安全危险源辨识与评价打印报表
|
||||
/// </summary>
|
||||
public const string HazardListReportId = "14";
|
||||
public const string HazardListReportId = "14";
|
||||
/// <summary>
|
||||
/// 职业健康安全危险源辨识与评价(重大危险源)打印报表
|
||||
/// </summary>
|
||||
@@ -3872,7 +3959,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 已完成/已闭环
|
||||
/// </summary>
|
||||
public const string State_3 = "3";
|
||||
public const string State_3 = "3";
|
||||
/// <summary>
|
||||
/// 已完成/已上报
|
||||
/// </summary>
|
||||
@@ -5001,7 +5088,7 @@ namespace BLL
|
||||
/// 重报
|
||||
/// </summary>
|
||||
public const string Comprehensive_ReCompile = "0";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 驳回
|
||||
/// </summary>
|
||||
@@ -5526,7 +5613,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 审批完成
|
||||
/// </summary>
|
||||
public const string ConstructionPlan_Complete= "5";
|
||||
public const string ConstructionPlan_Complete = "5";
|
||||
#endregion
|
||||
|
||||
#region 总承包商施工报告
|
||||
@@ -6126,8 +6213,6 @@ namespace BLL
|
||||
public const string IsoCompreInfoMenuId = "CF3CB43C-4031-4CFD-905F-154DC1CB881E";
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 焊材申请流程定义
|
||||
/// <summary>
|
||||
/// 重新编制
|
||||
@@ -6150,6 +6235,7 @@ namespace BLL
|
||||
public static string MaterialApply_Complete = "3";//分包
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 不参与规则设置菜单
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public static class BehavioralSafetyObservationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取行为安全观察与沟通信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BehavioralSafetyObservation GetBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加行为安全观察与沟通
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation model = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 考核加分情况
|
||||
/// </summary>
|
||||
public static class BonusScoreSituationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取考核加分情况信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreSituation GetBonusScoreSituationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加考核加分情况
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBonusScoreSituation(Model.Examine_BonusScoreSituation model)
|
||||
{
|
||||
Model.Examine_BonusScoreSituation newModel = new Model.Examine_BonusScoreSituation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Level = model.Level,
|
||||
LevelName = model.LevelName,
|
||||
Score = model.Score,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BonusScoreSituation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBonusScoreSituation(Model.Examine_BonusScoreSituation model)
|
||||
{
|
||||
Model.Examine_BonusScoreSituation newModel = Funs.DB.Examine_BonusScoreSituation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Level = model.Level;
|
||||
newModel.LevelName = model.LevelName;
|
||||
newModel.Score = model.Score;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBonusScoreSituationById(string Id)
|
||||
{
|
||||
Model.Examine_BonusScoreSituation model = Funs.DB.Examine_BonusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BonusScoreSituation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public static class CoConstructionActivitiesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取一线党员联系班组共建活动信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_CoConstructionActivities GetCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_CoConstructionActivities.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities model = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_CoConstructionActivities.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public static class LeadershipJoinHomeworkAnalysisMeetingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取领导人员参加班组作业分析会信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_LeadershipJoinHomeworkAnalysisMeeting GetLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 考核扣分情况
|
||||
/// </summary>
|
||||
public static class MinusScoreSituationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取考核扣分情况信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_MinusScoreSituation GetMinusScoreSituationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_MinusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加考核扣分情况
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddMinusScoreSituation(Model.Examine_MinusScoreSituation model)
|
||||
{
|
||||
Model.Examine_MinusScoreSituation newModel = new Model.Examine_MinusScoreSituation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Level = model.Level,
|
||||
LevelName = model.LevelName,
|
||||
Score = model.Score,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_MinusScoreSituation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateMinusScoreSituation(Model.Examine_MinusScoreSituation model)
|
||||
{
|
||||
Model.Examine_MinusScoreSituation newModel = Funs.DB.Examine_MinusScoreSituation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Level = model.Level;
|
||||
newModel.LevelName = model.LevelName;
|
||||
newModel.Score = model.Score;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteMinusScoreSituationById(string Id)
|
||||
{
|
||||
Model.Examine_MinusScoreSituation model = Funs.DB.Examine_MinusScoreSituation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_MinusScoreSituation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// </summary>
|
||||
public static class PersonalSafetyActionPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取个人安全行动计划信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_PersonalSafetyActionPlan GetPersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加个人安全行动计划
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddPersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = new Model.Examine_PersonalSafetyActionPlan
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeletePersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan model = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// </summary>
|
||||
public static class SharingOfSafetyExperienceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取安全经验分享信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_SharingOfSafetyExperience GetSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全经验分享
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience model = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训类别
|
||||
/// </summary>
|
||||
public static class PostTrainingCategoryService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训类别信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Category GetCategoryById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取岗位培训类别信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Category GetCategoryByName(string Name)
|
||||
{
|
||||
return Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训类别
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCategory(Model.PostTraining_Category model)
|
||||
{
|
||||
Model.PostTraining_Category newModel = new Model.PostTraining_Category
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Category.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCategory(Model.PostTraining_Category model)
|
||||
{
|
||||
Model.PostTraining_Category newModel = Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCategoryById(string Id)
|
||||
{
|
||||
Model.PostTraining_Category model = Funs.DB.PostTraining_Category.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Category.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有培训类别List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Category> GetCategoryList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Category orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训类别下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingCategoryDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingCategoryList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训类别下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Category> GetPostTrainingCategoryList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Category orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,326 @@
|
||||
using EmitMapper;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Quartz.Util;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训课程
|
||||
/// </summary>
|
||||
public static class PostTrainingCourseService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训课程信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Course GetCourseById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Course.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训课程
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCourse(Model.PostTraining_Course model)
|
||||
{
|
||||
Model.PostTraining_Course newModel = new Model.PostTraining_Course
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CategoryId = model.CategoryId,
|
||||
CategoryName = model.CategoryName,
|
||||
Method1 = model.Method1,
|
||||
Method2 = model.Method2,
|
||||
Teachers1 = model.Teachers1,
|
||||
Teachers2 = model.Teachers2,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Course.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCourse(Model.PostTraining_Course model)
|
||||
{
|
||||
Model.PostTraining_Course newModel = Funs.DB.PostTraining_Course.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.CategoryId = model.CategoryId;
|
||||
newModel.CategoryName = model.CategoryName;
|
||||
newModel.Method1 = model.Method1;
|
||||
newModel.Method2 = model.Method2;
|
||||
newModel.Teachers1 = model.Teachers1;
|
||||
newModel.Teachers2 = model.Teachers2;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCourseById(string Id)
|
||||
{
|
||||
Model.PostTraining_Course model = Funs.DB.PostTraining_Course.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Course.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训课程List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Course> GetCourseList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Course orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入数据
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="creatUserId"></param>
|
||||
/// <param name="errorList"></param>
|
||||
/// <returns></returns>
|
||||
public static ResponeData ImportData(string OriFileName, string path, string projectid, string creatUserId, ref List<Model.ErrorInfo> errorList)
|
||||
{
|
||||
var responeData = new ResponeData();
|
||||
List<PostTrainingCourse_InputDataIn> temeplateDtoIns;
|
||||
try
|
||||
{
|
||||
//A2:开始行
|
||||
temeplateDtoIns = MiniExcel.Query<PostTrainingCourse_InputDataIn>(path, startCell: "A2").ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "模板错误:" + ex.ToString();
|
||||
return responeData;
|
||||
}
|
||||
|
||||
if (temeplateDtoIns.Count == 0)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "导入数据为空!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
//培训课程
|
||||
var lstCourse = GetCourseList();
|
||||
//培训类别
|
||||
var lstCategory = PostTrainingCategoryService.GetCategoryList();
|
||||
//培训方式
|
||||
var lstMethod = PostTrainingMethodService.GetMethodList();
|
||||
//培训教资
|
||||
var lstTeachers = PostTrainingTeachersService.GetTeachersList();
|
||||
|
||||
#region 数据校验
|
||||
|
||||
string errorMsg = string.Empty;
|
||||
int rowIndex = 3;
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string name = !string.IsNullOrWhiteSpace(item.Name) ? item.Name.Trim() : string.Empty;
|
||||
string method1 = !string.IsNullOrWhiteSpace(item.Method1) ? item.Method1.Trim() : string.Empty;
|
||||
string method2 = !string.IsNullOrWhiteSpace(item.Method2) ? item.Method2.Trim() : string.Empty;
|
||||
string teachers1 = !string.IsNullOrWhiteSpace(item.Teachers1) ? item.Teachers1.Trim() : string.Empty;
|
||||
string teachers2 = !string.IsNullOrWhiteSpace(item.Teachers2) ? item.Teachers2.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName))
|
||||
{
|
||||
if (!lstCategory.Where(x => x.Name == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = $"培训类别不存在:{categoryName}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "课程名称";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName) && !string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
if (temeplateDtoIns.Where(x => x.Name == name && x.CategoryName == categoryName).Count() > 1)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "课程名称";
|
||||
errorInfo.Reason = $"导入数据重复:{name}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
if (lstCourse.Where(x => x.Name == name && x.CategoryName == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "课程名称";
|
||||
errorInfo.Reason = $"已存在课程:{name}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(method1))
|
||||
{
|
||||
if (!lstMethod.Where(x => x.Name == method1).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训方式一";
|
||||
errorInfo.Reason = $"培训方式字典不存在:{method1}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(method2))
|
||||
{
|
||||
if (!lstMethod.Where(x => x.Name == method2).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训方式二";
|
||||
errorInfo.Reason = $"培训方式字典不存在:{method2}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(teachers1))
|
||||
{
|
||||
if (!lstTeachers.Where(x => x.Name == teachers1).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训师资一";
|
||||
errorInfo.Reason = $"培训师资字典不存在:{teachers1}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(teachers2))
|
||||
{
|
||||
if (!lstTeachers.Where(x => x.Name == teachers2).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训师资二";
|
||||
errorInfo.Reason = $"培训师资字典不存在:{teachers2}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
if (errorList.Any())
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "存在异常数据!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string name = !string.IsNullOrWhiteSpace(item.Name) ? item.Name.Trim() : string.Empty;
|
||||
string method1 = !string.IsNullOrWhiteSpace(item.Method1) ? item.Method1.Trim() : string.Empty;
|
||||
string method2 = !string.IsNullOrWhiteSpace(item.Method2) ? item.Method2.Trim() : string.Empty;
|
||||
string teachers1 = !string.IsNullOrWhiteSpace(item.Teachers1) ? item.Teachers1.Trim() : string.Empty;
|
||||
string teachers2 = !string.IsNullOrWhiteSpace(item.Teachers2) ? item.Teachers2.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
Model.PostTraining_Course newModel = new Model.PostTraining_Course
|
||||
{
|
||||
Id = SQLHelper.GetNewID(typeof(Model.PostTraining_Course)),
|
||||
Code = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PostTraining_Course", "Code", ""),
|
||||
//ProjectId = this.ProjectId,
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = creatUserId
|
||||
};
|
||||
newModel.Name = name;
|
||||
newModel.CategoryId = lstCategory.Where(x => x.Name == categoryName).FirstOrDefault().Id;
|
||||
newModel.CategoryName = categoryName;
|
||||
newModel.Method1 = method1;
|
||||
newModel.Method2 = method2;
|
||||
newModel.Teachers1 = teachers1;
|
||||
newModel.Teachers2 = teachers2;
|
||||
newModel.Remark = remark;
|
||||
|
||||
AddCourse(newModel);
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训课程下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="categoryId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingCourseDropDownList(FineUIPro.DropDownList dropName, string categoryId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingCourseList(categoryId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训课程下拉项
|
||||
/// </summary>
|
||||
/// <param name="categoryId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Course> GetPostTrainingCourseList(string categoryId)
|
||||
{
|
||||
var lst = (from x in Funs.DB.PostTraining_Course orderby x.Code select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(categoryId))
|
||||
{
|
||||
lst = lst.Where(x => x.CategoryId == categoryId).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训方式
|
||||
/// </summary>
|
||||
public static class PostTrainingMethodService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训方式信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Method GetMethodById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取岗位培训方式信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Method GetMethodByName(string Name)
|
||||
{
|
||||
return Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训方式
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddMethod(Model.PostTraining_Method model)
|
||||
{
|
||||
Model.PostTraining_Method newModel = new Model.PostTraining_Method
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Method.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateMethod(Model.PostTraining_Method model)
|
||||
{
|
||||
Model.PostTraining_Method newModel = Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteMethodById(string Id)
|
||||
{
|
||||
Model.PostTraining_Method model = Funs.DB.PostTraining_Method.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Method.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有培训方式List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Method> GetMethodList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Method orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训方式下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingMethodDropDownList(FineUIPro.DropDownList dropName, string excludeName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Name";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingMethodList(excludeName);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训方式下拉项
|
||||
/// </summary>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Method> GetPostTrainingMethodList(string excludeName)
|
||||
{
|
||||
var lst = (from x in Funs.DB.PostTraining_Method orderby x.Code select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(excludeName))
|
||||
{
|
||||
lst = lst.Where(x => x.Name != excludeName).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训角色
|
||||
/// </summary>
|
||||
public static class PostTrainingRoleService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训角色信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Role GetRoleById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Role.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训角色
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddRole(Model.PostTraining_Role model)
|
||||
{
|
||||
Model.PostTraining_Role newModel = new Model.PostTraining_Role
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Role.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateRole(Model.PostTraining_Role model)
|
||||
{
|
||||
Model.PostTraining_Role newModel = Funs.DB.PostTraining_Role.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteRoleById(string Id)
|
||||
{
|
||||
Model.PostTraining_Role model = Funs.DB.PostTraining_Role.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Role.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训角色List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Role> GetRoleList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Role orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取岗位培训角色下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingRoleDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingRoleList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取岗位培训角色下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Role> GetPostTrainingRoleList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Role orderby x.Code select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,446 @@
|
||||
using EmitMapper;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Quartz.Util;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using RestSharp;
|
||||
using System.Web.UI.WebControls;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public static class PostTrainingStandardService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训标准信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Standard GetStandardById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Standard.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训标准
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddStandard(Model.PostTraining_Standard model)
|
||||
{
|
||||
Model.PostTraining_Standard newModel = new Model.PostTraining_Standard
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
RoleId = model.RoleId,
|
||||
CourseId = model.CourseId,
|
||||
ClassHour = model.ClassHour,
|
||||
Cycle = model.Cycle,
|
||||
Method = model.Method,
|
||||
Outcome = model.Outcome,
|
||||
Teachers = model.Teachers,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Standard.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateStandard(Model.PostTraining_Standard model)
|
||||
{
|
||||
Model.PostTraining_Standard newModel = Funs.DB.PostTraining_Standard.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.RoleId = model.RoleId;
|
||||
newModel.CourseId = model.CourseId;
|
||||
newModel.ClassHour = model.ClassHour;
|
||||
newModel.Cycle = model.Cycle;
|
||||
newModel.Method = model.Method;
|
||||
newModel.Outcome = model.Outcome;
|
||||
newModel.Teachers = model.Teachers;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteStandardById(string Id)
|
||||
{
|
||||
Model.PostTraining_Standard model = Funs.DB.PostTraining_Standard.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Standard.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训标准List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Standard> GetStandardList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Standard orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有岗位培训标准信息List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTrainingStandardInfo> GetStandardInfoList()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var lst = (from x in db.PostTraining_Standard
|
||||
join y in db.PostTraining_Course on x.CourseId equals y.Id
|
||||
join z in db.PostTraining_Role on x.RoleId equals z.Id
|
||||
orderby x.Code
|
||||
select new PostTrainingStandardInfo
|
||||
{
|
||||
RoleId = x.RoleId,
|
||||
RoleName = z.Name,
|
||||
CourseId = x.CourseId,
|
||||
CourseName = y.Name,
|
||||
CategoryName = y.CategoryName,
|
||||
ClassHour = x.ClassHour,
|
||||
Cycle = x.Cycle,
|
||||
Method = x.Method,
|
||||
Outcome = x.Outcome,
|
||||
Teachers = x.Teachers,
|
||||
Remark = x.Remark
|
||||
}).ToList();
|
||||
return lst;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导入数据
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="creatUserId"></param>
|
||||
/// <param name="errorList"></param>
|
||||
/// <returns></returns>
|
||||
public static ResponeData ImportData(string OriFileName, string path, string projectid, string creatUserId, ref List<Model.ErrorInfo> errorList)
|
||||
{
|
||||
var responeData = new ResponeData();
|
||||
List<PostTrainingStandard_InputDataIn> temeplateDtoIns;
|
||||
try
|
||||
{
|
||||
temeplateDtoIns = MiniExcel.Query<PostTrainingStandard_InputDataIn>(path, startCell: "A1").ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "模板错误:" + ex.ToString();
|
||||
return responeData;
|
||||
}
|
||||
|
||||
if (temeplateDtoIns.Count == 0)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "导入数据为空!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
//培训标准
|
||||
var lstStandard = GetStandardInfoList();
|
||||
//培训课程
|
||||
var lstCourse = PostTrainingCourseService.GetCourseList();
|
||||
//培训角色
|
||||
var lstRole = PostTrainingRoleService.GetRoleList();
|
||||
//培训类别
|
||||
var lstCategory = PostTrainingCategoryService.GetCategoryList();
|
||||
//培训方式
|
||||
var lstMethod = PostTrainingMethodService.GetMethodList();
|
||||
//培训教资
|
||||
var lstTeachers = PostTrainingTeachersService.GetTeachersList();
|
||||
//培训效果
|
||||
var lstOutcome = GetPostTrainingOutcomeList();
|
||||
|
||||
#region 数据校验
|
||||
|
||||
string errorMsg = string.Empty;
|
||||
int rowIndex = 3;
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string roleName = !string.IsNullOrWhiteSpace(item.RoleName) ? item.RoleName.Trim() : string.Empty;
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string courseName = !string.IsNullOrWhiteSpace(item.CourseName) ? item.CourseName.Trim() : string.Empty;
|
||||
string classHourStr = !string.IsNullOrWhiteSpace(item.ClassHour) ? item.ClassHour.Trim() : string.Empty;
|
||||
string cycleStr = !string.IsNullOrWhiteSpace(item.Cycle) ? item.Cycle.Trim() : string.Empty;
|
||||
decimal classHour = 0;
|
||||
decimal cycle = 0;
|
||||
string method = !string.IsNullOrWhiteSpace(item.Method) ? item.Method.Trim() : string.Empty;
|
||||
string outcome = !string.IsNullOrWhiteSpace(item.Outcome) ? item.Outcome.Trim() : string.Empty;
|
||||
string teachers = !string.IsNullOrWhiteSpace(item.Teachers) ? item.Teachers.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(roleName))
|
||||
{
|
||||
if (!lstRole.Where(x => x.Name == roleName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "适用岗位角色";
|
||||
errorInfo.Reason = $"角色不存在:{roleName}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "适用岗位角色";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName))
|
||||
{
|
||||
if (!lstCategory.Where(x => x.Name == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = $"培训类别不存在:{categoryName}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训类别";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(courseName))
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = "不可为空";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(categoryName) && !string.IsNullOrWhiteSpace(courseName))
|
||||
{
|
||||
if (temeplateDtoIns.Where(x => x.RoleName == roleName && x.CourseName == courseName && x.CategoryName == categoryName).Count() > 1)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = $"【{roleName}】导入数据重复:{courseName}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
if (!lstCourse.Where(x => x.Name == courseName && x.CategoryName == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = $"【{roleName}】不存在培训课程:{courseName}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
else if (lstStandard.Where(x => x.CourseName == courseName && x.CategoryName == categoryName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课程";
|
||||
errorInfo.Reason = $"培训标准已存在:{courseName}({categoryName})";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(classHourStr))
|
||||
{
|
||||
try
|
||||
{
|
||||
classHour = decimal.Parse(classHourStr);
|
||||
if (classHour <= 0)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课时";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课时";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训课时";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(cycleStr))
|
||||
{
|
||||
try
|
||||
{
|
||||
cycle = decimal.Parse(cycleStr);
|
||||
if (cycle <= 0)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训周期";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训周期";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训周期";
|
||||
errorInfo.Reason = "请填写大于0的数值";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(method))
|
||||
{
|
||||
if (!lstMethod.Where(x => x.Name == method).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训方式";
|
||||
errorInfo.Reason = $"培训方式字典不存在:{method}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(outcome))
|
||||
{
|
||||
if (!lstOutcome.Where(x => x.Text == outcome).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训效果";
|
||||
errorInfo.Reason = $"培训效果字典不存在:{outcome}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(teachers))
|
||||
{
|
||||
if (!lstTeachers.Where(x => x.Name == teachers).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
errorInfo.Column = "培训师资";
|
||||
errorInfo.Reason = $"培训师资字典不存在:{teachers}";
|
||||
errorList.Add(errorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
if (errorList.Any())
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "存在异常数据!";
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
string roleName = !string.IsNullOrWhiteSpace(item.RoleName) ? item.RoleName.Trim() : string.Empty;
|
||||
string categoryName = !string.IsNullOrWhiteSpace(item.CategoryName) ? item.CategoryName.Trim() : string.Empty;
|
||||
string courseName = !string.IsNullOrWhiteSpace(item.CourseName) ? item.CourseName.Trim() : string.Empty;
|
||||
decimal classHour = decimal.Parse(item.ClassHour);
|
||||
decimal cycle = decimal.Parse(item.Cycle);
|
||||
string method = !string.IsNullOrWhiteSpace(item.Method) ? item.Method.Trim() : string.Empty;
|
||||
string outcome = !string.IsNullOrWhiteSpace(item.Outcome) ? item.Outcome.Trim() : string.Empty;
|
||||
string teachers = !string.IsNullOrWhiteSpace(item.Teachers) ? item.Teachers.Trim() : string.Empty;
|
||||
string remark = !string.IsNullOrWhiteSpace(item.Remark) ? item.Remark.Trim() : string.Empty;
|
||||
|
||||
Model.PostTraining_Standard newModel = new Model.PostTraining_Standard
|
||||
{
|
||||
Id = SQLHelper.GetNewID(typeof(Model.PostTraining_Standard)),
|
||||
Code = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PostTraining_Standard", "Code", ""),
|
||||
//ProjectId = this.ProjectId,
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = creatUserId
|
||||
};
|
||||
newModel.CourseId = lstCourse.Where(x => x.Name == courseName).FirstOrDefault().Id;
|
||||
newModel.RoleId = lstRole.Where(x => x.Name == roleName).FirstOrDefault().Id;
|
||||
newModel.ClassHour = classHour;
|
||||
newModel.Cycle = cycle;
|
||||
newModel.Method = method;
|
||||
newModel.Outcome = outcome;
|
||||
newModel.Teachers = teachers;
|
||||
newModel.Remark = remark;
|
||||
|
||||
AddStandard(newModel);
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingOutcomeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Text";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetPostTrainingOutcomeList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetPostTrainingOutcomeList()
|
||||
{
|
||||
ListItem[] lis = null;
|
||||
lis = new ListItem[3];
|
||||
lis[0] = new ListItem("掌握", "0");
|
||||
lis[1] = new ListItem("熟悉", "1");
|
||||
lis[2] = new ListItem("了解", "2");
|
||||
return lis;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 岗位培训师资
|
||||
/// </summary>
|
||||
public static class PostTrainingTeachersService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取岗位培训师资信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Teachers GetTeachersById(string Id)
|
||||
{
|
||||
return Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取岗位培训师资信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PostTraining_Teachers GetTeachersByName(string Name)
|
||||
{
|
||||
return Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加岗位培训师资
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddTeachers(Model.PostTraining_Teachers model)
|
||||
{
|
||||
Model.PostTraining_Teachers newModel = new Model.PostTraining_Teachers
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.PostTraining_Teachers.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateTeachers(Model.PostTraining_Teachers model)
|
||||
{
|
||||
Model.PostTraining_Teachers newModel = Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteTeachersById(string Id)
|
||||
{
|
||||
Model.PostTraining_Teachers model = Funs.DB.PostTraining_Teachers.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.PostTraining_Teachers.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有培训师资List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<PostTraining_Teachers> GetTeachersList()
|
||||
{
|
||||
return (from x in Funs.DB.PostTraining_Teachers orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训师资下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPostTrainingTeachersDropDownList(FineUIPro.DropDownList dropName, string excludeName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Name";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetPostTrainingTeachersList(excludeName);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训师资下拉项
|
||||
/// </summary>
|
||||
/// <param name="excludeName"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PostTraining_Teachers> GetPostTrainingTeachersList(string excludeName)
|
||||
{
|
||||
var lst = (from x in Funs.DB.PostTraining_Teachers orderby x.Code select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(excludeName))
|
||||
{
|
||||
lst = lst.Where(x => x.Name != excludeName).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,16 @@ namespace BLL
|
||||
return Funs.DB.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.View_SitePerson_PersonList GetPersonInfoById(string personId)
|
||||
{
|
||||
return Funs.DB.View_SitePerson_PersonList.FirstOrDefault(e => e.PersonId == personId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取人员信息
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user