From e83f0e9dbec9c08317747f835922dd440ddddb51 Mon Sep 17 00:00:00 2001 From: wrx <88384874@qq.com> Date: Fri, 31 May 2024 17:04:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BB=B6=E8=A3=85=E9=85=8D=E5=92=8C?= =?UTF-8?q?=E5=86=B2=E5=AD=94,=E8=A7=86=E9=A2=91=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=AD=89=E5=8A=9F=E8=83=BD=E9=A1=B9=E7=9B=AE.=E6=95=B4?= =?UTF-8?q?=E4=BD=93=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SjMes/PunchAssemble/BBMPT.sln | 42 + .../PunchAssemble/MESClassLibrary/App.config | 20 + .../BLL/Andon/AndonButtonRecordBLL.cs | 42 + .../BLL/Andon/AndonButtonTypeBLL.cs | 31 + .../MESClassLibrary/BLL/BasicBLL.cs | 178 + .../BLL/BasicInfo/BadInjectionBLL.cs | 44 + .../BLL/BasicInfo/BarCodeBLL.cs | 174 + .../MESClassLibrary/BLL/BasicInfo/BomBLL.cs | 271 + .../BLL/BasicInfo/BucketInfoBLL.cs | 184 + .../BLL/BasicInfo/CheckItemBLL.cs | 198 + .../MESClassLibrary/BLL/BasicInfo/ColorBLL.cs | 214 + .../BLL/BasicInfo/DefectBLL.cs | 181 + .../MESClassLibrary/BLL/BasicInfo/DeptBLL.cs | 144 + .../BLL/BasicInfo/DeviceBLL.cs | 251 + .../BLL/BasicInfo/FactoryBLL.cs | 148 + .../BLL/BasicInfo/ImgVideoBLL.cs | 141 + .../BLL/BasicInfo/InjectionPlanBLL.cs | 391 + .../MESClassLibrary/BLL/BasicInfo/LineBLL.cs | 170 + .../BLL/BasicInfo/MachineBLL.cs | 184 + .../BLL/BasicInfo/ModelInfoBLL.cs | 208 + .../BLL/BasicInfo/ModelUpdateBLL.cs | 137 + .../BLL/BasicInfo/OperatorBLL.cs | 185 + .../BLL/BasicInfo/PaintInfoBLL.cs | 335 + .../MESClassLibrary/BLL/BasicInfo/PlaceBLL.cs | 165 + .../BLL/BasicInfo/PlasticBLL.cs | 238 + .../BLL/BasicInfo/ProductBLL.cs | 443 + .../BLL/BasicInfo/ProductOfInjectionBLL.cs | 83 + .../BLL/BasicInfo/ProductTypeBLL.cs | 182 + .../BLL/BasicInfo/StationBLL.cs | 195 + .../BLL/Check/InspectResultBLL.cs | 1506 +++ .../BLL/ExchangeCenter/GetNewTasksBLL.cs | 29 + .../BLL/ExchangeCenter/PartMstrBLL.cs | 29 + .../BLL/ExchangeCenter/PartRecordBLL.cs | 29 + .../BLL/ExchangeCenter/TESBomBLL.cs | 58 + .../BLL/ExchangeCenter/TESPartDetBLL.cs | 28 + .../BLL/Injection/DownReasonBLL.cs | 29 + .../BLL/Injection/InjectionDownRecordBLL.cs | 891 ++ .../BLL/Injection/InjectionRecordBLL.cs | 1979 +++ .../BLL/Inspection/CommonlyInspectionBLL.cs | 596 + .../CommonlyInspectionVersionBLL.cs | 208 + .../BLL/Mistake247/AssemblyBLL.cs | 100 + .../MESClassLibrary/BLL/Mistake247/BoxBLL.cs | 86 + .../BLL/Mistake247/MistakeBLL.cs | 72 + .../BLL/Mistake247/Plan247BLL.cs | 101 + .../BLL/Mistake247/RecordBLL.cs | 171 + .../BLL/Painting/InspectResultBLL.cs | 29 + .../BLL/Painting/PaintBarCodeBLL.cs | 72 + .../BLL/Painting/StockInBLL.cs | 114 + .../MESClassLibrary/BLL/Plan247/Plan247BLL.cs | 399 + .../BLL/PunchAndWeld/PlanPunchBLL.cs | 451 + .../BLL/PunchAndWeld/PunchAdressBLL.cs | 29 + .../BLL/PunchAndWeld/PunchAndStationBLL.cs | 182 + .../BLL/PunchAndWeld/PunchDeviceBLL.cs | 42 + .../BLL/PunchAndWeld/PunchPartBLL.cs | 29 + .../BLL/PunchAndWeld/PunchPlanBLL.cs | 94 + .../BLL/PunchAndWeld/PunchRecordBLL.cs | 44 + .../BLL/PunchAndWeld/PunchValueRecordBLL.cs | 29 + .../BLL/Record247/Record247BLL.cs | 81 + .../BLL/Report/FiveScreenBLL.cs | 190 + .../BLL/Report/FiveScreenLastBLL.cs | 153 + .../BLL/Report/FiveScreenStandardBLL.cs | 161 + .../MESClassLibrary/BLL/Show/AnalysisBLL.cs | 57 + .../MESClassLibrary/BLL/Stock/StockInBLL.cs | 156 + .../BLL/User/Sys_ButtonsService.cs | 45 + .../BLL/User/Sys_NavMenuService.cs | 83 + .../MESClassLibrary/BLL/User/UserBLL.cs | 304 + .../DAL/Andon/AndonButtonRecordDAL.cs | 68 + .../DAL/Andon/AndonButtonTypeDAL.cs | 34 + .../MESClassLibrary/DAL/BaseDAL.cs | 199 + .../MESClassLibrary/DAL/BasicDAL.cs | 51 + .../DAL/BasicInfo/BadInjectionDAL.cs | 92 + .../DAL/BasicInfo/BarCodeDAl.cs | 440 + .../MESClassLibrary/DAL/BasicInfo/BomDAL.cs | 150 + .../MESClassLibrary/DAL/BasicInfo/ColorDAL.cs | 55 + .../DAL/BasicInfo/DefectDAL.cs | 35 + .../DAL/BasicInfo/InjectionPlanDAL.cs | 199 + .../DAL/BasicInfo/OperatorDAL.cs | 73 + .../DAL/BasicInfo/ProductDAL.cs | 245 + .../DAL/BasicInfo/ProductOfInjectionDAL.cs | 265 + .../DAL/BasicInfo/ProductTypeDAL.cs | 210 + .../DAL/BasicInfo/StationDAL.cs | 38 + .../DAL/Check/InspectResultDAL.cs | 253 + .../MESClassLibrary/DAL/DataTableExtend.cs | 80 + .../DAL/ExchangeCenter/GetNewTasksDAL.cs | 123 + .../DAL/ExchangeCenter/PartMstrDAL.cs | 110 + .../DAL/ExchangeCenter/PartRecordDAL.cs | 46 + .../DAL/ExchangeCenter/TESBomDAL.cs | 177 + .../DAL/ExchangeCenter/TESPartDetDAL.cs | 93 + .../DAL/Injection/DownReasonDAL.cs | 31 + .../DAL/Injection/InjectionDownRecordDAL.cs | 159 + .../DAL/Injection/InjectionRecordDAL.cs | 113 + .../DAL/Mistake247/AssemblyDAL.cs | 202 + .../MESClassLibrary/DAL/Mistake247/BoxDAL.cs | 168 + .../DAL/Mistake247/MistakeDAL.cs | 104 + .../DAL/Mistake247/Plan247DAL.cs | 214 + .../DAL/Mistake247/RecordDAL.cs | 311 + .../MESClassLibrary/DAL/Plan247/Plan247DAL.cs | 13 + .../DAL/PunchAndWeld/PunchAdressDAL.cs | 37 + .../DAL/PunchAndWeld/PunchAndStationDAL.cs | 42 + .../DAL/PunchAndWeld/PunchDeviceDAL.cs | 51 + .../DAL/PunchAndWeld/PunchPartDAL.cs | 29 + .../DAL/PunchAndWeld/PunchPlanDAL.cs | 172 + .../DAL/PunchAndWeld/PunchRecordDAL.cs | 64 + .../DAL/PunchAndWeld/PunchValueRecordDAL.cs | 52 + .../MESClassLibrary/DAL/SqlHelper.cs | 2482 ++++ .../DAL/User/Sys_ButtonsData.cs | 75 + .../DAL/User/Sys_NavMenuData.cs | 107 + .../MESClassLibrary/DAL/User/UserDAL.cs | 421 + .../DAL/painting/InspectResultDAL.cs | 83 + .../DAL/painting/PaintBarCodeDAL.cs | 181 + .../DAL/painting/StockInDAL.cs | 596 + .../MESClassLibrary/EFModel/BBMPT.Context.cs | 403 + .../MESClassLibrary/EFModel/BBMPT.Context.tt | 636 + .../MESClassLibrary/EFModel/BBMPT.Designer.cs | 10 + .../MESClassLibrary/EFModel/BBMPT.cs | 9 + .../MESClassLibrary/EFModel/BBMPT.edmx | 11035 ++++++++++++++++ .../EFModel/BBMPT.edmx.diagram | 242 + .../MESClassLibrary/EFModel/BBMPT.tt | 733 + .../MESClassLibrary/EFModel/LogErr.cs | 22 + .../MESClassLibrary/EFModel/LogSys.cs | 22 + .../EFModel/LogSys_202001_04.cs | 22 + .../MESClassLibrary/EFModel/LogSys_202003.cs | 22 + .../MESClassLibrary/EFModel/LogSys_202004.cs | 22 + .../MESClassLibrary/EFModel/LogSys_202005.cs | 22 + .../EFModel/LogSys_20200605.cs | 22 + .../EFModel/LogSys_20200610.cs | 22 + .../MESClassLibrary/EFModel/LogSys_202008.cs | 22 + .../EFModel/LogSys_20210322.cs | 22 + .../EFModel/QRTZ_BLOB_TRIGGERS.cs | 22 + .../MESClassLibrary/EFModel/QRTZ_CALENDARS.cs | 21 + .../EFModel/QRTZ_CRON_TRIGGERS.cs | 23 + .../EFModel/QRTZ_FIRED_TRIGGERS.cs | 31 + .../EFModel/QRTZ_JOB_DETAILS.cs | 28 + .../MESClassLibrary/EFModel/QRTZ_LOCKS.cs | 20 + .../EFModel/QRTZ_PAUSED_TRIGGER_GRPS.cs | 20 + .../EFModel/QRTZ_SCHEDULER_STATE.cs | 22 + .../EFModel/QRTZ_SIMPLE_TRIGGERS.cs | 24 + .../EFModel/QRTZ_SIMPROP_TRIGGERS.cs | 32 + .../MESClassLibrary/EFModel/QRTZ_TRIGGERS.cs | 35 + .../MESClassLibrary/EFModel/TA_DEPT.cs | 30 + .../MESClassLibrary/EFModel/TES_BOM.cs | 45 + .../MESClassLibrary/EFModel/TES_PART_MSTR.cs | 36 + .../MESClassLibrary/EFModel/T_PaintInfo.cs | 26 + .../MESClassLibrary/EFModel/T_Sys_Buttons.cs | 26 + .../MESClassLibrary/EFModel/T_Sys_NavMenu.cs | 26 + .../MESClassLibrary/EFModel/T_Sys_Power.cs | 32 + .../MESClassLibrary/EFModel/T_Sys_Role.cs | 23 + .../EFModel/T_Sys_RoleLinkPower.cs | 24 + .../MESClassLibrary/EFModel/T_Sys_UserRole.cs | 22 + .../MESClassLibrary/EFModel/T_Sys_Users.cs | 31 + .../EFModel/T_Sys_Users_NavMenu.cs | 21 + .../MESClassLibrary/EFModel/fine_authority.cs | 25 + .../EFModel/fine_authority_object.cs | 31 + .../EFModel/fine_backup_node.cs | 25 + .../EFModel/fine_base_message.cs | 29 + .../EFModel/fine_base_output.cs | 24 + .../MESClassLibrary/EFModel/fine_block_ip.cs | 22 + .../EFModel/fine_conf_classname.cs | 20 + .../EFModel/fine_conf_entity.cs | 20 + .../EFModel/fine_conf_xmlentity.cs | 20 + .../EFModel/fine_custom_role.cs | 25 + .../MESClassLibrary/EFModel/fine_dep_role.cs | 24 + .../EFModel/fine_department.cs | 27 + .../EFModel/fine_extra_property.cs | 23 + .../EFModel/fine_favorite_entry.cs | 22 + .../EFModel/fine_homepage_expand.cs | 25 + .../EFModel/fine_international.cs | 23 + .../EFModel/fine_last_login.cs | 23 + .../EFModel/fine_login_lock.cs | 26 + .../EFModel/fine_mobile_device.cs | 25 + .../EFModel/fine_mobile_push_message.cs | 24 + .../EFModel/fine_output_class.cs | 20 + .../EFModel/fine_output_client_notice.cs | 27 + .../EFModel/fine_output_email.cs | 29 + .../EFModel/fine_output_ftp.cs | 25 + .../EFModel/fine_output_mount.cs | 23 + .../EFModel/fine_output_platform_msg.cs | 22 + .../EFModel/fine_output_print.cs | 20 + .../EFModel/fine_output_sftp.cs | 25 + .../EFModel/fine_output_sms.cs | 21 + .../EFModel/fine_param_template.cs | 22 + .../MESClassLibrary/EFModel/fine_post.cs | 25 + .../EFModel/fine_print_offset.cs | 24 + .../EFModel/fine_print_offset_ip_relate.cs | 21 + .../EFModel/fine_process_expand.cs | 20 + .../EFModel/fine_process_message.cs | 23 + .../EFModel/fine_remote_design_auth.cs | 24 + .../EFModel/fine_report_expand.cs | 21 + .../EFModel/fine_schedule_output.cs | 22 + .../EFModel/fine_schedule_record.cs | 29 + .../EFModel/fine_schedule_task.cs | 41 + .../EFModel/fine_schedule_task_param.cs | 22 + .../EFModel/fine_swift_cluster_size.cs | 21 + .../EFModel/fine_swift_col_idx_conf.cs | 22 + .../EFModel/fine_swift_config_entity.cs | 20 + .../EFModel/fine_swift_metadata.cs | 24 + .../EFModel/fine_swift_seg_location.cs | 21 + .../EFModel/fine_swift_segments.cs | 24 + .../EFModel/fine_swift_service_info.cs | 23 + .../EFModel/fine_swift_tab_idx_conf.cs | 20 + .../EFModel/fine_swift_table_path.cs | 23 + .../EFModel/fine_system_message.cs | 21 + .../MESClassLibrary/EFModel/fine_user.cs | 34 + .../EFModel/fine_user_role_middle.cs | 22 + .../MESClassLibrary/EFModel/fine_vcs.cs | 25 + .../MESClassLibrary/EFModel/fine_workflow.cs | 24 + .../EFModel/fine_workflow_log.cs | 24 + .../EFModel/fine_workflow_node.cs | 27 + .../EFModel/fine_workflow_stash_data.cs | 23 + .../EFModel/fine_workflow_task.cs | 32 + .../EFModel/fine_workflow_task_impl.cs | 41 + .../EFModel/fine_write_stash.cs | 22 + .../EFModel/tb_AndonButtonType.cs | 21 + .../MESClassLibrary/EFModel/tb_AndonRecord.cs | 23 + .../EFModel/tb_Assembly_243.cs | 34 + .../EFModel/tb_Assembly_247.cs | 36 + .../EFModel/tb_Bad_Injection.cs | 24 + .../MESClassLibrary/EFModel/tb_BarCode.cs | 30 + .../MESClassLibrary/EFModel/tb_Bom.cs | 21 + .../EFModel/tb_Bom_20190726.cs | 21 + .../MESClassLibrary/EFModel/tb_Box_243.cs | 30 + .../MESClassLibrary/EFModel/tb_Box_247.cs | 30 + .../MESClassLibrary/EFModel/tb_Box_Record.cs | 22 + .../EFModel/tb_Box_WheelBrow.cs | 27 + .../MESClassLibrary/EFModel/tb_BucketInfo.cs | 23 + .../MESClassLibrary/EFModel/tb_CheckItem.cs | 22 + .../MESClassLibrary/EFModel/tb_Color.cs | 28 + .../EFModel/tb_Color_20191008.cs | 24 + .../EFModel/tb_Color_20201101.cs | 28 + .../EFModel/tb_CommonlyInspection.cs | 28 + .../EFModel/tb_CommonlyInspectionRecord.cs | 38 + .../EFModel/tb_CommonlyInspectionVersion.cs | 30 + .../MESClassLibrary/EFModel/tb_Config.cs | 25 + .../MESClassLibrary/EFModel/tb_Cylinder.cs | 21 + .../EFModel/tb_CylinderAndRaw.cs | 25 + .../MESClassLibrary/EFModel/tb_Defect.cs | 22 + .../MESClassLibrary/EFModel/tb_Device.cs | 25 + .../MESClassLibrary/EFModel/tb_Factory.cs | 21 + .../EFModel/tb_FinishProduct.cs | 22 + .../MESClassLibrary/EFModel/tb_HybridPlan.cs | 25 + .../EFModel/tb_HybridScanRecord.cs | 21 + .../MESClassLibrary/EFModel/tb_ImgVideo.cs | 24 + .../EFModel/tb_Inhection_DownReason.cs | 21 + .../EFModel/tb_InjectPlanReport.cs | 25 + .../EFModel/tb_InjectionPlan.cs | 33 + .../EFModel/tb_Injection_DownRecord.cs | 30 + .../EFModel/tb_Injection_DownTime.cs | 27 + .../EFModel/tb_Injection_DownType.cs | 21 + .../EFModel/tb_Injection_Record.cs | 27 + .../EFModel/tb_InspectResult.cs | 35 + .../EFModel/tb_InspectResult_20190902.cs | 35 + .../EFModel/tb_InspectResult_20200717.cs | 35 + .../EFModel/tb_InspectResult_20201021.cs | 35 + .../EFModel/tb_InspectResult_20210322.cs | 35 + .../MESClassLibrary/EFModel/tb_LayerAndBC.cs | 23 + .../MESClassLibrary/EFModel/tb_Line.cs | 22 + .../MESClassLibrary/EFModel/tb_Location.cs | 21 + .../MESClassLibrary/EFModel/tb_Machine.cs | 21 + .../MESClassLibrary/EFModel/tb_Mistake_243.cs | 25 + .../EFModel/tb_Mistake_243_bak.cs | 25 + .../MESClassLibrary/EFModel/tb_Mistake_247.cs | 25 + .../MESClassLibrary/EFModel/tb_ModelCount.cs | 24 + .../MESClassLibrary/EFModel/tb_ModelInfo.cs | 33 + .../EFModel/tb_Model_Product.cs | 21 + .../EFModel/tb_Model_Update.cs | 25 + .../MESClassLibrary/EFModel/tb_Operator.cs | 24 + .../EFModel/tb_PaintBarCode.cs | 32 + .../MESClassLibrary/EFModel/tb_PaintInfo.cs | 26 + .../MESClassLibrary/EFModel/tb_PaintPerson.cs | 20 + .../MESClassLibrary/EFModel/tb_PaintReason.cs | 20 + .../EFModel/tb_PaintScanRecord.cs | 23 + .../EFModel/tb_Paint_Bucket.cs | 21 + .../MESClassLibrary/EFModel/tb_PartRecord.cs | 23 + .../MESClassLibrary/EFModel/tb_Place.cs | 22 + .../EFModel/tb_PlanScreenConfig.cs | 22 + .../MESClassLibrary/EFModel/tb_Plan_243.cs | 31 + .../MESClassLibrary/EFModel/tb_Plan_247.cs | 31 + .../MESClassLibrary/EFModel/tb_Plan_Punch.cs | 29 + .../EFModel/tb_Plan_Punch_20200509.cs | 29 + .../MESClassLibrary/EFModel/tb_Plastic.cs | 24 + .../MESClassLibrary/EFModel/tb_PrintConfig.cs | 21 + .../MESClassLibrary/EFModel/tb_PrintRecord.cs | 28 + .../MESClassLibrary/EFModel/tb_Product.cs | 36 + .../MESClassLibrary/EFModel/tb_Product0912.cs | 34 + .../EFModel/tb_Product20200802.cs | 33 + .../EFModel/tb_Product20201016.cs | 34 + .../EFModel/tb_ProductSotckIn.cs | 22 + .../MESClassLibrary/EFModel/tb_ProductType.cs | 22 + .../EFModel/tb_Product_20200513.cs | 31 + .../EFModel/tb_Product_20201110.cs | 35 + .../EFModel/tb_Product_Injection.cs | 27 + .../EFModel/tb_Product_Injection_20190726.cs | 26 + .../EFModel/tb_Product_Injection_w.cs | 22 + .../MESClassLibrary/EFModel/tb_Project.cs | 22 + .../EFModel/tb_PunchAddress.cs | 23 + .../EFModel/tb_PunchAndStation.cs | 26 + .../MESClassLibrary/EFModel/tb_PunchDevice.cs | 22 + .../EFModel/tb_PunchMFAPlan.cs | 34 + .../EFModel/tb_PunchNGCCPlan.cs | 34 + .../MESClassLibrary/EFModel/tb_PunchPlan.cs | 26 + .../MESClassLibrary/EFModel/tb_PunchRecord.cs | 21 + .../MESClassLibrary/EFModel/tb_PunchResult.cs | 27 + .../EFModel/tb_PunchValueRecord.cs | 23 + .../EFModel/tb_Punch_Code_Record.cs | 31 + .../EFModel/tb_Punch_Code_Record2.cs | 23 + .../EFModel/tb_Punch_Code_Record_20200721.cs | 26 + .../EFModel/tb_Punch_Code_Record_20200907.cs | 26 + .../EFModel/tb_Punch_Code_Record_BF.cs | 26 + .../EFModel/tb_Punch_Proucting.cs | 21 + .../MESClassLibrary/EFModel/tb_Record_243.cs | 27 + .../EFModel/tb_Record_243_20220517.cs | 27 + .../MESClassLibrary/EFModel/tb_Record_247.cs | 30 + .../MESClassLibrary/EFModel/tb_ReportA1.cs | 33 + .../MESClassLibrary/EFModel/tb_ReportF1.cs | 32 + .../MESClassLibrary/EFModel/tb_ReportF3.cs | 23 + .../MESClassLibrary/EFModel/tb_ReportG1.cs | 32 + .../MESClassLibrary/EFModel/tb_ReportH1.cs | 32 + .../EFModel/tb_ReportPaintingScreen.cs | 25 + .../EFModel/tb_ReportPaintingScreen_bak.cs | 25 + .../EFModel/tb_ReportPaintingScreen_pg.cs | 32 + .../EFModel/tb_ReportPaintingScreen_pg_bak.cs | 32 + .../MESClassLibrary/EFModel/tb_ReportTest.cs | 30 + .../EFModel/tb_Report_FiveScreen.cs | 65 + .../EFModel/tb_Report_FiveScreenConfig.cs | 24 + .../EFModel/tb_Report_FiveScreenLast.cs | 25 + .../EFModel/tb_Report_FiveScreenStandard.cs | 34 + .../EFModel/tb_Report_FiveScreen_20191011.cs | 65 + .../EFModel/tb_Report_FiveScreen_20191014.cs | 65 + .../EFModel/tb_ScanAnalysis.cs | 28 + .../EFModel/tb_ScanRecord_Laser.cs | 21 + .../MESClassLibrary/EFModel/tb_SkidInfo.cs | 49 + .../EFModel/tb_SkidInfo_20200904.cs | 49 + .../EFModel/tb_SpcialNotFacStockNo.cs | 20 + .../EFModel/tb_SpcialStockNo.cs | 20 + .../MESClassLibrary/EFModel/tb_Station.cs | 22 + .../EFModel/tb_StationAndCylinder.cs | 23 + .../MESClassLibrary/EFModel/tb_StockIn.cs | 24 + .../EFModel/tb_StockInColor.cs | 22 + .../EFModel/tb_StockIn_20200511.cs | 24 + .../EFModel/tb_StockIn_20210322.cs | 24 + .../EFModel/tb_StockIn_beif.cs | 22 + .../EFModel/tb_ToVisual_WheelBrow_243.cs | 23 + .../EFModel/tb_ToVisual_WheelBrow_247.cs | 23 + .../MESClassLibrary/EFModel/tb_aa.cs | 24 + .../MESClassLibrary/EFModel/tb_reportA2.cs | 33 + .../MESClassLibrary/EFModel/tb_test.cs | 21 + .../MESClassLibrary/EFModel/test1.cs | 29 + .../MESClassLibrary/EFModel/test2.cs | 24 + .../EFModel/user_department_sel_Result.cs | 19 + .../EFModel/user_menu_sel_Result.cs | 19 + .../EncryptedDLL/MESClassLibrary.dll | Bin 0 -> 721920 bytes .../MESClassLibrary/JSONTools.cs | 85 + .../MESClassLibrary/LambdaHelper.cs | 220 + .../MESClassLibrary/MESClassLibrary.csproj | 983 ++ .../MESClassLibrary/Model/AnalysisBarModel.cs | 16 + .../MESClassLibrary/Model/AnalysisPieModel.cs | 14 + .../Model/AndonButtonTypeModel.cs | 15 + .../MESClassLibrary/Model/AndonRecordModel.cs | 18 + .../MESClassLibrary/Model/AssemblyModel.cs | 38 + .../Model/BadInjectionModel.cs | 17 + .../MESClassLibrary/Model/BarCodeModel.cs | 28 + .../MESClassLibrary/Model/BasicModel.cs | 20 + .../MESClassLibrary/Model/BomModel.cs | 16 + .../MESClassLibrary/Model/BoxModel.cs | 35 + .../MESClassLibrary/Model/CheckItemModel.cs | 14 + .../MESClassLibrary/Model/ChildTreeModel.cs | 16 + .../MESClassLibrary/Model/ColorModel.cs | 16 + .../Model/CommonlyInspectionModel.cs | 14 + .../Model/CommonlyInspectionVersionModel.cs | 17 + .../MESClassLibrary/Model/DefectModel.cs | 14 + .../MESClassLibrary/Model/DeviceModel.cs | 14 + .../MESClassLibrary/Model/DownRecordVO.cs | 28 + .../MESClassLibrary/Model/EcharBarModel.cs | 15 + .../MESClassLibrary/Model/GetNewTasksModel.cs | 51 + .../Model/InjectionBadReasonModel.cs | 14 + .../Model/InjectionDownReason.cs | 15 + .../Model/InjectionDownRecordModel.cs | 20 + .../Model/InjectionPlanModel.cs | 22 + .../Model/InjectionRecordDownReasonModel.cs | 15 + .../Model/Injection_DownRecordModel.cs | 18 + .../Model/Injection_RecordModel.cs | 14 + .../Model/InspectResultGroup.cs | 34 + .../Model/InspectResultModel.cs | 27 + .../MESClassLibrary/Model/JsonDataModel.cs | 14 + .../MESClassLibrary/Model/LineModel.cs | 14 + .../MESClassLibrary/Model/LogErrModel.cs | 20 + .../MESClassLibrary/Model/LogSysModel.cs | 19 + .../MESClassLibrary/Model/OperationModel.cs | 42 + .../MESClassLibrary/Model/OperatorModel.cs | 14 + .../Model/PaintBarCodeModel.cs | 26 + .../Model/Paint_BucketModel.cs | 17 + .../MESClassLibrary/Model/PartDetModel.cs | 30 + .../MESClassLibrary/Model/PartMstrModel.cs | 60 + .../MESClassLibrary/Model/PartRecordModel.cs | 17 + .../MESClassLibrary/Model/PieDataModel.cs | 14 + .../MESClassLibrary/Model/PlaceModel.cs | 14 + .../MESClassLibrary/Model/PlasticModel.cs | 16 + .../Model/ProductInjectionModel.cs | 16 + .../MESClassLibrary/Model/ProductModel.cs | 14 + .../Model/ProductOfInjectionModel.cs | 25 + .../MESClassLibrary/Model/ProductTypeModel.cs | 21 + .../Model/PunchAndStationModel.cs | 36 + .../Model/PunchAndStationModel1.cs | 34 + .../MESClassLibrary/Model/PunchPlanModel.cs | 19 + .../MESClassLibrary/Model/PunchRecordModel.cs | 14 + .../Model/PunchValueRecordModel.cs | 18 + .../Model/QualifiedDayModel.cs | 15 + .../Model/QualifiedMonthModel.cs | 15 + .../MESClassLibrary/Model/RecordModel.cs | 28 + .../MESClassLibrary/Model/SelectModel.cs | 14 + .../MESClassLibrary/Model/StationModel.cs | 14 + .../MESClassLibrary/Model/StockInModel.cs | 15 + .../MESClassLibrary/Model/Sys_Buttons.cs | 51 + .../MESClassLibrary/Model/Sys_NavMenuInfo.cs | 71 + .../MESClassLibrary/Model/TESBomModel.cs | 63 + .../MESClassLibrary/Model/TESPartDetModel.cs | 143 + .../MESClassLibrary/Model/TreeModel.cs | 16 + .../MESClassLibrary/Model/UserModel.cs | 21 + .../MESClassLibrary/Model/tb_Plan_247Model.cs | 13 + .../Model/tb_Plan_PunchModel.cs | 13 + .../Properties/AssemblyInfo.cs | 36 + SjMes/PunchAssemble/MESClassLibrary/Tool.cs | 240 + .../MESClassLibrary/packages.config | 5 + SjMes/PunchAssemble/PunchAndWeld/App.config | 53 + .../PunchAssemble/PunchAndWeld/AutoUpdater.cs | 134 + .../PunchAndWeld/DataSouce/ProScreenFunc.cs | 3446 +++++ .../PunchAndWeld/DataSouce/Tools.dll | Bin 0 -> 34304 bytes .../PunchAndWeld/Form1.Designer.cs | 363 + SjMes/PunchAssemble/PunchAndWeld/Form1.cs | 1096 ++ SjMes/PunchAssemble/PunchAndWeld/Form1.resx | 123 + .../PunchAndWeld/FrmDoorSill.Designer.cs | 246 + .../PunchAssemble/PunchAndWeld/FrmDoorSill.cs | 826 ++ .../PunchAndWeld/FrmDoorSill.resx | 123 + .../PunchAndWeld/FrmDoorSillNew.Designer.cs | 413 + .../PunchAndWeld/FrmDoorSillNew.cs | 1220 ++ .../PunchAndWeld/FrmDoorSillNew.resx | 1435 ++ .../PunchAndWeld/FrmDoorSill_214.Designer.cs | 443 + .../PunchAndWeld/FrmDoorSill_214.cs | 1265 ++ .../PunchAndWeld/FrmDoorSill_214.resx | 1435 ++ .../FrmDoorSill_214_2.Designer.cs | 451 + .../PunchAndWeld/FrmDoorSill_214_2.cs | 1486 +++ .../PunchAndWeld/FrmDoorSill_214_2.resx | 1438 ++ .../PunchAndWeld/FrmHybird.Designer.cs | 422 + SjMes/PunchAssemble/PunchAndWeld/FrmHybird.cs | 570 + .../PunchAssemble/PunchAndWeld/FrmHybird.resx | 123 + .../PunchAndWeld/FrmHybridS.Designer.cs | 396 + .../PunchAssemble/PunchAndWeld/FrmHybridS.cs | 1045 ++ .../PunchAndWeld/FrmHybridS.resx | 126 + .../FrmInspection_WheelBrow.Designer.cs | 271 + .../PunchAndWeld/FrmInspection_WheelBrow.cs | 466 + .../PunchAndWeld/FrmInspection_WheelBrow.resx | 120 + .../PunchAndWeld/FrmLaser.Designer.cs | 220 + SjMes/PunchAssemble/PunchAndWeld/FrmLaser.cs | 391 + .../PunchAssemble/PunchAndWeld/FrmLaser.resx | 123 + .../PunchAndWeld/FrmNotPackList.Designer.cs | 73 + .../PunchAndWeld/FrmNotPackList.cs | 47 + .../PunchAndWeld/FrmNotPackList.resx | 120 + .../PunchAndWeld/FrmOtherParts.Designer.cs | 443 + .../PunchAndWeld/FrmOtherParts.cs | 886 ++ .../PunchAndWeld/FrmOtherParts.resx | 120 + .../PunchAndWeld/FrmPackList.Designer.cs | 175 + .../PunchAssemble/PunchAndWeld/FrmPackList.cs | 67 + .../PunchAndWeld/FrmPackList.resx | 120 + .../PunchAndWeld/FrmPassWord.Designer.cs | 101 + .../PunchAssemble/PunchAndWeld/FrmPassWord.cs | 42 + .../PunchAndWeld/FrmPassWord.resx | 120 + .../PunchAndWeld/FrmPlan.Designer.cs | 274 + SjMes/PunchAssemble/PunchAndWeld/FrmPlan.cs | 393 + SjMes/PunchAssemble/PunchAndWeld/FrmPlan.resx | 120 + .../PunchAndWeld/FrmPreNoPlan.Designer.cs | 218 + .../PunchAndWeld/FrmPreNoPlan.cs | 68 + .../PunchAndWeld/FrmPreNoPlan.resx | 863 ++ .../PunchAndWeld/FrmPrintOrder.Designer.cs | 131 + .../PunchAndWeld/FrmPrintOrder.cs | 78 + .../PunchAndWeld/FrmPrintOrder.resx | 120 + .../PunchAndWeld/FrmProScreen.Designer.cs | 424 + .../PunchAndWeld/FrmProScreen.cs | 1004 ++ .../PunchAndWeld/FrmProScreen.resx | 126 + .../PunchAndWeld/FrmProScreen2.Designer.cs | 346 + .../PunchAndWeld/FrmProScreen2.cs | 97 + .../PunchAndWeld/FrmProScreen2.resx | 147 + .../PunchAndWeld/FrmProScreen3.Designer.cs | 287 + .../PunchAndWeld/FrmProScreen3.cs | 729 + .../PunchAndWeld/FrmProScreen3.resx | 120 + .../FrmProScreenBumper.Designer.cs | 516 + .../PunchAndWeld/FrmProScreenBumper.cs | 729 + .../PunchAndWeld/FrmProScreenBumper.resx | 123 + .../FrmProScreenBumperS.Designer.cs | 538 + .../PunchAndWeld/FrmProScreenBumperS.cs | 2060 +++ .../PunchAndWeld/FrmProScreenBumperS.resx | 123 + .../PunchAndWeld/FrmProScreenS.Designer.cs | 429 + .../PunchAndWeld/FrmProScreenS.cs | 1235 ++ .../PunchAndWeld/FrmProScreenS.resx | 123 + .../FrmProScreen_WheelBrow.Designer.cs | 341 + .../PunchAndWeld/FrmProScreen_WheelBrow.cs | 600 + .../PunchAndWeld/FrmProScreen_WheelBrow.resx | 123 + .../FrmProScreen_WheelBrow_New.Designer.cs | 361 + .../FrmProScreen_WheelBrow_New.cs | 475 + .../FrmProScreen_WheelBrow_New.resx | 120 + .../PunchAndWeld/FrmSearchPlan.Designer.cs | 343 + .../PunchAndWeld/FrmSearchPlan.cs | 96 + .../PunchAndWeld/FrmSearchPlan.resx | 150 + .../PunchAndWeld/FrmTest.Designer.cs | 59 + SjMes/PunchAssemble/PunchAndWeld/FrmTest.cs | 132 + SjMes/PunchAssemble/PunchAndWeld/FrmTest.resx | 120 + .../PunchAndWeld/Img/20200428213144.png | Bin 0 -> 102753 bytes .../PunchAndWeld/Img/Preassembly.png | Bin 0 -> 119682 bytes .../PunchAndWeld/Img/Preassembly1.png | Bin 0 -> 44516 bytes SjMes/PunchAssemble/PunchAndWeld/Img/new.png | Bin 0 -> 86971 bytes .../PunchAndWeld/Interop.OPCAutomation.dll | Bin 0 -> 28672 bytes SjMes/PunchAssemble/PunchAndWeld/LogHelper.cs | 136 + SjMes/PunchAssemble/PunchAndWeld/OPCHelper.cs | 115 + SjMes/PunchAssemble/PunchAndWeld/Program.cs | 84 + .../PunchAndWeld/Properties/AssemblyInfo.cs | 36 + .../Properties/Resources.Designer.cs | 113 + .../PunchAndWeld/Properties/Resources.resx | 136 + .../Properties/Settings.Designer.cs | 36 + .../PunchAndWeld/Properties/Settings.settings | 9 + .../PunchAndWeld/PunchAndWeld.csproj | 424 + .../PunchAndWeld/ReportHelper.cs | 98 + .../PunchAndWeld/Resources/20200428213144.png | Bin 0 -> 109049 bytes .../PunchAndWeld/Resources/20200723112650.png | Bin 0 -> 92044 bytes .../PunchAndWeld/Resources/987654341.png | Bin 0 -> 109049 bytes .../PunchAndWeld/Resources/background.png | Bin 0 -> 127817 bytes .../PunchAndWeld/Resources/background1.png | Bin 0 -> 118100 bytes .../PunchAndWeld/SchTaskExtAPI.dll | Bin 0 -> 8704 bytes .../PunchAssemble/PunchAndWeld/UC.Designer.cs | 87 + SjMes/PunchAssemble/PunchAndWeld/UC.cs | 33 + SjMes/PunchAssemble/PunchAndWeld/UC.resx | 120 + SjMes/PunchAssemble/PunchAndWeld/Upload.cs | 97 + .../Web References/WebReference/Reference.cs | 398 + .../Web References/WebReference/Reference.map | 7 + .../WebReference/WMSWebService.disco | 6 + .../WebReference/WMSWebService.wsdl | 453 + .../PunchAndWeld/signal/Punch128.csv | 17 + .../signal/二厂冲孔模拟信号点位.png | Bin 0 -> 121229 bytes 536 files changed, 84242 insertions(+) create mode 100644 SjMes/PunchAssemble/BBMPT.sln create mode 100644 SjMes/PunchAssemble/MESClassLibrary/App.config create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonRecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonTypeBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BadInjectionBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BomBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BucketInfoBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/CheckItemBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ColorBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DefectBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeptBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeviceBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/FactoryBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ImgVideoBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/InjectionPlanBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/LineBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/MachineBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelInfoBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelUpdateBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/OperatorBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PaintInfoBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlaceBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlasticBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductOfInjectionBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductTypeBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/StationBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Check/InspectResultBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/GetNewTasksBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartMstrBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartRecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESBomBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESPartDetBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/DownReasonBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionDownRecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionRecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionVersionBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/AssemblyBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/BoxBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/MistakeBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/Plan247BLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/RecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/InspectResultBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/PaintBarCodeBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/StockInBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Plan247/Plan247BLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PlanPunchBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAdressBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAndStationBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchDeviceBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPartBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPlanBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchRecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchValueRecordBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Record247/Record247BLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenLastBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenStandardBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Show/AnalysisBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/Stock/StockInBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_ButtonsService.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_NavMenuService.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/BLL/User/UserBLL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonRecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonTypeDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BaseDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BadInjectionDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BomDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ColorDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/DefectDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/InjectionPlanDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/OperatorDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductOfInjectionDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductTypeDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/StationDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Check/InspectResultDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/DataTableExtend.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/GetNewTasksDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartMstrDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartRecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESBomDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESPartDetDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/DownReasonDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionDownRecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionRecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/AssemblyDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/BoxDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/MistakeDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/Plan247DAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/RecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/Plan247/Plan247DAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAdressDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAndStationDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchDeviceDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPartDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPlanDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchRecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchValueRecordDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/SqlHelper.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_ButtonsData.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_NavMenuData.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/User/UserDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/painting/InspectResultDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/painting/PaintBarCodeDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/DAL/painting/StockInDAL.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.tt create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Designer.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx.diagram create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.tt create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogErr.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202001_04.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202003.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202004.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202005.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200605.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200610.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202008.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20210322.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_BLOB_TRIGGERS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CALENDARS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CRON_TRIGGERS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_FIRED_TRIGGERS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_JOB_DETAILS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_LOCKS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_PAUSED_TRIGGER_GRPS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SCHEDULER_STATE.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPLE_TRIGGERS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPROP_TRIGGERS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_TRIGGERS.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/TA_DEPT.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_BOM.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_PART_MSTR.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_PaintInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Buttons.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_NavMenu.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Power.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Role.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_RoleLinkPower.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_UserRole.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users_NavMenu.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority_object.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_backup_node.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_message.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_output.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_block_ip.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_classname.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_entity.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_xmlentity.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_custom_role.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_dep_role.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_department.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_extra_property.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_favorite_entry.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_homepage_expand.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_international.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_last_login.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_login_lock.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_device.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_push_message.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_class.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_client_notice.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_email.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_ftp.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_mount.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_platform_msg.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_print.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sftp.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sms.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_param_template.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_post.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset_ip_relate.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_expand.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_message.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_remote_design_auth.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_report_expand.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_output.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_record.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task_param.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_cluster_size.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_col_idx_conf.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_config_entity.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_metadata.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_seg_location.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_segments.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_service_info.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_tab_idx_conf.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_table_path.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_system_message.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user_role_middle.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_vcs.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_log.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_node.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_stash_data.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task_impl.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_write_stash.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonButtonType.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_243.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_247.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bad_Injection.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BarCode.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom_20190726.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_243.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_247.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_Record.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_WheelBrow.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BucketInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CheckItem.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20191008.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20201101.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspection.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionVersion.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Config.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Cylinder.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CylinderAndRaw.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Defect.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Device.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Factory.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_FinishProduct.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridPlan.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridScanRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ImgVideo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Inhection_DownReason.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectPlanReport.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectionPlan.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownTime.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownType.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_Record.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20190902.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20200717.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20201021.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20210322.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_LayerAndBC.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Line.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Location.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Machine.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243_bak.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_247.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelCount.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Product.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Update.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Operator.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintBarCode.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintPerson.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintReason.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintScanRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Paint_Bucket.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PartRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Place.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PlanScreenConfig.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_243.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_247.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch_20200509.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plastic.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintConfig.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product0912.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20200802.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20201016.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductSotckIn.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductType.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20200513.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20201110.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_20190726.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_w.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Project.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAddress.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAndStation.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchDevice.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchMFAPlan.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchNGCCPlan.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchPlan.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchResult.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchValueRecord.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record2.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200721.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200907.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_BF.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Proucting.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243_20220517.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_247.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportA1.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF1.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF3.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportG1.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportH1.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_bak.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg_bak.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportTest.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenConfig.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenLast.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenStandard.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191011.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191014.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanAnalysis.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanRecord_Laser.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo_20200904.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialNotFacStockNo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialStockNo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Station.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StationAndCylinder.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockInColor.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20200511.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20210322.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_beif.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_243.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_247.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_aa.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_reportA2.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_test.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/test1.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/test2.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/user_department_sel_Result.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EFModel/user_menu_sel_Result.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/EncryptedDLL/MESClassLibrary.dll create mode 100644 SjMes/PunchAssemble/MESClassLibrary/JSONTools.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/LambdaHelper.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/MESClassLibrary.csproj create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/AnalysisBarModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/AnalysisPieModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/AndonButtonTypeModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/AndonRecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/AssemblyModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/BadInjectionModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/BarCodeModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/BasicModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/BomModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/BoxModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/CheckItemModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/ChildTreeModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/ColorModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/CommonlyInspectionModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/CommonlyInspectionVersionModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/DefectModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/DeviceModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/DownRecordVO.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/EcharBarModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/GetNewTasksModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InjectionBadReasonModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InjectionDownReason.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InjectionDownRecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InjectionPlanModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InjectionRecordDownReasonModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/Injection_DownRecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/Injection_RecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InspectResultGroup.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/InspectResultModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/JsonDataModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/LineModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/LogErrModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/LogSysModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/OperationModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/OperatorModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PaintBarCodeModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/Paint_BucketModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PartDetModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PartMstrModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PartRecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PieDataModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PlaceModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PlasticModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/ProductInjectionModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/ProductModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/ProductOfInjectionModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/ProductTypeModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PunchAndStationModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PunchAndStationModel1.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PunchPlanModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PunchRecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/PunchValueRecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/QualifiedDayModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/QualifiedMonthModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/RecordModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/SelectModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/StationModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/StockInModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/Sys_Buttons.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/Sys_NavMenuInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/TESBomModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/TESPartDetModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/TreeModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/UserModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/tb_Plan_247Model.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Model/tb_Plan_PunchModel.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Properties/AssemblyInfo.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/Tool.cs create mode 100644 SjMes/PunchAssemble/MESClassLibrary/packages.config create mode 100644 SjMes/PunchAssemble/PunchAndWeld/App.config create mode 100644 SjMes/PunchAssemble/PunchAndWeld/AutoUpdater.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/DataSouce/ProScreenFunc.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/DataSouce/Tools.dll create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Form1.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Form1.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Form1.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSillNew.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSillNew.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSillNew.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_2.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_2.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_2.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmHybird.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmHybird.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmHybird.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmHybridS.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmHybridS.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmHybridS.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmInspection_WheelBrow.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmInspection_WheelBrow.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmInspection_WheelBrow.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmLaser.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmLaser.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmLaser.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmNotPackList.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmNotPackList.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmNotPackList.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmOtherParts.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmOtherParts.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmOtherParts.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPackList.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPackList.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPackList.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPassWord.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPassWord.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPassWord.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPlan.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPlan.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPlan.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPreNoPlan.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPreNoPlan.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPreNoPlan.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPrintOrder.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPrintOrder.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmPrintOrder.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen2.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen2.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen2.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen3.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen3.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen3.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenBumper.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenBumper.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenBumper.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenBumperS.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenBumperS.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenBumperS.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenS.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenS.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreenS.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen_WheelBrow.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen_WheelBrow.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen_WheelBrow.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen_WheelBrow_New.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen_WheelBrow_New.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmProScreen_WheelBrow_New.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmSearchPlan.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmSearchPlan.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmSearchPlan.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmTest.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmTest.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/FrmTest.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Img/20200428213144.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Img/Preassembly.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Img/Preassembly1.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Img/new.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Interop.OPCAutomation.dll create mode 100644 SjMes/PunchAssemble/PunchAndWeld/LogHelper.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/OPCHelper.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Program.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Properties/AssemblyInfo.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Properties/Resources.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Properties/Resources.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Properties/Settings.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Properties/Settings.settings create mode 100644 SjMes/PunchAssemble/PunchAndWeld/PunchAndWeld.csproj create mode 100644 SjMes/PunchAssemble/PunchAndWeld/ReportHelper.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Resources/20200428213144.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Resources/20200723112650.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Resources/987654341.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Resources/background.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Resources/background1.png create mode 100644 SjMes/PunchAssemble/PunchAndWeld/SchTaskExtAPI.dll create mode 100644 SjMes/PunchAssemble/PunchAndWeld/UC.Designer.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/UC.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/UC.resx create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Upload.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Web References/WebReference/Reference.cs create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Web References/WebReference/Reference.map create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Web References/WebReference/WMSWebService.disco create mode 100644 SjMes/PunchAssemble/PunchAndWeld/Web References/WebReference/WMSWebService.wsdl create mode 100644 SjMes/PunchAssemble/PunchAndWeld/signal/Punch128.csv create mode 100644 SjMes/PunchAssemble/PunchAndWeld/signal/二厂冲孔模拟信号点位.png diff --git a/SjMes/PunchAssemble/BBMPT.sln b/SjMes/PunchAssemble/BBMPT.sln new file mode 100644 index 0000000..b46ee13 --- /dev/null +++ b/SjMes/PunchAssemble/BBMPT.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MESClassLibrary", "MESClassLibrary\MESClassLibrary.csproj", "{867989D8-6837-41DC-9BF1-4658F5D6CFEF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0D128182-FB8C-4E0B-A42F-DF3767E4DE39}" + ProjectSection(SolutionItems) = preProject + 数据结构修改记录.txt = 数据结构修改记录.txt + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PunchAndWeld", "PunchAndWeld\PunchAndWeld.csproj", "{D6371D99-5220-4A51-A72C-966FB4BFCD2C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {867989D8-6837-41DC-9BF1-4658F5D6CFEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {867989D8-6837-41DC-9BF1-4658F5D6CFEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {867989D8-6837-41DC-9BF1-4658F5D6CFEF}.Debug|x86.ActiveCfg = Debug|Any CPU + {867989D8-6837-41DC-9BF1-4658F5D6CFEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {867989D8-6837-41DC-9BF1-4658F5D6CFEF}.Release|Any CPU.Build.0 = Release|Any CPU + {867989D8-6837-41DC-9BF1-4658F5D6CFEF}.Release|x86.ActiveCfg = Release|Any CPU + {D6371D99-5220-4A51-A72C-966FB4BFCD2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6371D99-5220-4A51-A72C-966FB4BFCD2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6371D99-5220-4A51-A72C-966FB4BFCD2C}.Debug|x86.ActiveCfg = Debug|Any CPU + {D6371D99-5220-4A51-A72C-966FB4BFCD2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6371D99-5220-4A51-A72C-966FB4BFCD2C}.Release|Any CPU.Build.0 = Release|Any CPU + {D6371D99-5220-4A51-A72C-966FB4BFCD2C}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {52EF8F7E-6AC9-4400-82F1-31F70143C867} + EndGlobalSection +EndGlobal diff --git a/SjMes/PunchAssemble/MESClassLibrary/App.config b/SjMes/PunchAssemble/MESClassLibrary/App.config new file mode 100644 index 0000000..f80c656 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/App.config @@ -0,0 +1,20 @@ + + + +
+ + + + + + + + + + + + + + + + diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonRecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonRecordBLL.cs new file mode 100644 index 0000000..e7ffbd1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonRecordBLL.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Andon; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Andon +{ + public class AndonButtonRecordBLL + { + AndonButtonRecordDAL da=new AndonButtonRecordDAL(); + + public bool InsertInfo(AndonRecordModel md) + { + try + { + return da.InsertInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(AndonRecordModel md) + { + try + { + return da.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonTypeBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonTypeBLL.cs new file mode 100644 index 0000000..9aa1828 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Andon/AndonButtonTypeBLL.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL; +using MESClassLibrary.DAL.Andon; + +namespace MESClassLibrary.BLL.Andon +{ + public class AndonButtonTypeBLL + { + public DataTable SearchInfoByName(string buttonName) + { + try + { + AndonButtonTypeDAL da = new AndonButtonTypeDAL(); + + return da.SearchInfoByName(buttonName); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicBLL.cs new file mode 100644 index 0000000..3621ab5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicBLL.cs @@ -0,0 +1,178 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL +{ + public class BasicBLL where T : class, new() + { + BaseDAL db = new BaseDAL(); + /// 新增信息 + public bool AddInfo(T md) + { + try + { + if (db.Add(md) > 0) + { + return true; + } + return false; + } + catch (Exception ex) + { + //LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// 修改信息 + public bool UpdateInfo(T md, params string[] proNames) + { + try + { + //T u = new T() { uId = 1, uLoginName = "asdfasdf" }; + if (db.Modify(md, proNames) > 0) + { + return true; + } + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// 删除信息 + public bool DelInfo(T md) + { + try + { + if (db.Del(md) > 0) + { + return true; + } + return false; + } + catch (Exception ex) + { + //LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + public List SearchInfo(int page, int pagesize, out int total) + { + try + { + var list = db.GetListBy(LambdaHelper.CreateEqual("IsUseing", 1)).ToList(); + total = list.Count; + int Skipcount = (page - 1) * pagesize; + return list.Skip(Skipcount).Take(pagesize).ToList(); + } + catch (Exception ex) + { + total = 0; + //LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + public List SearchInfoByKey(string keyname, object keyvalue) + { + try + { + var list = db.GetListBy(LambdaHelper.CreateEqual(keyname, keyvalue)).ToList(); + return list; + } + catch (Exception) + { + return new List(); + //return null; + } + + } + + public List SearchInfoContains(string keyname, string keyvalue) + { + try + { + var list = db.GetListBy(LambdaHelper.GetContains(keyname, keyvalue)).ToList(); + return list; + } + catch (Exception) + { + return new List(); + //return null; + } + + } + + + + public List SearchInfoAll(int page, int pagesize, out int total) + { + try + { + var list = db.GetListBy(LambdaHelper.True()).ToList(); + total = list.Count; + int Skipcount = (page - 1) * pagesize; + return list.Skip(Skipcount).Take(pagesize).ToList(); + } + catch (Exception ex) + { + total = 0; + //LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + public T SearchInfoByID(string ID) + { + try + { + var list = db.Find(ID); + return list; + } + catch (Exception ex) + { + return null; + } + + } + public List SearchAllInfo() + { + try + { + return db.GetListBy(LambdaHelper.True()).ToList(); + } + catch (Exception ex) + { + //LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + public List SearchInfoByTime(string cname, DateTime stime, DateTime etime) + { + try + { + IQueryable list = db.GetListBy(LambdaHelper.CreateCompareToLater(cname, stime)).AsQueryable(); + list = list.Where(LambdaHelper.CreateCompareToEarlier(cname, etime)); + return list.ToList(); + } + catch (Exception) + { + return new List(); + //return null; + } + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BadInjectionBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BadInjectionBLL.cs new file mode 100644 index 0000000..7a2f8f6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BadInjectionBLL.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.BasicInfo; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class BadInjectionBLL + { + BadInjectionDAL db=new BadInjectionDAL(); + + public bool Add_Info(BadInjectionModel md) + { + try + { + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchByCode(string code) + { + try + { + return db.SearchByCode(code); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs new file mode 100644 index 0000000..1f46252 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.BasicInfo; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class BarCodeBLL + { + BarCodeDAl db = new BarCodeDAl(); + + public DataTable SearchInfoByStock(string StockNo) + { + try + { + return db.SearchInfoByStock(StockNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool Add_Info(BarCodeModel md) + { + try + { + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchInfo(string stationNo) + { + try + { + return db.SearchInfo(stationNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAll() + { + try + { + return db.SearchInfoAll(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCode() + { + try + { + return db.SearchBarCode(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCodeByOne(string OneBarCode) + { + try + { + return db.SearchBarCodeByOne(OneBarCode); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCodeByTwo(string BarCode) + { + try + { + return db.SearchBarCodeByTwo(BarCode); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchSerialNoByBarCode(string Code) + { + try + { + return db.SearchSerialNoByBarCode(Code); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByBarCode(string BarCode) + { + try + { + return db.SearchInfoByBarCode(BarCode); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool Update_Info(BarCodeModel md) + { + try + { + return db.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool DelBarCode(BarCodeModel md) + { + try + { + return db.DelBarCode(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchOneBarCode(string barCode,int a) + { + try + { + return db.SearchOneBarCode(barCode,a); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BomBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BomBLL.cs new file mode 100644 index 0000000..3ee0387 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BomBLL.cs @@ -0,0 +1,271 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.DAL.BasicInfo; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class BomBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Bom md) + { + try + { + var list = db.SearchInfoByKey("PartNo1", md.PartNo1);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.BomID != md.BomID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Bom md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.PartNo1 == md.PartNo1 && p.BomID != md.BomID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[2]; + proNames[0] = "PartNo1"; + proNames[1] = "PartNo2"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Bom md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string partNo1) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(partNo1)) + { + list = list.Where(p => p.PartNo1.Contains(partNo1)).ToList(); + } + + if (list.Count > 0) + { + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + List modelList = new List(); + BasicBLL s_db = new BasicBLL(); + var s_list = s_db.SearchAllInfo(); + + foreach (var item in list) + { + BomModel dm = Tool.Mapper(item); + var info = s_list.FirstOrDefault(p => p.PartNo == item.PartNo1); + if (info != null) + { + dm.ProductName1 = info.ProductName; + } + + var info2 = s_list.FirstOrDefault(p => p.PartNo == item.PartNo2); + if (info2 != null) + { + dm.ProductName2 = info2.ProductName; + } + + modelList.Add(dm); + } + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception) + { + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Bom SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public DataTable SearchBom(string PartNo) + { + BomDAL dal=new BomDAL(); + try + { + return dal.SearchBom(PartNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable Search(string partNo1, string partNo2) + { + BomDAL dal = new BomDAL(); + try + { + return dal.Search(partNo1, partNo2); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(BomModel md) + { + BomDAL dal = new BomDAL(); + try + { + return dal.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool updateInfo(BomModel md) + { + BomDAL dal = new BomDAL(); + try + { + return dal.updateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool DelInfo(BomModel md) + { + BomDAL dal = new BomDAL(); + try + { + return dal.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BucketInfoBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BucketInfoBLL.cs new file mode 100644 index 0000000..89d654a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/BucketInfoBLL.cs @@ -0,0 +1,184 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + + public class BucketInfoBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_BucketInfo md) + { + try + { + var list = db.SearchInfoByKey("BucketCode", md.BucketCode);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ID != md.ID && p.IsUsing == 1).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_BucketInfo md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.BucketCode == md.BucketCode && p.ID != md.ID && p.IsUsing == 1).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "BucketCode"; + proNames[1] = "BucketName"; + proNames[2] = "IsUsing"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_BucketInfo md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string BucketCode) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(BucketCode)) + { + list = list.Where(p => p.BucketCode.Contains(BucketCode)).ToList(); + } + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_BucketInfo SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + + List sl = new List(); + + foreach (var item in list) + { + SelectModel md = new SelectModel(); + md.textField = item.BucketCode+"--"+ item.BucketName; + md.valueField = item.ID; + sl.Add(md); + } + + jsonStr = JSONTools.ScriptSerialize(sl); + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/CheckItemBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/CheckItemBLL.cs new file mode 100644 index 0000000..9267efd --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/CheckItemBLL.cs @@ -0,0 +1,198 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class CheckItemBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string CheckContent, string DeviceID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(DeviceID)) + { + list = list.Where(p => p.DeviceID == DeviceID).ToList(); + } + + if (!String.IsNullOrEmpty(CheckContent)) + { + list = list.Where(p => p.CheckContent.Contains(CheckContent)).ToList(); + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List ModelList = new List(); + BasicBLL p_db = new BasicBLL(); + var p_list = p_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + CheckItemModel dm = Tool.Mapper(item); + var info = p_list.FirstOrDefault(p => p.DeviceID == item.DeviceID); + if (info != null) + { + dm.DeviceName = info.DeviceName; + } + ModelList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = ModelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_CheckItem md) + { + try + { + var list = db.SearchInfoByKey("CheckContent", md.CheckContent);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.DeviceID.Equals(md.DeviceID)).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_CheckItem md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.CheckContent == md.CheckContent && p.DeviceID == md.DeviceID && p.ID != md.ID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "DeviceID"; + proNames[1] = "CheckContent"; + proNames[2] = "CheckVersion"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_CheckItem md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + + public string GetTreeData(string deviceID) + { + try + { + string jsonStr = "[]"; + BasicBLL li_db = new BasicBLL(); + List trlist = new List(); + TreeModel tr = new TreeModel(); + tr.id = "-1"; + tr.text = "点检项"; + tr.state = "open"; + var li_list = li_db.SearchAllInfo().Where(p => p.DeviceID.Equals(deviceID)).ToList(); + var queryData = from a in li_list + select new ChildTreeModel + { + id = a.ID, + text = a.CheckContent + }; + List clist = queryData.ToList(); + if (clist.Count > 0) + { + tr.children = clist; + trlist.Add(tr); + } + jsonStr = JSONTools.ScriptSerialize>(trlist); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ColorBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ColorBLL.cs new file mode 100644 index 0000000..4245237 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ColorBLL.cs @@ -0,0 +1,214 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using MESClassLibrary.DAL.BasicInfo; + + +namespace MESClassLibrary.BLL.BasicInfo +{ + + public class ColorBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Color md) + { + try + { + //var list = db.SearchInfoByKey("ColorCode", md.ColorCode);//判断是否有重复数据 + //if (list != null) + //{ + // if (list.Where(p => p.ID != md.ID).Count() > 0) + // { + // return false; + // } + + //} + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Color md) + { + try + { + //var list = db.SearchAllInfo().Where(p => p.ColorCode == md.ColorCode && p.ID != md.ID).ToList();//判断是否有重复数据 + //if (list.Count > 0) + //{ + // return false; + //} + + //初始化要更新的字段 + string[] proNames = new string[5]; + proNames[0] = "ColorCode"; + proNames[1] = "ColorNo"; + proNames[2] = "ColorQQCode"; + proNames[3] = "Des"; + proNames[4] = "ColorDQCode"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Color md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize,string ColorCode) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(ColorCode)) + { + list = list.Where(p => p.ColorCode.Contains(ColorCode)).ToList(); + } + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Color SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().Select(p=>p.Des).Distinct().ToList();//判断是否有重复数据 + + List sl = new List(); + + foreach (var item in list) + { + SelectModel md = new SelectModel(); + md.textField = item; + md.valueField = item; + sl.Add(md); + } + + jsonStr = JSONTools.ScriptSerialize(sl); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + + public DataTable SearchAll() + { + ColorDAL da = new ColorDAL(); + try + { + return da.SearchInfoAll(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByName(string color) + { + ColorDAL da = new ColorDAL(); + try + { + return da.SearchByName(color); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DefectBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DefectBLL.cs new file mode 100644 index 0000000..1e7b3f0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DefectBLL.cs @@ -0,0 +1,181 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.DAL.BasicInfo; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class DefectBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string DefectName, string LineID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(LineID)) + { + list = list.Where(p => p.LineID == LineID).ToList(); + } + + if (!String.IsNullOrEmpty(DefectName)) + { + list = list.Where(p => p.DefectName.Contains(DefectName)).ToList(); + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List ModelList = new List(); + BasicBLL p_db = new BasicBLL(); + var p_list = p_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + DefectModel dm = Tool.Mapper(item); + var info = p_list.FirstOrDefault(p => p.LineID == item.LineID); + if (info != null) + { + dm.LineName = info.LineName; + } + ModelList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = ModelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Defect md) + { + try + { + var list = db.SearchInfoByKey("DefectName", md.DefectName);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ID != md.ID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Defect md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.DefectName == md.DefectName && p.ID != md.ID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "LineID"; + proNames[1] = "DefectName"; + proNames[2] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Defect md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + + public DataTable SearchInfo(string LineID) + { + DefectDAL da=new DefectDAL(); + try + { + return da.SearchInfoAll(LineID); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeptBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeptBLL.cs new file mode 100644 index 0000000..281c860 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeptBLL.cs @@ -0,0 +1,144 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class DeptBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string DeptName) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(DeptName)) + { + list = list.Where(p => p.DeptName.Contains(DeptName)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(TA_DEPT md) + { + try + { + var list = db.SearchInfoByKey("LineName", md.DeptName);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.GUID != md.GUID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(TA_DEPT md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.DeptName == md.DeptName && p.GUID != md.GUID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "DeptCode"; + proNames[1] = "DeptName"; + proNames[2] = "Remark"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(TA_DEPT md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception ex) + { + return ""; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeviceBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeviceBLL.cs new file mode 100644 index 0000000..4b9d94c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/DeviceBLL.cs @@ -0,0 +1,251 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class DeviceBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string DeviceNo, string StationID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(StationID)) + { + list = list.Where(p => p.StationID == StationID).ToList();//按条件分页查询 + } + + if (!String.IsNullOrEmpty(DeviceNo)) + { + list = list.Where(p => p.DeviceNo.Contains(DeviceNo)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List StationList = new List(); + BasicBLL pl_db = new BasicBLL(); + var pl_list = pl_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + DeviceModel dm = Tool.Mapper(item); + var info = pl_list.FirstOrDefault(p => p.StationID == item.StationID); + if (info != null) + { + dm.StationNo = info.StationNo; + } + StationList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = StationList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + + + public string SearchInfoByID(string DeviceID) { + try + { + string jsonStr = "[]"; + tb_Device info = db.SearchInfoByID(DeviceID); + jsonStr = JSONTools.ScriptSerialize(info); + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Device md) + { + try + { + var list = db.SearchInfoByKey("DeviceNo", md.DeviceNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.DeviceID != md.DeviceID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Device md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.DeviceNo == md.DeviceNo && p.DeviceID != md.DeviceID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[6]; + proNames[0] = "StationID"; + proNames[1] = "DeviceNo"; + proNames[2] = "DeviceName"; + proNames[3] = "FixNo"; + proNames[4] = "Des"; + proNames[5] = "DeviceModel"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Device md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + foreach (var item in list) + { + item.DeviceName = item.DeviceNo + "----" + item.DeviceName; + } + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + + public string QueryForComboboxByLineID(string fl_id) + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + if (fl_id != null && fl_id != "") + { + BasicBLL s_db = new BasicBLL(); + var s_list = s_db.SearchAllInfo().Where(p => p.LineID == fl_id).ToList();//判断是否有重复数据 + if (s_list.Count > 0) + { + string[] arr = s_list.Select(p => p.StationID).ToArray(); + list = list.Where(p => arr.Contains(p.StationID)).ToList(); + foreach (var item in list) + { + item.DeviceName = item.DeviceNo + "----" + item.DeviceName; + } + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + } + return ""; + } + catch (Exception) + { + return ""; + } + + + } + + public string QueryForComboboxByStationID(string fl_id) + { + try + { + string jsonStr = "[]"; + + if (fl_id != null && fl_id != "") + { + var list = db.SearchAllInfo().Where(p => p.StationID == fl_id).ToList();//判断是否有重复数据 + foreach (var item in list) + { + item.DeviceName = item.DeviceNo + "----" + item.DeviceName; + } + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + return ""; + } + catch (Exception) + { + return ""; + } + + + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/FactoryBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/FactoryBLL.cs new file mode 100644 index 0000000..68ec1a7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/FactoryBLL.cs @@ -0,0 +1,148 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class FactoryBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string FactoryName) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + + if (!String.IsNullOrEmpty(FactoryName)) + { + list = list.Where(p => p.FactoryName.Contains(FactoryName)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Factory md) + { + try + { + var list = db.SearchInfoByKey("FactoryName", md.FactoryName);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.FactoryID != md.FactoryID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Factory md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.FactoryName == md.FactoryName && p.FactoryID != md.FactoryID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[2]; + proNames[0] = "FactoryName"; + proNames[1] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Factory md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ImgVideoBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ImgVideoBLL.cs new file mode 100644 index 0000000..096c2fe --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ImgVideoBLL.cs @@ -0,0 +1,141 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class ImgVideoBLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_ImgVideo md) + { + try + { + + var list = db.SearchInfoByKey("fileName", md.fileName);//判断是否有重复数据 + if (list != null) + { + return false; + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_ImgVideo md) + { + try + { + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "fileUrl"; + proNames[1] = "fileName"; + proNames[2] = "UpdateTime"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_ImgVideo md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = ef.tb_ImgVideo.OrderByDescending(p=>p.CreateTime).ToList(); + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_ImgVideo SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/InjectionPlanBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/InjectionPlanBLL.cs new file mode 100644 index 0000000..31fc881 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/InjectionPlanBLL.cs @@ -0,0 +1,391 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using MESClassLibrary.DAL.BasicInfo; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class InjectionPlanBLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + InjectionPlanDAL dal = new InjectionPlanDAL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_InjectionPlan md) + { + try + { + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_InjectionPlan md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[8]; + proNames[0] = "StationID"; + proNames[1] = "BeginTime"; + proNames[2] = "StockNo"; + proNames[3] = "PlanCount"; + proNames[4] = "EndTime"; + proNames[5] = "PlanDate"; + proNames[6] = "RealCycle"; + proNames[7] = "PartNo"; + + + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_InjectionPlan md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string stationID, string stockNo) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo().Where(p => p.IsFinish != 1).ToList(); + if (!String.IsNullOrEmpty(stationID)) + { + list = list.Where(p => p.StationID.Equals(stationID)).ToList(); + } + if (!String.IsNullOrEmpty(stockNo)) + { + list = list.Where(p => p.StockNo.Contains(stockNo)).ToList(); + } + + list = list.OrderBy(p => p.BeginTime).ToList(); + + List modelList = new List(); + if (list.Count > 0) + { + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + #region 联查 + BasicBLL product_db = new BasicBLL(); + var product_list = product_db.SearchAllInfo(); + + BasicBLL station_db = new BasicBLL(); + var station_list = station_db.SearchAllInfo(); + + foreach (var item in list) + { + InjectionPlanModel dm = Tool.Mapper(item); + var product_info = product_list.FirstOrDefault(p => p.StockNo == item.StockNo); + if (product_info != null) + { + dm.PartNo = product_info.PartNo; + dm.ProductName = product_info.ProductName; + } + + var station_info = station_list.FirstOrDefault(p => p.StationID == item.StationID); + if (station_info != null) + { + dm.StationNo = station_info.StationNo; + } + + modelList.Add(dm); + } + #endregion + + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string SearchInfoAll2(string page, string pagesize, string stationID, string stockNo, string StartTime, string EndTime) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + total = dal.SearchByTimeCount(stationID, stockNo, StartTime, EndTime); + DataTable dt = dal.SearchByTime(Convert.ToInt32(page), Convert.ToInt32(pagesize), stationID, stockNo, StartTime, EndTime); + + List list = Tool.ConvertTo(dt).ToList(); + + //List list = ef.tb_InjectionPlan.Where(p => DateTime.Parse(p.BeginTime) >= stime && DateTime.Parse(p.EndTime) <= etime).ToList(); + + + if (!String.IsNullOrEmpty(stationID)) + { + list = list.Where(p => p.StationID.Equals(stationID)).ToList(); + } + if (!String.IsNullOrEmpty(stockNo)) + { + list = list.Where(p => p.StockNo.Contains(stockNo)).ToList(); + } + + list = list.OrderBy(p => p.BeginTime).ToList(); + + List modelList = new List(); + if (list.Count > 0) + { + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + #region 联查 + BasicBLL product_db = new BasicBLL(); + var product_list = product_db.SearchAllInfo(); + + BasicBLL station_db = new BasicBLL(); + var station_list = station_db.SearchAllInfo(); + + foreach (var item in list) + { + InjectionPlanModel dm = Tool.Mapper(item); + var product_info = product_list.FirstOrDefault(p => p.StockNo == item.StockNo); + if (product_info != null) + { + dm.PartNo = product_info.PartNo; + dm.ProductName = product_info.ProductName; + } + + var station_info = station_list.FirstOrDefault(p => p.StationID == item.StationID); + if (station_info != null) + { + dm.StationNo = station_info.StationNo; + } + + modelList.Add(dm); + } + #endregion + + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + public bool UpdateInfo2(tb_InjectionPlan md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "workClass"; + proNames[1] = "JK_Weight"; + proNames[2] = "Waste_Weight"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception) + { + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_InjectionPlan SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public String GetEndTime(tb_InjectionPlan md) + { + try + { + BasicBLL Plastic_db = new BasicBLL(); + + var info = from c in Plastic_db.SearchAllInfo() + where c.StockNo == md.StockNo && c.StationID == md.StationID && c.IsBackup == 1 + select c.CycleTime; + + if (info.FirstOrDefault() != null) + { + double seconds = Convert.ToDouble(info.FirstOrDefault().Value) * Convert.ToDouble(md.PlanCount); + return Convert.ToDateTime(md.BeginTime).AddSeconds(seconds).ToString("yyyy-MM-dd HH:mm:ss"); + } + return md.BeginTime; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public DataTable SearchInfoByName(string StationID) + { + try + { + return dal.SearchPlanByStation(StationID); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + public DataTable NextSearchInfoByName(string StationID) + { + try + { + return dal.NextSearchPlanByStation(StationID); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateFinish(InjectionPlanModel md) + { + InjectionPlanDAL dal = new InjectionPlanDAL(); + try + { + return dal.UpdateFinish(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + + public string GetStartTime(string StationID) + { + + var bf = db.SearchInfoByKey("StationID", StationID).OrderByDescending(p => p.EndTime).FirstOrDefault(); + if (bf != null) + { + return bf.EndTime; + } + + return ""; + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/LineBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/LineBLL.cs new file mode 100644 index 0000000..58d9540 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/LineBLL.cs @@ -0,0 +1,170 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class LineBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string LineName, string PlaceID, string userID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + //数据权限 + //BasicBLL userdb = new BasicBLL(); + //T_Sys_Users user = userdb.SearchInfoByID(userID); + //List list = db.SearchInfoContains("LineName", user.Department); + + if (!String.IsNullOrEmpty(PlaceID)) + { + list = list.Where(p => p.PlaceID == PlaceID).ToList();//按条件分页查询 + } + + if (!String.IsNullOrEmpty(LineName)) + { + list = list.Where(p => p.LineName.Contains(LineName)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List ModelList = new List(); + BasicBLL p_db = new BasicBLL(); + var p_list = p_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + LineModel dm = Tool.Mapper(item); + var info = p_list.FirstOrDefault(p => p.PlaceID == item.PlaceID); + if (info != null) + { + dm.PlaceName = info.PlaceName; + } + ModelList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = ModelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Line md) + { + try + { + var list = db.SearchInfoByKey("LineName", md.LineName);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.LineID != md.LineID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Line md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.LineName == md.LineName && p.LineID != md.LineID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "PlaceID"; + proNames[1] = "LineName"; + proNames[2] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Line md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/MachineBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/MachineBLL.cs new file mode 100644 index 0000000..a38c035 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/MachineBLL.cs @@ -0,0 +1,184 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class MachineBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Machine md) + { + try + { + var list = db.SearchInfoByKey("MachineNo", md.MachineNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.MachineID != md.MachineID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Machine md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.MachineNo == md.MachineNo && p.MachineID != md.MachineID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[2]; + proNames[0] = "MachineNo"; + proNames[1] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Machine md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string machineNo) + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(machineNo)) + { + list = list.Where(p => p.MachineNo.Contains(machineNo)).ToList(); + } + + if (list.Count > 0) + { + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + + } + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception) + { + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Machine SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + //下拉框查询方法 + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList(); + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelInfoBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelInfoBLL.cs new file mode 100644 index 0000000..17797de --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelInfoBLL.cs @@ -0,0 +1,208 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class ModelInfoBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_ModelInfo md) + { + try + { + var list = db.SearchInfoByKey("ModelNo", md.ModelNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ID != md.ID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_ModelInfo md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.ModelNo == md.ModelNo && p.ID != md.ID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[14]; + proNames[0] = "ModelName"; + proNames[1] = "ModelNo"; + proNames[2] = "PermanentAssetsNo"; + proNames[3] = "Tonnage"; + proNames[4] = "ServiceLife"; + proNames[5] = "Supplier"; + proNames[6] = "PartWeight"; + proNames[7] = "InjectionPeriod"; + proNames[8] = "LocatingRingSize"; + proNames[9] = "OutForm"; + proNames[10] = "ModelWeight"; + proNames[11] = "RunnerForm"; + proNames[12] = "ModelCavityNo"; + proNames[13] = "ModelSize"; + + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_ModelInfo md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string ModelNo) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(ModelNo)) + { + list = list.Where(p => p.ModelNo.Contains(ModelNo)).ToList(); + } + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_ModelInfo SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().OrderBy(p => p.ModelNo).ToList();//判断是否有重复数据 + + List sl = new List(); + + foreach (var item in list) + { + SelectModel md = new SelectModel(); + md.textField = item.ModelName; + md.valueField = item.ID; + sl.Add(md); + } + + jsonStr = JSONTools.ScriptSerialize(sl); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + + //public DataTable SearchAll() + //{ + // ColorDAL da = new ColorDAL(); + // try + // { + // return da.SearchInfoAll(); + // } + // catch (Exception ex) + // { + // LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + // return null; + // } + //} + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelUpdateBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelUpdateBLL.cs new file mode 100644 index 0000000..199d30b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ModelUpdateBLL.cs @@ -0,0 +1,137 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + + public class ModelUpdateBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddUpdateInfo(tb_Model_Update md) + { + try + { + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Model_Update md) + { + try + { + //初始化要更新的字段 + string[] proNames = new string[5]; + proNames[0] = "Purpose"; + proNames[1] = "State"; + proNames[2] = "Supplier"; + proNames[3] = "Remarks"; + proNames[4] = "AddTime"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Model_Update md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string ModelID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchInfoByKey("ModelID", ModelID).OrderByDescending(p => p.AddTime).ToList(); + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Model_Update SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/OperatorBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/OperatorBLL.cs new file mode 100644 index 0000000..20e13c6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/OperatorBLL.cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using MESClassLibrary.DAL.BasicInfo; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; +using MESClassLibrary.EFModel; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class OperatorBLL + { + BasicBLL db = new BasicBLL(); + + OperatorDAL dal = new OperatorDAL(); + + public DataTable SearchInfoByName(string OperatorName, string StationID) + { + try + { + return dal.SearchInfoByName(OperatorName, StationID); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public DataTable SearchInfoByNameAndPsw(string OperatorName, string StationID, string psw) + { + try + { + return dal.SearchInfoByNameAndPsw(OperatorName, StationID, psw); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string OperatorName, string StationID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(StationID)) + { + list = list.Where(p => p.StationID.Equals(StationID)).ToList();//按条件分页查询 + } + + if (!String.IsNullOrEmpty(OperatorName)) + { + list = list.Where(p => p.OperatorName.Contains(OperatorName)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List StationList = new List(); + BasicBLL pl_db = new BasicBLL(); + var pl_list = pl_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + OperatorModel dm = Tool.Mapper(item); + var info = pl_list.FirstOrDefault(p => p.StationID == item.StationID); + if (info != null) + { + dm.StationNo = info.StationNo; + } + StationList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = StationList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Operator md) + { + try + { + var list = db.SearchInfoByKey("OperatorNo", md.OperatorNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.OperatorID != md.OperatorID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Operator md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.OperatorNo == md.OperatorNo && p.OperatorID != md.OperatorID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[5]; + proNames[0] = "StationID"; + proNames[1] = "OperatorNo"; + proNames[2] = "OperatorName"; + proNames[3] = "OperatorPsw"; + proNames[4] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Operator md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PaintInfoBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PaintInfoBLL.cs new file mode 100644 index 0000000..830fe66 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PaintInfoBLL.cs @@ -0,0 +1,335 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + + public class PaintInfoBLL + { + BasicBLL dbPB = new BasicBLL(); + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_PaintInfo md) + { + try + { + var list = db.SearchInfoByKey("PaintCode", md.PaintCode);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ID != md.ID && p.IsUsing == 1).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_PaintInfo md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.PaintCode == md.PaintCode && p.ID != md.ID && p.IsUsing == 1).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[5]; + proNames[0] = "PaintCode"; + proNames[1] = "PaintName"; + proNames[2] = "PaintModel"; + //proNames[3] = "UnitCode"; + proNames[3] = "CarModelCode"; + proNames[4] = "IsUsing"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_PaintInfo md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string PaintCode) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(PaintCode)) + { + list = list.Where(p => p.PaintCode.Contains(PaintCode)).ToList(); + } + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_PaintInfo SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + + List sl = new List(); + + foreach (var item in list) + { + SelectModel md = new SelectModel(); + md.textField = item.PaintCode + "--" + item.PaintName; + md.valueField = item.ID; + sl.Add(md); + } + + jsonStr = JSONTools.ScriptSerialize(sl); + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + + + public string SearchRelation(string page, string pagesize, string PaintID, string BucketID) + { + + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + + List list = dbPB.SearchAllInfo(); + + if (!String.IsNullOrEmpty(PaintID)) + { + list = list.Where(p => p.PaintID == PaintID).ToList(); + } + + if (!String.IsNullOrEmpty(BucketID)) + { + list = list.Where(p => p.BucketID == BucketID).ToList(); + } + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + List modelList = new List(); + + #region 联查 + BasicBLL PaintInfo_db = new BasicBLL(); + var PaintInfo_list = PaintInfo_db.SearchAllInfo(); + + BasicBLL BucketInfo_db = new BasicBLL(); + var BucketInfo_list = BucketInfo_db.SearchAllInfo(); + + foreach (var item in list) + { + Paint_BucketModel dm = Tool.Mapper(item); + var PaintInfo_info = PaintInfo_list.FirstOrDefault(p => p.ID == item.PaintID); + if (PaintInfo_info != null) + { + dm.PaintCode = PaintInfo_info.PaintCode; + dm.PaintName = PaintInfo_info.PaintName; + } + + var BucketInfo_info = BucketInfo_list.FirstOrDefault(p => p.ID == item.BucketID); + if (BucketInfo_info != null) + { + dm.BucketCode = BucketInfo_info.BucketCode; + dm.BucketName = BucketInfo_info.BucketName; + } + + modelList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 新增信息 + /// + /// + /// + public bool AddRelation(tb_Paint_Bucket md) + { + try + { + var list = dbPB.SearchAllInfo().Where(p => p.PaintID == md.PaintID && p.BucketID == md.BucketID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + return dbPB.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateRelation(tb_Paint_Bucket md) + { + try + { + var list = dbPB.SearchAllInfo().Where(p => p.PaintID == md.PaintID && p.ID != md.ID && p.BucketID == md.BucketID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[2]; + proNames[0] = "PaintID"; + proNames[1] = "BucketID"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return dbPB.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public bool DeleteRelation(tb_Paint_Bucket md) + { + try + { + List ef = dbPB.SearchInfoByKey("ID", md.ID); + if (ef!=null && ef.Count>0) + { + return dbPB.DelInfo(ef.First()); + } + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlaceBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlaceBLL.cs new file mode 100644 index 0000000..52b4c86 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlaceBLL.cs @@ -0,0 +1,165 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class PlaceBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string PlaceName, string FactoryID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(FactoryID)) + { + list = list.Where(p => p.FactoryID == FactoryID).ToList();//按条件分页查询 + } + + if (!String.IsNullOrEmpty(PlaceName)) + { + list = list.Where(p => p.PlaceName.Contains(PlaceName)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List ModelList = new List(); + BasicBLL p_db = new BasicBLL(); + var p_list = p_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + PlaceModel dm = Tool.Mapper(item); + var info = p_list.FirstOrDefault(p => p.FactoryID == item.FactoryID); + if (info != null) + { + dm.FactoryName = info.FactoryName; + } + ModelList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = ModelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Place md) + { + try + { + var list = db.SearchInfoByKey("PlaceName", md.PlaceName);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.PlaceID != md.PlaceID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Place md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.PlaceName == md.PlaceName && p.PlaceID != md.PlaceID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "FactoryID"; + proNames[1] = "PlaceName"; + proNames[2] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Place md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlasticBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlasticBLL.cs new file mode 100644 index 0000000..83d91b4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/PlasticBLL.cs @@ -0,0 +1,238 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class PlasticBLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Plastic md) + { + try + { + var list = db.SearchInfoByKey("StationID", md.StationID);//判断是否有重复数据 + if (list != null && list.Count > 0) + { + if (list.Where(p => p.StockNo.Equals(md.StockNo)).Count() > 0) + { + return false; + } + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Plastic md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[5]; + proNames[0] = "CycleTime"; + proNames[1] = "StationID"; + proNames[2] = "IsBackup"; + proNames[3] = "Weight"; + proNames[4] = "OpenDebugTime"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Plastic md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string stockNo, string partNo, string StationID) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(stockNo)) + { + list = list.Where(p => p.StockNo != null && p.StockNo.Contains(stockNo)).ToList(); + } + + if (!String.IsNullOrEmpty(StationID)) + { + list = list.Where(p => p.StationID.Equals(StationID)).ToList(); + } + + List modelList = new List(); + if (list.Count > 0) + { + + + + #region 联查 + BasicBLL product_db = new BasicBLL(); + var product_list = product_db.SearchAllInfo(); + + BasicBLL machine_db = new BasicBLL(); + var machine_list = machine_db.SearchAllInfo(); + + foreach (var item in list) + { + PlasticModel dm = Tool.Mapper(item); + var product_info = product_list.FirstOrDefault(p => p.StockNo == item.StockNo); + if (product_info != null) + { + dm.PartNo = product_info.PartNo; + } + + var machine_info = machine_list.FirstOrDefault(p => p.StationID == item.StationID); + if (machine_info != null) + { + dm.StationNo = machine_info.StationNo; + } + + modelList.Add(dm); + } + #endregion + + if (!String.IsNullOrEmpty(partNo)) + { + modelList = modelList.Where(p => p.PartNo != null && p.PartNo.Contains(partNo)).ToList(); + } + + total = modelList.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + modelList = modelList.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception) + { + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Plastic SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + + public string QueryForCombobox(string StationID) + { + try + { + + var info = from m in ef.tb_Plastic + join s in ef.tb_Product on m.StockNo equals s.StockNo into val2Grp + from grp in val2Grp.DefaultIfEmpty() + where m.StationID == StationID + select new { c_id = grp.StockNo, c_text = grp.PartNo + "--" + grp.ProductName, c_name = grp.StockNo + "--" + grp.ProductName }; + + string jsonStr = "[]"; + jsonStr = JSONTools.ScriptSerialize(info); + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductBLL.cs new file mode 100644 index 0000000..99ce043 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductBLL.cs @@ -0,0 +1,443 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using MESClassLibrary.DAL.BasicInfo; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class ProductBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Product md) + { + try + { + var list = db.SearchInfoByKey("StockNo", md.StockNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ProductID != md.ProductID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Product md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.StockNo == md.StockNo && p.ProductID != md.ProductID && p.ProductID != md.ProductID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[10]; + proNames[0] = "ProductTypeID"; + proNames[1] = "PartName"; + proNames[2] = "ProductName"; + proNames[3] = "ColorName"; + proNames[4] = "PartNo"; + proNames[5] = "Rows"; + proNames[6] = "Cols"; + proNames[7] = "Layers"; + proNames[8] = "Des"; + proNames[9] = "isImport"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + md.PicturePath = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Product md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string stockNo, string productTypeID, string productName, string partNo) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(stockNo)) + { + list = list.Where(p => p.StockNo != null && p.StockNo.Contains(stockNo)).ToList(); + } + if (!String.IsNullOrEmpty(productTypeID)) + { + list = list.Where(p => p.ProductTypeID.Equals(productTypeID)).ToList(); + } + if (!String.IsNullOrEmpty(productName)) + { + list = list.Where(p => p.ProductName != null && p.ProductName.Contains(productName)).ToList(); + } + if (!String.IsNullOrEmpty(partNo)) + { + list = list.Where(p => p.PartNo != null && p.PartNo.Contains(partNo)).ToList(); + } + List modelList = new List(); + if (list.Count > 0) + { + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + #region 联查 + BasicBLL s_db = new BasicBLL(); + var s_list = s_db.SearchAllInfo(); + + foreach (var item in list) + { + ProductModel dm = Tool.Mapper(item); + var info = s_list.FirstOrDefault(p => p.ProductTypeID == item.ProductTypeID); + if (info != null) + { + dm.ProductTypeName = info.ProductTypeName; + } + modelList.Add(dm); + } + #endregion + + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Product SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string GetComboboxData(string productTypeNo, string productTypeNo1) + { + try + { + string jsonStr = "[]"; + BasicBLL productTypeDB = new BasicBLL(); + + if (productTypeNo1 != "") + { + var info = from m in db.SearchAllInfo().ToList() + join s in productTypeDB.SearchAllInfo().ToList() on m.ProductTypeID equals s.ProductTypeID into + val2Grp + from grp in val2Grp.DefaultIfEmpty() + where grp.ProductTypeNo == productTypeNo || grp.ProductTypeNo == productTypeNo1 + select new {m.PartNo, PartName = m.PartNo + "----" + m.ProductName}; + jsonStr = JSONTools.ScriptSerialize(info); + } + else + { + var info = from m in db.SearchAllInfo().ToList() + join s in productTypeDB.SearchAllInfo().ToList() on m.ProductTypeID equals s.ProductTypeID into + val2Grp + from grp in val2Grp.DefaultIfEmpty() + where grp.ProductTypeNo == productTypeNo + select new { m.PartNo, PartName = m.PartNo + "----" + m.ProductName }; + jsonStr = JSONTools.ScriptSerialize(info); + } + + + + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + public string GetComboboxProduct(string productTypeNo) + { + try + { + + BasicBLL productTypeDB = new BasicBLL(); + + + var info = from m in db.SearchAllInfo().ToList() + join s in productTypeDB.SearchAllInfo().ToList() on m.ProductTypeID equals s.ProductTypeID into val2Grp + from grp in val2Grp.DefaultIfEmpty() + where grp.ProductTypeNo == productTypeNo + select new { m.ProductID, m.ProductName }; + string jsonStr = "[]"; + jsonStr = JSONTools.ScriptSerialize(info); + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + + + public string GetComboboxDataForStockNo(string productTypeNo) + { + try + { + + BasicBLL productTypeDB = new BasicBLL(); + + var info = from m in db.SearchAllInfo().ToList() + join s in productTypeDB.SearchAllInfo().ToList() on m.ProductTypeID equals s.ProductTypeID into val2Grp + from grp in val2Grp.DefaultIfEmpty() + where grp.ProductTypeNo == productTypeNo + select new { c_id = m.StockNo, c_text = m.PartNo + "--" + m.ProductName, c_name = m.StockNo + "--" + m.ProductName, c_name2 = m.PartNo }; + string jsonStr = "[]"; + jsonStr = JSONTools.ScriptSerialize(info); + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + public DataTable SearchInfoByType(string type, string stationNo) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoByType(type, stationNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAllByType(string type) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoAllByType(type); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByName(string productName, string ProductTypeNo) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoByName(productName, ProductTypeNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByPartNo(string partNo) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoByPartNo(partNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchIsImportByStockNo(string stockNo) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchIsImportByStockNo(stockNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + public DataTable SearchInfoByProductName(string ProductName) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoByProductName(ProductName); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdatePDF(string id, string fileName) + { + try + { + tb_Product md = new tb_Product(); + md.ProductID = id; + md.PicturePath = fileName; + + //初始化要更新的字段 + string[] proNames = new string[1]; + proNames[0] = "PicturePath"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchInfoAll() + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoAll(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + + public DataTable SearchInfoByStock(string StockNo) + { + ProductDAL da = new ProductDAL(); + try + { + return da.SearchInfoByStock(StockNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductOfInjectionBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductOfInjectionBLL.cs new file mode 100644 index 0000000..c7490c6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductOfInjectionBLL.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.BasicInfo; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class ProductOfInjectionBLL + { + ProductOfInjectionDAL db=new ProductOfInjectionDAL(); + + public bool Add_Info(ProductOfInjectionModel md) + { + try + { + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchCountByInfo(string station, string date, string classname, string StockNo,string partno) + { + try + { + return db.SearchCountByInfo(station,date,classname,StockNo,partno); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool Update_Info(ProductOfInjectionModel md) + { + try + { + return db.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateBad_Info(ProductOfInjectionModel md) + { + try + { + return db.UpdteBadInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool updateProductCount(ProductOfInjectionModel md) + { + try + { + return db.updateProductCount(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductTypeBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductTypeBLL.cs new file mode 100644 index 0000000..2896c0e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/ProductTypeBLL.cs @@ -0,0 +1,182 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.BasicInfo; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class ProductTypeBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_ProductType md) + { + try + { + var list = db.SearchInfoByKey("ProductTypeNo", md.ProductTypeNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ProductTypeID != md.ProductTypeID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_ProductType md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.ProductTypeNo == md.ProductTypeNo && p.ProductTypeID != md.ProductTypeID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[2]; + proNames[0] = "ProductTypeName"; + proNames[1] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_ProductType md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchInfoAll(Convert.ToInt32(page), Convert.ToInt32(pagesize), out total);//按分页查询 + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception) + { + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_ProductType SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + foreach (var item in list) + { + item.ProductTypeName = item.ProductTypeNo + "----" + item.ProductTypeName; + } + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/StationBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/StationBLL.cs new file mode 100644 index 0000000..365461e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/BasicInfo/StationBLL.cs @@ -0,0 +1,195 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using MESClassLibrary.DAL.BasicInfo; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; + +namespace MESClassLibrary.BLL.BasicInfo +{ + public class StationBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string StationNo, string LineID) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = db.SearchAllInfo(); + + if (!String.IsNullOrEmpty(LineID)) + { + list = list.Where(p => p.LineID == LineID).ToList();//按条件分页查询 + } + + if (!String.IsNullOrEmpty(StationNo)) + { + list = list.Where(p => p.StationNo.Contains(StationNo)).ToList();//按条件分页查询 + } + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + #region 联查 + List StationList = new List(); + BasicBLL pl_db = new BasicBLL(); + var pl_list = pl_db.SearchAllInfo().ToList(); + foreach (var item in list) + { + StationModel dm = Tool.Mapper(item); + var info = pl_list.FirstOrDefault(p => p.LineID == item.LineID); + if (info != null) + { + dm.LineName = info.LineName; + } + StationList.Add(dm); + } + #endregion + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = StationList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 生产线模型对象 + /// + public bool AddInfo(tb_Station md) + { + try + { + var list = db.SearchInfoByKey("StationNo", md.StationNo);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.StationID != md.StationID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 生产线模型对象 + /// + public bool UpdateInfo(tb_Station md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.StationNo == md.StationNo && p.StationID != md.StationID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "LineID"; + proNames[1] = "StationNo"; + proNames[2] = "Des"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_Station md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxData(string StationNo) + { + try + { + string jsonStr = "[]"; + if (StationNo == null || StationNo == "") + { + var list = db.SearchAllInfo().ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + } + else + { + var list = db.SearchInfoContains("StationNo", StationNo).ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize>(list); + } + + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + + } + + public DataTable SearchInfoByNo(string station) + { + StationDAL db = new StationDAL(); + + try + { + return db.SearchInfoByNo(station); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Check/InspectResultBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Check/InspectResultBLL.cs new file mode 100644 index 0000000..36810d1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Check/InspectResultBLL.cs @@ -0,0 +1,1506 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Check; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Check +{ + public class InspectResultBLL + { + + InspectResultDAL dal = new InspectResultDAL(); + + BBMPTEntities ef = new BBMPTEntities(); + + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string StartTime, string EndTime, string position, string inspectResult) + { + try + { + string jsonStr = "[]"; + int total = dal.SearchCount(StartTime, EndTime, position, inspectResult);//总行数 + + DataTable dt = dal.SearchByPage(Convert.ToInt32(page), Convert.ToInt32(pagesize), StartTime, EndTime, position, inspectResult); + if (dt != null && dt.Rows.Count > 0) + { + var list = Tool.ConvertTo(dt); + + List groupList = new List(); + + List barcodeList = list.GroupBy(p => p.barcode).Select(p => p.Key).ToList(); + + foreach (var item in barcodeList) + { + var info = list.Where(p => p.barcode.Equals(item)).OrderBy(p => p.InspectTimes).ToList(); + + if (info.Count > 0) + { + InspectResultGroup md = new InspectResultGroup(); + if (info.Count >= 3) + { + md.barcode = info[0].barcode; + md.side = info[0].side; + md.position = info[0].position; + md.stationNo = info[0].stationNo; + md.workClass = info[0].workClass; + md.productInfo = info[0].productInfo; + md.productOption = info[0].productOption; + md.inspectResult_1 = info[0].inspectResult; + md.damnPosition_1 = info[0].damnPosition; + md.reason_1 = info[0].reason; + md.createTime_1 = Convert.ToDateTime(info[0].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + md.inspectResult_2 = info[1].inspectResult; + md.damnPosition_2 = info[1].damnPosition; + md.reason_2 = info[1].reason; + md.createTime_2 = Convert.ToDateTime(info[1].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + md.inspectResult_3 = info[2].inspectResult; + md.damnPosition_3 = info[2].damnPosition; + md.reason_3 = info[2].reason; + md.createTime_3 = Convert.ToDateTime(info[2].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + groupList.Add(md); + } + + if (info.Count == 2) + { + md.barcode = info[0].barcode; + md.side = info[0].side; + md.position = info[0].position; + md.stationNo = info[0].stationNo; + md.workClass = info[0].workClass; + md.productInfo = info[0].productInfo; + md.productOption = info[0].productOption; + md.inspectResult_1 = info[0].inspectResult; + md.damnPosition_1 = info[0].damnPosition; + md.reason_1 = info[0].reason; + md.createTime_1 = Convert.ToDateTime(info[0].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + md.inspectResult_2 = info[1].inspectResult; + md.damnPosition_2 = info[1].damnPosition; + md.reason_2 = info[1].reason; + md.createTime_2 = Convert.ToDateTime(info[1].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + + groupList.Add(md); + } + + if (info.Count == 1) + { + md.barcode = info[0].barcode; + md.side = info[0].side; + md.position = info[0].position; + md.stationNo = info[0].stationNo; + md.workClass = info[0].workClass; + md.productInfo = info[0].productInfo; + md.productOption = info[0].productOption; + md.inspectResult_1 = info[0].inspectResult; + md.damnPosition_1 = info[0].damnPosition; + md.reason_1 = info[0].reason; + md.createTime_1 = Convert.ToDateTime(info[0].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + groupList.Add(md); + } + } + } + + if (groupList.Count > 0) + { + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = groupList; + jsonStr = JSONTools.ScriptSerialize(md); + } + } + + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + + /// + /// 点修补记录 + /// + /// + /// + /// + /// + /// + /// + public string SearchInfoByRepair(string page, string pagesize, string StartTime, string EndTime, + string inspectResult) + { + try + { + string jsonStr = "[]"; + int total = dal.SearchCountByRepair(StartTime, EndTime, inspectResult);//总行数 + DataTable dt = dal.SearchRepairByPage(Convert.ToInt32(page), Convert.ToInt32(pagesize), StartTime, EndTime, inspectResult); + if (dt != null && dt.Rows.Count > 0) + { + var list = Tool.ConvertTo(dt); + List groupList = new List(); + if (list.Count > 0) + { + + for (int i = 0; i < list.Count; i++) + { + tb_InspectResult md = new tb_InspectResult(); + md.barcode = list[i].barcode; + md.side = list[i].side; + md.position = list[i].position; + md.stationNo = list[i].stationNo; + md.workClass = list[i].workClass; + md.productInfo = list[i].productInfo; + md.productOption = list[i].productOption; + md.inspectResult = list[i].inspectResult; + md.damnPosition = list[i].damnPosition; + md.reason = list[i].reason; + if (list[i].createTime != null) + { + md.createTime = Convert.ToDateTime(list[i].createTime.ToString()); + } + groupList.Add(md); + } + + } + if (groupList.Count > 0) + { + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = groupList; + jsonStr = JSONTools.ScriptSerialize(md); + } + + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + + public List> SearchInfoByRepairForExcel(string StartTime, string EndTime, string inspectResult) + { + try + { + List> list_excel = new List>(); + List title_list = new List(); + title_list.Add("条码"); + title_list.Add("A/B侧"); + title_list.Add("位置"); + //title_list.Add("机台"); + title_list.Add("班次"); + title_list.Add("产品信息"); + title_list.Add("生产模式"); + title_list.Add("结果"); + title_list.Add("缺陷位置"); + title_list.Add("原因"); + title_list.Add("时间"); + list_excel.Add(title_list); + + DataTable dt = dal.SearchByRepair(StartTime, EndTime, inspectResult); + if (dt != null && dt.Rows.Count > 0) + { + var list = Tool.ConvertTo(dt); + List groupList = new List(); + if (list.Count > 0) + { + + for (int i = 0; i < list.Count; i++) + { + List row_list = new List(); + row_list.Add(list[i].barcode); + row_list.Add(list[i].side); + row_list.Add(list[i].position); + //row_list.Add(list[i].stationNo); + row_list.Add(list[i].workClass); + row_list.Add(list[i].productInfo); + row_list.Add(list[i].productOption); + row_list.Add(list[i].inspectResult); + row_list.Add(list[i].damnPosition); + row_list.Add(list[i].reason); + row_list.Add(list[i].createTime.ToString()); + list_excel.Add(row_list); + } + + } + + } + + return list_excel; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + + + + /// + /// 查询信息 + /// + /// + public List SearchInfoAll(string StartTime, string EndTime, string position, string inspectResult) + { + try + { + List groupList = new List(); + + DataTable dt = dal.Search(StartTime, EndTime, position, inspectResult); + if (dt != null && dt.Rows.Count > 0) + { + + IEnumerable> result = dt.Rows.Cast().GroupBy(dr => dr["barcode"].ToString());//按A分组 + + foreach (IGrouping info in result) + { + + if (info.Count() > 0) + { + InspectResultGroup md = new InspectResultGroup(); + if (info.Count() >= 3) + { + md.barcode = info.ToArray()[0]["barcode"].ToString(); + md.side = info.ToArray()[0]["side"].ToString(); + md.position = info.ToArray()[0]["position"].ToString(); + md.stationNo = info.ToArray()[0]["stationNo"].ToString(); + md.workClass = info.ToArray()[0]["workClass"].ToString(); + md.productInfo = info.ToArray()[0]["productInfo"].ToString(); + md.productOption = info.ToArray()[0]["productOption"].ToString(); + md.inspectResult_1 = info.ToArray()[0]["inspectResult"].ToString(); + md.damnPosition_1 = info.ToArray()[0]["damnPosition"].ToString(); + md.reason_1 = info.ToArray()[0]["reason"].ToString(); + md.createTime_1 = Convert.ToDateTime(info.ToArray()[0]["createTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + md.inspectResult_2 = info.ToArray()[1]["inspectResult"].ToString(); + md.damnPosition_2 = info.ToArray()[1]["damnPosition"].ToString(); + md.reason_2 = info.ToArray()[1]["reason"].ToString(); + md.createTime_2 = Convert.ToDateTime(info.ToArray()[1]["createTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + md.inspectResult_3 = info.ToArray()[2]["inspectResult"].ToString(); + md.damnPosition_3 = info.ToArray()[2]["damnPosition"].ToString(); + md.reason_3 = info.ToArray()[2]["reason"].ToString(); + md.createTime_3 = Convert.ToDateTime(info.ToArray()[2]["createTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + groupList.Add(md); + } + + if (info.Count() == 2) + { + md.barcode = info.ToArray()[0]["barcode"].ToString(); + md.side = info.ToArray()[0]["side"].ToString(); + md.position = info.ToArray()[0]["position"].ToString(); + md.stationNo = info.ToArray()[0]["stationNo"].ToString(); + md.workClass = info.ToArray()[0]["workClass"].ToString(); + md.productInfo = info.ToArray()[0]["productInfo"].ToString(); + md.productOption = info.ToArray()[0]["productOption"].ToString(); + md.inspectResult_1 = info.ToArray()[0]["inspectResult"].ToString(); + md.damnPosition_1 = info.ToArray()[0]["damnPosition"].ToString(); + md.reason_1 = info.ToArray()[0]["reason"].ToString(); + md.createTime_1 = Convert.ToDateTime(info.ToArray()[0]["createTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + md.inspectResult_2 = info.ToArray()[1]["inspectResult"].ToString(); + md.damnPosition_2 = info.ToArray()[1]["damnPosition"].ToString(); + md.reason_2 = info.ToArray()[1]["reason"].ToString(); + md.createTime_2 = Convert.ToDateTime(info.ToArray()[1]["createTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + + groupList.Add(md); + } + + if (info.Count() == 1) + { + md.barcode = info.ToArray()[0]["barcode"].ToString(); + md.side = info.ToArray()[0]["side"].ToString(); + md.position = info.ToArray()[0]["position"].ToString(); + md.stationNo = info.ToArray()[0]["stationNo"].ToString(); + md.workClass = info.ToArray()[0]["workClass"].ToString(); + md.productInfo = info.ToArray()[0]["productInfo"].ToString(); + md.productOption = info.ToArray()[0]["productOption"].ToString(); + md.inspectResult_1 = info.ToArray()[0]["inspectResult"].ToString(); + md.damnPosition_1 = info.ToArray()[0]["damnPosition"].ToString(); + md.reason_1 = info.ToArray()[0]["reason"].ToString(); + md.createTime_1 = Convert.ToDateTime(info.ToArray()[0]["createTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + groupList.Add(md); + } + } + } + + + //var list = Tool.ConvertTo(dt); + + + + + + //List barcodeList = list.GroupBy(p => p.barcode).Select(p => p.Key).ToList(); + + //foreach (var item in barcodeList) + //{ + // var info = list.Where(p => p.barcode.Equals(item)).OrderBy(p => p.InspectTimes).ToList(); + + // if (info.Count > 0) + // { + // InspectResultGroup md = new InspectResultGroup(); + // if (info.Count >= 3) + // { + // md.barcode = info[0].barcode; + // md.side = info[0].side; + // md.position = info[0].position; + // md.stationNo = info[0].stationNo; + // md.workClass = info[0].workClass; + // md.productInfo = info[0].productInfo; + // md.productOption = info[0].productOption; + // md.inspectResult_1 = info[0].inspectResult; + // md.damnPosition_1 = info[0].damnPosition; + // md.reason_1 = info[0].reason; + // md.createTime_1 = Convert.ToDateTime(info[0].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + // md.inspectResult_2 = info[1].inspectResult; + // md.damnPosition_2 = info[1].damnPosition; + // md.reason_2 = info[1].reason; + // md.createTime_2 = Convert.ToDateTime(info[1].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + // md.inspectResult_3 = info[2].inspectResult; + // md.damnPosition_3 = info[2].damnPosition; + // md.reason_3 = info[2].reason; + // md.createTime_3 = Convert.ToDateTime(info[2].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + // groupList.Add(md); + // } + + // if (info.Count == 2) + // { + // md.barcode = info[0].barcode; + // md.side = info[0].side; + // md.position = info[0].position; + // md.stationNo = info[0].stationNo; + // md.workClass = info[0].workClass; + // md.productInfo = info[0].productInfo; + // md.productOption = info[0].productOption; + // md.inspectResult_1 = info[0].inspectResult; + // md.damnPosition_1 = info[0].damnPosition; + // md.reason_1 = info[0].reason; + // md.createTime_1 = Convert.ToDateTime(info[0].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + // md.inspectResult_2 = info[1].inspectResult; + // md.damnPosition_2 = info[1].damnPosition; + // md.reason_2 = info[1].reason; + // md.createTime_2 = Convert.ToDateTime(info[1].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + + // groupList.Add(md); + // } + + // if (info.Count == 1) + // { + // md.barcode = info[0].barcode; + // md.side = info[0].side; + // md.position = info[0].position; + // md.stationNo = info[0].stationNo; + // md.workClass = info[0].workClass; + // md.productInfo = info[0].productInfo; + // md.productOption = info[0].productOption; + // md.inspectResult_1 = info[0].inspectResult; + // md.damnPosition_1 = info[0].damnPosition; + // md.reason_1 = info[0].reason; + // md.createTime_1 = Convert.ToDateTime(info[0].createTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss"); + + // groupList.Add(md); + // } + // } + //} + } + + return groupList; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + //public List SearchInfoAllByRepair(string StartTime, string EndTime, string inspectResult) + //{ + // try + // { + // List groupList = new List(); + // DataTable dt = dal.SearchByRepair(StartTime, EndTime, inspectResult); + // if (dt != null && dt.Rows.Count > 0) + // { + // IEnumerable> result = dt.Rows.Cast().GroupBy(dr => dr["barcode"].ToString()); + // foreach (IGrouping info in result) + // { + // if (info.Count() > 0) + // { + + + // } + // } + // } + // } + // catch (Exception ex) + // { + // LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + // return null; + // } + //} + + #region 合格率趋势统计 + public string SearchQualifiedTrend(string StartTime, string EndTime, string side, string product) + { + try + { + + StringBuilder sb = new StringBuilder(100); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + //DataTable dt = dal.SearchByPosition(StartTime + " 08:00:00.000", Convert.ToDateTime(EndTime + " 07:59:59.999").AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff"), side, product); + DataTable dt = dal.SearchByPosition(StartTime + " 07:30:00", Convert.ToDateTime(EndTime + " 07:30:00").AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"), side, product); + if (dt != null && dt.Rows.Count > 0) + { + + List numList = new List(); + List doubleList = new List(); + for (int i = 0; i < 13; i++) + { + numList.Add(0); + } + for (int i = 0; i < 4; i++) + { + doubleList.Add(0); + } + + TimeSpan ts1 = new TimeSpan(Convert.ToDateTime(StartTime).Ticks); + TimeSpan ts2 = new TimeSpan(Convert.ToDateTime(EndTime).Ticks); + TimeSpan ts3 = ts2.Subtract(ts1); //ts + for (int i = 0; i < ts3.Days + 1; i++) + { + DateTime dtime = Convert.ToDateTime(StartTime).AddDays(i); + string strTime = dtime.ToString("M/d"); + + //白班 + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(12) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 07:30:00") && + myRow.Field(12) <= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 19:29:59") + select myRow; + + sb.Append(""); + sb.Append(""); + sb.Append(""); + QualifiedTrendBuilindData(DayList, ref sb, numList, doubleList); + + var NightList = from myRowNight in dt.AsEnumerable() + where myRowNight.Field(12) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 19:30:00") && + myRowNight.Field(12) <= Convert.ToDateTime(dtime.AddDays(1).ToString("yyyy-MM-dd") + " 07:29:59") + select myRowNight; + + sb.Append(""); + sb.Append(""); + QualifiedTrendBuilindData(NightList, ref sb, numList, doubleList); + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + } + + + sb.Append("
日期班别下线数系统抛光数一次合格数抛光合格数合格数返修合格数报废数点修补数一次合格率抛光合格率总合格率报废率抛光结余
" + strTime + "白班
夜班
合计" + numList[0] + "" + numList[1] + "" + numList[2] + "" + numList[3] + "" + numList[4] + "" + numList[5] + "" + numList[6] + "" + numList[7] + "" + doubleList[0] + "%" + doubleList[1] + "%" + doubleList[2] + "%" + doubleList[3] + "%" + numList[12] + "
"); + + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + + public List> SearchQualifiedTrendForExcel(string StartTime, string EndTime, string side, string product) + { + try + { + List> list = new List>(); + List sonList = new List(); + + sonList.Add("日期"); + sonList.Add("班别"); + sonList.Add("下线数"); + sonList.Add("系统抛光数"); + sonList.Add("一次合格数"); + sonList.Add("抛光合格数"); + sonList.Add("合格数"); + sonList.Add("返修合格数"); + sonList.Add("报废数"); + sonList.Add("点修补数"); + sonList.Add("一次合格率"); + sonList.Add("抛光合格率"); + sonList.Add("总合格率"); + sonList.Add("报废率"); + sonList.Add("抛光结余"); + list.Add(sonList); + + //DataTable dt = dal.SearchByPosition(StartTime + " 00:00:00.000", EndTime + " 23:59:59.000", side, product); + DataTable dt = dal.SearchByPosition(StartTime + ".000", EndTime + ".000", side, product); + + if (dt != null && dt.Rows.Count > 0) + { + + List numList = new List(); + List doubleList = new List(); + for (int i = 0; i < 13; i++) + { + numList.Add(0); + } + + + TimeSpan ts1 = new TimeSpan(Convert.ToDateTime(StartTime).Ticks); + TimeSpan ts2 = new TimeSpan(Convert.ToDateTime(EndTime).Ticks); + TimeSpan ts3 = ts2.Subtract(ts1); //ts + for (int i = 0; i < ts3.Days + 1; i++) + { + DateTime dtime = Convert.ToDateTime(StartTime).AddDays(i); + string strTime = dtime.ToString("M/d"); + + //白班 + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(12) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 08:00:00.000") && + myRow.Field(12) <= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 19:59:59.999") + select myRow; + List sonDay = new List(); + sonDay.Add(strTime); + sonDay.Add("白班"); + + QualifiedTrendBuilindData(DayList, ref sonDay, numList, doubleList); + list.Add(sonDay); + + var NightList = from myRow in dt.AsEnumerable() + where myRow.Field(12) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 20:00:00.000") && + myRow.Field(12) <= Convert.ToDateTime(dtime.AddDays(1).ToString("yyyy-MM-dd") + " 07:59:59.999") + select myRow; + + List sonNight = new List(); + sonNight.Add(strTime); + sonNight.Add("夜班"); + QualifiedTrendBuilindData(NightList, ref sonNight, numList, doubleList); + list.Add(sonNight); + } + + + List sonCount = new List(); + sonCount.Add("合计"); + sonCount.Add(""); + sonCount.Add(numList[0].ToString()); + sonCount.Add(numList[1].ToString()); + sonCount.Add(numList[2].ToString()); + sonCount.Add(numList[3].ToString()); + sonCount.Add(numList[4].ToString()); + sonCount.Add(numList[5].ToString()); + sonCount.Add(numList[6].ToString()); + sonCount.Add(numList[7].ToString()); + sonCount.Add(doubleList[0].ToString() + "%"); + sonCount.Add(doubleList[1].ToString() + "%"); + sonCount.Add(doubleList[2].ToString() + "%"); + sonCount.Add(doubleList[3].ToString() + "%"); + sonCount.Add(numList[12].ToString()); + + list.Add(sonCount); + + } + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + + private void QualifiedTrendBuilindData(EnumerableRowCollection DayList, ref StringBuilder sb, List numList, List doubleList) + { + //下线数 + int XX_num = DayList.Where(p => "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //抛光数 + //int PG_num = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pg_1 = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + //var pg_2 = DayList.Where(p => p.ItemArray[6] != null && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + //IEnumerable pg_List = pg_1.Intersect(pg_2); + int PG_num = DayList.Where(p => "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //一次合格数 + int YCHG_num = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("合格") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //抛光合格 + //var pghg_1 = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + //var pghg_2 = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("合格") && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + //IEnumerable pghg_List = pghg_1.Intersect(pghg_2); + int pghg = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("合格") && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pghg = DayList.Where(t => t.ItemArray[3].ToString() == "下线二检 抛光区") + // .GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("合格")).Count(); + //返修合格数 + var fx = DayList.Where(t => t.ItemArray[6] != null && t.ItemArray[3].ToString().Contains("点修补") && t.ItemArray[6].ToString().Contains("合格")).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //合格数 + var hg = YCHG_num + pghg + fx; + //var hg = DayList.GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("合格")).Count(); + //报废数 + //var bf = DayList.GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("报废")).Count(); + var bf = DayList.Where(t => t.ItemArray[6] != null && t.ItemArray[6].ToString().Contains("报废")).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + var YC_bf = DayList.Where(t => t.ItemArray[6] != null && t.ItemArray[6].ToString().Contains("报废") && "1".Equals(t.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //点修补数 + //var dxb = DayList.Where(t => t.ItemArray[3].ToString() == "点修补 抛光区").GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + var dxb = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + + + //一次合格率 + var yc_hg_L = Math.Round(((double)YCHG_num / (double)XX_num) * 100, 2); + //抛光合格率 + var pg_hg_L = Math.Round(((double)pghg / (double)PG_num) * 100, 2); + //总合格率 + var all_hg_L = Math.Round(((double)hg / (double)XX_num) * 100, 2); + //报废率 + var pf_L = Math.Round(((double)bf / (double)XX_num) * 100, 2); + //抛光结余 + //var pgjy = XX_num - hg - bf - dxb; + var pgjy = XX_num - YCHG_num - YC_bf - PG_num; + + sb.Append("" + XX_num + ""); + sb.Append("" + PG_num + ""); + sb.Append("" + YCHG_num + ""); + sb.Append("" + pghg + ""); + sb.Append("" + hg + ""); + sb.Append("" + fx + ""); + sb.Append("" + bf + ""); + sb.Append("" + dxb + ""); + sb.Append("" + yc_hg_L + "%"); + sb.Append("" + pg_hg_L + "%"); + sb.Append("" + all_hg_L + "%"); + sb.Append("" + pf_L + "%"); + sb.Append("" + pgjy + ""); + sb.Append(""); + + numList[0] = numList[0] + XX_num; + numList[1] = numList[1] + PG_num; + numList[2] = numList[2] + YCHG_num; + numList[3] = numList[3] + pghg; + numList[4] = numList[4] + hg; + numList[5] = numList[5] + fx; + numList[6] = numList[6] + bf; + numList[7] = numList[7] + dxb; + + var xxx = Math.Round(((double)numList[2] / (double)numList[0]) * 100, 2); + + doubleList[0] = Math.Round(((double)numList[2] / (double)numList[0]) * 100, 2); + doubleList[1] = Math.Round(((double)numList[3] / (double)numList[1]) * 100, 2); + doubleList[2] = Math.Round(((double)numList[4] / (double)numList[0]) * 100, 2); + doubleList[3] = Math.Round(((double)numList[6] / (double)numList[0]) * 100, 2); + numList[12] = numList[12] + pgjy; + + + + + } + + private void QualifiedTrendBuilindData(EnumerableRowCollection DayList, ref List list, List numList, List doubleList) + { + //下线数 + int XX_num = DayList.Where(p => "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //抛光数 + //int PG_num = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + var pg_1 = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + var pg_2 = DayList.Where(p => p.ItemArray[6] != null && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + IEnumerable pg_List = pg_1.Intersect(pg_2); + int PG_num = pg_List.Count(); + //一次合格数 + int YCHG_num = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("合格") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //抛光合格 + var pghg_1 = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "1".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + var pghg_2 = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("合格") && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).ToList(); + IEnumerable pghg_List = pghg_1.Intersect(pghg_2); + int pghg = pghg_List.Count(); + //var pghg = DayList.Where(t => t.ItemArray[3].ToString() == "下线二检 抛光区") + // .GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("合格")).Count(); + //返修合格数 + var fx = DayList.Where(t => t.ItemArray[6] != null && t.ItemArray[3].ToString().Contains("点修补") && t.ItemArray[6].ToString().Contains("合格")).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //合格数 + var hg = YCHG_num + pghg + fx; + //var hg = DayList.GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("合格")).Count(); + //报废数 + //var bf = DayList.GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("报废")).Count(); + var bf = DayList.Where(t => t.ItemArray[6] != null && t.ItemArray[6].ToString().Contains("报废")).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + var YC_bf = DayList.Where(t => t.ItemArray[6] != null && t.ItemArray[6].ToString().Contains("报废") && "1".Equals(t.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //点修补数 + //var dxb = DayList.Where(t => t.ItemArray[3].ToString() == "点修补 抛光区").GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + var dxb = DayList.Where(p => p.ItemArray[6] != null && p.ItemArray[6].ToString().Contains("抛光") && "2".Equals(p.ItemArray[13])).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + + //一次合格率 + var yc_hg_L = Math.Round(((double)YCHG_num / (double)XX_num) * 100, 2); + //抛光合格率 + var pg_hg_L = Math.Round(((double)pghg / (double)PG_num) * 100, 2); + //总合格率 + var all_hg_L = Math.Round(((double)hg / (double)XX_num) * 100, 2); + //报废率 + var pf_L = Math.Round(((double)bf / (double)XX_num) * 100, 2); + //抛光结余 + //var pgjy = XX_num - hg - bf - dxb; + var pgjy = XX_num - YCHG_num - YC_bf - PG_num; + + list.Add(XX_num.ToString()); + list.Add(PG_num.ToString()); + list.Add(YCHG_num.ToString()); + list.Add(pghg.ToString()); + list.Add(hg.ToString()); + list.Add(fx.ToString()); + list.Add(bf.ToString()); + list.Add(dxb.ToString()); + list.Add(yc_hg_L.ToString() + "%"); + list.Add(pg_hg_L.ToString() + "%"); + list.Add(all_hg_L.ToString() + "%"); + list.Add(pf_L.ToString() + "%"); + list.Add(pgjy.ToString()); + + + numList[0] = numList[0] + XX_num; + numList[1] = numList[1] + PG_num; + numList[2] = numList[2] + YCHG_num; + numList[3] = numList[3] + pghg; + numList[4] = numList[4] + hg; + numList[5] = numList[5] + fx; + numList[6] = numList[6] + bf; + numList[7] = numList[7] + dxb; + doubleList[0] = Math.Round(((double)numList[2] / (double)numList[0]) * 100, 2); + doubleList[1] = Math.Round(((double)numList[3] / (double)numList[1]) * 100, 2); + doubleList[2] = Math.Round(((double)numList[4] / (double)numList[0]) * 100, 2); + doubleList[3] = Math.Round(((double)numList[6] / (double)numList[0]) * 100, 2); + numList[12] = numList[12] + pgjy; + + } + #endregion + + #region 喷涂报废统计 + public string SearchPlatingScrap(string StartTime, string EndTime, string side) + { + try + { + + StringBuilder sb = new StringBuilder(100); + sb.Append(""); + + + DataTable dt = dal.SearchByResult(StartTime, EndTime, side); + if (dt != null && dt.Rows.Count > 0) + { + + var infoAll = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + //.Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + //.Where(p => p.ItemArray[6].ToString().Contains("报废")).ToList(); + + //var infoTotal = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + + var BFTotal = dt.AsEnumerable() + //.Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + .Where(p => p.ItemArray[6].ToString().Contains("报废")).ToList(); + + + //合格数 + var ok_Total = dt.AsEnumerable().Where(p => p.ItemArray[6].ToString().Contains("合格")).ToList(); + + + + //获取全部产品+对应的颜色 + Dictionary> col_Dictionary = new Dictionary>(); + var info_product = infoAll.GroupBy(p => p.ItemArray[15]).Select(p => p.Key).ToList(); + foreach (var item in info_product) + { + col_Dictionary.Add(item.ToString(), + infoAll.Where(p => p.ItemArray[15].ToString().Equals(item)) + .GroupBy(p => p.ItemArray[14]) + .Select(p => (string)p.Key).ToList()); + } + + //获取全部缺陷 + List damnPositionList = new List(); + foreach (var item in BFTotal) + { + if (item.ItemArray[9] == null || String.IsNullOrWhiteSpace(item.ItemArray[9].ToString())) + { + continue; + } + + string[] sArray = item.ItemArray[9].ToString().Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries); + if (sArray.Length > 0) + { + foreach (var damn in sArray) + { + if (!damnPositionList.Contains(damn)) + { + damnPositionList.Add(damn); + } + } + } + } + Dictionary total_Dictionary = new Dictionary(); + + foreach (var item in damnPositionList) + { + total_Dictionary.Add(item, BFTotal.Where(p => p.ItemArray[9].ToString().Contains(item)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count()); + } + + var info_d = total_Dictionary.OrderByDescending(p => p.Value).ToList(); + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in info_d) + { + sb.Append(""); + } + sb.Append(""); + + foreach (var item in col_Dictionary) + { + sb.Append(""); + sb.Append(""); + + //var p_all = infoAll.Where(p => p.ItemArray[15].ToString().Equals(item.Key)).Count(); + var p_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key)) + .GroupBy(p => p.ItemArray[1]) + .Select(p => p.Key).Count(); + + sb.Append("");//总数 + foreach (var item2 in info_d) + { + + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)p_all) * 100, 2); + + sb.Append("");//各缺陷总数 + + } + sb.Append(""); + + + foreach (var item3 in item.Value) + { + sb.Append(""); + sb.Append("");//颜色 + //var c_all = infoAll.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3)).Count(); + var c_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + sb.Append("");//总数 + foreach (var item2 in info_d) + { + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)c_all) * 100, 2); + if (c_num > 0) + { + sb.Append(""); + } + else + { + sb.Append(""); + } + } + sb.Append(""); + } + + } + + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in info_d) + { + //var pf_L = Math.Round(((double)item.Value / (double)infoAll.GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count()) * 100, 2); + sb.Append(""); + } + sb.Append(""); + + + } + + + sb.Append("
总数" + item.Key + "
" + item.Key + "" + p_all + "" + c_num + "
" + item3 + "" + c_all + "" + c_num + "
总计" + infoAll.GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count() + "" + item.Value + "
"); + + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public List> SearchPlatingScrapForExcel(string StartTime, string EndTime, string side) + { + try + { + List> list = new List>(); + + + DataTable dt = dal.SearchByResult(StartTime, EndTime, side); + + if (dt != null && dt.Rows.Count > 0) + { + + //var infoAll = dt.AsEnumerable().GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("报废")).ToList(); + + + var infoAll = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + //.Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + //.Where(p => p.ItemArray[6].ToString().Contains("报废")).ToList(); + + //var infoTotal = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + + var BFTotal = dt.AsEnumerable() + //.Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + .Where(p => p.ItemArray[6].ToString().Contains("报废")).ToList(); + + + //合格数 + var ok_Total = dt.AsEnumerable().Where(p => p.ItemArray[6].ToString().Contains("合格")).ToList(); + + + + //获取全部产品+对应的颜色 + Dictionary> col_Dictionary = new Dictionary>(); + var info_product = infoAll.GroupBy(p => p.ItemArray[15]).Select(p => p.Key).ToList(); + foreach (var item in info_product) + { + col_Dictionary.Add(item.ToString(), + infoAll.Where(p => p.ItemArray[15].ToString().Equals(item)) + .GroupBy(p => p.ItemArray[14]) + .Select(p => (string)p.Key).ToList()); + } + + //获取全部缺陷 + List damnPositionList = new List(); + foreach (var item in infoAll) + { + if (item.ItemArray[9] == null || String.IsNullOrWhiteSpace(item.ItemArray[9].ToString())) + { + continue; + } + + string[] sArray = item.ItemArray[9].ToString().Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries); + if (sArray.Length > 0) + { + foreach (var damn in sArray) + { + if (!damnPositionList.Contains(damn)) + { + damnPositionList.Add(damn); + } + } + } + } + Dictionary total_Dictionary = new Dictionary(); + + foreach (var item in damnPositionList) + { + total_Dictionary.Add(item, BFTotal.Where(p => p.ItemArray[9].ToString().Contains(item)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count()); + } + + var info_d = total_Dictionary.OrderByDescending(p => p.Value).ToList(); + + List sonList = new List(); + + sonList.Add(""); + sonList.Add("总数"); + foreach (var item in info_d) + { + sonList.Add(item.Key); + + } + list.Add(sonList); + + foreach (var item in col_Dictionary) + { + List colorList = new List(); + + colorList.Add(item.Key); + var p_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key)) + .GroupBy(p => p.ItemArray[1]) + .Select(p => p.Key).Count(); + colorList.Add(p_all.ToString()); + + foreach (var item2 in info_d) + { + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)p_all) * 100, 2); + + colorList.Add(c_num.ToString()); + } + list.Add(colorList); + + + + + foreach (var item3 in item.Value) + { + List colorList2 = new List(); + colorList2.Add(item3); + //sb.Append(""); + //sb.Append("" + item3 + "");//颜色 + var c_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + colorList2.Add(c_all.ToString()); + //sb.Append("" + c_all + "");//总数 + foreach (var item2 in info_d) + { + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)c_all) * 100, 2); + //sb.Append("" + c_num + "(" + pf_L + "%)");//各缺陷 + colorList2.Add(c_num.ToString()); + + if (c_num > 0) + { + colorList2.Add(c_num.ToString()); + } + else + { + colorList2.Add(""); + } + + + } + list.Add(colorList2); + } + + } + + List sonList2 = new List(); + sonList2.Add("总计"); + sonList2.Add(infoAll.GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count().ToString()); + //sb.Append(""); + //sb.Append("总计"); + //sb.Append("" + infoAll.Count + ""); + foreach (var item in info_d) + { + //var pf_L = Math.Round(((double)item.Value / (double)infoAll.Count) * 100, 2); + //sb.Append("" + item.Value + "(" + pf_L + "%)"); + sonList2.Add(item.Value.ToString()); + } + //sb.Append(""); + list.Add(sonList2); + + } + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + #endregion + + #region 喷涂抛光统计 + public string SearchPlatingPolish(string StartTime, string EndTime, string side) + { + try + { + + StringBuilder sb = new StringBuilder(100); + sb.Append(""); + + + DataTable dt = dal.SearchByResult(StartTime, EndTime, side); + + if (dt != null && dt.Rows.Count > 0) + { + + //var infoAll = dt.AsEnumerable().GroupBy(p => p.ItemArray[1]) + // .Select(s => s.OrderByDescending(x => x.ItemArray[12]).FirstOrDefault()) + // .Where(p => p.ItemArray[6].ToString().Contains("抛光")).ToList(); + + //var infoTotal = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + + var infoAll = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + + var BFTotal = dt.AsEnumerable() + .Where(p => p.ItemArray[6].ToString().Contains("抛光")).ToList(); + + + //合格数 + var ok_Total = dt.AsEnumerable().Where(p => p.ItemArray[6].ToString().Contains("合格")).ToList(); + + + + + //获取全部产品+对应的颜色 + Dictionary> col_Dictionary = new Dictionary>(); + var info_product = infoAll.GroupBy(p => p.ItemArray[15]).Select(p => p.Key).ToList(); + foreach (var item in info_product) + { + col_Dictionary.Add(item.ToString(), + infoAll.Where(p => p.ItemArray[15].ToString().Equals(item)) + .GroupBy(p => p.ItemArray[14]) + .Select(p => (string)p.Key).ToList()); + } + + //获取全部缺陷 + List damnPositionList = new List(); + foreach (var item in infoAll) + { + if (item.ItemArray[9] == null || String.IsNullOrWhiteSpace(item.ItemArray[9].ToString())) + { + continue; + } + + string[] sArray = item.ItemArray[9].ToString().Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries); + if (sArray.Length > 0) + { + foreach (var damn in sArray) + { + if (!damnPositionList.Contains(damn)) + { + damnPositionList.Add(damn); + } + } + } + } + Dictionary total_Dictionary = new Dictionary(); + + foreach (var item in damnPositionList) + { + total_Dictionary.Add(item, BFTotal.Where(p => p.ItemArray[9].ToString().Contains(item)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count()); + } + + var info_d = total_Dictionary.OrderByDescending(p => p.Value).ToList(); + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in info_d) + { + sb.Append(""); + } + sb.Append(""); + + foreach (var item in col_Dictionary) + { + sb.Append(""); + sb.Append("");//产品 + var p_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key)) + .GroupBy(p => p.ItemArray[1]) + .Select(p => p.Key).Count(); + sb.Append("");//总数 + + foreach (var item2 in info_d) + { + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)p_all) * 100, 2); + + sb.Append("");//各缺陷总数 + } + sb.Append(""); + + + foreach (var item3 in item.Value) + { + sb.Append(""); + sb.Append("");//颜色 + //var c_all = infoAll.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3)).Count(); + var c_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + sb.Append("");//总数 + foreach (var item2 in info_d) + { + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)c_all) * 100, 2); + if (c_num > 0) + { + sb.Append(""); + } + else { + sb.Append(""); + } + + } + sb.Append(""); + } + + } + + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in info_d) + { + //var pf_L = Math.Round(((double)item.Value / (double)infoAll.Count) * 100, 2); + sb.Append(""); + } + sb.Append(""); + + + } + + + sb.Append("
总数" + item.Key + "
" + item.Key + "" + p_all + "" + c_num + "
" + item3 + "" + c_all + "" + c_num + "
总计" + infoAll.GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count() + "" + item.Value + "
"); + + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public List> SearchPlatingPolishForExcel(string StartTime, string EndTime, string side) + { + try + { + List> list = new List>(); + + + DataTable dt = dal.SearchByResult(StartTime, EndTime, side); + + if (dt != null && dt.Rows.Count > 0) + { + + var infoAll = dt.AsEnumerable().Where(p => p.ItemArray[13].ToString().Equals("1")).ToList(); + + var BFTotal = dt.AsEnumerable() + .Where(p => p.ItemArray[6].ToString().Contains("抛光")).ToList(); + + + //合格数 + var ok_Total = dt.AsEnumerable().Where(p => p.ItemArray[6].ToString().Contains("合格")).ToList(); + + + //获取全部产品+对应的颜色 + Dictionary> col_Dictionary = new Dictionary>(); + var info_product = infoAll.GroupBy(p => p.ItemArray[15]).Select(p => p.Key).ToList(); + foreach (var item in info_product) + { + col_Dictionary.Add(item.ToString(), + infoAll.Where(p => p.ItemArray[15].ToString().Equals(item)) + .GroupBy(p => p.ItemArray[14]) + .Select(p => (string)p.Key).ToList()); + } + + //获取全部缺陷 + List damnPositionList = new List(); + foreach (var item in infoAll) + { + if (item.ItemArray[9] == null || String.IsNullOrWhiteSpace(item.ItemArray[9].ToString())) + { + continue; + } + + string[] sArray = item.ItemArray[9].ToString().Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries); + if (sArray.Length > 0) + { + foreach (var damn in sArray) + { + if (!damnPositionList.Contains(damn)) + { + damnPositionList.Add(damn); + } + } + } + } + Dictionary total_Dictionary = new Dictionary(); + + foreach (var item in damnPositionList) + { + total_Dictionary.Add(item, BFTotal.Where(p => p.ItemArray[9].ToString().Contains(item)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count()); + } + + var info_d = total_Dictionary.OrderByDescending(p => p.Value).ToList(); + + List sonList = new List(); + + sonList.Add(""); + sonList.Add("总数"); + foreach (var item in info_d) + { + sonList.Add(item.Key); + + } + list.Add(sonList); + + foreach (var item in col_Dictionary) + { + List colorList = new List(); + + colorList.Add(item.Key); + var p_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key)) + .GroupBy(p => p.ItemArray[1]) + .Select(p => p.Key).Count(); + colorList.Add(p_all.ToString()); + + foreach (var item2 in info_d) + { + var c_num = BFTotal.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)p_all) * 100, 2); + + colorList.Add(c_num.ToString()); + } + list.Add(colorList); + + + + + foreach (var item3 in item.Value) + { + List colorList2 = new List(); + colorList2.Add(item3); + //sb.Append(""); + //sb.Append("" + item3 + "");//颜色 + var c_all = ok_Total.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + colorList2.Add(c_all.ToString()); + //sb.Append("" + c_all + "");//总数 + foreach (var item2 in info_d) + { + var c_num = infoAll.Where(p => p.ItemArray[15].ToString().Equals(item.Key) && p.ItemArray[14].ToString().Equals(item3) && p.ItemArray[9].ToString().Contains(item2.Key)).GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count(); + //var pf_L = Math.Round(((double)c_num / (double)c_all) * 100, 2); + //sb.Append("" + c_num + "(" + pf_L + "%)");//各缺陷 + if (c_num > 0) + { + colorList2.Add(c_num.ToString()); + } + else + { + colorList2.Add(""); + } + } + list.Add(colorList2); + } + + } + + List sonList2 = new List(); + sonList2.Add("总计"); + sonList2.Add(infoAll.GroupBy(p => p.ItemArray[1]).Select(p => p.Key).Count().ToString()); + //sb.Append(""); + //sb.Append("总计"); + //sb.Append("" + infoAll.Count + ""); + foreach (var item in info_d) + { + var pf_L = Math.Round(((double)item.Value / (double)infoAll.Count) * 100, 2); + //sb.Append("" + item.Value + "(" + pf_L + "%)"); + sonList2.Add(item.Value.ToString()); + } + //sb.Append(""); + list.Add(sonList2); + + } + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + + #endregion + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/GetNewTasksBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/GetNewTasksBLL.cs new file mode 100644 index 0000000..998dca7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/GetNewTasksBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.ExchangeCenter; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.ExchangeCenter +{ + public class GetNewTasksBLL + { + public bool AddInfo(GetNewTasksModel md) + { + GetNewTasksDAL da = new GetNewTasksDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartMstrBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartMstrBLL.cs new file mode 100644 index 0000000..23d70aa --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartMstrBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.ExchangeCenter; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.ExchangeCenter +{ + public class PartMstrBLL + { + public bool AddInfo(PartMstrModel md) + { + PartMstrDAL da = new PartMstrDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartRecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartRecordBLL.cs new file mode 100644 index 0000000..ec22766 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/PartRecordBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.BasicInfo; +using MESClassLibrary.DAL.ExchangeCenter; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.ExchangeCenter +{ + public class PartRecordBLL + { + public bool AddInfo(PartRecordModel md) + { + PartRecordDAL dal = new PartRecordDAL(); + try + { + return dal.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESBomBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESBomBLL.cs new file mode 100644 index 0000000..543c48c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESBomBLL.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.ExchangeCenter; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.ExchangeCenter +{ + public class TESBomBLL + { + public bool AddInfo(TESBomModel md) + { + TESBomDAL da = new TESBomDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable Search() + { + TESBomDAL da=new TESBomDAL(); + try + { + return da.Search(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool updateFlag(string TaskID) + { + TESBomDAL da = new TESBomDAL(); + try + { + return da.UpdateFlag(TaskID); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESPartDetBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESPartDetBLL.cs new file mode 100644 index 0000000..c8cb33f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/ExchangeCenter/TESPartDetBLL.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.ExchangeCenter; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.ExchangeCenter +{ + public class TESPartDetBLL + { + public bool AddInfo(TESPartDetModel md) + { + TESPartDetDAL da = new TESPartDetDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/DownReasonBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/DownReasonBLL.cs new file mode 100644 index 0000000..85f8703 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/DownReasonBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Injection; + +namespace MESClassLibrary.BLL.Injection +{ + public class DownReasonBLL + { + DownReasonDAL da=new DownReasonDAL(); + public DataTable SearchReason() + { + try + { + return da.SearchReason(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionDownRecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionDownRecordBLL.cs new file mode 100644 index 0000000..3707a93 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionDownRecordBLL.cs @@ -0,0 +1,891 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Injection; +using MESClassLibrary.DAL.painting; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Injection +{ + public class InjectionDownRecordBLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + InjectionDownRecordDAL dal = new InjectionDownRecordDAL(); + public bool AddInfo(InjectionDownRecordModel md) + { + InjectionDownRecordDAL da = new InjectionDownRecordDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(InjectionDownRecordModel md) + { + InjectionDownRecordDAL da = new InjectionDownRecordDAL(); + try + { + return da.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + + + #region web用方法 + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string StartTime, string EndTime, string StationID) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + DateTime stime = Convert.ToDateTime(StartTime); + DateTime etime = Convert.ToDateTime(EndTime); + + List list = ef.tb_Injection_DownRecord.Where(p => p.StartTime >= stime && p.EndTime <= etime && p.DownTime >= 60).ToList(); + + if (!String.IsNullOrEmpty(StationID)) + { + list = list.Where(p => p.StationID.Equals(StationID)).ToList(); + } + + List modelList = new List(); + if (list.Count > 0) + { + #region 联查 + BasicBLL machine_db = new BasicBLL(); + var machine_list = machine_db.SearchAllInfo(); + + BasicBLL DownReason_db = new BasicBLL(); + var DownReason_list = DownReason_db.SearchAllInfo(); + + BasicBLL DownType_db = new BasicBLL(); + var DownType_list = DownType_db.SearchAllInfo(); + + foreach (var item in list) + { + Injection_DownRecordModel dm = Tool.Mapper(item); + + var machine_info = machine_list.FirstOrDefault(p => p.StationID == item.StationID); + if (machine_info != null) + { + dm.StationNo = machine_info.StationNo; + } + + var DownReason = DownReason_list.FirstOrDefault(p => p.ID == item.DownReason); + if (DownReason != null) + { + dm.DownReasonName = DownReason.Reason; + } + var DownType = DownType_list.FirstOrDefault(p => p.ID == item.DownType); + if (DownType != null) + { + dm.DownTypeName = DownType.DownTypeName; + } + + modelList.Add(dm); + } + #endregion + + total = modelList.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + modelList = modelList.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public bool UpdateInfo(tb_Injection_DownRecord md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[8]; + proNames[0] = "StationID"; + proNames[1] = "DownType"; + proNames[2] = "DownReason"; + proNames[3] = "Des"; + proNames[4] = "StartTime"; + proNames[5] = "EndTime"; + proNames[6] = "DownTime"; + proNames[7] = "Remark1"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public string GetComboboxDataByDownType() + { + try + { + string jsonStr = "[]"; + var list = ef.tb_Injection_DownType.ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + + public string GetComboboxDataByDownReason() + { + try + { + string jsonStr = "[]"; + var list = ef.tb_Inhection_DownReason.ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + + } + + public bool UpdateData(List list, string DownRecordID) + { + try + { + foreach (var item in list) + { + tb_Injection_DownRecord md = new tb_Injection_DownRecord(); + md.ID = Guid.NewGuid().ToString(); + md.StationID = item.StationID; + //md.PlanID = item.PlanID; + md.StartTime = Convert.ToDateTime(item.StartTime); + md.EndTime = Convert.ToDateTime(item.EndTime); + TimeSpan ts = md.EndTime.Value.Subtract(md.StartTime.Value); + md.DownTime = (int)ts.TotalSeconds; + md.DownType = item.DownType; + md.DownReason = item.DownReason; + md.Des = ""; + md.Remark1 = item.Remark1; + md.Remark2 = "2"; + db.AddInfo(md); + } + + var info = ef.tb_Injection_DownRecord.FirstOrDefault(p => p.ID == DownRecordID); + info.Remark2 = "1"; + ef.SaveChanges(); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + #endregion + + #region 报表 + + //每日平均换膜次数 + public string SearchDay(string StartTime) + { + try + { + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01 08:00:00").ToString("yyyy-MM-dd HH:mm:ss"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString() + " 07:59:59").AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List Day_totalList = new List(); + List Night_totalList = new List(); + + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1).ToString()); + + DateTime dtime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)); + + //白班 + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(5) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 08:00:00.000") && + myRow.Field(6) <= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 19:59:59.999") + select myRow; + if (DayList.Count() > 0) + { + int Day_int = DayList.Sum(p => Convert.ToInt32(p.ItemArray[7])); + Day_totalList.Add(Math.Round((Day_int / (double)DayList.Count()) / 60, 2)); + } + else + { + Day_totalList.Add(0); + } + + + //夜班 + var NightList = from myRowNight in dt.AsEnumerable() + where myRowNight.Field(5) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 20:00:00.000") && + myRowNight.Field(6) <= Convert.ToDateTime(dtime.AddDays(1).ToString("yyyy-MM-dd") + " 07:59:59.999") + select myRowNight; + if (NightList.Count() > 0) + { + int Night_int = NightList.Sum(p => Convert.ToInt32(p.ItemArray[7])); + Night_totalList.Add(Math.Round((Night_int / (double)NightList.Count()) / 60, 2)); + } + else + { + Night_totalList.Add(0); + } + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in Day_totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in Night_totalList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append("
班次/日期" + item + "
白班" + item + "
夜班" + item + "
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + //每日平均换膜次数导出excel + public List> SearchDayForExcel(string StartTime) + { + try + { + List> list = new List>(); + + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01 08:00:00").ToString("yyyy-MM-dd HH:mm:ss"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString() + " 07:59:59").AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List Day_totalList = new List(); + List Night_totalList = new List(); + + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1).ToString()); + + DateTime dtime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)); + + //白班 + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(5) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 08:00:00.000") && + myRow.Field(6) <= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 19:59:59.999") + select myRow; + if (DayList.Count() > 0) + { + int Day_int = DayList.Sum(p => Convert.ToInt32(p.ItemArray[7])); + Day_totalList.Add(Math.Round((Day_int / (double)DayList.Count()) / 60, 2)); + } + else + { + Day_totalList.Add(0); + } + + + //夜班 + var NightList = from myRowNight in dt.AsEnumerable() + where myRowNight.Field(5) >= Convert.ToDateTime(dtime.ToString("yyyy-MM-dd") + " 20:00:00.000") && + myRowNight.Field(6) <= Convert.ToDateTime(dtime.AddDays(1).ToString("yyyy-MM-dd") + " 07:59:59.999") + select myRowNight; + if (NightList.Count() > 0) + { + int Night_int = NightList.Sum(p => Convert.ToInt32(p.ItemArray[7])); + Night_totalList.Add(Math.Round((Night_int / (double)NightList.Count()) / 60, 2)); + } + else + { + Night_totalList.Add(0); + } + } + + List title_ = new List(); + title_.Add("班次/日期"); + title_.AddRange(titleList); + list.Add(title_); + + List total_ = new List(); + total_.Add("白班"); + foreach (var item in Day_totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + + List No_total_ = new List(); + No_total_.Add("夜班"); + foreach (var item in Night_totalList) + { + No_total_.Add(item.ToString()); + } + list.Add(No_total_); + + + + } + + + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + //每月平均换膜次数 + public string SearchMonth(string StartTime) + { + try + { + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List Day_totalList = new List(); + + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(5) >= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01") && + myRow.Field(6) <= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days) + select myRow; + + if (DayList.Count() > 0) + { + int Day_int = DayList.Sum(p => Convert.ToInt32(p.ItemArray[7])); + Day_totalList.Add(Math.Round((Day_int / (double)DayList.Count()) / 60, 2)); + } + else + { + Day_totalList.Add(0); + } + } + + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in Day_totalList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append("
月份" + item + "
平均换膜时间" + item + "
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + public List> SearchMonthForExcel(string StartTime) + { + try + { + List> list = new List>(); + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List Day_totalList = new List(); + + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(5) >= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01") && + myRow.Field(6) <= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days) + select myRow; + + if (DayList.Count() > 0) + { + int Day_int = DayList.Sum(p => Convert.ToInt32(p.ItemArray[7])); + Day_totalList.Add(Math.Round((Day_int / (double)DayList.Count()) / 60, 2)); + } + else + { + Day_totalList.Add(0); + } + } + + List title_ = new List(); + title_.Add("月份"); + title_.AddRange(titleList); + list.Add(title_); + + List total_ = new List(); + total_.Add("平均换膜时间"); + foreach (var item in Day_totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + } + + + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + //每月换膜次数 + public string SearchMonthTimes(string StartTime) + { + try + { + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List Day_totalList = new List(); + + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(5) >= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01") && + myRow.Field(6) <= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days) + select myRow; + + Day_totalList.Add(DayList.Count()); + } + + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in Day_totalList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append("
月份" + item + "
换模次数" + item + "
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + public List> SearchMonthTimesForExcel(string StartTime) + { + try + { + List> list = new List>(); + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List Day_totalList = new List(); + + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(5) >= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01") && + myRow.Field(6) <= Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days) + select myRow; + + Day_totalList.Add(DayList.Count()); + } + + + List title_ = new List(); + title_.Add("月份"); + title_.AddRange(titleList); + list.Add(title_); + + List total_ = new List(); + total_.Add("换模次数"); + foreach (var item in Day_totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + } + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + //换膜记录单 + public string SearchChangeRecord(string StartTime, string EndTime, string ModelId) + { + StringBuilder sb = new StringBuilder(100); + DataTable dt = dal.SearchChangeRecord(StartTime, EndTime, ModelId); + + + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + for (int i = 0; i < dt.Rows.Count; i++) + { + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + sb.Append(""); + } + + sb.Append("
机台号日期起始时间总计时间累计合模数生产合模数日期章换膜人
" + dt.Rows[i]["StationNo"] + "" + Convert.ToDateTime(dt.Rows[i]["PrintDate"]).ToString("yyyy-MM-dd") + "" + dt.Rows[i]["StartTime"] + "" + Math.Round((Convert.ToDouble(dt.Rows[i]["DownTime"]) / 60), 2) + "" + dt.Rows[i]["ModelSumCount"] + "" + dt.Rows[i]["ModelPrintCount"] + "" + Convert.ToDateTime(dt.Rows[i]["PrintDate"]).Month + "月" + dt.Rows[i]["remark1"] + "
"); + + + return sb.ToString(); + } + public List> SearchChangeRecordForExcel(string StartTime, string EndTime, string ModelId) + { + try + { + List> list = new List>(); + + DataTable dt = dal.SearchChangeRecord(StartTime, EndTime, ModelId); + + List titleList = new List(); + titleList.Add("机台号"); + titleList.Add("日期"); + titleList.Add("起始时间"); + titleList.Add("总计时间"); + titleList.Add("累计合模数"); + titleList.Add("生产合模数"); + titleList.Add("日期章"); + titleList.Add("换膜人"); + list.Add(titleList); + + for (int i = 0; i < dt.Rows.Count; i++) + { + List total_ = new List(); + total_.Add(dt.Rows[i]["StationNo"].ToString()); + total_.Add(Convert.ToDateTime(dt.Rows[i]["PrintDate"]).ToString("yyyy-MM-dd")); + total_.Add(dt.Rows[i]["StartTime"].ToString()); + total_.Add(Math.Round((Convert.ToDouble(dt.Rows[i]["DownTime"]) / 60), 2).ToString()); + total_.Add(dt.Rows[i]["ModelSumCount"].ToString()); + total_.Add(dt.Rows[i]["ModelPrintCount"].ToString()); + total_.Add(Convert.ToDateTime(dt.Rows[i]["PrintDate"]).Month + "月"); + total_.Add(dt.Rows[i]["remark1"].ToString()); + list.Add(total_); + } + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + //维修记录 + public string SearchRepairRecord(string StartTime, string EndTime) + { + try + { + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchRepaorByTime(StartTime, EndTime); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + if (dt != null && dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + } + } + sb.Append("
序号日期班次设备名称故障现象维修时间故障原因维修内容及更换配件维修人
" + (i + 1) + "" + Convert.ToDateTime(dt.Rows[i]["StartTime"]).ToString("yyyy-MM-dd") + "" + CheckWorkClass(dt.Rows[i]["StartTime"].ToString()) + "" + dt.Rows[i]["StationNo"] + "" + dt.Rows[i]["Des"] + "" + dt.Rows[i]["DownTime"] + "" + dt.Rows[i]["Remark2"] + "" + dt.Rows[i]["Remark3"] + "" + dt.Rows[i]["Remark1"] + "
"); + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public List> SearchRepairRecordForExcel(string StartTime, string EndTime) + { + try + { + List> list = new List>(); + + DataTable dt = dal.SearchRepaorByTime(StartTime, EndTime); + + + List titleList = new List(); + titleList.Add("序号"); + titleList.Add("日期"); + titleList.Add("班次"); + titleList.Add("设备名称"); + titleList.Add("故障现象"); + titleList.Add("维修时间"); + titleList.Add("故障原因"); + titleList.Add("维修内容及更换配件"); + titleList.Add("维修人"); + list.Add(titleList); + + for (int i = 0; i < dt.Rows.Count; i++) + { + List total_ = new List(); + total_.Add((i + 1).ToString()); + total_.Add(Convert.ToDateTime(dt.Rows[i]["StartTime"]).ToString("yyyy-MM-dd")); + total_.Add(CheckWorkClass(dt.Rows[i]["StartTime"].ToString())); + total_.Add(dt.Rows[i]["StationNo"].ToString()); + total_.Add(dt.Rows[i]["Des"].ToString()); + total_.Add(dt.Rows[i]["DownTime"].ToString()); + total_.Add(dt.Rows[i]["Remark2"].ToString()); + total_.Add(dt.Rows[i]["Remark3"].ToString()); + total_.Add(dt.Rows[i]["Remark1"].ToString()); + list.Add(total_); + } + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + private string CheckWorkClass(string StartTime) + { + + try + { + if (true) + { + string time = StartTime.Substring(0, StartTime.IndexOf(" ")); + if (DateTime.Compare(Convert.ToDateTime(StartTime), Convert.ToDateTime(time + " 08:00:00")) > 0 && DateTime.Compare(Convert.ToDateTime(time + " 19:59:59"), Convert.ToDateTime(StartTime)) > 0) + { + return "A"; + } + return "B"; + + } + + } + catch (Exception ex) + { + + } + + return ""; + } + + #endregion + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionRecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionRecordBLL.cs new file mode 100644 index 0000000..db05e56 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Injection/InjectionRecordBLL.cs @@ -0,0 +1,1979 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Injection; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Injection +{ + public class InjectionRecordBLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + BasicBLL db_w = new BasicBLL(); + InjectionRecordDAL dal = new InjectionRecordDAL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Injection_Record md) + { + try + { + var list = db.SearchInfoByKey("RecordDate", md.RecordDate);//判断是否有重复数据 + if (list != null && list.Count > 0) + { + if (list.Where(p => p.StationID.Equals(md.StationID) && p.workClass.Equals(md.workClass)).Count() > 0) + { + return false; + } + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Injection_Record md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[7]; + proNames[0] = "workClass"; + proNames[1] = "StationID"; + proNames[2] = "JK_Weight"; + proNames[3] = "Waste_Weight"; + proNames[4] = "RecordDate"; + proNames[5] = "StockNo"; + proNames[6] = "PartNo"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Injection_Record md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string StartTime, string EndTime, string StationID) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + DateTime stime = Convert.ToDateTime(StartTime); + DateTime etime = Convert.ToDateTime(EndTime); + + List list = ef.tb_Injection_Record.Where(p => p.RecordDate >= stime && p.RecordDate <= etime).ToList(); + + if (!String.IsNullOrEmpty(StationID)) + { + list = list.Where(p => p.StationID.Equals(StationID)).ToList(); + } + + List modelList = new List(); + if (list.Count > 0) + { + #region 联查 + BasicBLL machine_db = new BasicBLL(); + var machine_list = machine_db.SearchAllInfo(); + + foreach (var item in list) + { + Injection_RecordModel dm = Tool.Mapper(item); + + var machine_info = machine_list.FirstOrDefault(p => p.StationID == item.StationID); + if (machine_info != null) + { + dm.StationNo = machine_info.StationNo; + } + + modelList.Add(dm); + } + #endregion + + total = modelList.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + modelList = modelList.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + #region 废料信息录入 + public string SearchInfo(string page, string pagesize, string StartTime, string EndTime, string StationID) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + DateTime stime = Convert.ToDateTime(StartTime); + DateTime etime = Convert.ToDateTime(EndTime); + + DataTable dt = dal.SearchRecordByPage(Convert.ToInt32(page), Convert.ToInt32(pagesize), StartTime, EndTime, StationID); + + + IList list = Tool.ConvertTo(dt); + + if (list.Count > 0) + { + total = list.Count; + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list.ToList(); + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + + public bool UpdateWasteInfo(tb_Product_Injection_w md) + { + try + { + var info = ef.tb_Product_Injection_w.Where(p => p.ID.Equals(md.ID)).FirstOrDefault();//判断是否有重复数据 + if (info != null) + { + //初始化要更新的字段 + string[] proNames = new string[3]; + proNames[0] = "RealCycle"; + proNames[1] = "JK_Weight"; + proNames[2] = "Waste_Weight"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + db_w.UpdateInfo(md, proNames); + } + else + { + db_w.AddInfo(md); + } + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + #endregion + + + + /// + /// 查询全部信息 + /// + /// + public List SearchAll() + { + try + { + var s_list = db.SearchAllInfo().ToList(); + return s_list; + } + catch (Exception) + { + return null; + } + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Injection_Record SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + + #region 日合格趋势 + //表格 + public string SearchQualifiedDay(string StartTime) + { + try + { + + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01").ToString("yyyy-MM-dd"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString()).ToString("yyyy-MM-dd")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1) + "日"); + + string nowTime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)).ToString("yyyy-MM-dd"); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(3) == nowTime + select myRow; + + double total_OK = DayList.Sum(p => (int)p.ItemArray[7]); + double total_NO = DayList.Sum(p => (int)p.ItemArray[8]); + double total_all = total_OK + total_NO; + totalList.Add(total_OK); + No_totalList.Add(total_NO); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in No_totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + sb.Append("
" + item + "
总合格数量" + item + "
不良数量" + item + "
合格率" + item + "%
目标值99.6%
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + //柱状图 + public EcharBarModel SearchQualifiedDayBar(string StartTime) + { + try + { + + EcharBarModel md = new EcharBarModel(); + + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01").ToString("yyyy-MM-dd"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString()).ToString("yyyy-MM-dd")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + List T_L_List = new List(); + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1) + "日"); + + string nowTime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)).ToString("yyyy-MM-dd"); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(3) == nowTime + select myRow; + + double total_OK = DayList.Sum(p => (int)p.ItemArray[7]); + double total_NO = DayList.Sum(p => (int)p.ItemArray[8]); + double total_all = total_OK + total_NO; + totalList.Add(total_OK); + No_totalList.Add(total_NO); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + foreach (var item in OK_L_List) + { + T_L_List.Add(99.6); + } + md.categories = titleList; + md.QualifiedData = OK_L_List; + md.TargetData = T_L_List; + + } + + return md; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public List> SearchQualifiedDayForExcel(string StartTime) + { + try + { + List> list = new List>(); + + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01").ToString("yyyy-MM-dd"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString()).ToString("yyyy-MM-dd")); + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1) + "日"); + + string nowTime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)).ToString("yyyy-MM-dd"); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(3) == nowTime + select myRow; + + double total_OK = DayList.Sum(p => (int)p.ItemArray[7]); + double total_NO = DayList.Sum(p => (int)p.ItemArray[8]); + double total_all = total_OK + total_NO; + totalList.Add(total_OK); + No_totalList.Add(total_NO); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + List title_ = new List(); + + title_.Add(""); + title_.AddRange(titleList); + list.Add(title_); + + List total_ = new List(); + total_.Add("总合格数量"); + foreach (var item in totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + + + + List No_total_ = new List(); + No_total_.Add("不良数量"); + foreach (var item in No_totalList) + { + No_total_.Add(item.ToString()); + } + list.Add(No_total_); + + List OK_L_ = new List(); + OK_L_.Add("合格率"); + foreach (var item in OK_L_List) + { + OK_L_.Add(item.ToString() + "%"); + } + list.Add(OK_L_); + + List tag_L_ = new List(); + tag_L_.Add("目标值"); + foreach (var item in OK_L_List) + { + tag_L_.Add("99.6%"); + } + list.Add(tag_L_); + + } + + + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + #endregion + + #region 月合格趋势 + //表格 + public string SearchQualifiedMonth(string StartTime) + { + try + { + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + + string starTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd"); + string entTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd"); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd")) >= 0 && + myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd")) <= 0 + select myRow; + + double total_OK = DayList.Sum(p => (int)p.ItemArray[7]); + double total_NO = DayList.Sum(p => (int)p.ItemArray[8]); + double total_all = total_OK + total_NO; + totalList.Add(total_OK); + No_totalList.Add(total_NO); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in No_totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + sb.Append("
" + item + "
总合格数量" + item + "
不良数量" + item + "
合格率" + item + "%
目标值99.6%
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + //柱状图 + public EcharBarModel SearchQualifiedMonthBar(string StartTime) + { + try + { + + EcharBarModel md = new EcharBarModel(); + + DateTime sTime = Convert.ToDateTime(StartTime); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + List T_L_List = new List(); + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + + string starTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd"); + string entTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd"); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd")) >= 0 && + myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd")) <= 0 + select myRow; + + double total_OK = DayList.Sum(p => (int)p.ItemArray[7]); + double total_NO = DayList.Sum(p => (int)p.ItemArray[8]); + double total_all = total_OK + total_NO; + totalList.Add(total_OK); + No_totalList.Add(total_NO); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + } + + + + foreach (var item in OK_L_List) + { + T_L_List.Add(99.6); + } + md.categories = titleList; + md.QualifiedData = OK_L_List; + md.TargetData = T_L_List; + + } + + return md; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public List> SearchQualifiedMonthForExcel(string StartTime) + { + try + { + List> list = new List>(); + + DateTime sTime = Convert.ToDateTime(StartTime); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < 12; i++) + { + titleList.Add((i + 1) + "月"); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + + string starTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd"); + string entTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd"); + + var DayList = from myRow in dt.AsEnumerable() + where myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd")) >= 0 && + myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd")) <= 0 + select myRow; + + double total_OK = DayList.Sum(p => (int)p.ItemArray[7]); + double total_NO = DayList.Sum(p => (int)p.ItemArray[8]); + double total_all = total_OK + total_NO; + totalList.Add(total_OK); + No_totalList.Add(total_NO); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + } + + List title_ = new List(); + + title_.Add(""); + title_.AddRange(titleList); + list.Add(title_); + + List total_ = new List(); + total_.Add("总合格数量"); + foreach (var item in totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + + + + List No_total_ = new List(); + No_total_.Add("不良数量"); + foreach (var item in No_totalList) + { + No_total_.Add(item.ToString()); + } + list.Add(No_total_); + + List OK_L_ = new List(); + OK_L_.Add("合格率"); + foreach (var item in OK_L_List) + { + OK_L_.Add(item.ToString() + "%"); + } + list.Add(OK_L_); + + List tag_L_ = new List(); + tag_L_.Add("目标值"); + foreach (var item in OK_L_List) + { + tag_L_.Add("99.6%"); + } + list.Add(tag_L_); + } + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + #endregion + + #region 日原料利用率 + public string SearchMaterialAvailabilityDay(string StartTime) + { + try + { + + var p_info = ef.tb_Plastic.Where(p => p.Weight != null); + + + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01").ToString("yyyy-MM-dd"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString()).ToString("yyyy-MM-dd")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List All_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1) + "日"); + + string nowTime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)).ToString("yyyy-MM-dd"); + + var listAddress = (from myRow in dt.AsEnumerable() + where myRow.Field(3) == nowTime + group myRow by new { StockNo = myRow.ItemArray[5] } into g + //orderby new ComparerItem() { OrderIndex = b.Key., Id = b.Key.Id } descending + select new + { + StockNo = (string)g.Key.StockNo, + total_ok = g.Sum(c => (int)c.ItemArray[7]), + total_no = g.Sum(c => (int)c.ItemArray[8]) + }); + + double total_OK = 0; + double total_NO = 0; + foreach (var item in listAddress) + { + string stockNo = item.StockNo; + + var w_info = p_info.FirstOrDefault(p => p.StockNo.Equals(stockNo)); + if (w_info != null) + { + total_OK += (double)(w_info.Weight * item.total_ok); + total_NO += (double)(w_info.Weight * item.total_no); + } + } + totalList.Add(Math.Round(total_OK / 1000, 2)); + No_totalList.Add(Math.Round(total_NO / 1000, 2)); + + DateTime nsTime = Convert.ToDateTime(nowTime + " 00:00:00"); + DateTime neTime = Convert.ToDateTime(nowTime + " 23:59:59"); + var Waste_Num = ef.tb_Injection_Record.Where(p => p.RecordDate >= nsTime && p.RecordDate <= neTime).Sum(p => p.Waste_Weight); + double total_Waste = 0; + if (Waste_Num == null) + { + total_Waste = 0; + } + else + { + total_Waste = (double)Waste_Num; + } + + double total_all = total_OK + total_NO + total_Waste; + All_totalList.Add(Math.Round(total_all / 1000, 2)); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in All_totalList) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append("
" + item + "
目标值98%
合格件耗用原料" + item + "
总耗用原料" + item + "
原料利用率" + item + "%
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + //柱状图 + public EcharBarModel SearchMaterialAvailabilityDayBar(string StartTime) + { + try + { + EcharBarModel md = new EcharBarModel(); + + var p_info = ef.tb_Plastic.Where(p => p.Weight != null); + + + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01").ToString("yyyy-MM-dd"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString()).ToString("yyyy-MM-dd")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + List T_L_List = new List(); + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1) + "日"); + + string nowTime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)).ToString("yyyy-MM-dd"); + + var listAddress = (from myRow in dt.AsEnumerable() + where myRow.Field(3) == nowTime + group myRow by new { StockNo = myRow.ItemArray[5] } into g + //orderby new ComparerItem() { OrderIndex = b.Key., Id = b.Key.Id } descending + select new + { + StockNo = (string)g.Key.StockNo, + total_ok = g.Sum(c => (int)c.ItemArray[7]), + total_no = g.Sum(c => (int)c.ItemArray[8]) + }); + + double total_OK = 0; + double total_NO = 0; + foreach (var item in listAddress) + { + string stockNo = item.StockNo; + + var w_info = p_info.FirstOrDefault(p => p.StockNo.Equals(stockNo)); + if (w_info != null) + { + total_OK += (double)(w_info.Weight * item.total_ok); + total_NO += (double)(w_info.Weight * item.total_no); + } + } + totalList.Add(Math.Round(total_OK / 1000, 2)); + No_totalList.Add(Math.Round(total_NO / 1000, 2)); + + DateTime nsTime = Convert.ToDateTime(nowTime + " 00:00:00"); + DateTime neTime = Convert.ToDateTime(nowTime + " 23:59:59"); + var Waste_Num = ef.tb_Injection_Record.Where(p => p.RecordDate >= nsTime && p.RecordDate <= neTime).Sum(p => p.Waste_Weight); + double total_Waste = 0; + if (Waste_Num == null) + { + total_Waste = 0; + } + else + { + total_Waste = (double)Waste_Num; + } + double total_all = total_OK + total_NO + total_Waste; + + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + foreach (var item in OK_L_List) + { + T_L_List.Add(98); + } + md.categories = titleList; + md.QualifiedData = OK_L_List; + md.TargetData = T_L_List; + } + return md; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public List> SearchMaterialAvailabilityDayForExcel(string StartTime) + { + try + { + List> list = new List>(); + + + var p_info = ef.tb_Plastic.Where(p => p.Weight != null); + DateTime sTime = Convert.ToDateTime(StartTime); + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(sTime.Year, sTime.Month); + StringBuilder sb = new StringBuilder(100); + + DataTable dt = dal.SearchByTime(Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-01").ToString("yyyy-MM-dd"), Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + days.ToString()).ToString("yyyy-MM-dd")); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List All_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < days; i++) + { + titleList.Add((i + 1) + "日"); + + string nowTime = Convert.ToDateTime(sTime.Year + "-" + sTime.Month + "-" + (i + 1)).ToString("yyyy-MM-dd"); + + var listAddress = (from myRow in dt.AsEnumerable() + where myRow.Field(3) == nowTime + group myRow by new { StockNo = myRow.ItemArray[5] } into g + //orderby new ComparerItem() { OrderIndex = b.Key., Id = b.Key.Id } descending + select new + { + StockNo = (string)g.Key.StockNo, + total_ok = g.Sum(c => (int)c.ItemArray[7]), + total_no = g.Sum(c => (int)c.ItemArray[8]) + }); + + double total_OK = 0; + double total_NO = 0; + foreach (var item in listAddress) + { + string stockNo = item.StockNo; + + var w_info = p_info.FirstOrDefault(p => p.StockNo.Equals(stockNo)); + if (w_info != null) + { + total_OK += (double)(w_info.Weight * item.total_ok); + total_NO += (double)(w_info.Weight * item.total_no); + } + } + totalList.Add(Math.Round(total_OK / 1000, 2)); + No_totalList.Add(Math.Round(total_NO / 1000, 2)); + + DateTime nsTime = Convert.ToDateTime(nowTime + " 00:00:00"); + DateTime neTime = Convert.ToDateTime(nowTime + " 23:59:59"); + var Waste_Num = ef.tb_Injection_Record.Where(p => p.RecordDate >= nsTime && p.RecordDate <= neTime).Sum(p => p.Waste_Weight); + double total_Waste = 0; + if (Waste_Num == null) + { + total_Waste = 0; + } + else + { + total_Waste = (double)Waste_Num; + } + + double total_all = total_OK + total_NO + total_Waste; + All_totalList.Add(Math.Round(total_all / 1000, 2)); + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + List title_ = new List(); + + title_.Add(""); + title_.AddRange(titleList); + list.Add(title_); + + List tag_L_ = new List(); + tag_L_.Add("目标值"); + foreach (var item in OK_L_List) + { + tag_L_.Add("98%"); + } + list.Add(tag_L_); + + + List total_ = new List(); + total_.Add("合格件耗用原料"); + foreach (var item in totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + + + + List No_total_ = new List(); + No_total_.Add("总耗用原料"); + foreach (var item in All_totalList) + { + No_total_.Add(item.ToString()); + } + list.Add(No_total_); + + List OK_L_ = new List(); + OK_L_.Add("原料利用率"); + foreach (var item in OK_L_List) + { + OK_L_.Add(item.ToString() + "%"); + } + list.Add(OK_L_); + + } + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + #endregion + + #region 月原料利用率 + public string SearchMaterialAvailabilityMonth(string StartTime) + { + try + { + StringBuilder sb = new StringBuilder(100); + var p_info = ef.tb_Plastic.Where(p => p.Weight != null); + + DateTime sTime = Convert.ToDateTime(StartTime); + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List All_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < 12; i++) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + titleList.Add((i + 1) + "月"); + + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + + string starTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd"); + string entTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd"); + + var listAddress = (from myRow in dt.AsEnumerable() + where myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd")) >= 0 && + myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd")) <= 0 + group myRow by new { StockNo = myRow.ItemArray[5] } into g + select new + { + StockNo = (string)g.Key.StockNo, + total_ok = g.Sum(c => (int)c.ItemArray[7]), + total_no = g.Sum(c => (int)c.ItemArray[8]) + }); + + double total_OK = 0; + double total_NO = 0; + foreach (var item in listAddress) + { + string stockNo = item.StockNo; + + var w_info = p_info.FirstOrDefault(p => p.StockNo.Equals(stockNo)); + if (w_info != null) + { + total_OK += (double)(w_info.Weight * item.total_ok); + total_NO += (double)(w_info.Weight * item.total_no); + } + } + totalList.Add(Math.Round(total_OK / 1000, 2)); + No_totalList.Add(Math.Round(total_NO / 1000, 2)); + + DateTime nsTime = Convert.ToDateTime(starTime + " 00:00:00"); + DateTime neTime = Convert.ToDateTime(entTime + " 23:59:59"); + var Waste_Num = ef.tb_Injection_Record.Where(p => p.RecordDate >= nsTime && p.RecordDate <= neTime).Sum(p => p.Waste_Weight); + double total_Waste = 0; + if (Waste_Num == null) + { + total_Waste = 0; + } + else + { + total_Waste = (double)Waste_Num; + } + double total_all = total_OK + total_NO + total_Waste; + All_totalList.Add(Math.Round(total_all / 1000, 2)); + + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in titleList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in totalList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in All_totalList) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append(""); + sb.Append(""); + foreach (var item in OK_L_List) + { + sb.Append(""); + } + sb.Append(""); + + sb.Append("
" + item + "
目标值98%
合格件耗用原料" + item + "
总耗用原料" + item + "
原料利用率" + item + "%
"); + } + return sb.ToString(); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public EcharBarModel SearchMaterialAvailabilityMonthBar(string StartTime) + { + try + { + EcharBarModel md = new EcharBarModel(); + + + var p_info = ef.tb_Plastic.Where(p => p.Weight != null); + + DateTime sTime = Convert.ToDateTime(StartTime); + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List OK_L_List = new List(); + List T_L_List = new List(); + for (int i = 0; i < 12; i++) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + titleList.Add((i + 1) + "月"); + + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + + string starTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd"); + string entTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd"); + + var listAddress = (from myRow in dt.AsEnumerable() + where myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd")) >= 0 && + myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd")) <= 0 + group myRow by new { StockNo = myRow.ItemArray[5] } into g + select new + { + StockNo = (string)g.Key.StockNo, + total_ok = g.Sum(c => (int)c.ItemArray[7]), + total_no = g.Sum(c => (int)c.ItemArray[8]) + }); + + double total_OK = 0; + double total_NO = 0; + foreach (var item in listAddress) + { + string stockNo = item.StockNo; + + var w_info = p_info.FirstOrDefault(p => p.StockNo.Equals(stockNo)); + if (w_info != null) + { + total_OK += (double)(w_info.Weight * item.total_ok); + total_NO += (double)(w_info.Weight * item.total_no); + } + } + totalList.Add(Math.Round(total_OK / 1000, 2)); + No_totalList.Add(Math.Round(total_NO / 1000, 2)); + + DateTime nsTime = Convert.ToDateTime(starTime + " 00:00:00"); + DateTime neTime = Convert.ToDateTime(entTime + " 23:59:59"); + var Waste_Num = ef.tb_Injection_Record.Where(p => p.RecordDate >= nsTime && p.RecordDate <= neTime).Sum(p => p.Waste_Weight); + double total_Waste = 0; + if (Waste_Num == null) + { + total_Waste = 0; + } + else + { + total_Waste = (double)Waste_Num; + } + double total_all = total_OK + total_NO + total_Waste; + + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + foreach (var item in OK_L_List) + { + T_L_List.Add(98); + } + md.categories = titleList; + md.QualifiedData = OK_L_List; + md.TargetData = T_L_List; + + } + return md; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public List> SearchMaterialAvailabilityMonthForExcel(string StartTime) + { + try + { + List> list = new List>(); + + var p_info = ef.tb_Plastic.Where(p => p.Weight != null); + + DateTime sTime = Convert.ToDateTime(StartTime); + DataTable dt = dal.SearchByTime(sTime.Year + "-01-01", sTime.Year + "-12-31"); + + if (dt != null && dt.Rows.Count > 0) + { + + List titleList = new List(); + List totalList = new List(); + List No_totalList = new List(); + List All_totalList = new List(); + List OK_L_List = new List(); + for (int i = 0; i < 12; i++) + { + + DateTime startT = Convert.ToDateTime(sTime.Year + "-01-01"); + + titleList.Add((i + 1) + "月"); + + + int days = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(startT.Year, (i + 1)); + + + string starTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd"); + string entTime = Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd"); + + var listAddress = (from myRow in dt.AsEnumerable() + where myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-01").ToString("yyyy-MM-dd")) >= 0 && + myRow.Field(3).CompareTo(Convert.ToDateTime(sTime.Year + "-" + (i + 1) + "-" + days).ToString("yyyy-MM-dd")) <= 0 + group myRow by new { StockNo = myRow.ItemArray[5] } into g + select new + { + StockNo = (string)g.Key.StockNo, + total_ok = g.Sum(c => (int)c.ItemArray[7]), + total_no = g.Sum(c => (int)c.ItemArray[8]) + }); + + double total_OK = 0; + double total_NO = 0; + foreach (var item in listAddress) + { + string stockNo = item.StockNo; + + var w_info = p_info.FirstOrDefault(p => p.StockNo.Equals(stockNo)); + if (w_info != null) + { + total_OK += (double)(w_info.Weight * item.total_ok); + total_NO += (double)(w_info.Weight * item.total_no); + } + } + totalList.Add(Math.Round(total_OK / 1000, 2)); + No_totalList.Add(Math.Round(total_NO / 1000, 2)); + + DateTime nsTime = Convert.ToDateTime(starTime + " 00:00:00"); + DateTime neTime = Convert.ToDateTime(entTime + " 23:59:59"); + var Waste_Num = ef.tb_Injection_Record.Where(p => p.RecordDate >= nsTime && p.RecordDate <= neTime).Sum(p => p.Waste_Weight); + double total_Waste = 0; + if (Waste_Num == null) + { + total_Waste = 0; + } + else + { + total_Waste = (double)Waste_Num; + } + double total_all = total_OK + total_NO + total_Waste; + All_totalList.Add(Math.Round(total_all / 1000, 2)); + + if (total_all > 0) + { + OK_L_List.Add(Math.Round((total_OK / total_all) * 100, 2)); + } + else + { + OK_L_List.Add(0); + } + + } + + List title_ = new List(); + + title_.Add(""); + title_.AddRange(titleList); + list.Add(title_); + + List tag_L_ = new List(); + tag_L_.Add("目标值"); + foreach (var item in OK_L_List) + { + tag_L_.Add("98%"); + } + list.Add(tag_L_); + + + List total_ = new List(); + total_.Add("合格件耗用原料"); + foreach (var item in totalList) + { + total_.Add(item.ToString()); + } + list.Add(total_); + + + + List No_total_ = new List(); + No_total_.Add("总耗用原料"); + foreach (var item in All_totalList) + { + No_total_.Add(item.ToString()); + } + list.Add(No_total_); + + List OK_L_ = new List(); + OK_L_.Add("原料利用率"); + foreach (var item in OK_L_List) + { + OK_L_.Add(item.ToString() + "%"); + } + list.Add(OK_L_); + } + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + #endregion + + #region 注塑生产记录表 + public string SearchProductInjectionRecord(string StartTime, string EndTime) + { + var defectList = ef.tb_Defect.ToList(); + var defectInfo = defectList.Where(p => p.LineID.Equals(defectList.FirstOrDefault().LineID)).OrderBy(p => p.DefectName).Select(p => p.DefectName).ToList(); + + var DownReasonList = ef.tb_Inhection_DownReason.OrderBy(p => p.Reason).Select(p => p.Reason).ToList(); + + DataTable dt = dal.SearchProductInjectionRecord(Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd"), Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd")); + DataTable dt2 = dal.SearchProductInjectionRecordBadReason(Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd"), Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd")); + + List list = Tool.ConvertTo(dt2).ToList(); + + + DataTable dt3 = dal.SearchProductInjectionRecordDownReason(Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd"), Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd")); + + List list3 = Tool.ConvertTo(dt3).ToList(); + + + + StringBuilder sb = new StringBuilder(100); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + //sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in defectInfo) + { + sb.Append(""); + } + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (var item in DownReasonList) + { + sb.Append(""); + } + sb.Append(""); + try + { + if (dt != null && dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append("");//注塑机台 + sb.Append("");//开机时间 + sb.Append("");//关机时间 + sb.Append("");//产品性质 + sb.Append("");//产品名称 + sb.Append("");//原料名称 + //sb.Append("");//原料牌号 + sb.Append("");//原料批次号 + sb.Append("");//标准开机时间 + + decimal cycle_Time = dt.Rows[i]["CycleTime"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["CycleTime"]); + + sb.Append("");//标准周期 + + decimal real_Cycle = dt.Rows[i]["RealCycle"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["RealCycle"]); + decimal product_count = dt.Rows[i]["ProductCount"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["ProductCount"]); + decimal bad_count = dt.Rows[i]["BadCount"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["BadCount"]); + decimal weight = dt.Rows[i]["Weight"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["Weight"]); + decimal plan_count = dt.Rows[i]["PlanCount"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["PlanCount"]); + + + sb.Append("");//实际周期 + + sb.Append("");//计划数量 + sb.Append("");//合格数量 + sb.Append("");//总合格数量 + sb.Append("");//不良数量 + for (int k = 0; k < defectInfo.Count; k++) + { + sb.Append(""); + } + + + sb.Append("");//产品毛重(总合格数量+不良数量)*产品毛重 + sb.Append("");//废料块 + sb.Append("");//浇口重量 + + + + + + sb.Append("");//产品耗用原料 + if ((product_count + bad_count) == 0) + { + sb.Append("");//合格率(总合格数/(总合格数+不良数)) + } + else + { + sb.Append("");//合格率(总合格数/(总合格数+不良数)) + } + if (plan_count == 0) + { + sb.Append("");//完成率 + } + else + { + + sb.Append("");//完成率(总合格数/计划数) + } + + sb.Append("");//计划工时(计划数量*标准周期/60) + sb.Append("");//产出工时(计划数量*实际周期/60) + + var listR = list3.Where(p => p.DownTypeName != null && p.PlanID.Equals(dt.Rows[i]["PlanID"])).ToList(); + + long x = listR.Where(p => p.DownTypeName.Contains("计划停机")).Sum(p => p.DownTime); + long x1 = listR.Where(p => p.DownTypeName.Contains("换模时间")).Sum(p => p.DownTime); + + sb.Append("");//计划停机+换模时间 + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + for (int k = 0; k < DownReasonList.Count; k++) + { + sb.Append(""); + } + sb.Append(""); + } + } + } + catch (Exception ex) + { + throw; + } + + sb.Append("
日期班次注塑机台开机时间关机时间产品性质产品名称原料名称原料牌号原料批次号标准开机时间标准周期实际周期计划数量合格数量总合格数量不良数量不良原因产品毛重废料块浇口重量产品耗用原料合格率完成率计划工时产出工时停机时间换膜计划停机停机原因
" + item + "计划停机+换模时间非计划停机换膜交班接班" + item + "
" + dt.Rows[i]["ProductDate"] + "" + dt.Rows[i]["ClassName"].ToString() + "" + dt.Rows[i]["StationNo"] + "" + dt.Rows[i]["BeginTime"] + "" + dt.Rows[i]["EndTime"] + "正常" + dt.Rows[i]["ProductName"] + "" + dt.Rows[i]["MaterialName"] + "" + dt.Rows[i]["BatchNo"] + "" + dt.Rows[i]["OpenDebugTime"] + "" + cycle_Time + "" + real_Cycle + "" + dt.Rows[i]["PlanCount"] + "" + product_count + "" + (product_count + bad_count + list.Where(p => "开机报废;".Equals(p.BadReason)).Count()) + "" + dt.Rows[i]["BadCount"] + "" + list.Where(p => p.BadReason.Equals(defectInfo[k] + ";")).Count() + "" + dt.Rows[i]["Weight"] + "" + dt.Rows[i]["Waste_Weight"] + "" + dt.Rows[i]["JK_Weight"] + "" + (product_count + bad_count) * weight + "0%" + Math.Round((product_count / (product_count + bad_count)) * 100, 2) + "%0%" + Math.Round((product_count / plan_count) * 100, 2) + "%" + Math.Round((plan_count * cycle_Time) / 60, 2) + "" + Math.Round((plan_count * real_Cycle) / 60, 2) + "" + (x + x1) + "" + listR.Where(p => p.DownTypeName.Contains("非计划停机")).Sum(p => p.DownTime) + "" + listR.Where(p => p.DownTypeName.Contains("换模")).Sum(p => p.DownTime) + "" + listR.Where(p => p.DownTypeName.Contains("交班")).Sum(p => p.DownTime) + "" + listR.Where(p => p.DownTypeName.Contains("接班")).Sum(p => p.DownTime) + "" + listR.Where(p => p.DownTypeName.Contains("计划停机")).Sum(p => p.DownTime) + "" + list3.Where(p => p.Reason != null && p.PlanID.Equals(dt.Rows[i]["PlanID"]) && p.Reason.Contains(DownReasonList[k])).Sum(p => p.DownTime) + "
"); + + return sb.ToString(); + } + + private string CheckWorkClass(string StartTime) + { + + try + { + if (true) + { + string time = StartTime.Substring(0, StartTime.IndexOf(" ")); + if (DateTime.Compare(Convert.ToDateTime(StartTime), Convert.ToDateTime(time + " 08:00:00")) > 0 && DateTime.Compare(Convert.ToDateTime(time + " 19:59:59"), Convert.ToDateTime(StartTime)) > 0) + { + return "A"; + } + return "B"; + + } + + } + catch (Exception ex) + { + + } + + return ""; + } + + public List> SearchProductInjectionRecordForExcel(string StartTime, string EndTime) + { + List> listExcel = new List>(); + + var defectList = ef.tb_Defect.ToList(); + var defectInfo = defectList.Where(p => p.LineID.Equals(defectList.FirstOrDefault().LineID)).OrderBy(p => p.DefectName).Select(p => p.DefectName).ToList(); + + var DownReasonList = ef.tb_Inhection_DownReason.OrderBy(p => p.Reason).Select(p => p.Reason).ToList(); + + DataTable dt = dal.SearchProductInjectionRecord(Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd"), Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd")); + DataTable dt2 = dal.SearchProductInjectionRecordBadReason(Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd"), Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd")); + + List list = Tool.ConvertTo(dt2).ToList(); + + + DataTable dt3 = dal.SearchProductInjectionRecordDownReason(Convert.ToDateTime(StartTime).ToString("yyyy-MM-dd"), Convert.ToDateTime(EndTime).ToString("yyyy-MM-dd")); + + List list3 = Tool.ConvertTo(dt3).ToList(); + + + List titleList = new List(); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + + foreach (var item in defectInfo) + { + titleList.Add("不良原因"); + } + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + titleList.Add(""); + + titleList.Add("停机时间"); + titleList.Add("停机时间"); + + titleList.Add("换膜"); + titleList.Add("换膜"); + titleList.Add("换膜"); + + titleList.Add(""); + foreach (var item in DownReasonList) + { + titleList.Add("停机原因"); + } + + + listExcel.Add(titleList); + + List titleList2 = new List(); + titleList2.Add("日期"); + titleList2.Add("班次"); + titleList2.Add("注塑机台"); + titleList2.Add("开机时间"); + titleList2.Add("关机时间"); + titleList2.Add("产品性质"); + titleList2.Add("产品名称"); + titleList2.Add("原料名称"); + titleList2.Add("原料批次号"); + titleList2.Add("标准开机时间"); + titleList2.Add("标准周期"); + titleList2.Add("实际周期"); + titleList2.Add("计划数量"); + titleList2.Add("合格数量"); + titleList2.Add("总合格数量"); + titleList2.Add("不良数量"); + foreach (var item in defectInfo) + { + titleList2.Add(item); + } + titleList2.Add("产品毛重"); + titleList2.Add("废料块"); + titleList2.Add("浇口重量"); + titleList2.Add("产品耗用原料"); + titleList2.Add("合格率"); + titleList2.Add("完成率"); + titleList2.Add("计划工时"); + titleList2.Add("产出工时"); + + titleList2.Add("计划停机+换模时间"); + titleList2.Add("非计划停机"); + titleList2.Add("换膜"); + titleList2.Add("交班"); + titleList2.Add("接班"); + titleList2.Add("计划停机"); + foreach (var item in DownReasonList) + { + titleList2.Add(item); + } + listExcel.Add(titleList2); + + + if (dt != null && dt.Rows.Count > 0) + { + + for (int i = 0; i < dt.Rows.Count; i++) + { + List conList = new List(); + conList.Add(dt.Rows[i]["ProductDate"].ToString()); + conList.Add(dt.Rows[i]["ClassName"].ToString()); + conList.Add(dt.Rows[i]["StationNo"].ToString()); + conList.Add(dt.Rows[i]["BeginTime"].ToString()); + conList.Add(dt.Rows[i]["EndTime"].ToString()); + conList.Add("正常"); + conList.Add(dt.Rows[i]["ProductName"].ToString()); + conList.Add(dt.Rows[i]["MaterialName"].ToString()); + conList.Add(dt.Rows[i]["BatchNo"].ToString()); + conList.Add(dt.Rows[i]["OpenDebugTime"].ToString()); + + decimal cycle_Time = dt.Rows[i]["CycleTime"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["CycleTime"]); + + conList.Add(cycle_Time.ToString()); + + decimal real_Cycle = dt.Rows[i]["RealCycle"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["RealCycle"]); + + decimal product_count = dt.Rows[i]["ProductCount"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["ProductCount"]); + decimal bad_count = dt.Rows[i]["BadCount"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["BadCount"]); + decimal weight = dt.Rows[i]["Weight"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["Weight"]); + decimal plan_count = dt.Rows[i]["PlanCount"] == DBNull.Value ? 0 : Convert.ToDecimal(dt.Rows[i]["PlanCount"]); + decimal openFailCount = 0; + conList.Add(real_Cycle.ToString()); + conList.Add(dt.Rows[i]["PlanCount"].ToString()); + conList.Add(product_count.ToString()); + conList.Add((product_count + bad_count + defectInfo.Where(p => "开机报废".Equals(p)).Count()).ToString()); + conList.Add(dt.Rows[i]["BadCount"].ToString()); + + for (int k = 0; k < defectInfo.Count; k++) + { + conList.Add(list.Where(p => p.BadReason.Equals(defectInfo[k] + ";")).Count().ToString()); + } + conList.Add(dt.Rows[i]["Weight"].ToString()); + conList.Add(dt.Rows[i]["Waste_Weight"].ToString()); + conList.Add(dt.Rows[i]["JK_Weight"].ToString()); + + + + + + conList.Add(((product_count + bad_count) * weight).ToString()); + + if ((product_count + bad_count) == 0) + { + + conList.Add("0%"); + } + else + { + conList.Add((Math.Round((product_count / (product_count + bad_count)) * 100, 2)).ToString()); + + } + if (plan_count == 0) + { + conList.Add("0%"); + } + else + { + conList.Add((Math.Round((product_count / plan_count) * 100, 2)).ToString()); + } + conList.Add((Math.Round((plan_count * cycle_Time) / 60, 2)).ToString()); + conList.Add((Math.Round((plan_count * real_Cycle) / 60, 2)).ToString()); + + + var listR = list3.Where(p => p.DownTypeName != null && p.PlanID.Equals(dt.Rows[i]["PlanID"])).ToList(); + + long x = listR.Where(p => p.DownTypeName.Contains("计划停机")).Sum(p => p.DownTime); + long x1 = listR.Where(p => p.DownTypeName.Contains("换模时间")).Sum(p => p.DownTime); + + conList.Add((x + x1).ToString()); + conList.Add((listR.Where(p => p.DownTypeName.Contains("非计划停机")).Sum(p => p.DownTime)).ToString()); + conList.Add((listR.Where(p => p.DownTypeName.Contains("换模")).Sum(p => p.DownTime)).ToString()); + conList.Add((listR.Where(p => p.DownTypeName.Contains("交班")).Sum(p => p.DownTime)).ToString()); + conList.Add((listR.Where(p => p.DownTypeName.Contains("接班")).Sum(p => p.DownTime)).ToString()); + conList.Add((listR.Where(p => p.DownTypeName.Contains("计划停机")).Sum(p => p.DownTime)).ToString()); + + for (int k = 0; k < DownReasonList.Count; k++) + { + conList.Add((list3.Where(p => p.Reason != null && p.PlanID.Equals(dt.Rows[i]["PlanID"]) && p.Reason.Contains(DownReasonList[k])).Sum(p => p.DownTime)).ToString()); + } + listExcel.Add(conList); + } + + } + + + + return listExcel; + } + #endregion + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionBLL.cs new file mode 100644 index 0000000..673f0cd --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionBLL.cs @@ -0,0 +1,596 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Inspection +{ + public class CommonlyInspectionBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string versionID, string checkDate) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = null; + list = db.SearchInfoByKey("IsUseing", 1).Where(p => p.VersionID.Equals(versionID)).ToList(); + if (list.Count > 0) + { + BasicBLL CheckItem_db = new BasicBLL(); + var CheckItemList = CheckItem_db.SearchAllInfo().ToList(); + + List CommonlyInspectionList = new List(); + foreach (var item in list) + { + CommonlyInspectionModel dm = Tool.Mapper(item); + dm.InspectionContent = CheckItemList.FirstOrDefault(p => p.ID == item.InspectionContentID).CheckContent; + CommonlyInspectionList.Add(dm); + } + + jsonStr = JSONTools.ScriptSerialize>(CommonlyInspectionList); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// + public bool AddInfo(string CommonlyInspection, string CheckUserID, string ConfirmUserID, string UserID, string CheckDate, string CheckType, string ErrMes) + { + try + { + BasicBLL Recorddb = new BasicBLL(); + DateTime dtime = DateTime.Now; + DateTime checktime = Convert.ToDateTime(CheckDate); + string[] arr = CommonlyInspection.Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < arr.Length - 1; i++) + { + int index = arr[i].IndexOf(":"); + tb_CommonlyInspectionRecord md = new tb_CommonlyInspectionRecord(); + md.ID = Guid.NewGuid().ToString(); + md.CommonlyInspectionID = arr[i].Substring(0, index); + md.CheckResult = arr[i].Substring(index + 1, arr[i].Length - index - 1); + md.CheckUser = CheckUserID; + md.ConfirmUser = CheckUserID; + md.CreateUserID = UserID; + md.CheckDate = checktime; + md.CheckType = CheckType; + md.ErrMes = ErrMes; + md.ConfirmUserDate = dtime; + md.CreateTime = dtime; + md.IsUseing = 1; + Recorddb.AddInfo(md); + } + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + public bool UpdateInfo(string CommonlyInspection, string CheckUserID, string ConfirmUserID, string UserID, string CheckDate, string CheckType, string ErrMes) + { + try + { + string[] proNames = new string[9]; + proNames[0] = "CheckResult"; + proNames[1] = "CheckUser"; + proNames[2] = "CheckDate"; + proNames[3] = "ConfirmUser"; + proNames[4] = "ConfirmUserDate"; + proNames[5] = "UpdateUserID"; + proNames[6] = "UpdateTime"; + proNames[7] = "CheckType"; + proNames[8] = "ErrMes"; + + BasicBLL Recorddb = new BasicBLL(); + DateTime dtime = DateTime.Now; + DateTime checktime = Convert.ToDateTime(CheckDate); + string[] arr = CommonlyInspection.Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < arr.Length - 3; i++) + { + int index = arr[i].IndexOf(":"); + tb_CommonlyInspectionRecord md = new tb_CommonlyInspectionRecord(); + md.ID = arr[i].Substring(0, index); + md.CheckResult = arr[i].Substring(index + 1, arr[i].Length - index - 1); + md.CheckUser = CheckUserID; + md.CheckDate = checktime; + md.CheckType = CheckType; + md.ErrMes = ErrMes; + md.ConfirmUser = ConfirmUserID; + md.ConfirmUserDate = dtime; + md.UpdateUserID = UserID; + md.UpdateTime = dtime; + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + md.CreateUserID = ""; + md.CommonlyInspectionID = ""; + Recorddb.UpdateInfo(md, proNames); + } + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + public string GetDate(string VersionID, string CheckDate, string CheckType) + { + try + { + string str = ""; + string CheckUserID = ""; + string ConfirmUserID = ""; + string ErrMes = ""; + BasicBLL db = new BasicBLL(); + string jsonStr = "[]"; + List list = null; + + list = db.SearchInfoByKey("IsUseing", 1).Where(p => p.VersionID.Equals(VersionID)).ToList(); + if (list.Count > 0) + { + BasicBLL CheckItem_db = new BasicBLL(); + var CheckItemList = CheckItem_db.SearchAllInfo().ToList(); + + string[] arr_id = list.Select(s => s.ID).ToArray(); + BasicBLL CommonlyInspectionRecord_db = new BasicBLL(); + var _info = CommonlyInspectionRecord_db.SearchInfoByKey("CheckDate", Convert.ToDateTime(CheckDate)).Where(p => arr_id.Contains(p.CommonlyInspectionID) && p.CheckType.Equals(CheckType)).ToList(); + if (_info.Count > 0) + { + #region 修改 + List CommonlyInspectionList = new List(); + foreach (var item in list) + { + CommonlyInspectionModel dm = Tool.Mapper(item); + dm.InspectionContent = CheckItemList.FirstOrDefault(p => p.ID.Equals(item.InspectionContentID)).CheckContent; + CommonlyInspectionList.Add(dm); + } + str = ""; + str += ""; + str += ""; + str += ""; + str += ""; + + for (int j = 0; j < CommonlyInspectionList.Count; j++) + { + str += ""; + str += ""; + + var R_info = _info.FirstOrDefault(p => p.CommonlyInspectionID == CommonlyInspectionList[j].ID); + CheckUserID = R_info.CheckUser; + ConfirmUserID = R_info.ConfirmUser; + ErrMes = R_info.ErrMes; + switch (R_info.CheckResult) + { + case "0": + str += ""; + break; + case "1": + str += ""; + break; + case "2": + str += ""; + break; + case "3": + str += ""; + break; + case "4": + str += ""; + break; + } + str += ""; + } + str += ""; + str += ""; + str += ""; + str += ""; + str += "
点检内容检查结果
" + CommonlyInspectionList[j].InspectionContent + "
异常情况描述
"; + str += ""; + str += ""; + str += ""; + + #endregion + } + else + { + #region 新增 + List CommonlyInspectionList = new List(); + foreach (var item in list) + { + CommonlyInspectionModel dm = Tool.Mapper(item); + dm.InspectionContent = CheckItemList.FirstOrDefault(p => p.ID.Equals(item.InspectionContentID)).CheckContent; + CommonlyInspectionList.Add(dm); + } + str = ""; + str += ""; + str += ""; + str += ""; + str += ""; + for (int j = 0; j < CommonlyInspectionList.Count; j++) + { + str += ""; + str += ""; + str += ""; + + + str += ""; + } + str += ""; + str += ""; + str += ""; + str += ""; + str += "
点检内容检查结果
" + CommonlyInspectionList[j].InspectionContent + "" + + "
异常情况描述
"; + str += ""; + #endregion + } + } + return str; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + } + public string GetReportDate(string VersionID, string CheckDate) + { + try + { + string str = ""; + + List ErrMesList = new List(); + + + BasicBLL dbUser = new BasicBLL(); + BasicBLL db = new BasicBLL(); + string jsonStr = "[]"; + List list = null; + list = db.SearchInfoByKey("IsUseing", 1).Where(p => p.VersionID.Equals(VersionID)).ToList(); + + if (list.Count > 0) + { + BasicBLL CheckItem_db = new BasicBLL(); + var CheckItemList = CheckItem_db.SearchAllInfo().ToList(); + + string[] arr_id = list.Select(s => s.ID).ToArray(); + BasicBLL CommonlyInspectionRecord_db = new BasicBLL(); + + DateTime StartTime = Convert.ToDateTime(CheckDate + "-01 00:00:00"); + DateTime EndTime = StartTime.AddMonths(1); + + int daynum = GetDays(Convert.ToInt32(CheckDate.Substring(0, 4)), Convert.ToInt32(CheckDate.Substring(5, 2))); + + + var _info = CommonlyInspectionRecord_db.SearchInfoByKey("IsUseing", 1).Where(p => p.CheckDate >= StartTime && p.CheckDate < EndTime && arr_id.Contains(p.CommonlyInspectionID)).ToList(); + var userList = dbUser.SearchAllInfo().ToList(); + if (_info.Count > 0) + { + #region 有记录 + List CommonlyInspectionList = new List(); + foreach (var item in list) + { + CommonlyInspectionModel dm = Tool.Mapper(item); + var IC_info = CheckItemList.FirstOrDefault(p => p.ID.Equals(item.InspectionContentID)); + if (IC_info != null) + { + dm.InspectionContent = IC_info.CheckContent; + CommonlyInspectionList.Add(dm); + } + + } + str = ""; + str += ""; + str += ""; + str += ""; + for (int i = 1; i <= daynum; i++) + { + str += ""; + } + + str += ""; + var info = CommonlyInspectionList.ToList(); + for (int j = 0; j < info.Count; j++) + { + + str += ""; + str += ""; + str += ""; + var R_info = _info.Where(p => p.CommonlyInspectionID == info[j].ID); + + for (int k = 1; k <= daynum; k++) + { + + DateTime dtime = StartTime.AddDays(k - 1); + var info_R = R_info.FirstOrDefault(p => p.CheckDate == dtime && p.CheckType.Equals("0")); + string CheckResult = ""; + if (info_R != null) + { + if (!String.IsNullOrEmpty(info_R.ErrMes) && !ErrMesList.Contains(dtime.ToString("yyyy-MM-dd") + ":" + info_R.ErrMes)) + { + ErrMesList.Add(dtime.ToString("yyyy-MM-dd") + ":" + info_R.ErrMes); + } + + //select + switch (info_R.CheckResult) + { + case "0": + CheckResult = "▲"; + break; + case "1": + CheckResult = "√"; + break; + case "2": + CheckResult = "◎"; + break; + case "3": + CheckResult = "X"; + break; + case "4": + CheckResult = "☆"; + break; + } + } + str += ""; + } + + str += ""; + + + str += ""; + for (int k = 1; k <= daynum; k++) + { + DateTime dtime = StartTime.AddDays(k - 1); + var info_R = R_info.FirstOrDefault(p => p.CheckDate == dtime && p.CheckType.Equals("1")); + string CheckResult = ""; + if (info_R != null) + { + //是否有异常记录并且没有加入到列表中 + if (!String.IsNullOrEmpty(info_R.ErrMes) && !ErrMesList.Contains(dtime.ToString("yyyy-MM-dd") + ":" + info_R.ErrMes)) + { + ErrMesList.Add(dtime.ToString("yyyy-MM-dd") + ":" + info_R.ErrMes); + } + + switch (info_R.CheckResult) + { + case "0": + CheckResult = "▲"; + break; + case "1": + CheckResult = "√"; + break; + case "2": + CheckResult = "◎"; + break; + case "3": + CheckResult = "X"; + break; + case "4": + CheckResult = "☆"; + break; + } + } + str += ""; + } + + str += ""; + + } + + str += ""; + str += ""; + str += ""; + for (int i = 1; i <= daynum; i++) + { + DateTime dtime = StartTime.AddDays(i - 1); + var infoUser = _info.FirstOrDefault(p => p.CheckDate == dtime); + if (infoUser != null) + { + str += ""; + } + else + { + str += ""; + } + } + str += ""; + + str += ""; + //str += ""; + str += ""; + for (int i = 1; i <= daynum; i++) + { + DateTime dtime = StartTime.AddDays(i - 1); + var infoUser = _info.FirstOrDefault(p => p.CheckDate == dtime); + if (infoUser != null) + { + str += ""; + } + else + { + str += ""; + } + } + str += ""; + + str += ""; + //str += ""; + str += ""; + for (int i = 1; i <= daynum; i++) + { + DateTime dtime = StartTime.AddDays(i - 1); + var infoUser = _info.FirstOrDefault(p => p.CheckDate == dtime); + if (infoUser != null) + { + str += ""; + } + else + { + str += ""; + } + } + str += ""; + + str += ""; + //str += ""; + str += ""; + for (int i = 1; i <= daynum; i++) + { + DateTime dtime = StartTime.AddDays(i - 1); + var infoUser = _info.FirstOrDefault(p => p.CheckDate == dtime); + if (infoUser != null) + { + str += ""; + } + else + { + str += ""; + } + } + str += ""; + str += "
序号点检内容" + i + "
" + (j + 1).ToString() + "" + info[j].InspectionContent + "" + CheckResult + "
" + CheckResult + "
日点检确认点检人(白 班)确认签名" + userList.FirstOrDefault(p => p.UserID.ToString().ToUpper().Equals(infoUser.CheckUser.ToUpper())).RealName + "
日点检确认点检人(夜 班)确认签名" + userList.FirstOrDefault(p => p.UserID.ToString().ToUpper().Equals(infoUser.CheckUser.ToUpper())).RealName + "
日点检确认点检人(白班班长)确认签名" + userList.FirstOrDefault(p => p.UserID.ToString().ToUpper().Equals(infoUser.ConfirmUser.ToUpper())).RealName + "
日点检确认点检人(夜班班长)确认签名" + userList.FirstOrDefault(p => p.UserID.ToString().ToUpper().Equals(infoUser.ConfirmUser.ToUpper())).RealName + "
"; + + if (ErrMesList.Count > 0) + { + #region 异常情况描述 + str += ""; + str += ""; + str += ""; + str += ""; + str += ""; + str += ""; + for (int i = 1; i < ErrMesList.Count; i++) + { + str += ""; + str += ""; + str += ""; + } + str += "
异常情况描述" + ErrMesList[0] + "
" + ErrMesList[i] + "
"; + #endregion + } + + + + #endregion + } + else + { + #region 无记录 + List CommonlyInspectionList = new List(); + foreach (var item in list) + { + CommonlyInspectionModel dm = Tool.Mapper(item); + var IC_info = CheckItemList.FirstOrDefault(p => p.ID.Equals(item.InspectionContentID)); + if (IC_info != null) + { + dm.InspectionContent = IC_info.CheckContent; + CommonlyInspectionList.Add(dm); + } + } + str = ""; + str += ""; + str += ""; + str += ""; + for (int i = 1; i <= daynum; i++) + { + str += ""; + } + + str += ""; + var info = CommonlyInspectionList.ToList(); + for (int j = 0; j < info.Count; j++) + { + str += ""; + str += ""; + str += ""; + for (int k = 1; k <= daynum; k++) + { + str += ""; + } + str += ""; + str += ""; + for (int k = 1; k <= daynum; k++) + { + str += ""; + } + str += ""; + } + + #endregion + + } + } + return str; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + } + public static int GetDays(int year, int month) + { + int days = 0; + if (month != 2) + { + switch (month) + { + case 1: + case 3: + case 5: + case 7: + case 8: + case 10: + case 12: + days = 31; + break; + case 4: + case 6: + case 9: + case 11: + days = 30; break; + } + } + else + { + // 闰年 + if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) + days = 29; + else + days = 28; + } + return days; + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionVersionBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionVersionBLL.cs new file mode 100644 index 0000000..b1bac7c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Inspection/CommonlyInspectionVersionBLL.cs @@ -0,0 +1,208 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Inspection +{ + public class CommonlyInspectionVersionBLL + { + BasicBLL db = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize,string deviceID) + { + try + { + + BasicBLL station_db = new BasicBLL(); + BasicBLL device_db = new BasicBLL(); + + var station_list = station_db.SearchAllInfo().ToList(); + var device_list = device_db.SearchAllInfo().ToList(); + + + string jsonStr = "[]"; + int total = 0;//总行数 + List list = null; + + list = db.SearchAllInfo().ToList(); + + + if (deviceID != "") + { + list = list.Where(p => p.DeviceID.Equals(deviceID)).ToList(); + } + + List CommonlyInspectionVersionList = new List(); + if (list.Count > 0) + { + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + total = list.Count; + + #region 联查 + + + foreach (var item in list) + { + CommonlyInspectionVersionModel dm = Tool.Mapper(item); + var info = device_list.FirstOrDefault(p => p.DeviceID.Equals(item.DeviceID)); + if (info != null) + { + dm.DeviceID = info.DeviceID; + dm.DeviceName = info.DeviceNo + "----" + info.DeviceName; + } + if (item.IsUseing == 1) + { + dm.IsUseingName = "启用"; + } + CommonlyInspectionVersionList.Add(dm); + } + #endregion + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = CommonlyInspectionVersionList; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + /// + /// 添加信息 + /// + /// 模型对象 + /// + public bool AddInfo(tb_CommonlyInspectionVersion md, string s) + { + try + { + var list = db.SearchInfoByKey("DeviceID", md.DeviceID).Where(p => p.Version == md.Version).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + if (db.AddInfo(md)) + { + BasicBLL CommonlyInspection_db = new BasicBLL(); + string[] arry = s.Split(','); + for (int i = 0; i < arry.Length; i++) + { + tb_CommonlyInspection m = new tb_CommonlyInspection(); + m.ID = Guid.NewGuid().ToString(); + m.VersionID = md.ID; + m.InspectionContentID = arry[i]; + m.CreateUserID = md.CreateUserID; + m.CreateTime = md.CreateTime; + m.IsUseing = 1; + CommonlyInspection_db.AddInfo(m); + } + return true; + } + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// 模型对象 + /// + public bool UpdateInfo(tb_CommonlyInspectionVersion md) + { + try + { + //var list = db.SearchInfoByKey("ProductionLineID", md.ProductionLineID).Where(p => p.DeviceNo == md.DeviceNo).ToList();//判断是否有重复数据 + //if (list.Count > 0) + //{ + // return false; + //} + ////初始化要更新的字段 + //string[] proNames = new string[6]; + //proNames[0] = "ProductionLineID"; + //proNames[1] = "DeviceNo"; + //proNames[2] = "DeviceName"; + //proNames[3] = "Description"; + //proNames[4] = "UpdateUserID"; + //proNames[5] = "UpdateTime"; + + ////必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + ////如果没有初始化必填字段,更新会报错 + //md.CreateUserID = ""; + + //return db.UpdateInfo(md, proNames); + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + /// 删除生产线信息 + public bool DelInfo(tb_CommonlyInspectionVersion md) + { + try + { + ////初始化要更新的字段 + //string[] proNames = new string[3]; + //proNames[0] = "IsUseing"; + //proNames[1] = "DisableTime"; + //proNames[2] = "DisableUserID"; + + ////必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + ////如果没有初始化必填字段,更新会报错 + //md.ProductionLineID = 0; + //md.DeviceNo = ""; + //md.DeviceName = ""; + //md.CreateUserID = ""; + //return db.UpdateInfo(md, proNames); + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + public string GetComboboxData(string deviceID) + { + try + { + string jsonStr = "[]"; + var list = db.SearchInfoByKey("IsUseing", 1).ToList();//判断是否有重复数据 + if (deviceID != null && deviceID != "") + { + list = list.Where(p => p.DeviceID.Equals(deviceID)).ToList(); + } + jsonStr = JSONTools.ScriptSerialize>(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/AssemblyBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/AssemblyBLL.cs new file mode 100644 index 0000000..e355be3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/AssemblyBLL.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Mistake247; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Mistake247 +{ + public class AssemblyBLL + { + public bool AddInfo(AssemblyModel md) + { + AssemblyDAL da = new AssemblyDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(AssemblyModel md) + { + AssemblyDAL da = new AssemblyDAL(); + try + { + return da.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchCount( string PartNo) + { + AssemblyDAL da = new AssemblyDAL(); + try + { + return da.SearchCount(PartNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdatePrintFlag(AssemblyModel md) + { + AssemblyDAL da = new AssemblyDAL(); + try + { + return da.UpdatePrintFlag(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdatePrintFlag1(string partno) + { + AssemblyDAL da = new AssemblyDAL(); + try + { + return da.UpdatePrintFlag1(partno); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable searchPartNo(string partno) + { + AssemblyDAL da = new AssemblyDAL(); + try + { + return da.searchPartNo(partno); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/BoxBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/BoxBLL.cs new file mode 100644 index 0000000..d4e22ab --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/BoxBLL.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Mistake247; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Mistake247 +{ + public class BoxBLL + { + public bool AddInfo(BoxModel md) + { + BoxDAL da = new BoxDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchByNo(string PartNo, string BatchNo) + { + BoxDAL da = new BoxDAL(); + try + { + return da.SearchByNo(PartNo, BatchNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateInfo(BoxModel md) + { + BoxDAL da = new BoxDAL(); + try + { + return da.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable searchBox(string partno) + { + BoxDAL da = new BoxDAL(); + try + { + return da.SearchBox(partno); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBoxIsExsit(string box) + { + BoxDAL da = new BoxDAL(); + try + { + return da.SearchBoxIsExsit(box); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/MistakeBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/MistakeBLL.cs new file mode 100644 index 0000000..d19c805 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/MistakeBLL.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Mistake247; +using MESClassLibrary.DAL.painting; + +namespace MESClassLibrary.BLL.Mistake247 +{ + public class MistakeBLL + { + public DataTable IsMath(string DeviceNo, string PartNo) + { + MistakeDAL da = new MistakeDAL(); + try + { + return da.IsMath(DeviceNo, PartNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByNo(string PartNo,string deviceNo) + { + MistakeDAL da = new MistakeDAL(); + try + { + return da.SearchByNo(PartNo, deviceNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchPartName(string PartNo) + { + MistakeDAL da = new MistakeDAL(); + try + { + return da.SearchPartName(PartNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchPartNoByDecice(string deviceNo) + { + MistakeDAL da = new MistakeDAL(); + try + { + return da.SearchPartNoByDecice(deviceNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/Plan247BLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/Plan247BLL.cs new file mode 100644 index 0000000..4c0a12b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/Plan247BLL.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL; +using MESClassLibrary.DAL.Mistake247; + +namespace MESClassLibrary.BLL.Mistake247 +{ + public class Plan247BLL + { + public DataTable SearhByOrderNo(string OrderNo) + { + Plan247DAL da = new Plan247DAL(); + try + { + return da.SearhByOrderNo(OrderNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable DetailOrderNo(string OrderNo) + { + Plan247DAL da = new Plan247DAL(); + try + { + return da.DetailOrderNo(OrderNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable IsHavePlan(string partNo1, string orderNo) + { + Plan247DAL da = new Plan247DAL(); + try + { + return da.IsHavePlan(partNo1, orderNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public DataTable SearhCountByOrderNo(string OrderNo, string partNo) + { + Plan247DAL da = new Plan247DAL(); + try + { + return da.SearhCountByOrderNo(OrderNo, partNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateCount(string partNo, string orderNo) + { + Plan247DAL da = new Plan247DAL(); + try + { + return da.UpdateCount(partNo, orderNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchPlanIDByOrderNo(string partNo, string orderNo) + { + Plan247DAL da = new Plan247DAL(); + try + { + return da.SearchPlanIDByOrderNo(partNo, orderNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/RecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/RecordBLL.cs new file mode 100644 index 0000000..12160f7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Mistake247/RecordBLL.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.Mistake247; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Mistake247 +{ + public class RecordBLL + { + public DataTable SearchByPartNo1(string PartNo) + { + RecordDAL da = new RecordDAL(); + try + { + return da.SearchByPartNo1(PartNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchCountByBox(string boxNo) + { + RecordDAL da = new RecordDAL(); + try + { + return da.SearchCountByBox(boxNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(RecordModel md) + { + RecordDAL da = new RecordDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool updateBoxInfo(RecordModel md) + { + RecordDAL da = new RecordDAL(); + try + { + return da.updateBoxInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchState(int type1,int type2,int type3) + { + RecordDAL da = new RecordDAL(); + try + { + return da.SearchState(type1,type2,type3); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool DelInfo(RecordModel md) + { + RecordDAL da = new RecordDAL(); + try + { + return da.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchBoxByPart(string part) + { + RecordDAL da = new RecordDAL(); + try + { + return da.SearchBoxByPart(part); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByPartNo2(string partno) + { + RecordDAL da = new RecordDAL(); + try + { + return da.SearchByPartNo2(partno); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable GetCount(string part,string batch) + { + RecordDAL da = new RecordDAL(); + try + { + return da.GetCount(part,batch); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public DataTable GetRecord(string boxNo) + { + RecordDAL da = new RecordDAL(); + try + { + return da.GetRecord(boxNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable GetOrderNum(string orderno) + { + RecordDAL da = new RecordDAL(); + try + { + return da.GetOrderNum(orderno); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/InspectResultBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/InspectResultBLL.cs new file mode 100644 index 0000000..6876050 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/InspectResultBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.painting; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Painting +{ + public class InspectResultBLL + { + public bool AddInfo(InspectResultModel md) + { + InspectResultDAL da = new InspectResultDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/PaintBarCodeBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/PaintBarCodeBLL.cs new file mode 100644 index 0000000..d2e9518 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/PaintBarCodeBLL.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.painting; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.Painting +{ + public class PaintBarCodeBLL + { + public DataTable SearchAll(string banci,string productdate) + { + PaintBarCodeDAL da=new PaintBarCodeDAL(); + try + { + return da.SearchInfoAll(banci, productdate); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCode(string banci, string productdate, string ProductID) + { + PaintBarCodeDAL da = new PaintBarCodeDAL(); + try + { + return da.SearchBarCode(banci, productdate, ProductID); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(PaintBarCodeModel md) + { + PaintBarCodeDAL da = new PaintBarCodeDAL(); + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdatePrintTime(PaintBarCodeModel md) + { + PaintBarCodeDAL da = new PaintBarCodeDAL(); + try + { + return da.UpdatePrintTime(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/StockInBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/StockInBLL.cs new file mode 100644 index 0000000..efb13e0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Painting/StockInBLL.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.BasicInfo; +using MESClassLibrary.DAL.painting; + +namespace MESClassLibrary.BLL.Painting +{ + public class StockInBLL + { + public DataTable SearchInfoA() + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchInfoA(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoB() + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchInfoB(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoBByA() + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchInfoBByA(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAByB() + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchInfoAByB(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchDetailA() + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchDetailA(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchDetailB() + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchDetailB(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchColor(string barCode) + { + StockInDAL da = new StockInDAL(); + try + { + return da.SearchColor(barCode); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Plan247/Plan247BLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Plan247/Plan247BLL.cs new file mode 100644 index 0000000..ed46b0c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Plan247/Plan247BLL.cs @@ -0,0 +1,399 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.BLL.Plan247 +{ + public class Plan247BLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Plan_247 md) + { + try + { + var list = ef.tb_Plan_247.Where(p => p.OrderNo == md.OrderNo).ToList(); + if (list != null && list.Count > 0) + { + return false; + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public bool UpdateAddInfo(tb_Plan_247 md) + { + try + { + var list = ef.tb_Plan_247.Where(p => p.OrderNo==md.OrderNo && p.PartNo == md.PartNo).ToList(); + if (list != null && list.Count > 0) + { + return false; + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + + + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Plan_247 md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[1]; + proNames[0] = "OrderCount"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Plan_247 md) + { + try + { + if (ef.tb_Plan_247.Where(p => p.ID == md.ID && p.CompleteCount > 0).Count() > 0) + { + return false; + } + return db.DelInfo(md); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string StartTime, string EndTime, string OrderNo) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + DateTime stime = Convert.ToDateTime(StartTime + " 00:00:00"); + DateTime etime = Convert.ToDateTime(EndTime + " 23:59:59"); + + List list = ef.tb_Plan_247.Where(p => p.CreateTime >= stime && p.CreateTime <= etime).OrderBy(p => p.CreateTime).ToList(); + + if (!String.IsNullOrEmpty(OrderNo)) + { + list = list.Where(p => p.OrderNo.Contains(OrderNo)).OrderBy(p => p.CreateTime).ToList(); + } + + + if (list.Count > 0) + { + + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + List modelList = new List(); + + #region 联查 + + var listModel = ef.tb_Mistake_247.ToList(); + + foreach (var item in list) + { + tb_Plan_247Model dm = Tool.Mapper(item); + + var machine_info = listModel.FirstOrDefault(p => p.PartNo2 == item.PartNo); + if (machine_info != null) + { + dm.PartName = machine_info.PartName2; + } + + modelList.Add(dm); + } + #endregion + + + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public string SearchOrderNo(string StartTime) + { + try + { + + string jsonStr = ""; + string orderNo = Convert.ToDateTime(StartTime).ToString("yyyyMMdd"); + var info = ef.tb_Plan_247.Where(p => p.OrderNo.Contains(orderNo)).OrderByDescending(p => p.OrderNo).FirstOrDefault(); + + if (info != null) + { + return (Convert.ToInt64(info.OrderNo) + 1).ToString(); + } + else + { + return orderNo + "0001"; + } + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = ef.tb_Mistake_247.ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + + public string GetMistake(string id) + { + try + { + string jsonStr = "[]"; + var list = ef.tb_Mistake_247.Where(p => p.ID.Equals(id)).FirstOrDefault();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return null; + } + } + + public string QueryForComboboxOrderNo(string StartTime) + { + try + { + string jsonStr = "[]"; + List list = new List(); + string orderNo = Convert.ToDateTime(StartTime).ToString("yyyyMMdd"); + var info = ef.tb_Plan_247.Where(p => p.OrderNo.Contains(orderNo)).GroupBy(p => p.OrderNo).Select(p => p.Key).ToList();//判断是否有重复数据 + foreach (var item in info) + { + SelectModel md = new SelectModel(); + md.textField = item; + md.valueField = item; + list.Add(md); + } + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + + public string QueryForItem(string OrderNo) + { + try + { + var info = ef.tb_Plan_247.Where(p => p.OrderNo.Equals(OrderNo)).OrderByDescending(p => p.Item).FirstOrDefault();//判断是否有重复数据 + return (info.Item + 1).ToString(); + } + catch (Exception) + { + return ""; + } + } + + //校验是否生成计划单号日期部分+零件号有相同的计划 + public bool QueryByOrderNo(string OrderNo, string PartNo) + { + try + { + var info = ef.tb_Plan_247.Where(p => p.OrderNo.Contains(OrderNo) && p.PartNo.Equals(PartNo)); + if (info.Count() > 0) + { + return true; + } + return false; + } + catch (Exception) + { + return false; + } + } + + //校验是否同一个生成计划单号下有相同序号的计划 + public bool QueryByOrderNoAndItem(string OrderNo, int Item) + { + try + { + var info = ef.tb_Plan_247.Where(p => p.OrderNo.Equals(OrderNo) && p.Item == Item); + if (info.Count() > 0) + { + return true; + } + return false; + } + catch (Exception) + { + return false; + } + } + + + public List> SearchForExcel(string StartTime, string EndTime, string OrderNo) + { + try + { + List> list = new List>(); + + DateTime stime = Convert.ToDateTime(StartTime + " 00:00:00"); + DateTime etime = Convert.ToDateTime(EndTime + " 23:59:59"); + + + List titleList = new List(); + titleList.Add("生产计划单号"); + titleList.Add("序号"); + titleList.Add("零件号"); + titleList.Add("零件名称"); + titleList.Add("数量"); + titleList.Add("领用数量"); + titleList.Add("完成数量"); + titleList.Add("返修数量"); + titleList.Add("成品报废"); + titleList.Add("半成品报废"); + titleList.Add("备注"); + titleList.Add("创建时间"); + list.Add(titleList); + + List Plan_247_list = ef.tb_Plan_247.Where(p => p.CreateTime >= stime && p.CreateTime <= etime).OrderBy(p => p.CreateTime).ToList(); + + if (!String.IsNullOrEmpty(OrderNo)) + { + Plan_247_list = Plan_247_list.Where(p => p.OrderNo.Contains(OrderNo)).OrderBy(p => p.CreateTime).ToList(); + } + + if (Plan_247_list.Count > 0) + { + List modelList = new List(); + var listModel = ef.tb_Mistake_247.ToList(); + + foreach (var item in Plan_247_list) + { + tb_Plan_247Model dm = Tool.Mapper(item); + + var machine_info = listModel.FirstOrDefault(p => p.PartNo2 == item.PartNo); + if (machine_info != null) + { + dm.PartName = machine_info.PartName2; + } + + modelList.Add(dm); + } + + for (int i = 0; i < modelList.Count; i++) + { + List rowList = new List(); + rowList.Add(modelList[i].OrderNo); + rowList.Add(modelList[i].Item == null ? "" : modelList[i].Item.ToString()); + rowList.Add(modelList[i].PartNo); + rowList.Add(modelList[i].PartName == null ? "" : modelList[i].PartName.ToString()); + rowList.Add(modelList[i].OrderCount == null ? "" : modelList[i].OrderCount.ToString()); + rowList.Add(modelList[i].LyCount == null ? "" : modelList[i].LyCount.ToString()); + rowList.Add(modelList[i].CompleteCount == null ? "" : modelList[i].CompleteCount.ToString()); + rowList.Add(modelList[i].RepairCount == null ? "" : modelList[i].RepairCount.ToString()); + rowList.Add(modelList[i].ScrapCount1 == null ? "" : modelList[i].ScrapCount1.ToString()); + rowList.Add(modelList[i].ScrapCount2 == null ? "" : modelList[i].ScrapCount2.ToString()); + rowList.Add(modelList[i].Des); + rowList.Add(modelList[i].CreateTime == null ? "" : modelList[i].CreateTime.ToString()); + list.Add(rowList); + } + } + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PlanPunchBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PlanPunchBLL.cs new file mode 100644 index 0000000..366f7b5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PlanPunchBLL.cs @@ -0,0 +1,451 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PlanPunchBLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string StartTime, string EndTime, string OrderNo) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + DateTime stime = Convert.ToDateTime(StartTime + " 00:00:00"); + DateTime etime = Convert.ToDateTime(EndTime + " 23:59:59"); + + List list = ef.tb_Plan_Punch.Where(p => p.CreateTime >= stime && p.CreateTime <= etime).OrderBy(p => p.CreateTime).ToList(); + + if (!String.IsNullOrEmpty(OrderNo)) + { + list = list.Where(p => p.OrderNo.Contains(OrderNo)).OrderBy(p => p.CreateTime).ToList(); + } + + + if (list.Count > 0) + { + + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + List modelList = new List(); + + #region 联查 + + var listModel = ef.tb_Product.ToList(); + + foreach (var item in list) + { + tb_Plan_PunchModel dm = Tool.Mapper(item); + + var machine_info = listModel.FirstOrDefault(p => p.PartNo == item.PartNo); + if (machine_info != null) + { + dm.PartName = machine_info.ProductName; + } + + modelList.Add(dm); + } + #endregion + + + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = modelList; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Plan_Punch md) + { + try + { + var list = ef.tb_Plan_Punch.Where(p => p.OrderNo == md.OrderNo && p.Item==md.Item && p.PartNo==md.PartNo).ToList(); + if (list != null && list.Count > 0) + { + return false; + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public bool UpdateAddInfo(tb_Plan_Punch md) + { + try + { + var list = ef.tb_Plan_Punch.Where(p => p.OrderNo == md.OrderNo && p.PartNo == md.PartNo).ToList(); + if (list != null && list.Count > 0) + { + return false; + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Plan_Punch md) + { + try + { + + //初始化要更新的字段 + string[] proNames = new string[1]; + proNames[0] = "OrderCount"; + + string sql = "select * from tb_Plan_Punch where OrderNo='" + md.OrderNo + "' and PartNo='"+ md.PartNo+"'"; + SqlDataReader dr = SqlHelper.ExecuteReader(SqlHelper.GetConnSting(), CommandType.Text, sql); + if (dr.Read()) + { + if (md.OrderCount < Convert.ToInt32(dr["CompleteCount"])) + { + return false; + } + else + { + return db.UpdateInfo(md, proNames); + } + } + else + { + return false; + } + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public string SearchOrderNo(string StartTime, string Banci) + { + try + { + + string jsonStr = ""; + string orderNo = Convert.ToDateTime(StartTime).ToString("yyyyMMdd"); + + var info = ef.tb_Plan_Punch.Where(p => p.OrderNo.Contains(Banci.Substring(0, 1) + orderNo)).OrderByDescending(p => p.OrderNo).FirstOrDefault(); + + if (info != null) + { + return info.OrderNo.Substring(0, info.OrderNo.Length - 4) + (Convert.ToInt32(info.OrderNo.Substring(info.OrderNo.Length - 1, 1)) + 1).ToString() + .PadLeft(4, '0'); + //if (Banci.Contains("A")) + //{ + // return "A" + (Convert.ToInt64(info.OrderNo.Substring(1, info.OrderNo.Length-1)) + 1).ToString(); + //} + //else + //{ + // return "B" + (Convert.ToInt64(info.OrderNo.Substring(1, info.OrderNo.Length - 1)) + 1).ToString(); + //} + } + else + { + if (Banci.Contains("A")) + { + return "A" + orderNo + "0001"; + } + else + { + return "B" + orderNo + "0001"; + } + } + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + } + + public string GetComboboxData() + { + try + { + string jsonStr = "[]"; + var list = ef.tb_Product.Where(p => p.ProductTypeID == "3a8545ee-5979-4780-a5ca-6c5e75685ae2" || p.ProductTypeID == "69ec20f1-dab5-4caf-b81e-1c65b38b9e34").ToList();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + + public string GetMistake(string id) + { + try + { + string jsonStr = "[]"; + var list = ef.tb_Product.Where(p => p.PartNo.Equals(id)).FirstOrDefault();//判断是否有重复数据 + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return null; + } + } + + public string QueryForComboboxOrderNo(string StartTime) + { + try + { + string jsonStr = "[]"; + List list = new List(); + string orderNo = Convert.ToDateTime(StartTime).ToString("yyyyMMdd"); + var info = ef.tb_Plan_Punch.Where(p => p.OrderNo.Contains(orderNo)).GroupBy(p => p.OrderNo).Select(p => p.Key).ToList();//判断是否有重复数据 + foreach (var item in info) + { + SelectModel md = new SelectModel(); + md.textField = item; + md.valueField = item; + list.Add(md); + } + jsonStr = JSONTools.ScriptSerialize(list); + return jsonStr; + } + catch (Exception) + { + return ""; + } + } + + public string QueryForItem(string OrderNo) + { + try + { + var info = ef.tb_Plan_Punch.Where(p => p.OrderNo.Equals(OrderNo)).OrderByDescending(p => p.Item).FirstOrDefault();//判断是否有重复数据 + return (info.Item + 1).ToString(); + } + catch (Exception) + { + return ""; + } + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Plan_Punch md) + { + try + { + if (ef.tb_Plan_Punch.Where(p => p.ID == md.ID && p.CompleteCount > 0).Count() > 0) + { + return false; + } + return db.DelInfo(md); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public List> SearchForExcel(string StartTime, string EndTime, string OrderNo) + { + try + { + List> list = new List>(); + + DateTime stime = Convert.ToDateTime(StartTime + " 00:00:00"); + DateTime etime = Convert.ToDateTime(EndTime + " 23:59:59"); + + + List titleList = new List(); + titleList.Add("生产计划单号"); + titleList.Add("序号"); + titleList.Add("零件号"); + titleList.Add("零件名称"); + titleList.Add("数量"); + titleList.Add("领用数量"); + titleList.Add("完成数量"); + titleList.Add("不良数量"); + titleList.Add("备注"); + titleList.Add("创建时间"); + list.Add(titleList); + + List Plan_list = ef.tb_Plan_Punch.Where(p => p.CreateTime >= stime && p.CreateTime <= etime).OrderBy(p => p.CreateTime).ToList(); + + if (!String.IsNullOrEmpty(OrderNo)) + { + Plan_list = Plan_list.Where(p => p.OrderNo.Contains(OrderNo)).OrderBy(p => p.CreateTime).ToList(); + } + + if (Plan_list.Count > 0) + { + List modelList = new List(); + var listModel = ef.tb_Product.ToList(); + + foreach (var item in Plan_list) + { + tb_Plan_PunchModel dm = Tool.Mapper(item); + + var machine_info = listModel.FirstOrDefault(p => p.PartNo == item.PartNo); + if (machine_info != null) + { + dm.PartName = machine_info.ProductName; + } + + modelList.Add(dm); + } + + for (int i = 0; i < modelList.Count; i++) + { + List rowList = new List(); + rowList.Add(modelList[i].OrderNo); + rowList.Add(modelList[i].Item == null ? "" : modelList[i].Item.ToString()); + rowList.Add(modelList[i].PartNo); + rowList.Add(modelList[i].PartName == null ? "" : modelList[i].PartName.ToString()); + rowList.Add(modelList[i].OrderCount == null ? "" : modelList[i].OrderCount.ToString()); + rowList.Add(modelList[i].LyCount == null ? "" : modelList[i].LyCount.ToString()); + rowList.Add(modelList[i].CompleteCount == null ? "" : modelList[i].CompleteCount.ToString()); + rowList.Add(modelList[i].BadCount == null ? "" : modelList[i].BadCount.ToString()); + rowList.Add(modelList[i].Des); + rowList.Add(modelList[i].CreateTime == null ? "" : modelList[i].CreateTime.ToString()); + list.Add(rowList); + } + } + + return list; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + + //校验是否生成计划单号日期部分+零件号有相同的计划 + public bool QueryByOrderNo(string OrderNo, string PartNo) + { + try + { + var info = ef.tb_Plan_Punch.Where(p => p.OrderNo.Contains(OrderNo) && p.PartNo.Equals(PartNo)); + if (info.Count() > 0) + { + return true; + } + return false; + } + catch (Exception) + { + return false; + } + } + + //校验是否同一个生成计划单号下有相同序号的计划 + public bool QueryByOrderNoAndItem(string OrderNo, int Item) + { + try + { + var info = ef.tb_Plan_Punch.Where(p => p.OrderNo.Equals(OrderNo) && p.Item == Item); + if (info.Count() > 0) + { + return true; + } + return false; + } + catch (Exception) + { + return false; + } + } + + public string GetOrderNo(string banci,string date) + { + try + { + //string order = banci + DateTime.Now.ToString("yyyyMMdd"); + string order = banci + date; + var info = ef.tb_Plan_Punch.Where(p => p.OrderNo.Contains(order)).OrderBy(p => p.CreateTime) + .FirstOrDefault(); + if (info != null) + { + return order + (Convert.ToInt32(info.OrderNo.Substring(info.OrderNo.Length - 4, 4)) + 1).ToString() + .PadLeft(4, '0'); + } + else + { + return order + "0001"; + } + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return banci + date +"0001"; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAdressBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAdressBLL.cs new file mode 100644 index 0000000..7f2000f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAdressBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.PunchAndWeld; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchAdressBLL + { + PunchAdressDAL da=new PunchAdressDAL(); + + public DataTable SearchInfo(string deviceNo,int i) + { + try + { + return da.SearchInfo(deviceNo,i); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAndStationBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAndStationBLL.cs new file mode 100644 index 0000000..357ad19 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchAndStationBLL.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL; +using MESClassLibrary.DAL.PunchAndWeld; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchAndStationBLL + { + BasicBLL db = new BasicBLL(); + + public bool AddInfo(tb_PunchAndStation md) + { + try + { + BBMPTEntities ef = new BBMPTEntities(); + List list1 = ef.tb_PunchAndStation.Where(p => + p.StationID == md.StationID && p.ProductID1 == md.ProductID1 && p.ProductID2 == md.ProductID2) + .ToList(); + + if (list1 != null) + { + if (list1.Count() > 0) + { + return false; + } + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public string SearchInfoAll(string page, string pagesize, string partNo1) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + List list = new List(); + + string sql = @"SELECT dbo.tb_PunchAndStation.ID, dbo.tb_Station.StationNo, tb_Product_1.PartNo AS PartNo1, + tb_Product_1.ProductName AS ProductName1, tb_Product_2.PartNo AS PartNo2, + tb_Product_2.ProductName AS ProductName2, tb_Product_3.PartNo AS PartNo3, + tb_Product_3.ProductName AS ProductName3, tb_Product_4.PartNo AS PartNo4, + tb_Product_4.ProductName AS ProductName4, dbo.tb_Product.PartNo AS PartNo5, + dbo.tb_Product.ProductName AS ProductName5 + FROM dbo.tb_Product AS tb_Product_3 RIGHT OUTER JOIN + dbo.tb_PunchAndStation LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PunchAndStation.ProductID5 = dbo.tb_Product.ProductID LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_4 ON dbo.tb_PunchAndStation.ProductID4 = tb_Product_4.ProductID ON + tb_Product_3.ProductID = dbo.tb_PunchAndStation.ProductID3 LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_2 ON dbo.tb_PunchAndStation.ProductID2 = tb_Product_2.ProductID LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_PunchAndStation.StationID = dbo.tb_Station.StationID LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_1 ON dbo.tb_PunchAndStation.ProductID1 = tb_Product_1.ProductID where 1=1"; + + if (!string.IsNullOrWhiteSpace(partNo1)) + { + sql += " And tb_Product_1.PartNo like '%" + partNo1 + "%' "; + } + + DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql).Tables[0]; + if (dt != null && dt.Rows.Count > 0) + { + list = Tool.ConvertTo(dt).ToList(); + } + + if (list.Count > 0) + { + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + jsonStr = JSONTools.ScriptSerialize>(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public bool UpdateInfo(tb_PunchAndStation md) + { + try + { + List list = new List(); + + string sql = @"SELECT dbo.tb_PunchAndStation.ID, dbo.tb_Station.StationNo, tb_Product_1.PartNo AS PartNo1, + tb_Product_1.ProductName AS ProductName1, tb_Product_2.PartNo AS PartNo2, + tb_Product_2.ProductName AS ProductName2, tb_Product_3.PartNo AS PartNo3, + tb_Product_3.ProductName AS ProductName3, tb_Product_4.PartNo AS PartNo4, + tb_Product_4.ProductName AS ProductName4, dbo.tb_Product.PartNo AS PartNo5, + dbo.tb_Product.ProductName AS ProductName5,dbo.tb_PunchAndStation.ProductID1, + dbo.tb_PunchAndStation.ProductID2,dbo.tb_PunchAndStation.ProductID3, + dbo.tb_PunchAndStation.ProductID4,dbo.tb_PunchAndStation.ProductID5 + FROM dbo.tb_Product AS tb_Product_3 RIGHT OUTER JOIN + dbo.tb_PunchAndStation LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PunchAndStation.ProductID5 = dbo.tb_Product.ProductID LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_4 ON dbo.tb_PunchAndStation.ProductID4 = tb_Product_4.ProductID ON + tb_Product_3.ProductID = dbo.tb_PunchAndStation.ProductID3 LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_2 ON dbo.tb_PunchAndStation.ProductID2 = tb_Product_2.ProductID LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_PunchAndStation.StationID = dbo.tb_Station.StationID LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_1 ON dbo.tb_PunchAndStation.ProductID1 = tb_Product_1.ProductID where 1=1 and + ProductID1='"+md.ProductID1+"' and ProductID2='"+md.ProductID2+"' and ProductID3='"+md.ProductID3+"' and ProductID4='"+md.ProductID4 +"' and ProductID5='"+md.ProductID5+"' and ID <> '"+ md.ID+"' "; + + DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql).Tables[0]; + if (dt != null && dt.Rows.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[6]; + proNames[0] = "StationID"; + proNames[1] = "ProductID1"; + proNames[2] = "ProductID2"; + proNames[3] = "ProductID3"; + proNames[4] = "ProductID4"; + proNames[5] = "ProductID5"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public bool DeleteInfo(tb_PunchAndStation md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public DataTable IsMath(string partNo1, string partNo2) + { + try + { + PunchAndStationDAL da=new PunchAndStationDAL(); + return da.IsMath(partNo1, partNo2); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchDeviceBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchDeviceBLL.cs new file mode 100644 index 0000000..bd3efa8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchDeviceBLL.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.PunchAndWeld; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchDeviceBLL + { + PunchDeviceDAL da=new PunchDeviceDAL(); + + public DataTable SearchInfo() + { + try + { + return da.SearchInfo(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchDeviceNo(string deviceName) + { + try + { + return da.SearchDeviceNo(deviceName); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPartBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPartBLL.cs new file mode 100644 index 0000000..a1312a4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPartBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.PunchAndWeld; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchPartBLL + { + PunchPartDAL da=new PunchPartDAL(); + + public DataTable SearchPunchPart(string deviceNo) + { + try + { + return da.SearchPunchPart(deviceNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPlanBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPlanBLL.cs new file mode 100644 index 0000000..8a12c68 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchPlanBLL.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchPlanBLL + { + PunchPlanDAL da=new PunchPlanDAL(); + + public DataTable SearchPlan(string deviceNo) + { + try + { + return da.SearchPlan(deviceNo); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchAllPlan() + { + try + { + return da.SearchAllPlan(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(PunchPlanModel md) + { + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(PunchPlanModel md) + { + try + { + return da.UpdateInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool DelInfo(PunchPlanModel md) + { + try + { + return da.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateDty(PunchPlanModel md) + { + try + { + return da.UpdateDty(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchRecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchRecordBLL.cs new file mode 100644 index 0000000..9d029ff --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchRecordBLL.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.PunchAndWeld; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchRecordBLL + { + PunchRecordDAL da=new PunchRecordDAL(); + + public bool AddInfo(PunchRecordModel md) + { + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchInfo(string barCode) + { + try + { + return da.SearchInfo(barCode); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchValueRecordBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchValueRecordBLL.cs new file mode 100644 index 0000000..43260d6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/PunchAndWeld/PunchValueRecordBLL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.PunchAndWeld; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchValueRecordBLL + { + PunchValueRecordDAL da = new PunchValueRecordDAL(); + + public bool AddInfo(PunchValueRecordModel md) + { + try + { + return da.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Record247/Record247BLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Record247/Record247BLL.cs new file mode 100644 index 0000000..f866a15 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Record247/Record247BLL.cs @@ -0,0 +1,81 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.BLL.Record247 +{ + public class Record247BLL + { + BBMPTEntities ef = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize, string StartTime, string EndTime, string BoxNo, string PartNo2, string PartNo1, string OrderNo) + { + try + { + + string jsonStr = "[]"; + int total = 0;//总行数 + + DateTime stime = Convert.ToDateTime(StartTime + " 00:00:00"); + DateTime etime = Convert.ToDateTime(EndTime + " 23:59:59"); + + List list = ef.tb_Record_247.Where(p => p.CreateTime1 >= stime && p.CreateTime1 <= etime && p.Flag == 1).ToList(); + + if (!String.IsNullOrEmpty(BoxNo)) + { + list = list.Where(p => p.BoxNo != null && p.BoxNo.Contains(BoxNo)).ToList(); + } + + if (!String.IsNullOrEmpty(PartNo2)) + { + list = list.Where(p => p.PartNo2 != null && p.PartNo2.Contains(PartNo2)).ToList(); + } + + if (!String.IsNullOrEmpty(PartNo1)) + { + list = list.Where(p => p.PartNo1 != null && p.PartNo1.Contains(PartNo1)).ToList(); + } + + if (!String.IsNullOrEmpty(OrderNo)) + { + list = list.Where(p => p.OrderNo != null && p.OrderNo.Contains(OrderNo)).ToList(); + } + + + if (list.Count > 0) + { + + total = list.Count; + + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.OrderBy(p => p.CreateTime1).Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenBLL.cs new file mode 100644 index 0000000..6736c2a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenBLL.cs @@ -0,0 +1,190 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Report +{ + public class FiveScreenBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Report_FiveScreen md) + { + try + { + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Report_FiveScreen md) + { + try + { + //初始化要更新的字段 + string[] proNames = new string[45]; + proNames[0] = "Name"; + proNames[1] = "LastYear"; + proNames[2] = "Jan"; + proNames[3] = "Feb"; + proNames[4] = "Mar"; + proNames[5] = "Apr"; + proNames[6] = "May"; + proNames[7] = "Jun"; + proNames[8] = "Jul"; + proNames[9] = "Aug"; + proNames[10] = "Sept"; + proNames[11] = "Oct"; + proNames[12] = "Nov"; + proNames[13] = "Dec"; + proNames[14] = "day1"; + proNames[15] = "day2"; + proNames[16] = "day3"; + proNames[17] = "day4"; + proNames[18] = "day5"; + proNames[19] = "day6"; + proNames[20] = "day7"; + proNames[21] = "day8"; + proNames[22] = "day9"; + proNames[23] = "day10"; + proNames[24] = "day11"; + proNames[25] = "day12"; + proNames[26] = "day13"; + proNames[27] = "day14"; + proNames[28] = "day15"; + proNames[29] = "day16"; + proNames[30] = "day17"; + proNames[31] = "day18"; + proNames[32] = "day19"; + proNames[33] = "day20"; + proNames[34] = "day21"; + proNames[35] = "day22"; + proNames[36] = "day23"; + proNames[37] = "day24"; + proNames[38] = "day25"; + proNames[39] = "day26"; + proNames[40] = "day27"; + proNames[41] = "day28"; + proNames[42] = "day29"; + proNames[43] = "day30"; + proNames[44] = "day31"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Report_FiveScreen md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Report_FiveScreen SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + public tb_Report_FiveScreen SearchInfoByNameLast(string name) { + + var info = db.SearchInfoByKey("Name", name).OrderByDescending(p=>p.CreateTime).FirstOrDefault();//判断是否有重复数据 + if (info != null) + { + return info; + } + + return null; + + } + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenLastBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenLastBLL.cs new file mode 100644 index 0000000..e683e8d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenLastBLL.cs @@ -0,0 +1,153 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Report +{ + public class FiveScreenLastBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Report_FiveScreenLast md) + { + try + { + var list = db.SearchInfoByKey("StationID", md.StationID);//判断是否有重复数据 + if (list != null) + { + if (list.Where(p => p.ID != md.ID).Count() > 0) + { + return false; + } + + } + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Report_FiveScreenLast md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.StationID == md.StationID && p.ID != md.ID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[5]; + proNames[0] = "StationID"; + proNames[1] = "StationNo"; + proNames[2] = "UseRate"; + proNames[3] = "PassRate"; + proNames[4] = "Remark1"; + + + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Report_FiveScreenLast md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Report_FiveScreenLast SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenStandardBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenStandardBLL.cs new file mode 100644 index 0000000..694f068 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Report/FiveScreenStandardBLL.cs @@ -0,0 +1,161 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Report +{ + + public class FiveScreenStandardBLL + { + BasicBLL db = new BasicBLL(); + + /// + /// 新增信息 + /// + /// + /// + public bool AddInfo(tb_Report_FiveScreenStandard md) + { + try + { + //var list = db.SearchInfoByKey("Name", md.Name);//判断是否有重复数据 + //if (list != null) + //{ + // if (list.Where(p => p.ID != md.ID).Count() > 0) + // { + // return false; + // } + + //} + + return db.AddInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改信息 + /// + /// + /// + public bool UpdateInfo(tb_Report_FiveScreenStandard md) + { + try + { + var list = db.SearchAllInfo().Where(p => p.Name == md.Name && p.ID != md.ID).ToList();//判断是否有重复数据 + if (list.Count > 0) + { + return false; + } + + //初始化要更新的字段 + string[] proNames = new string[14]; + proNames[0] = "Name"; + proNames[1] = "LastYear"; + proNames[2] = "Jan"; + proNames[3] = "Feb"; + proNames[4] = "Mar"; + proNames[5] = "Apr"; + proNames[6] = "May"; + proNames[7] = "Jun"; + proNames[8] = "Jul"; + proNames[9] = "Aug"; + proNames[10] = "Sept"; + proNames[11] = "Oct"; + proNames[12] = "Nov"; + proNames[13] = "Dec"; + + //必填字段初始化,如果不需要更新必填字段则设置为空即可,时间类型无需初始化 + //如果没有初始化必填字段,更新会报错 + //md.Des = ""; + + return db.UpdateInfo(md, proNames); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 删除信息 + /// + /// + /// + /// + public bool DeleteInfo(tb_Report_FiveScreenStandard md) + { + try + { + return db.DelInfo(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 查询全部信息分页 + /// + /// + public string SearchInfoAll(string page, string pagesize) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + + List list = db.SearchAllInfo(); + + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = list; + return JSONTools.ScriptSerialize(md); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据ID查询信息 + /// + /// + /// + public tb_Report_FiveScreenStandard SearchInfoByID(string id) + { + try + { + return db.SearchInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Show/AnalysisBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Show/AnalysisBLL.cs new file mode 100644 index 0000000..ed09d63 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Show/AnalysisBLL.cs @@ -0,0 +1,57 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Show +{ + public class AnalysisBLL + { + BBMPTEntities dbe = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + + public List SearchInfo(string ProductName) + { + List list = new List(); + try + { + + DateTime date = DateTime.Now; + //DateTime date = Convert.ToDateTime("2019-07-08 10:00:00"); + string nowTime = date.ToString("yyyy-MM-dd"); + DateTime startTime = Convert.ToDateTime(nowTime + " 08:00:00");//班次开始时间 + DateTime endTime = Convert.ToDateTime(nowTime + " 19:59:59");//班次结束时间 + + var info = dbe.tb_InspectResult.Where(p => p.productInfo.Contains(ProductName)); + if (DateTime.Compare(date, startTime) < 0) + { + //昨天夜班 + list = info.Where(p => p.createTime > endTime.AddDays(-1) && p.createTime < startTime).ToList(); + } + + if (DateTime.Compare(date, endTime) > 0) + { + //今天夜班 + list = info.Where(p => p.createTime > endTime && p.createTime <= date).ToList(); + } + + if (DateTime.Compare(date, startTime) >= 0 && DateTime.Compare(date, endTime) <= 0) + { + //今天白班 + list = info.Where(p => p.createTime >= startTime && p.createTime <= endTime).ToList(); + } + + return list; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return list; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/Stock/StockInBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/Stock/StockInBLL.cs new file mode 100644 index 0000000..5d5d197 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/Stock/StockInBLL.cs @@ -0,0 +1,156 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.BLL.Stock +{ + public class StockInBLL + { + BBMPTEntities dbe = new BBMPTEntities(); + BasicBLL db = new BasicBLL(); + BasicBLL Resultdb = new BasicBLL(); + /// + /// 查询信息 + /// + /// + public string SearchInfo(string page, string pagesize, string StartTime, string EndTime, string workClass, string color, string productInfo) + { + try + { + string jsonStr = "[]"; + int total = 0;//总行数 + //List list = db.SearchAllInfo(); + + DateTime start = Convert.ToDateTime(StartTime); + DateTime end = Convert.ToDateTime(EndTime); + + List list = dbe.tb_StockIn.Where(p => p.createTime >= start && p.createTime <= end && "1".Equals(p.pass)).ToList(); + + //list = list.Where(p => p.createTime >= start && p.createTime <= end && "1".Equals(p.pass)).ToList(); + + List barcodeList = list.Select(m => m.barcode).ToList(); + + var resultList = dbe.tb_InspectResult.Where(p => barcodeList.Contains(p.barcode) && p.inspectResult.Contains("合格")).ToList(); + + + if (!String.IsNullOrEmpty(workClass)) + { + resultList = resultList.Where(p => p.workClass.Contains(workClass)).ToList(); + } + + if (!String.IsNullOrEmpty(color)) + { + resultList = resultList.Where(p => p.productInfo.Contains(color)).ToList(); + } + + if (!String.IsNullOrEmpty(productInfo)) + { + resultList = resultList.Where(p => p.productInfo.Contains(productInfo)).ToList(); + } + + list = list.Where(p => resultList.Select(m => m.barcode).ToList().Contains(p.barcode)).ToList(); + + if (list.Count > 0) + { + total = list.Count; + int Skipcount = (Convert.ToInt32(page) - 1) * Convert.ToInt32(pagesize); + list = list.OrderByDescending(p => p.createTime).Skip(Skipcount).Take(Convert.ToInt32(pagesize)).ToList(); + List StockInList = new List(); + foreach (var item in list) + { + StockInModel dm = Tool.Mapper(item); + var info = resultList.FirstOrDefault(p => p.barcode == item.barcode); + if (info != null) + { + dm.workClass = info.workClass; + dm.productInfo = info.productInfo; + } + StockInList.Add(dm); + } + + JsonDataModel md = new JsonDataModel(); + md.total = total.ToString(); + md.rows = StockInList; + jsonStr = JSONTools.ScriptSerialize(md); + } + return jsonStr; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return ""; + } + + + } + + /// + /// 查询信息 + /// + /// + public List SearchInfoAll(string StartTime, string EndTime, string workClass, string color, string productInfo) + { + try + { + List list = db.SearchAllInfo(); + + DateTime start = Convert.ToDateTime(StartTime); + DateTime end = Convert.ToDateTime(EndTime); + + list = list.Where(p => p.createTime >= start && p.createTime <= end && "1".Equals(p.pass)).ToList(); + + List barcodeList = list.Select(m => m.barcode).ToList(); + + var resultList = dbe.tb_InspectResult.Where(p => barcodeList.Contains(p.barcode) && p.inspectResult.Contains("合格")).ToList(); + + + if (!String.IsNullOrEmpty(workClass)) + { + resultList = resultList.Where(p => p.workClass.Contains(workClass)).ToList(); + } + + if (!String.IsNullOrEmpty(color)) + { + resultList = resultList.Where(p => p.productInfo.Contains(color)).ToList(); + } + + if (!String.IsNullOrEmpty(productInfo)) + { + resultList = resultList.Where(p => p.productInfo.Contains(productInfo)).ToList(); + } + + list = list.Where(p => resultList.Select(m => m.barcode).ToList().Contains(p.barcode)).ToList(); + + List StockInList = new List(); + if (list.Count > 0) + { + foreach (var item in list) + { + StockInModel dm = Tool.Mapper(item); + var info = resultList.FirstOrDefault(p => p.barcode == item.barcode); + if (info != null) + { + dm.workClass = info.workClass; + dm.productInfo = info.productInfo; + } + StockInList.Add(dm); + } + } + return StockInList; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_ButtonsService.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_ButtonsService.cs new file mode 100644 index 0000000..9969e9b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_ButtonsService.cs @@ -0,0 +1,45 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.User; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.BLL.User +{ + /// + /// 用户按钮 + /// lx 2017-06-28 + /// + public class Sys_ButtonsService + { + /// + /// 获取用户有权限的按钮 + /// + /// + /// + /// + public List GetUserButtons(string menuID, string userID) + { + try + { + List returnList = new List(); + Sys_ButtonsData dal = new Sys_ButtonsData(); + DataTable dt = new DataTable(); + + dt = dal.GetUserButtons(menuID, userID); + returnList = Tool.ConvertTo(dt).ToList(); + + return returnList; + } + catch(Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return new List(); + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_NavMenuService.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_NavMenuService.cs new file mode 100644 index 0000000..b803a90 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/User/Sys_NavMenuService.cs @@ -0,0 +1,83 @@ +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using MESClassLibrary.BLL.Log; +using System.Reflection; +using System.Data; +using MESClassLibrary.DAL.User; + +namespace MESClassLibrary.BLL.User +{ + public class Sys_NavMenuService + { + /// + /// 根据userID查询用户菜单 + /// + /// + /// + public List BuilderLeftMenu(string userID) + { + try + { + List returnList = new List(); + Sys_NavMenuData dal = new Sys_NavMenuData(); + DataTable dt = new DataTable(); + List navList = new List(); + + dt = dal.BuilderLeftMenu(userID); + navList = Tool.ConvertTo(dt).ToList(); + + foreach (Sys_NavMenuInfo item in navList) + { + Sys_NavMenuInfo menuItem = BuilderItem(item, navList); + if (menuItem != null) + returnList.Add(menuItem); + + } + return returnList; + } + catch(Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 生成菜单list + /// + /// + /// + /// + /// + public Sys_NavMenuInfo BuilderItem(Sys_NavMenuInfo item, List allItem) + { + Sys_NavMenuInfo returnItem = new Sys_NavMenuInfo(); + returnItem.ItemPic = item.ItemPic; + returnItem.MenuID = item.MenuID; + returnItem.MenuName = item.MenuName; + returnItem.OrderNum = item.OrderNum; + returnItem.ParentMenuID = item.ParentMenuID; + returnItem.PowerID = item.PowerID; + returnItem.URLStr = item.URLStr; + + List subItemList = new List(); + + StringBuilder sb = new StringBuilder(); + List subList = allItem.FindAll(p => p.ParentMenuID == item.MenuID); + if (subList.Count > 0) + { + foreach (Sys_NavMenuInfo subItem in subList.OrderBy(p => p.OrderNum)) + { + returnItem.SubNavMenuList.Add(subItem); + } + } + if (returnItem.SubNavMenuList.Count == 0) + return null; + else + return returnItem; + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/BLL/User/UserBLL.cs b/SjMes/PunchAssemble/MESClassLibrary/BLL/User/UserBLL.cs new file mode 100644 index 0000000..8f6a9f4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/BLL/User/UserBLL.cs @@ -0,0 +1,304 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL.User; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.BLL.User +{ + public class UserBLL + { + UserDAL db = new UserDAL(); + //用户登录 + public bool Login(UserModel md) + { + + try + { + + #region 入参校验 + if (string.IsNullOrWhiteSpace(md.Username) || string.IsNullOrWhiteSpace(md.Password)) + { + return false; + } + #endregion + + #region 登陆 + //DataTable dt = db.Search_UserInfoByUP(md.Username, Tool.MD5encryption(md.Password)); + DataTable dt = db.Search_UserInfoByUP(md.Username, md.Password); + if (dt != null && dt.Rows.Count > 0) + { + #region 记录用户登录日志-暂注销 + //md.ID = dt.Rows[0]["ID"].ToString(); + //md.TrueName = dt.Rows[0]["TrueName"].ToString(); + //md.FaceURL = dt.Rows[0]["FaceURL"].ToString(); + //md.RoleID = dt.Rows[0]["RoleID"].ToString(); + //md.RoleName = dt.Rows[0]["RoleName"].ToString(); + //md.RoleJurisdiction = dt.Rows[0]["RoleJurisdiction"].ToString(); + //md.CompanyPost = dt.Rows[0]["CompanyPost"].ToString(); + //md.ContactWay = dt.Rows[0]["ContactWay"].ToString(); + //md.CreateUserID = dt.Rows[0]["CreateUserID"].ToString(); + //md.IsUseing = (int)dt.Rows[0]["IsUseing"]; + //db.Add_UserLoginInfo(md.ID); + #endregion + return true; + } + else + { + return false; + } + + #endregion + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 新增用户信息 + /// + /// + /// + public bool AddUserInfo(UserModel md) + { + //try + //{ + // DataTable dt = db.Search_UserInfoByUserName(md.ID, md.Username); + // if (dt != null && dt.Rows.Count > 0) + // { + // return false; + // } + // md.Password = Tool.MD5encryption(md.Password); + // return db.Add_UserInfo(md); + //} + //catch (Exception ex) + //{ + // LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + // return false; + //} + + return false; + + } + /// + /// 修改用户信息 + /// + /// + /// + /// + public bool UpdateUserInfo(UserModel md, int flag) + { + try + { + //DataTable dt = db.Search_UserInfoByUserName(md.ID, md.Username); + //if (dt != null && dt.Rows.Count > 0) + //{ + // return false; + //} + + //if (flag == 1) + //{ + // md.Password = Tool.MD5encryption(md.Password); + //} + //return db.Update_UserInfo(md); + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 修改用户密码 + /// + /// + /// + /// + /// + public bool UpdateUserPassword(string oldpassword, string newpassword, string id) + { + try + { + DataTable dt = db.Search_UserInfoByID_v2(id); + if (dt != null && dt.Rows.Count > 0) + { + if (dt.Rows[0]["Password"].ToString() == oldpassword) + { + return db.Update_Password(id, oldpassword, newpassword); + } + } + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// + /// + /// + /// + /// + public bool DelUserInfoByID(string id, string userid) + { + try + { + return db.Del_Info(db.GetTableName(), id, userid); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + #region 查询用户信息 + /// + /// 查询全部用户信息 + /// + /// + public DataTable SearchUserInfo() + { + try + { + return db.Search_UserInfo(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 根据ID查询用户信息 + /// + /// + /// + public DataTable SearchUserInfoByID(string id) + { + try + { + return db.Search_UserInfoByID(id); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 根据登录账号查询用户信息 + /// + /// + /// + public DataTable SearchUserInfoByUserName(string username) + { + try + { + DataTable dt = db.Search_UserInfoByUserName(username); + if (dt != null && dt.Rows.Count > 0) + { + return dt; + } + return null; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据角色ID查询用户信息 + /// + /// 角色主键ID + /// + public DataTable SearchUserInfoByRoleID(string roleid) + { + try + { + DataTable dt = db.Search_UserInfoByRoleID(roleid); + if (dt != null && dt.Rows.Count > 0) + { + return dt; + } + return null; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 查询用户登录记录 + /// + /// + public DataTable SearchUserLoginInfo() + { + try + { + return db.Search_UserLoginInfo(); + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + + public string GetComboboxData() + { + try + { + + string jsonStr = "[]"; + DataTable dt = db.Search_UserInfo(); + if (dt != null && dt.Rows.Count > 0) + { + List list = new List(); + for (int i = 0; i < dt.Rows.Count; i++) + { + T_Sys_Users md = new T_Sys_Users(); + md.UserID = (Guid)dt.Rows[i]["UserID"]; + md.RealName = dt.Rows[i]["RealName"].ToString(); + list.Add(md); + } + jsonStr = JSONTools.ScriptSerialize>(list); + } + return jsonStr; + } + catch (Exception ex) + { + return ""; + } + } + + + + #endregion + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonRecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonRecordDAL.cs new file mode 100644 index 0000000..a5059a8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonRecordDAL.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.Andon +{ + public class AndonButtonRecordDAL + { + public bool InsertInfo(AndonRecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = " insert into tb_AndonRecord(ID,ButtonTypeID"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@ButtonTypeID)"; + + param = new SqlParameter[2]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@ButtonTypeID", SqlDbType.VarChar); + param[1].Value = md.ButtonTypeID; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(AndonRecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + + sql =@"update tb_AndonRecord set EndTime=getdate() where ButtonTypeID=@ButtonTypeID and EndTime is null"; + param=new SqlParameter[1]; + + param[0] = new SqlParameter("@ButtonTypeID", SqlDbType.VarChar); + param[0].Value = md.ButtonTypeID; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonTypeDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonTypeDAL.cs new file mode 100644 index 0000000..eaae178 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Andon/AndonButtonTypeDAL.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.Andon +{ + public class AndonButtonTypeDAL + { + public DataTable SearchInfoByName(string buttonName) + { + try + { + string sql = @"select * from tb_AndonButtonType where ButtonName=@ButtonName"; + + SqlParameter[] param=new SqlParameter[1]; + + param[0] = new SqlParameter("@ButtonName", SqlDbType.VarChar); + param[0].Value = buttonName; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BaseDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BaseDAL.cs new file mode 100644 index 0000000..0dcec87 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BaseDAL.cs @@ -0,0 +1,199 @@ +using MESClassLibrary.EFModel; +using System; +using System.Collections.Generic; +using System.Data.Entity.Infrastructure; +using System.Diagnostics.Contracts; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.DAL +{ + public class BaseDAL where T : class, new() + { + /// + /// 数据上下文对象 + /// + BBMPTEntities db = new BBMPTEntities(); + + #region 1.0 新增 实体 +int Add(T model) + /// + /// 新增 实体 + /// + /// + /// + public int Add(T model) + { + db.Set().Add(model); + return db.SaveChanges();//保存成功后,会将自增的id设置给 model的 主键属性,并返回受影响行数 + } + #endregion + + #region 2.0 根据 id 删除 +int Del(T model) + /// + /// 根据 id 删除 + /// + /// 包含要删除id的对象 + /// + public int Del(T model) + { + db.Set().Attach(model); + db.Set().Remove(model); + return db.SaveChanges(); + } + #endregion + + #region 3.0 根据条件删除 +int DelBy(Expression> delWhere) + /// + /// 3.0 根据条件删除 + /// + /// + /// + public int DelBy(Expression> delWhere) + { + //3.1查询要删除的数据 + List listDeleting = db.Set().Where(delWhere).ToList(); + //3.2将要删除的数据 用删除方法添加到 EF 容器中 + listDeleting.ForEach(u => + { + db.Set().Attach(u);//先附加到 EF容器 + db.Set().Remove(u);//标识为 删除 状态 + }); + //3.3一次性 生成sql语句到数据库执行删除 + return db.SaveChanges(); + } + #endregion + + #region 4.0 修改 +int Modify(T model, params string[] proNames) + /// + /// 4.0 修改,如: + /// T u = new T() { uId = 1, uLoginName = "asdfasdf" }; + /// this.Modify(u, "uLoginName"); + /// + /// 要修改的实体对象 + /// 要修改的 属性 名称 + /// + public int Modify(T model, params string[] proNames) + { + //4.1将 对象 添加到 EF中 + DbEntityEntry entry = db.Entry(model); + //4.2先设置 对象的包装 状态为 Unchanged + entry.State = System.Data.EntityState.Unchanged; + //4.3循环 被修改的属性名 数组 + foreach (string proName in proNames) + { + //4.4将每个 被修改的属性的状态 设置为已修改状态;后面生成update语句时,就只为已修改的属性 更新 + entry.Property(proName).IsModified = true; + } + //4.4一次性 生成sql语句到数据库执行 + return db.SaveChanges(); + } + #endregion + + #region 4.0 批量修改 +int Modify(T model, Expression> whereLambda, params string[] modifiedProNames) + /// + /// 4.0 批量修改 + /// + /// 要修改的实体对象 + /// 查询条件 + /// 要修改的 属性 名称 + /// + public int ModifyBy(T model, Expression> whereLambda, params string[] modifiedProNames) + { + //4.1查询要修改的数据 + List listModifing = db.Set().Where(whereLambda).ToList(); + + //获取 实体类 类型对象 + Type t = typeof(T); // model.GetType(); + //获取 实体类 所有的 公有属性 + List proInfos = t.GetProperties(BindingFlags.Instance | BindingFlags.Public).ToList(); + //创建 实体属性 字典集合 + Dictionary dictPros = new Dictionary(); + //将 实体属性 中要修改的属性名 添加到 字典集合中 键:属性名 值:属性对象 + proInfos.ForEach(p => + { + if (modifiedProNames.Contains(p.Name)) + { + dictPros.Add(p.Name, p); + } + }); + + //4.3循环 要修改的属性名 + foreach (string proName in modifiedProNames) + { + //判断 要修改的属性名是否在 实体类的属性集合中存在 + if (dictPros.ContainsKey(proName)) + { + //如果存在,则取出要修改的 属性对象 + PropertyInfo proInfo = dictPros[proName]; + //取出 要修改的值 + object newValue = proInfo.GetValue(model, null); //object newValue = model.uName; + + //4.4批量设置 要修改 对象的 属性 + foreach (T usrO in listModifing) + { + //为 要修改的对象 的 要修改的属性 设置新的值 + proInfo.SetValue(usrO, newValue, null); //usrO.uName = newValue; + } + } + } + //4.4一次性 生成sql语句到数据库执行 + return db.SaveChanges(); + } + #endregion + + #region 5.0 根据条件查询 +List GetListBy(Expression> whereLambda) + /// + /// 5.0 根据条件查询 +List GetListBy(Expression> whereLambda) + /// + /// + /// + public List GetListBy(Expression> whereLambda) + { + return db.Set().AsNoTracking().Where(whereLambda).ToList(); + } + #endregion + + #region 5.1 根据条件 排序 和查询 + List GetListBy + /// + /// 5.1 根据条件 排序 和查询 + /// + /// 排序字段类型 + /// 查询条件 lambda表达式 + /// 排序条件 lambda表达式 + /// + public List GetListBy(Expression> whereLambda, Expression> orderLambda) + { + return db.Set().Where(whereLambda).OrderBy(orderLambda).ToList(); + } + #endregion + + #region 6.0 分页查询 + List GetPagedList + /// + /// 6.0 分页查询 + List GetPagedList + /// + /// 页码 + /// 页容量 + /// 条件 lambda表达式 + /// 排序 lambda表达式 + /// + public List GetPagedList(int pageIndex, int pageSize, Expression> whereLambda, Expression> orderBy) + { + // 分页 一定注意: Skip 之前一定要 OrderBy + return db.Set().Where(whereLambda).OrderBy(orderBy).Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); + } + #endregion + + public T Find(params object[] keyValues) + { + return db.Set().Find(keyValues); + } + + public List FindAll() + { + return db.Set().ToList(); + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicDAL.cs new file mode 100644 index 0000000..658e526 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicDAL.cs @@ -0,0 +1,51 @@ +using MESClassLibrary.BLL.Log; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.DAL +{ + public class BasicDAL + { + public bool Del_Info(string tableName,string id, string userid) + { + try + { + string sql = @"update " + tableName + @" set + IsUseing = @IsUseing, + DisableUserID = @DisableUserID, + DisableTime = @DisableTime + where ID=@ID"; + + SqlParameter[] param = new SqlParameter[4]; + param[0] = new SqlParameter("@IsUseing", SqlDbType.Int); + param[0].Value = 0; + + param[1] = new SqlParameter("@DisableUserID", SqlDbType.VarChar); + param[1].Value = userid; + + param[2] = new SqlParameter("@DisableTime", SqlDbType.DateTime); + param[2].Value = DateTime.Now; + + param[3] = new SqlParameter("@ID", SqlDbType.VarChar); + param[3].Value = id; + + if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param) > 0) + { + return true; + } + return false; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BadInjectionDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BadInjectionDAL.cs new file mode 100644 index 0000000..7ff692f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BadInjectionDAL.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class BadInjectionDAL + { + public static string TableName = "tb_Bad_Injection"; + + public bool AddInfo(BadInjectionModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ID,OneBarCode,[BarCode],[BadPosition],[BadReason]"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@OneBarCode,"; + sql += "@BarCode,"; + sql += "@BadPosition,"; + sql += "@BadReason)"; + + #region 添加参数 + param = new SqlParameter[5]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@OneBarCode", SqlDbType.VarChar); + param[1].Value = md.OneBarCode; + + param[2] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[2].Value = md.BarCode; + + param[3] = new SqlParameter("@BadPosition", SqlDbType.VarChar); + param[3].Value = md.BadPosition; + + param[4] = new SqlParameter("@BadReason", SqlDbType.VarChar); + param[4].Value = md.BadReason; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchByCode(string code) + { + try + { + string sql = ""; + + if (code.Contains(".")) + { + sql = @"select * from " + TableName + " where BarCode=@BarCode"; + } + else + { + sql = @"select * from " + TableName + " where OneBarCode=@BarCode"; + } + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[0].Value = code; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs new file mode 100644 index 0000000..1e7032b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs @@ -0,0 +1,440 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class BarCodeDAl + { + public static string TableName = "tb_BarCode"; + public DataTable SearchInfoByStock(string StockNo) + { + string sql = ""; + DateTime time; + try + { + time = GetDateTime(); + if (time.Hour>=8 &&time.Hour<=23) + { + sql = @"select top 1 * from " + TableName + " where StockNo=@StockNo and PrintType <>2 and " + + "substring([BarCode],len( [BarCode])-10,6)= right(DATENAME(yy, GETDATE()),2)+ RIGHT('00'+CAST(MONTH(GETDATE()) AS VARCHAR(2)),2)+RIGHT('00'+CAST(Day(GETDATE()) AS VARCHAR(2)),2)" + + " order by [CreateTime] desc"; + } + else + { + sql = @"select top 1 * from " + TableName + " where StockNo=@StockNo and PrintType <>2 and " + + "substring([BarCode],len( [BarCode])-10,6)= right(DATENAME(yy, DATEADD(dd,-1, GETDATE())),2)+ RIGHT('00'+CAST(MONTH(DATEADD(dd,-1, GETDATE())) AS VARCHAR(2)),2)+RIGHT('00'+CAST(Day(DATEADD(dd,-1, GETDATE())) AS VARCHAR(2)),2)" + + " order by [CreateTime] desc"; + } + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[0].Value = StockNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(BarCodeModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ID,StationID,OneBarCode,[BarCode],[StockNo],[PrintType],[CreateTime],[IsImport],StationID2,PlanID"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@StationID,"; + sql += "@OneBarCode,"; + sql += "@BarCode,"; + sql += "@StockNo,"; + sql += "@PrintType,"; + //sql += "@CreateTime,"; + sql += "(select getdate()),"; + sql += "@IsImport,"; + sql += "@StationID2,"; + sql += "@PlanID)"; + + #region 添加参数 + param = new SqlParameter[9]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[1].Value = md.StationID; + + param[2] = new SqlParameter("@OneBarCode", SqlDbType.VarChar); + param[2].Value = md.OneBarCode; + + param[3] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[3].Value = md.BarCode; + + param[4] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[4].Value = md.StockNo; + + param[5] = new SqlParameter("@PrintType", SqlDbType.Int); + param[5].Value =md.PrintType; + + //param[6] = new SqlParameter("@CreateTime", SqlDbType.DateTime); + //param[6].Value = md.CreateTime; + + param[6] = new SqlParameter("@IsImport", SqlDbType.Text); + param[6].Value = md.Import; + + param[7] = new SqlParameter("@StationID2", SqlDbType.VarChar); + param[7].Value = md.StationID2; + + param[8] = new SqlParameter("@PlanID", SqlDbType.VarChar); + param[8].Value = md.PlanID; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchInfo(string stationNo) + { + try + { + string sql = @"SELECT top 100 dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName, + CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '自动打印' when 1 then '手动打印' when 2 then '补打' END AS PrintType, + dbo.tb_BarCode.CreateTime + FROM dbo.tb_BarCode LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID + where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + + //" and substring([BarCode],len( [BarCode])-10,6)= right(DATENAME(yy, GETDATE()),2)+ RIGHT('00'+CAST(MONTH(GETDATE()) AS VARCHAR(2)),2)+RIGHT('00'+CAST(Day(GETDATE()) AS VARCHAR(2)),2)" + + " order by [CreateTime] desc"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@stationNo", SqlDbType.VarChar); + param[0].Value = stationNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAll() + { + try + { + string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName, + CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '自动打印' when 1 then '手动打印' when 2 then '补打' END AS PrintType, + dbo.tb_BarCode.PrintTime + FROM dbo.tb_BarCode LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID + where dbo.tb_Station.StationNo=@stationNo and IsDel=0 " + + //" and substring([BarCode],len( [BarCode])-10,6)= right(DATENAME(yy, GETDATE()),2)+ RIGHT('00'+CAST(MONTH(GETDATE()) AS VARCHAR(2)),2)+RIGHT('00'+CAST(Day(GETDATE()) AS VARCHAR(2)),2)" + + " order by [CreateTime] desc"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCode() + { + try + { + string sql = @"SELECT TOP (1000) dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName, + CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '自动打印' WHEN 1 THEN '手动打印' WHEN 2 THEN '补打' END AS PrintType, + dbo.tb_BarCode.PrintTime, dbo.tb_BarCode.OneBarCode, dbo.tb_BarCode.PlanID, + dbo.tb_InjectPlanReport.MaterialName, dbo.tb_InjectPlanReport.BatchNo + FROM dbo.tb_BarCode LEFT OUTER JOIN + dbo.tb_InjectPlanReport ON dbo.tb_BarCode.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID + WHERE (dbo.tb_BarCode.IsDel = 0) + ORDER BY dbo.tb_BarCode.CreateTime DESC"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCodeByOne(string oneBarCode) + { + try + { + string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName, + CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '自动打印' WHEN 1 THEN '手动打印' WHEN 2 THEN '补打' END AS PrintType, + dbo.tb_BarCode.PrintTime, dbo.tb_BarCode.OneBarCode,dbo.tb_BarCode.PlanID, + dbo.tb_InjectPlanReport.MaterialName, dbo.tb_InjectPlanReport.BatchNo + FROM dbo.tb_BarCode LEFT OUTER JOIN + dbo.tb_InjectPlanReport ON dbo.tb_BarCode.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID + WHERE dbo.tb_BarCode.IsDel = 0 and dbo.tb_BarCode.OneBarCode=@OneBarCode + ORDER BY dbo.tb_BarCode.CreateTime DESC"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@OneBarCode", SqlDbType.VarChar); + param[0].Value = oneBarCode; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBarCodeByTwo(string BarCode) + { + try + { +// string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName, +// CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '自动打印' WHEN 1 THEN '手动打印' WHEN 2 THEN '补打' END AS PrintType, +// dbo.tb_BarCode.PrintTime, dbo.tb_BarCode.OneBarCode +// FROM dbo.tb_BarCode LEFT OUTER JOIN +// dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN +// dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID +// WHERE dbo.tb_BarCode.IsDel = 0 and dbo.tb_BarCode.BarCode=@BarCode +// ORDER BY dbo.tb_BarCode.CreateTime DESC"; + string sql = @"SELECT dbo.tb_BarCode.BarCode, dbo.tb_Product.ProductName, + CASE dbo.tb_BarCode.PrintType WHEN 0 THEN '自动打印' WHEN 1 THEN '手动打印' WHEN 2 THEN '补打' END AS PrintType, + dbo.tb_BarCode.PrintTime, dbo.tb_BarCode.OneBarCode,dbo.tb_BarCode.PlanID, + dbo.tb_InjectPlanReport.MaterialName, dbo.tb_InjectPlanReport.BatchNo + FROM dbo.tb_BarCode LEFT OUTER JOIN + dbo.tb_InjectPlanReport ON dbo.tb_BarCode.PlanID = dbo.tb_InjectPlanReport.InjectionPlanID LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_BarCode.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_BarCode.StationID = dbo.tb_Station.StationID + WHERE dbo.tb_BarCode.IsDel = 0 and dbo.tb_BarCode.BarCode=@BarCode + ORDER BY dbo.tb_BarCode.CreateTime DESC"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[0].Value = BarCode; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 查找流水号 + /// + /// 零件号.批次 + /// + public DataTable SearchSerialNoByBarCode(string Code) + { + try + { + string sql = @"select top 1 * from " + TableName + " where left([BarCode],len([BarCode])-5)=@Code and PrintType <> 2" + + " order by [CreateTime] desc"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@Code", SqlDbType.VarChar); + param[0].Value = Code; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByBarCode(string BarCode) + { + try + { + string sql = @"select top 1 * from " + TableName + " where BarCode=@BarCode order by [CreateTime] desc "; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[0].Value = BarCode; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 更改打印时间 + /// + /// + /// + public bool UpdateInfo(BarCodeModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = @"update tb_BarCode set PrintTime=(select getdate()) where [StationID]=@StationID and PrintTime is null"; + + #region 添加参数 + param = new SqlParameter[1]; + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = md.StationID; + + //param[1] = new SqlParameter("@PrintTime", SqlDbType.DateTime); + //param[1].Value = md.PrintTime; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + /// + /// 删除手工打印条码 + /// + /// + /// + public bool DelBarCode(BarCodeModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = @"update tb_BarCode set IsDel=0 where BarCode=@BarCode"; + + #region 添加参数 + param = new SqlParameter[1]; + param[0] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[0].Value = md.BarCode; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DateTime GetDateTime() + { + string sql = ""; + DateTime time; + DataTable dt; + try + { + sql = @"select getdate() as time"; + + dt= SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + if (dt != null && dt.Rows.Count > 0) + { + time = Convert.ToDateTime(dt.Rows[0]["time"].ToString()); + + } + else + { + time=DateTime.Now; + } + return time; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return DateTime.Now; + } + } + + /// + /// 根据二维码查找一维码,并查找一维码是否存在 + /// + /// + /// + public DataTable SearchOneBarCode(string BarCode,int a) + { + try + { + string sql = ""; + SqlParameter[] param = new SqlParameter[1]; + + if (a == 1) + { + sql = @"select OneBarCode + from tb_BarCode + where OneBarCode = @barcode"; + + param[0] = new SqlParameter("@barcode", SqlDbType.VarChar); + param[0].Value = BarCode; + } + + if (a == 2) + { + sql = @"select * + from tb_BarCode + where barcode = @barcode"; + + param[0] = new SqlParameter("@barcode", SqlDbType.VarChar); + param[0].Value = BarCode; + } + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BomDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BomDAL.cs new file mode 100644 index 0000000..ee41955 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/BomDAL.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class BomDAL + { + public DataTable SearchBom(string PartNo) + { + try + { + string sql = @"SELECT dbo.tb_Product.ProductName, dbo.tb_ProductType.ProductTypeName, dbo.tb_ProductType.ProductTypeNo, + dbo.tb_Product.PartNo, dbo.tb_Bom.PartNo2, dbo.tb_Product.StockNo + FROM dbo.tb_Bom RIGHT OUTER JOIN + dbo.tb_Product ON dbo.tb_Bom.PartNo1 = dbo.tb_Product.PartNo LEFT OUTER JOIN + dbo.tb_ProductType ON dbo.tb_Product.ProductTypeID = dbo.tb_ProductType.ProductTypeID + WHERE PartNo=@PartNo"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = PartNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable Search(string partNo1, string partNo2) + { + try + { + string sql = "select * from tb_Bom where PartNo1=@partNo1,PartNo2=@partNo2"; + + SqlParameter[] param = new SqlParameter[2]; + param[0] = new SqlParameter("@@partNo1", SqlDbType.VarChar); + param[0].Value = partNo1; + + param[1] = new SqlParameter("@@partNo2", SqlDbType.VarChar); + param[1].Value = partNo2; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(BomModel md) + { + string sql = ""; + SqlParameter[] param = null; + + try + { + sql = "insert into tb_Bom(ID,,PartNo1,PartNo2) values(@ID,@partNo1,@partNo2)"; + + param = new SqlParameter[3]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.BomID; + + param[1] = new SqlParameter("@partNo1", SqlDbType.VarChar); + param[1].Value = md.PartNo1; + + param[2] = new SqlParameter("@partNo2", SqlDbType.VarChar); + param[2].Value = md.PartNo2; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool updateInfo(BomModel md) + { + string sql = ""; + SqlParameter[] param = null; + + try + { + sql = "update tb_Bom set PartNo2=@partNo2 where PartNo1=@partNo1"; + + param = new SqlParameter[2]; + + param[0] = new SqlParameter("@partNo1", SqlDbType.VarChar); + param[0].Value = md.PartNo1; + + param[1] = new SqlParameter("@partNo2", SqlDbType.VarChar); + param[1].Value = md.PartNo2; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool DelInfo(BomModel md) + { + string sql = ""; + SqlParameter[] param = null; + + try + { + sql = "delete from tb_Bom where PartNo1=@partNo1 and PartNo2=@partNo2 "; + + param = new SqlParameter[2]; + + param[0] = new SqlParameter("@partNo1", SqlDbType.VarChar); + param[0].Value = md.PartNo1; + + param[1] = new SqlParameter("@partNo2", SqlDbType.VarChar); + param[1].Value = md.PartNo2; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ColorDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ColorDAL.cs new file mode 100644 index 0000000..f94989e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ColorDAL.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.Model; + +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class ColorDAL + { + public DataTable SearchInfoAll() + { + try + { + string sql = @"select * from [tb_Color]"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByName(string color) + { + try + { + string sql = @"select distinct [ColorNo] from [tb_Color] where [Des] like @Des"; + + SqlParameter[] param=new SqlParameter[1]; + + param[0] = new SqlParameter("@Des", SqlDbType.VarChar); + param[0].Value = color; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/DefectDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/DefectDAL.cs new file mode 100644 index 0000000..4c8c162 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/DefectDAL.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +namespace MESClassLibrary.DAL.BasicInfo +{ + public class DefectDAL + { + public DataTable SearchInfoAll(string LineID) + { + try + { + string sql = @"SELECT * from tb_Defect where LineID=@LineID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@LineID", SqlDbType.VarChar); + param[0].Value = LineID; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/InjectionPlanDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/InjectionPlanDAL.cs new file mode 100644 index 0000000..8979325 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/InjectionPlanDAL.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.EFModel; +using MESClassLibrary.Model; +using System.Reflection; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class InjectionPlanDAL + { + public static string TableName = "tb_InjectionPlan"; + + + /// + /// 获取当前计划 + /// + /// + /// + public DataTable SearchPlanByStation(string StationID) + { + try + { + string sql = @"SELECT top 1 dbo.tb_InjectionPlan.InjectionPlanID, dbo.tb_Product.ProductName, dbo.tb_Station.StationNo, dbo.tb_InjectionPlan.BeginTime, dbo.tb_InjectionPlan.PlanCount, + dbo.tb_InjectionPlan.EndTime, dbo.tb_InjectionPlan.StockNo, dbo.tb_InjectionPlan.PlanDate, + dbo.tb_InjectionPlan.CompleteCount, dbo.tb_Product.PartNo, dbo.tb_Product.ProductName, dbo.tb_Product.ColorName, + dbo.tb_Product.Rows, dbo.tb_Product.Cols, dbo.tb_Product.Layers, dbo.tb_Product.PicturePath,dbo.tb_Station.StationID + FROM dbo.tb_InjectionPlan LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_InjectionPlan.StationID = dbo.tb_Station.StationID LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_InjectionPlan.StockNo = dbo.tb_Product.StockNo + WHERE (dbo.tb_Station.StationNo = @StationID) AND ((dbo.tb_InjectionPlan.IsFinish IS NULL OR dbo.tb_InjectionPlan.IsFinish=0)) + ORDER BY dbo.tb_InjectionPlan.BeginTime"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = StationID; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 获取下一计划 + /// + /// + /// + public DataTable NextSearchPlanByStation(string StationID) + { + try + { + string sql = @"SELECT top 2 dbo.tb_Product.ProductName, dbo.tb_Station.StationNo, dbo.tb_InjectionPlan.BeginTime, dbo.tb_InjectionPlan.PlanCount, + dbo.tb_InjectionPlan.EndTime, dbo.tb_InjectionPlan.StockNo, dbo.tb_InjectionPlan.PlanDate, + dbo.tb_InjectionPlan.CompleteCount, dbo.tb_Product.PartNo, dbo.tb_Product.ProductName, dbo.tb_Product.ColorName, + dbo.tb_Product.Rows, dbo.tb_Product.Cols, dbo.tb_Product.Layers, dbo.tb_Product.PicturePath,dbo.tb_Station.StationID + FROM dbo.tb_InjectionPlan LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_InjectionPlan.StationID = dbo.tb_Station.StationID LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_InjectionPlan.StockNo = dbo.tb_Product.StockNo + WHERE (dbo.tb_Station.StationNo = @StationID) AND ((dbo.tb_InjectionPlan.IsFinish IS NULL OR dbo.tb_InjectionPlan.IsFinish=0)) + ORDER BY dbo.tb_InjectionPlan.BeginTime"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = StationID; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateFinish(InjectionPlanModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = @"update tb_InjectionPlan set IsFinish=1 ,FinishTime=getdate() + where [InjectionPlanID]=( select top 1 [InjectionPlanID] from [dbo].[tb_InjectionPlan] where (IsFinish is null or IsFinish=0 )and StationID=@StationID order by BeginTime asc)"; + + #region 添加参数 + param = new SqlParameter[1]; + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = md.StationID; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + + public DataTable SearchByPage(int pageIndex, int pageSize, string stationID, string stockNo) + { + try + { + + string sql = "select * FROM[dbo].[tb_InjectionPlan] "; + sql += " where 1=1 "; + if (!string.IsNullOrEmpty(stationID)) + { + sql += " and StationID = '" + stationID + "' "; + } + if (!string.IsNullOrEmpty(stockNo)) + { + sql += " and StockNo like '%" + stockNo + "%' "; + } + sql += " order by BeginTime "; + sql += " offset " + ((pageIndex - 1) * pageSize) + " rows "; + sql += " fetch next " + pageSize + " rows only "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + public DataTable SearchByTime(int pageIndex, int pageSize, string stationID, string stockNo, string StartTime, string EndTime) + { + try + { + + string sql = "select * FROM[dbo].[tb_InjectionPlan] where BeginTime>='" + StartTime + "' and BeginTime<='" + EndTime + "' "; + if (!string.IsNullOrEmpty(stationID)) + { + sql += " and StationID = '" + stationID + "' "; + } + if (!string.IsNullOrEmpty(stockNo)) + { + sql += " and StockNo like '%" + stockNo + "%' "; + } + sql += " order by BeginTime "; + sql += " offset " + ((pageIndex - 1) * pageSize) + " rows "; + sql += " fetch next " + pageSize + " rows only "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public int SearchByTimeCount(string stationID, string stockNo, string StartTime, string EndTime) + { + try + { + + string sql = "select * FROM[dbo].[tb_InjectionPlan] where BeginTime>='" + StartTime + "' and EndTime<='" + EndTime + "' "; + if (!string.IsNullOrEmpty(stationID)) + { + sql += " and StationID = '" + stationID + "' "; + } + if (!string.IsNullOrEmpty(stockNo)) + { + sql += " and StockNo like '%" + stockNo + "%' "; + } + + return SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return 0; + } + } + + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/OperatorDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/OperatorDAL.cs new file mode 100644 index 0000000..bc30e15 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/OperatorDAL.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class OperatorDAL + { + public static string TableName = "tb_Operator"; + + /// + /// 根据操作员姓名和工位查询 + /// + /// + /// + public DataTable SearchInfoByName(string OperatorName,string StationID) + { + try + { + string sql = @"select * from " + TableName + " where OperatorName=@OperatorName and StationID=@StationID"; + + SqlParameter[] param = new SqlParameter[2]; + param[0] = new SqlParameter("@OperatorName", SqlDbType.VarChar); + param[0].Value = OperatorName; + + param[1] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[1].Value = StationID; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByNameAndPsw(string OperatorName, string StationID,string OperatorPsw) + { + try + { + string sql = @"select * from " + TableName + " where OperatorName=@OperatorName and StationID=@StationID and OperatorPsw=@OperatorPsw"; + + SqlParameter[] param = new SqlParameter[3]; + param[0] = new SqlParameter("@OperatorName", SqlDbType.VarChar); + param[0].Value = OperatorName; + + + param[1] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[1].Value = StationID; + + param[2] = new SqlParameter("@OperatorPsw", SqlDbType.VarChar); + param[2].Value = OperatorPsw; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductDAL.cs new file mode 100644 index 0000000..16d6e52 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductDAL.cs @@ -0,0 +1,245 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; +using MESClassLibrary.Model; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class ProductDAL + { + public static string TableName = "tb_ProductType"; + + public DataTable SearchInfoByType(string type, string stationNo) + { + try + { + string sql = + @"SELECT + dbo.tb_Product.PartName, + dbo.tb_Product.ProductName, + dbo.tb_ProductType.ProductTypeName, + dbo.tb_ProductType.ProductTypeNo, + dbo.tb_Product.PartNo, + dbo.tb_Station.StationNo, + dbo.tb_Plastic.StockNo + FROM dbo.tb_Plastic + LEFT OUTER JOIN dbo.tb_Station ON dbo.tb_Plastic.StationID = dbo.tb_Station.StationID + LEFT OUTER JOIN dbo.tb_Product ON dbo.tb_Plastic.StockNo = dbo.tb_Product.StockNo + LEFT OUTER JOIN dbo.tb_ProductType ON dbo.tb_Product.ProductTypeID = dbo.tb_ProductType.ProductTypeID + WHERE + dbo.tb_ProductType.ProductTypeNo = @ProductTypeNo + and StationNo = @StationNo"; + + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@ProductTypeNo", SqlDbType.VarChar); + param[0].Value = type; + + param[1] = new SqlParameter("@StationNo", SqlDbType.VarChar); + param[1].Value = stationNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAllByType(string type) + { + try + { + string sql = + @"SELECT + DISTINCT dbo.tb_Product.ProductName, + dbo.tb_ProductType.ProductTypeName, + dbo.tb_ProductType.ProductTypeNo, + dbo.tb_Product.PartNo, + dbo.tb_Bom.PartNo2, + dbo.tb_Product.StockNo + FROM dbo.tb_Bom + RIGHT OUTER JOIN dbo.tb_Product ON dbo.tb_Bom.PartNo1 = dbo.tb_Product.PartNo + LEFT OUTER JOIN dbo.tb_ProductType ON dbo.tb_Product.ProductTypeID = dbo.tb_ProductType.ProductTypeID + WHERE + dbo.tb_ProductType.ProductTypeNo = @ProductTypeNo + ORDER BY + StockNo"; + + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@ProductTypeNo", SqlDbType.VarChar); + param[0].Value = type; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByName(string ProductName, string ProductTypeNo) + { + try + { + string sql = + @"SELECT + dbo.tb_Product.PartName, + dbo.tb_Product.ProductName, + dbo.tb_ProductType.ProductTypeName, + dbo.tb_ProductType.ProductTypeNo, + dbo.tb_Product.PartNo, + dbo.tb_Product.StockNo + FROM dbo.tb_ProductType + RIGHT OUTER JOIN dbo.tb_Product ON dbo.tb_ProductType.ProductTypeID = dbo.tb_Product.ProductTypeID + where + dbo.tb_Product.ProductName = @ProductName + and dbo.tb_ProductType.ProductTypeNo = @ProductTypeNo + ORDER BY + SUBSTRING(ProductName, 0, 4)"; + + SqlParameter[] param = new SqlParameter[2]; + param[0] = new SqlParameter("@ProductName", SqlDbType.VarChar); + param[0].Value = ProductName; + + param[1] = new SqlParameter("@ProductTypeNo", SqlDbType.VarChar); + param[1].Value = ProductTypeNo; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoByPartNo(string partNo) + { + try + { + string sql = @"select * from [tb_Product] where [PartNo]=@partNo"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@partNo", SqlDbType.VarChar); + param[0].Value = partNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + + } + } + + public DataTable SearchIsImportByStockNo(string StockNo) + { + try + { + string sql = @"select * from [tb_Product] where [StockNo]=@StockNo"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[0].Value = StockNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + + } + } + + public DataTable SearchInfoByProductName(string ProductName) + { + try + { + string sql = @"select * from [tb_Product] where [ProductName]=@ProductName"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@ProductName", SqlDbType.VarChar); + param[0].Value = ProductName; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAll() + { + try + { + string sql = @"select * from [tb_Product] where ProductTypeID='f3bbde11-7188-4910-855d-806d92d142b9' and StockNo is not null order by StockNo"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + //public DataTable SearchInfoByType(string list) + //{ + // try + // { + // string sql = @"select StockNo+'-'+ProductName AS aa from [tb_Product] where StockNo+'-'+ProductName like '%' + @list + '%' and [StockNo] like '2%'"; + + // SqlParameter[] param = new SqlParameter[1]; + // param[0] = new SqlParameter("@list", SqlDbType.VarChar); + // param[0].Value = list; + + // return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + // } + // catch (Exception ex) + // { + // LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + // return null; + // } + //} + + public DataTable SearchInfoByStock(string StockNo) + { + try + { + string sql = @"select * from [tb_Product] where [StockNo]=@StockNo"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[0].Value = StockNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductOfInjectionDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductOfInjectionDAL.cs new file mode 100644 index 0000000..3d9d074 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductOfInjectionDAL.cs @@ -0,0 +1,265 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class ProductOfInjectionDAL + { + public static string TableName = "tb_Product_Injection"; + public bool AddInfo(ProductOfInjectionModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ID,PlanID,StationID,ProductDate,ClassName,StockNo,PartNo,ProductCount,BadCount)"; + sql += " VALUES ("; + sql += "@ID,"; + sql += "@PlanID,"; + sql += "@StationID,"; + sql += "@ProductDate,"; + sql += "@ClassName,"; + sql += "@StockNo,"; + sql += "@PartNo,"; + sql += "@ProductCount,"; + sql += "@BadCount)"; + + #region 添加参数 + param = new SqlParameter[9]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@PlanID", SqlDbType.VarChar); + param[1].Value = md.PlanID; + + param[2] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[2].Value = md.StationID; + + param[3] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[3].Value = md.ProductDate; + + param[4] = new SqlParameter("@ClassName", SqlDbType.VarChar); + param[4].Value = md.ClassName; + + param[5] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[5].Value = md.StockNo; + + param[6] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[6].Value = md.PartNo; + + param[7] = new SqlParameter("@ProductCount", SqlDbType.Int); + param[7].Value = md.ProductCount; + + param[8] = new SqlParameter("@BadCount", SqlDbType.Int); + param[8].Value = md.BadCount; + + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public DataTable SearchCountByInfo(string station,string date,string classname,string StockNo,string PartNo) + { + try + { + string sql = @"select * from " + TableName + " where StationID=@StationID and " + + "ProductDate=@ProductDate and ClassName=@ClassName and StockNo=@StockNo and PartNo=@PartNo"; + + SqlParameter[] param = new SqlParameter[5]; + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = station; + + param[1] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[1].Value = date; + + param[2] = new SqlParameter("@ClassName", SqlDbType.VarChar); + param[2].Value = classname; + + param[3] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[3].Value = StockNo; + + param[4] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[4].Value = PartNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateInfo(ProductOfInjectionModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = @"update " + TableName + " set ProductCount=ProductCount+@ProductCount,BadCount=BadCount+@BadCount where StationID=@StationID and ProductDate=@ProductDate and ClassName=@ClassName and StockNo=@StockNo and PartNo=@PartNo and PlanID=@PlanID"; + + #region 添加参数 + param = new SqlParameter[8]; + param[0] = new SqlParameter("@ProductCount", SqlDbType.Int); + param[0].Value = md.ProductCount; + + param[1] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[1].Value = md.StationID; + + param[2] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[2].Value = md.ProductDate; + + param[3] = new SqlParameter("@ClassName", SqlDbType.VarChar); + param[3].Value = md.ClassName; + + param[4] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[4].Value = md.StockNo; + + param[5] = new SqlParameter("@BadCount", SqlDbType.Int); + param[5].Value = md.BadCount; + + param[6] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[6].Value = md.PartNo; + + param[7] = new SqlParameter("@PlanID", SqlDbType.VarChar); + param[7].Value = md.PlanID; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdteBadInfo(ProductOfInjectionModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + if (md.StockNo != "") + { + sql = @"update " + TableName + " set BadCount=BadCount+@BadCount where StationID=@StationID and ProductDate=@ProductDate and ClassName=@ClassName and StockNo=@StockNo "; + } + else + { + sql = @"update " + TableName + " set BadCount=BadCount+@BadCount where StationID=@StationID and ProductDate=@ProductDate and ClassName=@ClassName and PartNo=@PartNo"; + } + + + #region 添加参数 + param = new SqlParameter[6]; + + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = md.StationID; + + param[1] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[1].Value = md.ProductDate; + + param[2] = new SqlParameter("@ClassName", SqlDbType.VarChar); + param[2].Value = md.ClassName; + + param[3] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[3].Value = md.StockNo; + + param[4] = new SqlParameter("@BadCount", SqlDbType.Int); + param[4].Value = md.BadCount; + + param[5] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[5].Value = md.PartNo; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + /// + /// 开机报废减产量 + /// + /// + /// + public bool updateProductCount(ProductOfInjectionModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + if (md.StockNo != "") + { + sql = @"update " + TableName + " set ProductCount=ProductCount-@ProductCount where StationID=@StationID and ProductDate=@ProductDate and ClassName=@ClassName and StockNo=@StockNo "; + } + else + { + sql = @"update " + TableName + " set ProductCount=ProductCount-@ProductCount where StationID=@StationID and ProductDate=@ProductDate and ClassName=@ClassName and PartNo=@PartNo"; + } + + + #region 添加参数 + param = new SqlParameter[6]; + + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = md.StationID; + + param[1] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[1].Value = md.ProductDate; + + param[2] = new SqlParameter("@ClassName", SqlDbType.VarChar); + param[2].Value = md.ClassName; + + param[3] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[3].Value = md.StockNo; + + param[4] = new SqlParameter("@ProductCount", SqlDbType.Int); + param[4].Value = md.ProductCount; + + param[5] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[5].Value = md.PartNo; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductTypeDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductTypeDAL.cs new file mode 100644 index 0000000..7cee704 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/ProductTypeDAL.cs @@ -0,0 +1,210 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class ProductTypeDAL + { + public static string TableName = "tb_ProductType"; + public string GetTableName() + { + return TableName; + } + /// + /// 获取全部信息 + /// + /// + public DataTable SearchInfo() + { + try + { + string sql = @"select * from "+ TableName; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 根据id查询信息 + /// + /// + /// + public DataTable SearchInfoByID(string ProductTypeID) + { + try + { + string sql = @"select * from "+ TableName + " where ProductTypeID=@ProductTypeID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@ProductTypeID", SqlDbType.VarChar); + param[0].Value = ProductTypeID; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 根据ProductTypeNo查询信息 + /// + /// + /// + public DataTable SearchByProductTypeNo(string ProductTypeNo) + { + try + { + string sql = @"select * from " + TableName + " where ProductTypeNo=@ProductTypeNo"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@ProductTypeNo", SqlDbType.VarChar); + param[0].Value = ProductTypeNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 添加信息 + /// + /// 模型 + /// + public bool AddInfo(ProductTypeModel mod) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ProductTypeID,ProductTypeNo,ProductTypeName,Des"; + sql += ") VALUES ("; + sql += "@ProductTypeID,"; + sql += "@ProductTypeNo,"; + sql += "@ProductTypeName,"; + sql += "@Des)"; + + #region 添加参数 + param = new SqlParameter[4]; + param[0] = new SqlParameter("@ProductTypeID", SqlDbType.VarChar); + param[0].Value = mod.ProductTypeID; + + param[1] = new SqlParameter("@ProductTypeNo", SqlDbType.VarChar); + param[1].Value = mod.ProductTypeNo; + + param[2] = new SqlParameter("@ProductTypeName", SqlDbType.VarChar); + param[2].Value = mod.ProductTypeName; + + param[3] = new SqlParameter("@Des", SqlDbType.VarChar); + param[3].Value = mod.Des; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 更新信息 + /// + /// 模型对象 + /// + public bool UpdateInfo(ProductTypeModel md) + { + try + { + string sql = @"update " + TableName + @" set + ProductTypeNo = @ProductTypeNo, + ProductTypeName = @ProductTypeName, + Des = @Des + where ProductTypeID=@ProductTypeID"; + + SqlParameter[] param = new SqlParameter[4]; + param[0] = new SqlParameter("@ProductTypeNo", SqlDbType.VarChar); + param[0].Value = md.ProductTypeNo; + + param[1] = new SqlParameter("@ProductTypeName", SqlDbType.VarChar); + param[1].Value = md.ProductTypeName; + + param[2] = new SqlParameter("@Des", SqlDbType.VarChar); + param[2].Value = md.Des; + + param[3] = new SqlParameter("@ProductTypeID", SqlDbType.VarChar); + param[3].Value = md.ProductTypeID; + + if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param) > 0) + { + return true; + } + return false; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + /// + /// 更新信息 + /// + /// 模型对象 + /// + public bool DeleteInfo(string ProductTypeID) + { + try + { + string sql = @"delete from " + TableName + @" where ProductTypeID=@ProductTypeID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@ProductTypeID", SqlDbType.VarChar); + param[0].Value = ProductTypeID; + + if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param) > 0) + { + return true; + } + return false; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/StationDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/StationDAL.cs new file mode 100644 index 0000000..b2ae940 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/BasicInfo/StationDAL.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System.Data; +using System.Data.SqlClient; +using System.Reflection; + +namespace MESClassLibrary.DAL.BasicInfo +{ + public class StationDAL + { + public static string TableName = "tb_Station"; + + public DataTable SearchInfoByNo(string station) + { + try + { + string sql = @"select * from " + TableName + " where StationNo=@StationNo"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@StationNo", SqlDbType.VarChar); + param[0].Value = station; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Check/InspectResultDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Check/InspectResultDAL.cs new file mode 100644 index 0000000..945be7b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Check/InspectResultDAL.cs @@ -0,0 +1,253 @@ +using MESClassLibrary.BLL.Log; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.DAL.Check +{ + public class InspectResultDAL + { + public DataTable SearchByPage(int pageIndex, int pageSize, string StartTime, string EndTime, string position, string inspectResult) + { + try + { + //string sql = @"select top " + pageSize + " * from (select row_number() over(order by createTime desc) as rownumber,* from tb_InspectResult) temp_row "; + //sql += " where createTime>='"+ StartTime + "' and createTime<='" + EndTime + "'"; + //if (!string.IsNullOrEmpty(position)) + //{ + // sql += " and position = '" + position+"'"; + //} + //if (!string.IsNullOrEmpty(inspectResult)) + //{ + // sql += " and inspectResult like '%" + inspectResult + "%'"; + //} + //sql += " and rownumber > " + ((pageIndex - 1) * pageSize); + + string sql = "select * FROM[dbo].[tb_InspectResult] where barcode in "; + sql += "(select barcode from(select distinct barcode, createTime from [dbo].[tb_InspectResult] "; + sql += " where barcode is not null and createTime>='" + StartTime + "' and createTime<='" + EndTime + "' "; + if (!string.IsNullOrEmpty(position)) + { + sql += " and position = '" + position + "' "; + } + if (!string.IsNullOrEmpty(inspectResult)) + { + sql += " and inspectResult like '%" + inspectResult + "%' "; + } + sql += " order by createTime "; + sql += " offset " + ((pageIndex - 1) * pageSize) + " rows "; + sql += " fetch next " + pageSize + " rows only) temp_row) "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchRepairByPage(int pageIndex, int pageSize, string StartTime, string EndTime, string inspectResult) + { + try + { + string sql = @" SELECT * FROM dbo.tb_InspectResult "; + + //sql += "(select barcode from(select distinct barcode, createTime from [dbo].[tb_InspectResult] "; + sql += " where barcode IS NOT NULL AND createTime BETWEEN '" + StartTime + "' AND '" + EndTime + ".999' and position='下线二检 点修补'"; + + if (!string.IsNullOrEmpty(inspectResult)) + { + sql += " and inspectResult like '%" + inspectResult + "%' "; + } + sql += " order by createTime "; + sql += " offset " + ((pageIndex - 1) * pageSize) + " rows "; + sql += " fetch next " + pageSize + " rows only "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public int SearchCount(string StartTime, string EndTime, string position, string inspectResult) + { + try + { + string sql = "select count(1) as num from (select barcode as num FROM[dbo].[tb_InspectResult] where barcode in "; + sql += "(select distinct barcode from [dbo].[tb_InspectResult] "; + sql += " where barcode is not null and createTime>='" + StartTime + "' and createTime<='" + EndTime + "' "; + if (!string.IsNullOrEmpty(position)) + { + sql += " and position = '" + position + "' "; + } + if (!string.IsNullOrEmpty(inspectResult)) + { + sql += " and inspectResult like '%" + inspectResult + "%' "; + } + sql += " ) GROUP BY barcode) tem"; + //string sql = "select count(1) as num FROM[dbo].[tb_InspectResult] "; + //sql += " where barcode is not null and createTime>='" + StartTime + "' and createTime<='" + EndTime + "' "; + //if (!string.IsNullOrEmpty(position)) + //{ + // sql += " and position = '" + position + "' "; + //} + //if (!string.IsNullOrEmpty(inspectResult)) + //{ + // sql += " and inspectResult like '%" + inspectResult + "%' "; + //} + + return Convert.ToInt32(SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0].Rows[0]["num"].ToString()); + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return 0; + } + } + + public int SearchCountByRepair(string StartTime, string EndTime, string inspectResult) + { + string sql = @" SELECT COUNT(*) as num FROM dbo.tb_InspectResult "; + //sql += "(select barcode from(select distinct barcode, createTime from [dbo].[tb_InspectResult] "; + sql += " where barcode IS NOT NULL AND createTime BETWEEN '" + StartTime + "' AND '" + EndTime + ".999' and position='下线二检 点修补'"; + + //string sql = @" SELECT COUNT(DISTINCT barcode) as num FROM dbo.tb_InspectResult WHERE barcode IS NOT NULL AND createTime BETWEEN '"+ StartTime + "' AND '"+ EndTime + ".999' AND position='下线二检 点修补'"; + if (!string.IsNullOrEmpty(inspectResult)) + { + sql += " and inspectResult like '%" + inspectResult + "%' "; + } + return Convert.ToInt32(SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0].Rows[0]["num"].ToString()); + } + + public DataTable Search(string StartTime, string EndTime, string position, string inspectResult) + { + try + { + + string sql = "select * FROM[dbo].[tb_InspectResult] where barcode in "; + sql += "(select distinct barcode from [dbo].[tb_InspectResult] "; + sql += " where barcode is not null and createTime<='" + EndTime + "' and createTime>='" + StartTime + "' "; + if (!string.IsNullOrEmpty(position)) + { + sql += " and position = '" + position + "' "; + } + if (!string.IsNullOrEmpty(inspectResult)) + { + sql += " and inspectResult like '%" + inspectResult + "%' "; + } + sql += " ) order by createTime"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByRepair(string StartTime, string EndTime, string inspectResult) + { + try + { + + string sql = "select * FROM dbo.tb_InspectResult "; + sql += " where barcode IS NOT NULL AND createTime BETWEEN '" + StartTime + "' AND '" + EndTime + ".999' AND position='下线二检 点修补'"; + + if (!string.IsNullOrEmpty(inspectResult)) + { + sql += " and inspectResult like '%" + inspectResult + "%' "; + } + sql += " order by createTime"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + public DataTable SearchByPosition(string StartTime, string EndTime, string side, string product) + { + try + { + + string sql = "select * FROM[dbo].[tb_InspectResult] "; + sql += " where barcode is not null and createTime BETWEEN '" + StartTime + "' AND '" + EndTime + "'"; + if (!string.IsNullOrEmpty(side)) + { + if ("A侧".Equals(side)) + { + sql += " and (side = '" + side + "' or side ='' or side is null) "; + } + if ("B侧".Equals(side)) + { + sql += " and side = '" + side + "' "; + } + + } + if (!string.IsNullOrEmpty(product)) + { + if ("保险杠".Equals(product)) + { + sql += " and (product like '%前保%' or product like '%后保%')"; + } + } + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByResult(string StartTime, string EndTime, string side) + { + try + { + + string sql = "select ID,barcode,side,position,stationNo,workClass,inspectResult,damnPosition,defectID,reason,productInfo,productOption,createTime,InspectTimes,replace(remark1,' ','') as remark1,remark2,remark3 FROM[dbo].[tb_InspectResult] "; + sql += " where barcode is not null and createTime BETWEEN '" + StartTime + "' and '" + EndTime + "' "; + sql += " and remark1 is not null and remark2 is not null"; + if (!string.IsNullOrEmpty(side)) + { + if ("A侧".Equals(side)) + { + sql += " and (side = '" + side + "' or side ='' or side is null) "; + } + if ("B侧".Equals(side)) + { + sql += " and side = '" + side + "' "; + } + + } + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/DataTableExtend.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/DataTableExtend.cs new file mode 100644 index 0000000..e67ea49 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/DataTableExtend.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; + +namespace MESClassLibrary.DAL +{ + public static class DataTableExtend + { + /// + /// 返回执行Select distinct后的DataTable + /// + /// 源数据表 + /// 字段集 + /// + public static DataTable SelectDistinct(DataTable SourceTable, params string[] FieldNames) + { + object[] lastValues; + DataTable newTable; + DataRow[] orderedRows; + + if (FieldNames == null || FieldNames.Length == 0) + throw new ArgumentNullException("FieldNames"); + + lastValues = new object[FieldNames.Length]; + newTable = new DataTable(); + + foreach (string fieldName in FieldNames) + newTable.Columns.Add(fieldName, SourceTable.Columns[fieldName].DataType); + + orderedRows = SourceTable.Select("", string.Join(",", FieldNames)); + + foreach (DataRow row in orderedRows) + { + if (!fieldValuesAreEqual(lastValues, row, FieldNames)) + { + newTable.Rows.Add(createRowClone(row, newTable.NewRow(), FieldNames)); + + setLastValues(lastValues, row, FieldNames); + } + } + + return newTable; + } + + private static bool fieldValuesAreEqual(object[] lastValues, DataRow currentRow, string[] fieldNames) + { + bool areEqual = true; + + for (int i = 0; i < fieldNames.Length; i++) + { + //if (lastValues[i] == null || !lastValues[i].Equals(currentRow[fieldNames[i]])) + //品牌字母有的大写,有的小写 + //if(lastValues[i] == null || lastValues[i].ToString().ToUpper()!= currentRow[fieldNames[i]].ToString().ToUpper()) + if(lastValues[i] == null || lastValues[i].ToString()!= currentRow[fieldNames[i]].ToString()) + { + areEqual = false; + break; + } + } + + return areEqual; + } + + private static DataRow createRowClone(DataRow sourceRow, DataRow newRow, string[] fieldNames) + { + foreach (string field in fieldNames) + newRow[field] = sourceRow[field].ToString();//品牌字母有的大写,有的小写 + + return newRow; + } + + private static void setLastValues(object[] lastValues, DataRow sourceRow, string[] fieldNames) + { + for (int i = 0; i < fieldNames.Length; i++) + lastValues[i] = sourceRow[fieldNames[i]]; + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/GetNewTasksDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/GetNewTasksDAL.cs new file mode 100644 index 0000000..8b0e8ae --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/GetNewTasksDAL.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.ExchangeCenter +{ + public class GetNewTasksDAL + { + public static string TableName = "tb_GetNewTasks"; + + public bool AddInfo(GetNewTasksModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " ([TaskState] ,[TaskID] ,[TableName],[TableName2],[TableName3],[Creator],[DataCount],[Subscriber] ,[FailedCount],[FailedInfo],[Domain],[Site],[GUID] ,[UID],[CreateUser],[CreateTime],[Remark],[UpdateUser] ,[UpdateTime],[IsChecked]"; + sql += ") VALUES ("; + sql += "@TaskState,"; + sql += "@TaskID,"; + sql += "@TableName,"; + sql += "@TableName2,"; + sql += "@TableName3,"; + sql += "@Creator,"; + sql += "@DataCount,"; + sql += "@Subscriber,"; + sql += "@FailedCount,"; + sql += "@FailedInfo,"; + sql += "@Domain,"; + sql += "@Site,"; + sql += "@GUID,"; + sql += "@UID,"; + sql += "@CreateUser,"; + sql += "@CreateTime,"; + sql += "@Remark,"; + sql += "@UpdateUser,"; + sql += "@UpdateTime,"; + sql += "@IsChecked)"; + + #region 添加参数 + param = new SqlParameter[20]; + param[0] = new SqlParameter("@TaskState", SqlDbType.VarChar); + param[0].Value = md.TaskState; + + param[1] = new SqlParameter("@TaskID", SqlDbType.VarChar); + param[1].Value = md.TaskID; + + param[2] = new SqlParameter("@TableName", SqlDbType.VarChar); + param[2].Value = md.TableName; + + param[3] = new SqlParameter("@TableName2", SqlDbType.VarChar); + param[3].Value = md.TableName2; + + param[4] = new SqlParameter("@TableName3", SqlDbType.VarChar); + param[4].Value = md.TableName3; + + param[5] = new SqlParameter("@Creator", SqlDbType.VarChar); + param[5].Value = md.Creator; + + param[6] = new SqlParameter("@DataCount", SqlDbType.VarChar); + param[6].Value = md.DataCount; + + param[7] = new SqlParameter("@Subscriber", SqlDbType.VarChar); + param[7].Value = md.Subscriber; + + param[8] = new SqlParameter("@FailedCount", SqlDbType.VarChar); + param[8].Value = md.FailedCount; + + param[9] = new SqlParameter("@FailedInfo", SqlDbType.VarChar); + param[9].Value = md.FailedInfo; + + param[10] = new SqlParameter("@Domain", SqlDbType.VarChar); + param[10].Value = md.Domain; + + param[11] = new SqlParameter("@Site", SqlDbType.VarChar); + param[11].Value = md.Site; + + param[12] = new SqlParameter("@GUID", SqlDbType.VarChar); + param[12].Value = md.GUID; + + param[13] = new SqlParameter("@UID", SqlDbType.VarChar); + param[13].Value = md.UID; + + param[14] = new SqlParameter("@CreateUser", SqlDbType.VarChar); + param[14].Value = md.CreateUser; + + param[15] = new SqlParameter("@CreateTime", SqlDbType.VarChar); + param[15].Value = md.CreateTime; + + param[16] = new SqlParameter("@Remark", SqlDbType.VarChar); + param[16].Value = md.Remark; + + param[17] = new SqlParameter("@UpdateUser", SqlDbType.VarChar); + param[17].Value = md.UpdateUser; + + param[18] = new SqlParameter("@UpdateTime", SqlDbType.VarChar); + param[18].Value = md.UpdateTime; + + param[19] = new SqlParameter("@IsChecked", SqlDbType.VarChar); + param[19].Value = md.IsChecked; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartMstrDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartMstrDAL.cs new file mode 100644 index 0000000..81ae206 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartMstrDAL.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.ExchangeCenter +{ + public class PartMstrDAL + { + public static string TableName = "TES_PART_MSTR"; + public bool AddInfo(PartMstrModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (GUID,PartCode,Desc1,Desc2,Um,ProdLine,AddDate,PartType,Status,Qgrade,InventoryCode,UID,Remark,TaskID,CommandType,Domain,Site"; + sql += ") VALUES ("; + sql += "@GUID,"; + sql += "@PartCode,"; + sql += "@Desc1,"; + sql += "@Desc2,"; + sql += "@Um,"; + sql += "@ProdLine,"; + sql += "@AddDate,"; + sql += "@PartType,"; + sql += "@Status,"; + sql += "@Qgrade,"; + sql += "@InventoryCode,"; + sql += "@UID,"; + sql += "@Remark,"; + sql += "@TaskID,"; + sql += "@CommandType,"; + sql += "@Domain,"; + sql += "@Site)"; + + #region 添加参数 + param = new SqlParameter[17]; + param[0] = new SqlParameter("@GUID", SqlDbType.VarChar); + param[0].Value = md.GUID; + + param[1] = new SqlParameter("@PartCode", SqlDbType.VarChar); + param[1].Value = md.PartCode; + + param[2] = new SqlParameter("@Desc1", SqlDbType.VarChar); + param[2].Value = md.Desc1; + + param[3] = new SqlParameter("@Desc2", SqlDbType.VarChar); + param[3].Value = md.Desc2; + + param[4] = new SqlParameter("@Um", SqlDbType.VarChar); + param[4].Value = md.Um; + + param[5] = new SqlParameter("@ProdLine", SqlDbType.VarChar); + param[5].Value = md.ProdLine; + + param[6] = new SqlParameter("@AddDate", SqlDbType.VarChar); + param[6].Value = md.AddDate; + + param[7] = new SqlParameter("@PartType", SqlDbType.VarChar); + param[7].Value = md.PartType; + + param[8] = new SqlParameter("@Status", SqlDbType.VarChar); + param[8].Value = md.Status; + + param[9] = new SqlParameter("@Qgrade", SqlDbType.VarChar); + param[9].Value = md.Qgrade; + + param[10] = new SqlParameter("@InventoryCode", SqlDbType.VarChar); + param[10].Value = md.InventoryCode; + + param[11] = new SqlParameter("@UID", SqlDbType.VarChar); + param[11].Value = md.UID; + + param[12] = new SqlParameter("@Remark", SqlDbType.VarChar); + param[12].Value = md.Remark; + + param[13] = new SqlParameter("@TaskID", SqlDbType.VarChar); + param[13].Value = md.TaskID; + + param[14] = new SqlParameter("@CommandType", SqlDbType.VarChar); + param[14].Value = md.CommandType; + + param[15] = new SqlParameter("@Domain", SqlDbType.VarChar); + param[15].Value = md.Domain; + + param[16] = new SqlParameter("@Site", SqlDbType.VarChar); + param[16].Value = md.Site; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartRecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartRecordDAL.cs new file mode 100644 index 0000000..299ea2e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/PartRecordDAL.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.ExchangeCenter +{ + public class PartRecordDAL + { + public bool AddInfo(PartRecordModel md) + { + try + { + string sql =@"insert into tb_PartRecord (ID,PartNo,TaskID,CommandType) values(@ID,@PartNo,@TaskID,@CommandType)"; + + SqlParameter[] param=new SqlParameter[4]; + + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[1].Value = md.PartNo; + + param[3] = new SqlParameter("@TaskID", SqlDbType.VarChar); + param[3].Value = md.TaskID; + + param[4] = new SqlParameter("@CommandType", SqlDbType.VarChar); + param[4].Value = md.CommandType; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESBomDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESBomDAL.cs new file mode 100644 index 0000000..04a3075 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESBomDAL.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.ExchangeCenter +{ + public class TESBomDAL + { + public static string TableName = "TES_BOM"; + + public bool AddInfo(TESBomModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ParentPart,ComponentPart,Reference,StartEffective,QuantityPer,StructureType,EndEffective,Remarks,Scrap,LeadTimeOffset,Operation,SequenceNumber,FporecastPercent,OptionGroup,Process,GUID,UID,CreateUser,CreateTime,Remark,TaskID,CommandType,DataID,Domain,Site"; + sql += ") VALUES ("; + sql += "@ParentPart,"; + sql += "@ComponentPart,"; + sql += "@Reference,"; + sql += "@StartEffective,"; + sql += "@QuantityPer,"; + sql += "@StructureType,"; + sql += "@EndEffective,"; + sql += "@Remarks,"; + sql += "@Scrap,"; + sql += "@LeadTimeOffset,"; + sql += "@Operation,"; + sql += "@SequenceNumber,"; + sql += "@FporecastPercent,"; + sql += "@OptionGroup,"; + sql += "@Process,"; + sql += "@GUID,"; + sql += "@UID,"; + sql += "@CreateUser,"; + sql += "@CreateTime,"; + sql += "@Remark,"; + sql += "@TaskID,"; + sql += "@CommandType,"; + sql += "@DataID,"; + sql += "@Domain,"; + sql += "@Site)"; + + #region 添加参数 + param = new SqlParameter[25]; + param[0] = new SqlParameter("@ParentPart", SqlDbType.VarChar); + param[0].Value = md.ParentPart; + + param[1] = new SqlParameter("@ComponentPart", SqlDbType.VarChar); + param[1].Value = md.ComponentPart; + + param[2] = new SqlParameter("@Reference", SqlDbType.VarChar); + param[2].Value = md.Reference; + + param[3] = new SqlParameter("@StartEffective", SqlDbType.VarChar); + param[3].Value = md.StartEffective; + + param[4] = new SqlParameter("@QuantityPer", SqlDbType.VarChar); + param[4].Value = md.QuantityPer; + + param[5] = new SqlParameter("@StructureType", SqlDbType.VarChar); + param[5].Value = md.StructureType; + + param[6] = new SqlParameter("@EndEffective", SqlDbType.VarChar); + param[6].Value = md.EndEffective; + + param[7] = new SqlParameter("@Remarks", SqlDbType.VarChar); + param[7].Value = md.Remarks; + + param[8] = new SqlParameter("@Scrap", SqlDbType.VarChar); + param[8].Value = md.Scrap; + + param[9] = new SqlParameter("@LeadTimeOffset", SqlDbType.VarChar); + param[9].Value = md.LeadTimeOffset; + + param[10] = new SqlParameter("@Operation", SqlDbType.VarChar); + param[10].Value = md.Operation; + + param[11] = new SqlParameter("@SequenceNumber", SqlDbType.VarChar); + param[11].Value = md.SequenceNumber; + + param[12] = new SqlParameter("@FporecastPercent", SqlDbType.VarChar); + param[12].Value = md.FporecastPercent; + + param[13] = new SqlParameter("@OptionGroup", SqlDbType.VarChar); + param[13].Value = md.OptionGroup; + + param[14] = new SqlParameter("@Process", SqlDbType.VarChar); + param[14].Value = md.Process; + + param[15] = new SqlParameter("@GUID", SqlDbType.VarChar); + param[15].Value = md.GUID; + + param[16] = new SqlParameter("@UID", SqlDbType.VarChar); + param[16].Value = md.UID; + + param[17] = new SqlParameter("@CreateUser", SqlDbType.VarChar); + param[17].Value = md.CreateUser; + + param[18] = new SqlParameter("@CreateTime", SqlDbType.VarChar); + param[18].Value = md.CreateTime; + + param[19] = new SqlParameter("@Remark", SqlDbType.VarChar); + param[19].Value = md.Remark; + + param[20] = new SqlParameter("@TaskID", SqlDbType.VarChar); + param[20].Value = md.TaskID; + + param[21] = new SqlParameter("@CommandType", SqlDbType.VarChar); + param[21].Value = md.CommandType; + + param[22] = new SqlParameter("@DataID", SqlDbType.VarChar); + param[22].Value = md.DataID; + + param[23] = new SqlParameter("@Domain", SqlDbType.VarChar); + param[23].Value = md.Domain; + + param[24] = new SqlParameter("@Site", SqlDbType.VarChar); + param[24].Value = md.Site; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable Search() + { + try + { + string sql = "select * from " + TableName + " where ParentPart like '%-P' and ComponentPart like 'ROH%' and Flag=0"; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateFlag(string TaskID) + { + try + { + string sql = "update " + TableName + " set Flag=1 where TaskID=@TaskID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@TaskID", SqlDbType.VarChar); + param[0].Value = TaskID; + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESPartDetDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESPartDetDAL.cs new file mode 100644 index 0000000..ec7240a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/ExchangeCenter/TESPartDetDAL.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.ExchangeCenter +{ + public class TESPartDetDAL + { + public static string TableName = "TES_PART_DET"; + + public bool AddInfo(TESPartDetModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " ([GUID],[PartCode],[Site],[KeyPart],SetupTime,UID,CreateUser,CreateTime,Remark,TaskID,CommandType,DataID,Domain"; + sql += ") VALUES ("; + sql += "@GUID,"; + sql += "@PartCode,"; + sql += "@Site,"; + sql += "@KeyPart,"; + sql += "@SetupTime,"; + sql += "@UID,"; + sql += "@CreateUser,"; + sql += "@CreateTime,"; + sql += "@Remark,"; + sql += "@TaskID,"; + sql += "@CommandType,"; + sql += "@DataID,"; + sql += "@Domain)"; + + #region 添加参数 + + param = new SqlParameter[13]; + param[0] = new SqlParameter("@GUID", SqlDbType.VarChar); + param[0].Value = md.GUID; + + param[1] = new SqlParameter("@PartCode", SqlDbType.VarChar); + param[1].Value = md.PartCode; + + param[2] = new SqlParameter("@Site", SqlDbType.VarChar); + param[2].Value = md.Site; + + param[3] = new SqlParameter("@KeyPart", SqlDbType.VarChar); + param[3].Value = md.KeyPart; + + param[4] = new SqlParameter("@SetupTime", SqlDbType.VarChar); + param[4].Value = md.SetupTime; + + param[5] = new SqlParameter("@UID", SqlDbType.VarChar); + param[5].Value = md.UID; + + param[6] = new SqlParameter("@CreateUser", SqlDbType.VarChar); + param[6].Value = md.CreateUser; + + param[7] = new SqlParameter("@CreateTime", SqlDbType.VarChar); + param[7].Value = md.CreateTime; + + param[8] = new SqlParameter("@Remark", SqlDbType.VarChar); + param[8].Value = md.Remark; + + param[9] = new SqlParameter("@TaskID", SqlDbType.VarChar); + param[9].Value = md.TaskID; + + param[10] = new SqlParameter("@CommandType", SqlDbType.VarChar); + param[10].Value = md.CommandType; + + param[11] = new SqlParameter("@DataID", SqlDbType.VarChar); + param[11].Value = md.DataID; + + param[12] = new SqlParameter("@Domain", SqlDbType.VarChar); + param[12].Value = md.Domain; + + #endregion + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/DownReasonDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/DownReasonDAL.cs new file mode 100644 index 0000000..e4a90f2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/DownReasonDAL.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.Injection +{ + public class DownReasonDAL + { + public DataTable SearchReason() + { + try + { + string sql = @"select * from tb_Inhection_DownReason"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionDownRecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionDownRecordDAL.cs new file mode 100644 index 0000000..476aa95 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionDownRecordDAL.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.Injection +{ + public class InjectionDownRecordDAL + { + public static string TableName = "tb_Injection_DownRecord"; + public bool AddInfo(InjectionDownRecordModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = " IF NOT EXISTS (SELECT * FROM tb_Injection_DownRecord WHERE StationID=@StationID AND EndTime IS NULL ) INSERT INTO " + TableName + " ([ID] ,[StationID] ,[DownType],[DownReason],[Des],[StartTime]"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@StationID,"; + sql += "@DownType,"; + sql += "@DownReason,"; + sql += "@Des,"; + sql += "@StartTime)"; + + #region 添加参数 + param = new SqlParameter[6]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[1].Value = md.StationID; + + param[2] = new SqlParameter("@DownType", SqlDbType.VarChar); + param[2].Value = md.DownType; + + param[3] = new SqlParameter("@DownReason", SqlDbType.VarChar); + param[3].Value = md.DownReason; + + param[4] = new SqlParameter("@Des", SqlDbType.VarChar); + param[4].Value = md.Des; + + param[5] = new SqlParameter("@StartTime", SqlDbType.DateTime); + param[5].Value = md.StartTime; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(InjectionDownRecordModel md) + { + try + { + #region 添加数据 + //string sql = @"update " + TableName + " set EndTime=@EndTime WHERE [StationID]=@StationID AND EndTime IS NULL "; + string sql = @"update " + TableName + " set DownType=@DownType,DownReason=@DownReason,Des=@Des WHERE ID=(select top 1 ID from tb_Injection_DownRecord where [StationID]=@StationID AND EndTime IS NULL order by StartTime DESC)"; + SqlParameter[] param = null; + + #region 添加参数 + param = new SqlParameter[4]; + param[0] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[0].Value = md.StationID; + + param[1] = new SqlParameter("@DownType", SqlDbType.VarChar); + param[1].Value = md.DownType; + + param[2] = new SqlParameter("@DownReason", SqlDbType.VarChar); + param[2].Value = md.DownReason; + + param[3] = new SqlParameter("@Des", SqlDbType.VarChar); + param[3].Value = md.Des; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + + public DataTable SearchByTime(string StartTime, string EndTime) + { + try + { + string sql = @" SELECT * FROM dbo.tb_Injection_DownRecord "; + sql += " where StationID is not null and StartTime>='" + StartTime + "' and EndTime<='" + EndTime + "'"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + public DataTable SearchChangeRecord(string StartTime, string EndTime, string ModelId) + { + try + { + string sql = @" SELECT s.StationNo,m.PrintDate,d.StartTime,d.DownTime,d.EndTime,m.ModelSumCount,m.ModelPrintCount,d.remark1 FROM (SELECT * FROM [dbo].[tb_ModelCount] WHERE "; + sql += "ModelID = '" + ModelId + "' and PrintDate>= '"+ StartTime + "' and PrintDate<= '"+ EndTime + "') as m "; + sql += "left join (SELECT* FROM [dbo].[tb_Injection_DownRecord] where StationID is not null and StartTime>='" + StartTime + "' and EndTime<='" + EndTime + "') as d on m.StationID = d.StationID left join tb_Station s on d.StationID = s.StationID"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + //故障停机查询 + public DataTable SearchRepaorByTime(string StartTime, string EndTime) + { + try + { + string sql = @" SELECT d.StationID,s.StationNo,d.StartTime,d.EndTime,d.DownTime,d.Des,d.Remark1,d.Remark2,d.Remark3 FROM dbo.tb_Injection_DownRecord d "; + sql += " left join tb_Station s on d.StationID = s.StationID "; + sql += " where d.StationID is not null and d.StartTime>='" + StartTime + "' and d.EndTime<='" + EndTime + "' and d.DownType='F1F851FB-8913-40B7-A992-F28A3FD25054' order by d.StartTime"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionRecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionRecordDAL.cs new file mode 100644 index 0000000..190ab03 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Injection/InjectionRecordDAL.cs @@ -0,0 +1,113 @@ +using MESClassLibrary.BLL.Log; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace MESClassLibrary.DAL.Injection +{ + public class InjectionRecordDAL + { + public DataTable SearchByTime(string StartTime, string EndTime) + { + try + { + + string sql = "select * FROM [dbo].[tb_Product_Injection] "; + sql += " where ProductDate is not null and ProductDate>='" + StartTime + "' and ProductDate<='" + EndTime + "'"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchProductInjectionRecord(string StartTime, string EndTime) { + + string sql = "SELECT t.PlanID,t.ProductDate,t.ClassName,s.StationNo,p.ProductName,r.MaterialName,r.BatchNo,pl.OpenDebugTime,pl.CycleTime,i.RealCycle,i.PlanCount,t.ProductCount,t.BadCount,pl.Weight,ir.Waste_Weight,ir.JK_Weight,i.BeginTime,i.EndTime "; + sql += " FROM[dbo].[tb_Product_Injection] t "; + sql += " left join tb_Product p on t.PartNo = p.PartNo "; + sql += " left join tb_Station s on t.StationID = s.StationID "; + sql += " left join tb_InjectPlanReport r on t.PlanID = r.InjectionPlanID "; + sql += " left join tb_Plastic pl on t.StockNo = pl.StockNo and t.StationID = pl.StationID "; + sql += " left join tb_InjectionPlan i on t.PlanID = i.InjectionPlanID "; + sql += " left join tb_Injection_Record ir on t.PlanID = ir.PlanID "; + sql += " where t.ProductDate >='" + StartTime + "' and t.ProductDate <='" + EndTime + "' order by t.ProductDate,t.ClassName,t.StationID"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + + public DataTable SearchProductInjectionRecordBadReason(string StartTime, string EndTime) + { + + string sql = "SELECT bc.PlanID,bi.BadReason from tb_Bad_Injection bi "; + sql += " left join tb_BarCode bc on bi.OneBarCode = bc.OneBarCode "; + sql += " where bc.PlanID in (SELECT PlanID FROM tb_Product_Injection t where t.ProductDate >='"+ StartTime + "' and t.ProductDate <='"+ EndTime + "')"; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + + + public DataTable SearchProductInjectionRecordDownReason(string StartTime, string EndTime) + { + + string sql = "SELECT PlanID,DownTime,DownTypeName,Reason from tb_Injection_DownRecord r "; + sql += " left join tb_Injection_DownType t on r.DownType = t.ID "; + sql += " left join tb_Inhection_DownReason s on r.DownReason = s.ID "; + sql += " where r.PlanID in (SELECT PlanID FROM tb_Product_Injection t where t.ProductDate >='" + StartTime + "' and t.ProductDate <='" + EndTime + "') and DownTime is not null"; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + + + public DataTable SearchProductInjection(string StartTime, string EndTime,string StationID) + { + + string sql = "SELECT t.ID,t.ProductDate,t.ClassName,s.StationNo,t.StockNo,t.PartNo,t.ProductCount,ir.RealCycle,ir.Waste_Weight,ir.JK_Weight "; + sql += " FROM[dbo].[tb_Product_Injection] t "; + sql += " left join tb_Station s on t.StationID = s.StationID "; + sql += " left join tb_Injection_Record ir on t.ID = ir.PI_ID "; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + + + public DataTable SearchRecordByPage(int pageIndex, int pageSize, string StartTime, string EndTime, string StationID) + { + try + { + string sql = @"SELECT t.ID,t.ProductDate,t.ClassName,t.StationID,s.StationNo,t.StockNo,t.PartNo,t.ProductCount,ir.RealCycle,ir.Waste_Weight,ir.JK_Weight "; + sql += " FROM[dbo].[tb_Product_Injection] t "; + sql += " left join tb_Station s on t.StationID = s.StationID "; + sql += " left join tb_Product_Injection_w ir on t.ID = ir.ID "; + sql += " where t.ProductDate >='" + StartTime + "' and t.ProductDate <='" + EndTime + "' "; + + if (!string.IsNullOrEmpty(StationID)) + { + sql += " and t.StationID = '" + StationID + "' "; + } + sql += " order by t.ProductDate,t.ClassName,t.StationID "; + sql += " offset " + ((pageIndex - 1) * pageSize) + " rows "; + sql += " fetch next " + pageSize + " rows only "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/AssemblyDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/AssemblyDAL.cs new file mode 100644 index 0000000..57b129a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/AssemblyDAL.cs @@ -0,0 +1,202 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.Mistake247 +{ + public class AssemblyDAL + { + public static string TableName = "tb_Assembly_247"; + public bool AddInfo(AssemblyModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ID,PartNo,PartName,BatchNo,Color,ColorNo,PartType,TapeBatchNo,Validity,ValidityDate,Des,Flag"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@PartNo,"; + sql += "@PartName,"; + sql += "@BatchNo,"; + sql += "@Color,"; + sql += "@ColorNo,"; + sql += "@PartType,"; + sql += "@TapeBatchNo,"; + sql += "@Validity,"; + sql += "@ValidityDate,"; + sql += "@Des,"; + sql += "@Flag)"; + + #region 添加参数 + param = new SqlParameter[12]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[1].Value = md.PartNo; + + param[2] = new SqlParameter("@PartName", SqlDbType.VarChar); + param[2].Value = md.PartName; + + param[3] = new SqlParameter("@BatchNo", SqlDbType.VarChar); + param[3].Value = md.BatchNo; + + param[4] = new SqlParameter("@Color", SqlDbType.VarChar); + param[4].Value = md.Color; + + param[5] = new SqlParameter("@ColorNo", SqlDbType.VarChar); + param[5].Value = md.ColorNo; + + param[6] = new SqlParameter("@PartType", SqlDbType.VarChar); + param[6].Value = md.PartType; + + param[7] = new SqlParameter("@TapeBatchNo", SqlDbType.VarChar); + param[7].Value = md.TapeBatchNo; + + param[8] = new SqlParameter("@Validity", SqlDbType.VarChar); + param[8].Value = md.Validity; + + param[9] = new SqlParameter("@ValidityDate", SqlDbType.VarChar); + param[9].Value = md.ValidityDate; + + param[10] = new SqlParameter("@Des", SqlDbType.VarChar); + param[10].Value = md.Des; + + param[11] = new SqlParameter("@Flag", SqlDbType.Int); + param[11].Value = md.Flag; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(AssemblyModel md) + { + string sql = ""; + SqlParameter[] param = null; + + try + { + sql = "update " + TableName + " set PrintTime=(select getdate()) where substring (PartNo,1,11)= @PartNo and (PrintTime is null or PrintTime='')"; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = md.PartNo.Substring(0,11); + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + public DataTable SearchCount(string PartNo) + { + try + { + string sql = @"SELECT count(*) as sum from tb_Assembly_247 where PartNo=@PartNo and IsPrintBox=0"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = PartNo; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdatePrintFlag(AssemblyModel md) + { + string sql = ""; + SqlParameter[] param = null; + + try + { + sql = "update " + TableName + " set IsPrintBox=1 where PartNo=@PartNo and IsPrintBox =0"; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = md.PartNo; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdatePrintFlag1(string partno) + { + string sql = ""; + SqlParameter[] param = null; + + try + { + sql = "update " + TableName + " set IsPrintBox=1 where PartNo=@PartNo and IsPrintBox =0"; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = partno; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable searchPartNo(string partNo) + { + try + { + string sql = @"SELECT top 1 * from tb_Assembly_247 where PartNo like '%" + partNo + "%' and Flag=0 order by CreateTime desc"; + //SqlParameter[] param = new SqlParameter[1]; + + //param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + //param[0].Value = partNo; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/BoxDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/BoxDAL.cs new file mode 100644 index 0000000..ee07b17 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/BoxDAL.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.Mistake247 +{ + public class BoxDAL + { + public static string TableName = "tb_Box_247"; + public bool AddInfo(BoxModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ID,BoxNo,PartNo,PartName,BatchNo,BoxCount,Des,Flag,Validity,ValidityDate"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@BoxNo,"; + sql += "@PartNo,"; + sql += "@PartName,"; + sql += "@BatchNo,"; + sql += "@BoxCount,"; + sql += "@Des,"; + sql += "@Flag,"; + sql += "@Validity,"; + sql += "@ValidityDate)"; + + #region 添加参数 + param = new SqlParameter[10]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@BoxNo", SqlDbType.VarChar); + param[1].Value = md.BoxNo; + + param[2] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[2].Value = md.PartNo; + + param[3] = new SqlParameter("@PartName", SqlDbType.VarChar); + param[3].Value = md.PartName; + + param[4] = new SqlParameter("@BatchNo", SqlDbType.VarChar); + param[4].Value = md.BatchNo; + + param[5] = new SqlParameter("@BoxCount", SqlDbType.Int); + param[5].Value = md.BoxCount; + + param[6] = new SqlParameter("@Des", SqlDbType.VarChar); + param[6].Value = md.Des; + + param[7] = new SqlParameter("@Flag", SqlDbType.Int); + param[7].Value = md.Flag; + + param[8] = new SqlParameter("@Validity", SqlDbType.VarChar); + param[8].Value = md.Validity; + + param[9] = new SqlParameter("@ValidityDate", SqlDbType.VarChar); + param[9].Value = md.ValidityDate; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchByNo(string PartNo,string BatchNo) + { + try + { + string sql = @"SELECT top 1 * from " + TableName + " where PartNo=@PartNo and SUBSTRING(BoxNo,13,6)=@BatchNo order by CreateTime"; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = PartNo; + + param[1] = new SqlParameter("@BatchNo", SqlDbType.VarChar); + param[1].Value = BatchNo; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool UpdateInfo(BoxModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = "update " + TableName + " set PrintTime=(select getdate()) where PartNo=@PartNo and PrintTime is null"; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = md.PartNo; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchBox(string partno) + { + try + { + string sql = @"SELECT top 1 * from " + TableName + " where PartNo=@PartNo and Flag=0 order by CreateTime"; + SqlParameter[] param = null; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = partno; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchBoxIsExsit(string box) + { + try + { + string sql = @"SELECT * from " + TableName + " where BoxNo=@BoxNo"; + SqlParameter[] param = null; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar); + param[0].Value = box; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/MistakeDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/MistakeDAL.cs new file mode 100644 index 0000000..83e56e3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/MistakeDAL.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.Mistake247 +{ + public class MistakeDAL + { + public DataTable IsMath(string DeviceNo, string PartNo) + { + try + { + string sql = @"SELECT * from tb_Mistake_247 where DeviceNo=@DeviceNo and PartNo1=@PartNo"; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); + param[0].Value = DeviceNo; + + param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[1].Value = PartNo; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByNo(string PartNo, string deviceNo) + { + try + { + string sql = @"SELECT * from tb_Mistake_247 where PartNo1=@PartNo and DeviceNo=@deviceNo"; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = PartNo; + + param[1] = new SqlParameter("@deviceNo", SqlDbType.VarChar); + param[1].Value = deviceNo; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchPartName(string PartNo) + { + try + { + string sql = @"SELECT * from tb_Mistake_247 where [PartNo2]=@PartNo "; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = PartNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchPartNoByDecice(string deviceNo) + { + try + { + string sql = @"SELECT * from tb_Mistake_247 where DeviceNo=@DeviceNo "; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); + param[0].Value = deviceNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/Plan247DAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/Plan247DAL.cs new file mode 100644 index 0000000..c0fa21d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/Plan247DAL.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.Mistake247 +{ + public class Plan247DAL + { + public static string TableName = "tb_Plan_247"; + + public DataTable SearhByOrderNo(string OrderNo) + { + try + { + string sql = @"SELECT dbo.tb_Plan_247.OrderNo, dbo.tb_Plan_247.PartNo, dbo.tb_Mistake_247.PartName2, + dbo.tb_Plan_247.OrderCount,dbo.tb_Plan_247.IsFinish,dbo.tb_Plan_247.CompleteCount + FROM dbo.tb_Plan_247 LEFT OUTER JOIN + dbo.tb_Mistake_247 ON dbo.tb_Plan_247.PartNo = dbo.tb_Mistake_247.PartNo2 + where dbo.tb_Plan_247.OrderNo=@OrderNo + ORDER BY dbo.tb_Plan_247.CreateTime"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[0].Value = OrderNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable DetailOrderNo(string OrderNo) + { + try + { + string sql = @"SELECT dbo.tb_Plan_247.Item, dbo.tb_Plan_247.PartNo, dbo.tb_Mistake_247.PartName2, + dbo.tb_Plan_247.OrderCount + FROM dbo.tb_Plan_247 LEFT OUTER JOIN + dbo.tb_Mistake_247 ON dbo.tb_Plan_247.PartNo = dbo.tb_Mistake_247.PartNo2 + where dbo.tb_Plan_247.OrderNo=@OrderNo + ORDER BY dbo.tb_Plan_247.CreateTime"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[0].Value = OrderNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 根据半成品零件号查找扫描的订单中是否有此产品的生产计划 + /// + /// + /// + public DataTable IsHavePlan(string partNo1,string orderNo) + { + try + { + string sql = @"SELECT top 1 dbo.tb_Plan_247.OrderNo, dbo.tb_Plan_247.Item, dbo.tb_Plan_247.PartNo, + dbo.tb_Plan_247.OrderCount, dbo.tb_Plan_247.CompleteCount, dbo.tb_Mistake_247.PartNo1 + FROM dbo.tb_Plan_247 LEFT OUTER JOIN + dbo.tb_Mistake_247 ON dbo.tb_Plan_247.PartNo = dbo.tb_Mistake_247.PartNo2 + where PartNo1=@PartNo1 and OrderNo =@orderNo and IsFinish =0 + ORDER BY dbo.tb_Plan_247.CreateTime"; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@PartNo1", SqlDbType.VarChar); + param[0].Value = partNo1; + + param[1] = new SqlParameter("@orderNo", SqlDbType.VarChar); + param[1].Value = orderNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 根据半成品零件号查找订单号 + /// + /// + /// + public DataTable SearchOrderNoByPart1(string partNo1) + { + try + { + string sql = @"SELECT top 1 dbo.tb_Plan_247.OrderNo, dbo.tb_Plan_247.Item, dbo.tb_Plan_247.PartNo, + dbo.tb_Plan_247.OrderCount, dbo.tb_Plan_247.CompleteCount, dbo.tb_Mistake_247.PartNo1 + FROM dbo.tb_Plan_247 LEFT OUTER JOIN + dbo.tb_Mistake_247 ON dbo.tb_Plan_247.PartNo = dbo.tb_Mistake_247.PartNo2 + where PartNo1=@PartNo1 and IsFinish =0 + ORDER BY dbo.tb_Plan_247.CreateTime "; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@PartNo1", SqlDbType.VarChar); + param[0].Value = partNo1; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearhCountByOrderNo(string OrderNo,string partNo) + { + try + { + string sql = @"SELECT dbo.tb_Plan_247.OrderNo, dbo.tb_Plan_247.PartNo, dbo.tb_Mistake_247.PartName2, + dbo.tb_Plan_247.OrderCount,dbo.tb_Plan_247.IsFinish + FROM dbo.tb_Plan_247 LEFT OUTER JOIN + dbo.tb_Mistake_247 ON dbo.tb_Plan_247.PartNo = dbo.tb_Mistake_247.PartNo2 + where dbo.tb_Plan_247.OrderNo=@OrderNo and dbo.tb_Plan_247.PartNo=@PartNo + ORDER BY dbo.tb_Plan_247.CreateTime"; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[0].Value = OrderNo; + + param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[1].Value = partNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 更新订单完成数 + /// + /// + /// + /// + public bool UpdateCount(string partNo, string orderNo) + { + try + { + string sql = "update tb_Plan_247 set [CompleteCount]=[CompleteCount]+1 where OrderNo=@OrderNo and PartNo =@PartNo"; + SqlParameter[] param = null; + + #region 添加参数 + param = new SqlParameter[2]; + param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[0].Value = orderNo; + + param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[1].Value = partNo; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchPlanIDByOrderNo(string partNo, string orderNo) + { + try + { + string sql = @"select ID from tb_Plan_247 where OrderNo=@OrderNo and PartNo =@PartNo"; + SqlParameter[] param = null; + + #region 添加参数 + param = new SqlParameter[2]; + param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[0].Value = orderNo; + + param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[1].Value = partNo; + + #endregion + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/RecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/RecordDAL.cs new file mode 100644 index 0000000..cfa6d57 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Mistake247/RecordDAL.cs @@ -0,0 +1,311 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.Mistake247 +{ + public class RecordDAL + { + public static string TableName = "tb_Record_247"; + + /// + /// 查找半成品是否已经装配 + /// + /// + /// + public DataTable SearchByPartNo1(string PartNo) + { + try + { + string sql = @"SELECT * from " + TableName + " where PartNo1=@PartNo"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = PartNo; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchCountByBox(string boxNo) + { + try + { + string sql = @"SELECT count(*) as sum from " + TableName + " where BoxNo=@BoxNo and Flag <>2"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar); + param[0].Value = boxNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(RecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " (ID,PartNo1,PartNo2,OrderNo,Type"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@PartNo1,"; + sql += "@PartNo2,"; + sql += "@OrderNo,"; + sql += "@Type)"; + + #region 添加参数 + param = new SqlParameter[5]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@PartNo1", SqlDbType.VarChar); + param[1].Value = md.PartNo1; + + param[2] = new SqlParameter("@PartNo2", SqlDbType.VarChar); + param[2].Value = md.PartNo2; + + param[3] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[3].Value = md.OrderNo; + + param[4] = new SqlParameter("@Type", SqlDbType.Int); + param[4].Value = md.Type; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool updateBoxInfo(RecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + + sql = @"update " + TableName + " set BoxNo=@BoxNo,CreateTime2=(select getdate()),Flag=@Flag where PartNo2=@PartNo2"; + + #region 添加参数 + + param = new SqlParameter[3]; + param[0] = new SqlParameter("@BoxNo", SqlDbType.VarChar); + param[0].Value = md.BoxNo; + + param[1] = new SqlParameter("@Flag", SqlDbType.Int); + param[1].Value = md.Flag; + + param[2] = new SqlParameter("@PartNo2", SqlDbType.VarChar); + param[2].Value = md.PartNo2; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchState(int type1,int type2,int type3) + { + try + { + //string sql = @"SELECT * from " + TableName + " where Type in (@type1,@type2,@type3) and Flag =0 order by CreateTime1"; + + //string sql = @"SELECT * from " + TableName + " where Type in (@type1,@type2,@type3) and Flag =0 order by CreateTime1"; + + //string sql = @"SELECT * from " + TableName + " where Type in (@type1,@type2,@type3) and Flag =0 order by CreateTime1"; + string sql = @" + SELECT * from tb_record_247 where Type in (@type1,@type2,@type3) and Flag =0 AND CreateTime1 >= CONVERT(VARCHAR(10),GETDATE(),120) AND CreateTime1 < (CONVERT(VARCHAR(10),GETDATE(),120)+' 23:59:59') order by CreateTime1 + "; + + SqlParameter[] param = new SqlParameter[3]; + + param[0] = new SqlParameter("@type1", SqlDbType.Int); + param[0].Value = type1; + + param[1] = new SqlParameter("@type2", SqlDbType.Int); + param[1].Value = type2; + + param[2] = new SqlParameter("@type3", SqlDbType.Int); + param[2].Value = type3; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool DelInfo(RecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + + sql = @"update " + TableName + " set Flag=@Flag where PartNo2=@PartNo2"; + + #region 添加参数 + + param = new SqlParameter[2]; + + param[0] = new SqlParameter("@Flag", SqlDbType.Int); + param[0].Value = md.Flag; + + param[1] = new SqlParameter("@PartNo2", SqlDbType.VarChar); + param[1].Value = md.PartNo2; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchBoxByPart(string part) + { + try + { + string sql = @"SELECT top 1 * from " + TableName + " where SUBSTRING(PartNo2,1,11)=@PartNo2 order by CreateTime2 desc"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@PartNo2", SqlDbType.VarChar); + param[0].Value = part; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchByPartNo2(string partno) + { + try + { + string sql = @"SELECT * from " + TableName + " where PartNo2=@PartNo"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar); + param[0].Value = partno; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable GetCount(string part,string batch) + { + try + { + string sql = @"SELECT count(*) as sum from " + TableName + " where SUBSTRING(PartNo2,1,11)=@PartNo2 and SUBSTRING(PartNo2,13,6)=@batch "; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@PartNo2", SqlDbType.VarChar); + param[0].Value = part; + + param[1] = new SqlParameter("@batch", SqlDbType.VarChar); + param[1].Value = batch; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable GetRecord(string boxNo) + { + try + { + string sql = @" + SELECT PartNo2,CreateTime1 FROM tb_record_247 WHERE boxno = '" + boxNo + @"' ORDER BY createtime1 + "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + ///根据改订单的生产数量 + /// + /// + /// + public DataTable GetOrderNum(string orderno) + { + try + { + string sql = @"SELECT count(*) as sum from tb_record_247 where OrderNo=@OrderNo"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar); + param[0].Value = orderno; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/Plan247/Plan247DAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/Plan247/Plan247DAL.cs new file mode 100644 index 0000000..6961706 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/Plan247/Plan247DAL.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MESClassLibrary.DAL.Plan247 +{ + public class Plan247DAL + { + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAdressDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAdressDAL.cs new file mode 100644 index 0000000..367c598 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAdressDAL.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.PunchAndWeld +{ + public class PunchAdressDAL + { + public DataTable SearchInfo(string deviceNo ,int i) + { + try + { + string sql = @"SELECT * from tb_PunchAddress where DeviceNo=@DeviceNo and RW=@RW order by ID"; + SqlParameter[] param = null; + + param = new SqlParameter[2]; + param[0] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); + param[0].Value = deviceNo; + + param[1] = new SqlParameter("@RW", SqlDbType.Int); + param[1].Value = i; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAndStationDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAndStationDAL.cs new file mode 100644 index 0000000..d53d9a7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchAndStationDAL.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.PunchAndWeld +{ + public class PunchAndStationDAL + { + public DataTable IsMath(string partNo1, string partNo2) + { + try + { + string sql = @"SELECT tb_Product_1.PartNo AS PartNo1, tb_Product_1.ProductName AS ProductName1, dbo.tb_Product.PartNo AS PartNo2, + dbo.tb_Product.ProductName AS ProductName2 + FROM dbo.tb_PunchAndStation LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PunchAndStation.ProductID2 = dbo.tb_Product.ProductID LEFT OUTER JOIN + dbo.tb_Product AS tb_Product_1 ON dbo.tb_PunchAndStation.ProductID1 = tb_Product_1.ProductID + where tb_Product_1.PartNo=@partNo1 and dbo.tb_Product.PartNo =@partNo2"; + SqlParameter[] param = null; + + param = new SqlParameter[2]; + param[0] = new SqlParameter("@partNo1", SqlDbType.VarChar); + param[0].Value = partNo1; + + param[1] = new SqlParameter("@partNo2", SqlDbType.VarChar); + param[1].Value = partNo2; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchDeviceDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchDeviceDAL.cs new file mode 100644 index 0000000..761118c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchDeviceDAL.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.PunchAndWeld +{ + public class PunchDeviceDAL + { + public DataTable SearchInfo() + { + try + { + string sql = @"select * from tb_PunchDevice "; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchDeviceNo(string deviceName) + { + try + { + string sql = @"select * from tb_PunchDevice where DeviceName=@DeviceName"; + + SqlParameter[] param = null; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@DeviceName", SqlDbType.VarChar); + param[0].Value = deviceName; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPartDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPartDAL.cs new file mode 100644 index 0000000..8207ac2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPartDAL.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.PunchAndWeld +{ + public class PunchPartDAL + { + public DataTable SearchPunchPart(string deviceNo) + { + try + { + string sql = @"select * from tb_Product where ProductTypeID='3a8545ee-5979-4780-a5ca-6c5e75685ae2' and DeviceNo='"+ deviceNo +"' order by ProductName "; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPlanDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPlanDAL.cs new file mode 100644 index 0000000..e6441e0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchPlanDAL.cs @@ -0,0 +1,172 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.DAL; +using MESClassLibrary.Model; + +namespace MESClassLibrary.BLL.PunchAndWeld +{ + public class PunchPlanDAL + { + /// + /// 查询设备当前计划 + /// + /// + /// + public DataTable SearchPlan(string deviceNo) + { + try + { + string sql =@"SELECT top 1 dbo.tb_PunchPlan.ID, dbo.tb_PunchPlan.DeviceNo, dbo.tb_PunchPlan.PlanCount, dbo.tb_PunchPlan.CompleteCount, + dbo.tb_PunchPlan.BadCount, dbo.tb_PunchPlan.IsFinish, dbo.tb_Product.PartNo, dbo.tb_Product.ProductName + FROM dbo.tb_PunchPlan LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PunchPlan.ProductID = dbo.tb_Product.ProductID where dbo.tb_PunchPlan.DeviceNo=@DeviceNo and IsFinish=0 order by CreateTime"; + + SqlParameter[] param = null; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); + param[0].Value = deviceNo; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 查询所有设备未完成的计划 + /// + /// + public DataTable SearchAllPlan() + { + string sql = @"SELECT dbo.tb_PunchPlan.ID, dbo.tb_PunchPlan.DeviceNo, dbo.tb_PunchPlan.PlanCount, dbo.tb_PunchPlan.CompleteCount, + dbo.tb_PunchPlan.BadCount, dbo.tb_PunchPlan.IsFinish, dbo.tb_Product.PartNo, dbo.tb_Product.ProductName, + dbo.tb_PunchDevice.DeviceName + FROM dbo.tb_PunchPlan LEFT OUTER JOIN + dbo.tb_PunchDevice ON dbo.tb_PunchPlan.DeviceNo = dbo.tb_PunchDevice.DeviceNo LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PunchPlan.ProductID = dbo.tb_Product.ProductID where IsFinish=0 order by CreateTime"; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + } + + public bool AddInfo(PunchPlanModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = " insert into tb_PunchPlan(ID,DeviceNo,ProductID,PlanCount"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@DeviceNo,"; + sql += "@ProductID,"; + sql += "@PlanCount)"; + + param = new SqlParameter[4]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); + param[1].Value = md.DeviceNo; + + param[2] = new SqlParameter("@ProductID", SqlDbType.VarChar); + param[2].Value = md.ProductID; + + param[3] = new SqlParameter("@PlanCount", SqlDbType.Int); + param[3].Value = md.PlanCount; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateInfo(PunchPlanModel md) + { + try + { + string sql = @"update tb_PunchPlan set PlanCount=@PlanCount where ID=@ID"; + SqlParameter[] param = null; + + param = new SqlParameter[2]; + + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@PlanCount", SqlDbType.Int); + param[1].Value = md.PlanCount; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdateDty(PunchPlanModel md) + { + try + { + string sql = @"update tb_PunchPlan set CompleteCount=CompleteCount+1 where ID=@ID"; + SqlParameter[] param = null; + + param = new SqlParameter[1]; + + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool DelInfo(PunchPlanModel md) + { + try + { + string sql = @"delete from tb_PunchPlan where ID=@ID"; + SqlParameter[] param = null; + + param = new SqlParameter[1]; + + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchRecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchRecordDAL.cs new file mode 100644 index 0000000..f0bdd09 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchRecordDAL.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.PunchAndWeld +{ + public class PunchRecordDAL + { + public bool AddInfo(PunchRecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = " insert into tb_PunchRecord(ID,BarCode"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@BarCode)"; + + param = new SqlParameter[2]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[1].Value =md.BarCode ; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public DataTable SearchInfo(string barCode) + { + try + { + string sql = @"SELECT * from tb_PunchRecord where BarCode=@BarCode "; + SqlParameter[] param = null; + + param = new SqlParameter[1]; + param[0] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[0].Value = barCode; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchValueRecordDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchValueRecordDAL.cs new file mode 100644 index 0000000..f2040b9 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/PunchAndWeld/PunchValueRecordDAL.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.PunchAndWeld +{ + public class PunchValueRecordDAL + { + public bool AddInfo(PunchValueRecordModel md) + { + try + { + string sql = ""; + SqlParameter[] param = null; + sql = " insert into tb_PunchValueRecord(ID,DeviceNo,Address,ItemValue"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@DeviceNo,"; + sql += "@Address,"; + sql += "@ItemValue)"; + + param = new SqlParameter[4]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); + param[1].Value = md.DeviceNo; + + param[2] = new SqlParameter("@Address", SqlDbType.VarChar); + param[2].Value = md.Address; + + param[3] = new SqlParameter("@ItemValue", SqlDbType.VarChar); + param[3].Value = md.ItemValue; + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/SqlHelper.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/SqlHelper.cs new file mode 100644 index 0000000..58a11c4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/SqlHelper.cs @@ -0,0 +1,2482 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Xml; + +namespace MESClassLibrary.DAL +{ + /// + /// SqlServer数据访问帮助类 + /// + public sealed class SqlHelper + { + #region 私有构造函数和方法 + + private SqlHelper() { } + + /// + /// 将SqlParameter参数数组(参数值)分配给SqlCommand命令. + /// 这个方法将给任何一个参数分配DBNull.Value; + /// 该操作将阻止默认值的使用. + /// + /// 命令名 + /// SqlParameters数组 + private static void AttachParameters(SqlCommand command, SqlParameter[] commandParameters) + { + if (command == null) throw new ArgumentNullException("command"); + if (commandParameters != null) + { + foreach (SqlParameter p in commandParameters) + { + if (p != null) + { + // 检查未分配值的输出参数,将其分配以DBNull.Value. + if ((p.Direction == ParameterDirection.InputOutput || p.Direction == ParameterDirection.Input) && + (p.Value == null)) + { + p.Value = DBNull.Value; + } + command.Parameters.Add(p); + } + } + } + } + + /// + /// 将DataRow类型的列值分配到SqlParameter参数数组. + /// + /// 要分配值的SqlParameter参数数组 + /// 将要分配给存储过程参数的DataRow + private static void AssignParameterValues(SqlParameter[] commandParameters, DataRow dataRow) + { + if ((commandParameters == null) || (dataRow == null)) + { + return; + } + + int i = 0; + // 设置参数值 + foreach (SqlParameter commandParameter in commandParameters) + { + // 创建参数名称,如果不存在,只抛出一个异常. + if (commandParameter.ParameterName == null || + commandParameter.ParameterName.Length <= 1) + throw new Exception( + string.Format("请提供参数{0}一个有效的名称{1}.", i, commandParameter.ParameterName)); + // 从dataRow的表中获取为参数数组中数组名称的列的索引. + // 如果存在和参数名称相同的列,则将列值赋给当前名称的参数. + if (dataRow.Table.Columns.IndexOf(commandParameter.ParameterName.Substring(1)) != -1) + commandParameter.Value = dataRow[commandParameter.ParameterName.Substring(1)]; + i++; + } + } + + /// + /// 将一个对象数组分配给SqlParameter参数数组. + /// + /// 要分配值的SqlParameter参数数组 + /// 将要分配给存储过程参数的对象数组 + private static void AssignParameterValues(SqlParameter[] commandParameters, object[] parameterValues) + { + if ((commandParameters == null) || (parameterValues == null)) + { + return; + } + + // 确保对象数组个数与参数个数匹配,如果不匹配,抛出一个异常. + if (commandParameters.Length != parameterValues.Length) + { + throw new ArgumentException("参数值个数与参数不匹配."); + } + + // 给参数赋值 + for (int i = 0, j = commandParameters.Length; i < j; i++) + { + // If the current array value derives from IDbDataParameter, then assign its Value property + if (parameterValues[i] is IDbDataParameter) + { + IDbDataParameter paramInstance = (IDbDataParameter)parameterValues[i]; + if (paramInstance.Value == null) + { + commandParameters[i].Value = DBNull.Value; + } + else + { + commandParameters[i].Value = paramInstance.Value; + } + } + else if (parameterValues[i] == null) + { + commandParameters[i].Value = DBNull.Value; + } + else + { + commandParameters[i].Value = parameterValues[i]; + } + } + } + + /// + /// 预处理用户提供的命令,数据库连接/事务/命令类型/参数 + /// + /// 要处理的SqlCommand + /// 数据库连接 + /// 一个有效的事务或者是null值 + /// 命令类型 (存储过程,命令文本, 其它.) + /// 存储过程名或都T-SQL命令文本 + /// 和命令相关联的SqlParameter参数数组,如果没有参数为'null' + /// true 如果连接是打开的,则为true,其它情况下为false. + private static void PrepareCommand(SqlCommand command, SqlConnection connection, SqlTransaction transaction, CommandType commandType, string commandText, SqlParameter[] commandParameters, out bool mustCloseConnection) + { + if (command == null) throw new ArgumentNullException("command"); + if (commandText == null || commandText.Length == 0) throw new ArgumentNullException("commandText"); + + // If the provided connection is not open, we will open it + if (connection.State != ConnectionState.Open) + { + mustCloseConnection = true; + connection.Open(); + } + else + { + mustCloseConnection = false; + } + + // 给命令分配一个数据库连接. + command.Connection = connection; + + // 设置命令文本(存储过程名或SQL语句) + command.CommandText = commandText; + + // 分配事务 + if (transaction != null) + { + if (transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + command.Transaction = transaction; + } + + // 设置命令类型. + command.CommandType = commandType; + + // 分配命令参数 + if (commandParameters != null) + { + AttachParameters(command, commandParameters); + } + return; + } + + #endregion 私有构造函数和方法结束 + + #region 数据库连接 + /// + /// 一个有效的数据库连接字符串 + /// + /// + public static string GetConnSting() + { + return ConfigurationManager.ConnectionStrings["SqlConnString"].ConnectionString; + } + /// + /// 一个有效的数据库连接对象 + /// + /// + public static SqlConnection GetConnection() + { + SqlConnection Connection = new SqlConnection(SqlHelper.GetConnSting()); + return Connection; + } + #endregion + + #region ExecuteNonQuery命令 + + /// + /// 执行指定连接字符串,类型的SqlCommand. + /// + /// + /// 示例: + /// int result = ExecuteNonQuery(connString, CommandType.StoredProcedure, "PublishOrders"); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本, 其它.) + /// 存储过程名称或SQL语句 + /// 返回命令影响的行数 + public static int ExecuteNonQuery(string connectionString, CommandType commandType, string commandText) + { + return ExecuteNonQuery(connectionString, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定连接字符串,类型的SqlCommand.如果没有提供参数,不返回结果. + /// + /// + /// 示例: + /// int result = ExecuteNonQuery(connString, CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本, 其它.) + /// 存储过程名称或SQL语句 + /// SqlParameter参数数组 + /// 返回命令影响的行数 + public static int ExecuteNonQuery(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + + return ExecuteNonQuery(connection, commandType, commandText, commandParameters); + } + } + + /// + /// 执行指定连接字符串的存储过程,将对象数组的值赋给存储过程参数, + /// 此方法需要在参数缓存方法中探索参数并生成参数. + /// + /// + /// 这个方法没有提供访问输出参数和返回值. + /// 示例: + /// int result = ExecuteNonQuery(connString, "PublishOrders", 24, 36); + /// + /// 一个有效的数据库连接字符串/param> + /// 存储过程名称 + /// 分配到存储过程输入参数的对象数组 + /// 返回受影响的行数 + public static int ExecuteNonQuery(string connectionString, string spName, params object[] parameterValues) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果存在参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从探索存储过程参数(加载到缓存)并分配给存储过程参数数组. + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteNonQuery(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数情况下 + return ExecuteNonQuery(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定数据库连接对象的命令 + /// + /// + /// 示例: + /// int result = ExecuteNonQuery(conn, CommandType.StoredProcedure, "PublishOrders"); + /// + /// 一个有效的数据库连接对象 + /// 命令类型(存储过程,命令文本或其它.) + /// 存储过程名称或T-SQL语句 + /// 返回影响的行数 + public static int ExecuteNonQuery(SqlConnection connection, CommandType commandType, string commandText) + { + return ExecuteNonQuery(connection, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接对象的命令 + /// + /// + /// 示例: + /// int result = ExecuteNonQuery(conn, CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型(存储过程,命令文本或其它.) + /// T存储过程名称或T-SQL语句 + /// SqlParamter参数数组 + /// 返回影响的行数 + public static int ExecuteNonQuery(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connection == null) throw new ArgumentNullException("connection"); + + // 创建SqlCommand命令,并进行预处理 + SqlCommand cmd = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(cmd, connection, (SqlTransaction)null, commandType, commandText, commandParameters, out mustCloseConnection); + + // Finally, execute the command + int retval = cmd.ExecuteNonQuery(); + + // 清除参数,以便再次使用. + cmd.Parameters.Clear(); + if (mustCloseConnection) + connection.Close(); + return retval; + } + + /// + /// 执行指定数据库连接对象的命令,将对象数组的值赋给存储过程参数. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值 + /// 示例: + /// int result = ExecuteNonQuery(conn, "PublishOrders", 24, 36); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回影响的行数 + public static int ExecuteNonQuery(SqlConnection connection, string spName, params object[] parameterValues) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数 + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 给存储过程分配参数值 + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteNonQuery(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return ExecuteNonQuery(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行带事务的SqlCommand. + /// + /// + /// 示例.: + /// int result = ExecuteNonQuery(trans, CommandType.StoredProcedure, "PublishOrders"); + /// + /// 一个有效的数据库连接对象 + /// 命令类型(存储过程,命令文本或其它.) + /// 存储过程名称或T-SQL语句 + /// 返回影响的行数/returns> + public static int ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, string commandText) + { + return ExecuteNonQuery(transaction, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行带事务的SqlCommand(指定参数). + /// + /// + /// 示例: + /// int result = ExecuteNonQuery(trans, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型(存储过程,命令文本或其它.) + /// 存储过程名称或T-SQL语句 + /// SqlParamter参数数组 + /// 返回影响的行数 + public static int ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + + // 预处理 + SqlCommand cmd = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(cmd, transaction.Connection, transaction, commandType, commandText, commandParameters, out mustCloseConnection); + + // 执行 + int retval = cmd.ExecuteNonQuery(); + + // 清除参数集,以便再次使用. + cmd.Parameters.Clear(); + return retval; + } + + /// + /// 执行带事务的SqlCommand(指定参数值). + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值 + /// 示例: + /// int result = ExecuteNonQuery(conn, trans, "PublishOrders", 24, 36); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回受影响的行数 + public static int ExecuteNonQuery(SqlTransaction transaction, string spName, params object[] parameterValues) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + return ExecuteNonQuery(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteNonQuery(transaction, CommandType.StoredProcedure, spName); + } + } + + #endregion ExecuteNonQuery方法结束 + + #region ExecuteDataset方法 + + /// + /// 执行指定数据库连接字符串的命令,返回DataSet. + /// + /// + /// 示例: + /// DataSet ds = ExecuteDataset(connString, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(string connectionString, CommandType commandType, string commandText) + { + return ExecuteDataset(connectionString, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接字符串的命令,返回DataSet. + /// + /// + /// 示例: + /// DataSet ds = ExecuteDataset(connString, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// SqlParamters参数数组 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + + // 创建并打开数据库连接对象,操作完成释放对象. + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + + // 调用指定数据库连接字符串重载方法. + return ExecuteDataset(connection, commandType, commandText, commandParameters); + } + } + + /// + /// 执行指定数据库连接字符串的命令,直接提供参数值,返回DataSet. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值. + /// 示例: + /// DataSet ds = ExecuteDataset(connString, "GetOrders", 24, 36); + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(string connectionString, string spName, params object[] parameterValues) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中检索存储过程参数 + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 给存储过程参数分配值 + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteDataset(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return ExecuteDataset(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定数据库连接对象的命令,返回DataSet. + /// + /// + /// 示例: + /// DataSet ds = ExecuteDataset(conn, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(SqlConnection connection, CommandType commandType, string commandText) + { + return ExecuteDataset(connection, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接对象的命令,指定存储过程参数,返回DataSet. + /// + /// + /// 示例: + /// DataSet ds = ExecuteDataset(conn, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// SqlParamter参数数组 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connection == null) throw new ArgumentNullException("connection"); + + // 预处理 + SqlCommand cmd = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(cmd, connection, (SqlTransaction)null, commandType, commandText, commandParameters, out mustCloseConnection); + + // 创建SqlDataAdapter和DataSet. + using (SqlDataAdapter da = new SqlDataAdapter(cmd)) + { + DataSet ds = new DataSet(); + + // 填充DataSet. + da.Fill(ds); + + cmd.Parameters.Clear(); + + if (mustCloseConnection) + connection.Close(); + + return ds; + } + } + + /// + /// 执行指定数据库连接对象的命令,指定参数值,返回DataSet. + /// + /// + /// 此方法不提供访问存储过程输入参数和返回值. + /// 示例.: + /// DataSet ds = ExecuteDataset(conn, "GetOrders", 24, 36); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(SqlConnection connection, string spName, params object[] parameterValues) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 比缓存中加载存储过程参数 + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 给存储过程参数分配值 + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteDataset(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return ExecuteDataset(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定事务的命令,返回DataSet. + /// + /// + /// 示例: + /// DataSet ds = ExecuteDataset(trans, CommandType.StoredProcedure, "GetOrders"); + /// + /// 事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(SqlTransaction transaction, CommandType commandType, string commandText) + { + return ExecuteDataset(transaction, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定事务的命令,指定参数,返回DataSet. + /// + /// + /// 示例: + /// DataSet ds = ExecuteDataset(trans, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// SqlParamter参数数组 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + + // 预处理 + SqlCommand cmd = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(cmd, transaction.Connection, transaction, commandType, commandText, commandParameters, out mustCloseConnection); + + // 创建 DataAdapter & DataSet + using (SqlDataAdapter da = new SqlDataAdapter(cmd)) + { + DataSet ds = new DataSet(); + da.Fill(ds); + cmd.Parameters.Clear(); + return ds; + } + } + + /// + /// 执行指定事务的命令,指定参数值,返回DataSet. + /// + /// + /// 此方法不提供访问存储过程输入参数和返回值. + /// 示例.: + /// DataSet ds = ExecuteDataset(trans, "GetOrders", 24, 36); + /// + /// 事务 + /// 存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回一个包含结果集的DataSet + public static DataSet ExecuteDataset(SqlTransaction transaction, string spName, params object[] parameterValues) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数 + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 给存储过程参数分配值 + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteDataset(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return ExecuteDataset(transaction, CommandType.StoredProcedure, spName); + } + } + + #endregion ExecuteDataset数据集命令结束 + + #region ExecuteReader 数据阅读器 + + /// + /// 枚举,标识数据库连接是由SqlHelper提供还是由调用者提供 + /// + private enum SqlConnectionOwnership + { + /// 由SqlHelper提供连接 + Internal, + /// 由调用者提供连接 + External + } + + /// + /// 执行指定数据库连接对象的数据阅读器. + /// + /// + /// 如果是SqlHelper打开连接,当连接关闭DataReader也将关闭. + /// 如果是调用都打开连接,DataReader由调用都管理. + /// + /// 一个有效的数据库连接对象 + /// 一个有效的事务,或者为 'null' + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// SqlParameters参数数组,如果没有参数则为'null' + /// 标识数据库连接对象是由调用者提供还是由SqlHelper提供 + /// 返回包含结果集的SqlDataReader + private static SqlDataReader ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, string commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) + { + if (connection == null) throw new ArgumentNullException("connection"); + + bool mustCloseConnection = false; + // 创建命令 + SqlCommand cmd = new SqlCommand(); + try + { + PrepareCommand(cmd, connection, transaction, commandType, commandText, commandParameters, out mustCloseConnection); + + // 创建数据阅读器 + SqlDataReader dataReader; + + if (connectionOwnership == SqlConnectionOwnership.External) + { + dataReader = cmd.ExecuteReader(); + } + else + { + dataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection); + } + + // 清除参数,以便再次使用.. + // HACK: There is a problem here, the output parameter values are fletched + // when the reader is closed, so if the parameters are detached from the command + // then the SqlReader can磘 set its values. + // When this happen, the parameters can磘 be used again in other command. + bool canClear = true; + foreach (SqlParameter commandParameter in cmd.Parameters) + { + if (commandParameter.Direction != ParameterDirection.Input) + canClear = false; + } + + if (canClear) + { + cmd.Parameters.Clear(); + } + + return dataReader; + } + catch + { + if (mustCloseConnection) + connection.Close(); + throw; + } + } + + /// + /// 执行指定数据库连接字符串的数据阅读器. + /// + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(connString, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(string connectionString, CommandType commandType, string commandText) + { + return ExecuteReader(connectionString, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接字符串的数据阅读器,指定参数. + /// + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(connString, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// SqlParamter参数数组(new SqlParameter("@prodid", 24)) + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + SqlConnection connection = null; + try + { + connection = new SqlConnection(connectionString); + connection.Open(); + + return ExecuteReader(connection, null, commandType, commandText, commandParameters, SqlConnectionOwnership.Internal); + } + catch + { + // If we fail to return the SqlDatReader, we need to close the connection ourselves + if (connection != null) connection.Close(); + throw; + } + + } + + /// + /// 执行指定数据库连接字符串的数据阅读器,指定参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// 示例: + /// SqlDataReader dr = ExecuteReader(connString, "GetOrders", 24, 36); + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(string connectionString, string spName, params object[] parameterValues) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteReader(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return ExecuteReader(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定数据库连接对象的数据阅读器. + /// + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(conn, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名或T-SQL语句 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(SqlConnection connection, CommandType commandType, string commandText) + { + return ExecuteReader(connection, commandType, commandText, (SqlParameter[])null); + } + + /// + /// [调用者方式]执行指定数据库连接对象的数据阅读器,指定参数. + /// + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(conn, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 命令类型 (存储过程,命令文本或其它) + /// SqlParamter参数数组 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + return ExecuteReader(connection, (SqlTransaction)null, commandType, commandText, commandParameters, SqlConnectionOwnership.External); + } + + /// + /// [调用者方式]执行指定数据库连接对象的数据阅读器,指定参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// 示例: + /// SqlDataReader dr = ExecuteReader(conn, "GetOrders", 24, 36); + /// + /// 一个有效的数据库连接对象 + /// T存储过程名 + /// 分配给存储过程输入参数的对象数组 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(SqlConnection connection, string spName, params object[] parameterValues) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteReader(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return ExecuteReader(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// [调用者方式]执行指定数据库事务的数据阅读器,指定参数值. + /// + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(trans, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(SqlTransaction transaction, CommandType commandType, string commandText) + { + return ExecuteReader(transaction, commandType, commandText, (SqlParameter[])null); + } + + /// + /// [调用者方式]执行指定数据库事务的数据阅读器,指定参数. + /// + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(trans, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 分配给命令的SqlParamter参数数组 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + + return ExecuteReader(transaction.Connection, transaction, commandType, commandText, commandParameters, SqlConnectionOwnership.External); + } + + /// + /// [调用者方式]执行指定数据库事务的数据阅读器,指定参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// SqlDataReader dr = ExecuteReader(trans, "GetOrders", 24, 36); + /// + /// 一个有效的连接事务 + /// 存储过程名称 + /// 分配给存储过程输入参数的对象数组 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReader(SqlTransaction transaction, string spName, params object[] parameterValues) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + AssignParameterValues(commandParameters, parameterValues); + + return ExecuteReader(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteReader(transaction, CommandType.StoredProcedure, spName); + } + } + + #endregion ExecuteReader数据阅读器 + + #region ExecuteScalar 返回结果集中的第一行第一列 + + /// + /// 执行指定数据库连接字符串的命令,返回结果集中的第一行第一列. + /// + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(connString, CommandType.StoredProcedure, "GetOrderCount"); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(string connectionString, CommandType commandType, string commandText) + { + // 执行参数为空的方法 + return ExecuteScalar(connectionString, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接字符串的命令,指定参数,返回结果集中的第一行第一列. + /// + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(connString, CommandType.StoredProcedure, "GetOrderCount", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 分配给命令的SqlParamter参数数组 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + // 创建并打开数据库连接对象,操作完成释放对象. + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + + // 调用指定数据库连接字符串重载方法. + return ExecuteScalar(connection, commandType, commandText, commandParameters); + } + } + + /// + /// 执行指定数据库连接字符串的命令,指定参数值,返回结果集中的第一行第一列. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(connString, "GetOrderCount", 24, 36); + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名称 + /// 分配给存储过程输入参数的对象数组 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(string connectionString, string spName, params object[] parameterValues) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + return ExecuteScalar(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteScalar(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定数据库连接对象的命令,返回结果集中的第一行第一列. + /// + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(conn, CommandType.StoredProcedure, "GetOrderCount"); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(SqlConnection connection, CommandType commandType, string commandText) + { + // 执行参数为空的方法 + return ExecuteScalar(connection, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接对象的命令,指定参数,返回结果集中的第一行第一列. + /// + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(conn, CommandType.StoredProcedure, "GetOrderCount", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 分配给命令的SqlParamter参数数组 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connection == null) throw new ArgumentNullException("connection"); + + // 创建SqlCommand命令,并进行预处理 + SqlCommand cmd = new SqlCommand(); + + bool mustCloseConnection = false; + PrepareCommand(cmd, connection, (SqlTransaction)null, commandType, commandText, commandParameters, out mustCloseConnection); + + // 执行SqlCommand命令,并返回结果. + object retval = cmd.ExecuteScalar(); + + // 清除参数,以便再次使用. + cmd.Parameters.Clear(); + + if (mustCloseConnection) + connection.Close(); + + return retval; + } + + /// + /// 执行指定数据库连接对象的命令,指定参数值,返回结果集中的第一行第一列. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(conn, "GetOrderCount", 24, 36); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 分配给存储过程输入参数的对象数组 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(SqlConnection connection, string spName, params object[] parameterValues) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + return ExecuteScalar(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteScalar(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定数据库事务的命令,返回结果集中的第一行第一列. + /// + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(trans, CommandType.StoredProcedure, "GetOrderCount"); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(SqlTransaction transaction, CommandType commandType, string commandText) + { + // 执行参数为空的方法 + return ExecuteScalar(transaction, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库事务的命令,指定参数,返回结果集中的第一行第一列. + /// + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(trans, CommandType.StoredProcedure, "GetOrderCount", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 分配给命令的SqlParamter参数数组 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + + // 创建SqlCommand命令,并进行预处理 + SqlCommand cmd = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(cmd, transaction.Connection, transaction, commandType, commandText, commandParameters, out mustCloseConnection); + + // 执行SqlCommand命令,并返回结果. + object retval = cmd.ExecuteScalar(); + + // 清除参数,以便再次使用. + cmd.Parameters.Clear(); + return retval; + } + + /// + /// 执行指定数据库事务的命令,指定参数值,返回结果集中的第一行第一列. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// int orderCount = (int)ExecuteScalar(trans, "GetOrderCount", 24, 36); + /// + /// 一个有效的连接事务 + /// 存储过程名称 + /// 分配给存储过程输入参数的对象数组 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalar(SqlTransaction transaction, string spName, params object[] parameterValues) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // PPull the parameters for this stored procedure from the parameter cache () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + return ExecuteScalar(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteScalar(transaction, CommandType.StoredProcedure, spName); + } + } + + #endregion ExecuteScalar + + #region ExecuteXmlReader XML阅读器 + /// + /// 执行指定数据库连接对象的SqlCommand命令,并产生一个XmlReader对象做为结果集返回. + /// + /// + /// 示例: + /// XmlReader r = ExecuteXmlReader(conn, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 using "FOR XML AUTO" + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReader(SqlConnection connection, CommandType commandType, string commandText) + { + // 执行参数为空的方法 + return ExecuteXmlReader(connection, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库连接对象的SqlCommand命令,并产生一个XmlReader对象做为结果集返回,指定参数. + /// + /// + /// 示例: + /// XmlReader r = ExecuteXmlReader(conn, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 using "FOR XML AUTO" + /// 分配给命令的SqlParamter参数数组 + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReader(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (connection == null) throw new ArgumentNullException("connection"); + + bool mustCloseConnection = false; + // 创建SqlCommand命令,并进行预处理 + SqlCommand cmd = new SqlCommand(); + try + { + PrepareCommand(cmd, connection, (SqlTransaction)null, commandType, commandText, commandParameters, out mustCloseConnection); + + // 执行命令 + XmlReader retval = cmd.ExecuteXmlReader(); + + // 清除参数,以便再次使用. + cmd.Parameters.Clear(); + + return retval; + } + catch + { + if (mustCloseConnection) + connection.Close(); + throw; + } + } + + /// + /// 执行指定数据库连接对象的SqlCommand命令,并产生一个XmlReader对象做为结果集返回,指定参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// XmlReader r = ExecuteXmlReader(conn, "GetOrders", 24, 36); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 using "FOR XML AUTO" + /// 分配给存储过程输入参数的对象数组 + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReader(SqlConnection connection, string spName, params object[] parameterValues) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + return ExecuteXmlReader(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteXmlReader(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定数据库事务的SqlCommand命令,并产生一个XmlReader对象做为结果集返回. + /// + /// + /// 示例: + /// XmlReader r = ExecuteXmlReader(trans, CommandType.StoredProcedure, "GetOrders"); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 using "FOR XML AUTO" + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReader(SqlTransaction transaction, CommandType commandType, string commandText) + { + // 执行参数为空的方法 + return ExecuteXmlReader(transaction, commandType, commandText, (SqlParameter[])null); + } + + /// + /// 执行指定数据库事务的SqlCommand命令,并产生一个XmlReader对象做为结果集返回,指定参数. + /// + /// + /// 示例: + /// XmlReader r = ExecuteXmlReader(trans, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24)); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 using "FOR XML AUTO" + /// 分配给命令的SqlParamter参数数组 + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReader(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + + // 创建SqlCommand命令,并进行预处理 + SqlCommand cmd = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(cmd, transaction.Connection, transaction, commandType, commandText, commandParameters, out mustCloseConnection); + + // 执行命令 + XmlReader retval = cmd.ExecuteXmlReader(); + + // 清除参数,以便再次使用. + cmd.Parameters.Clear(); + return retval; + } + + /// + /// 执行指定数据库事务的SqlCommand命令,并产生一个XmlReader对象做为结果集返回,指定参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// XmlReader r = ExecuteXmlReader(trans, "GetOrders", 24, 36); + /// + /// 一个有效的连接事务 + /// 存储过程名称 + /// 分配给存储过程输入参数的对象数组 + /// 返回一个包含结果集的DataSet. + public static XmlReader ExecuteXmlReader(SqlTransaction transaction, string spName, params object[] parameterValues) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + return ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + // 没有参数值 + return ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName); + } + } + + #endregion ExecuteXmlReader 阅读器结束 + + #region FillDataset 填充数据集 + /// + /// 执行指定数据库连接字符串的命令,映射数据表并填充数据集. + /// + /// + /// 示例: + /// FillDataset(connString, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + public static void FillDataset(string connectionString, CommandType commandType, string commandText, DataSet dataSet, string[] tableNames) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (dataSet == null) throw new ArgumentNullException("dataSet"); + + // 创建并打开数据库连接对象,操作完成释放对象. + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + + // 调用指定数据库连接字符串重载方法. + FillDataset(connection, commandType, commandText, dataSet, tableNames); + } + } + + /// + /// 执行指定数据库连接字符串的命令,映射数据表并填充数据集.指定命令参数. + /// + /// + /// 示例: + /// FillDataset(connString, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接字符串 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 分配给命令的SqlParamter参数数组 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + public static void FillDataset(string connectionString, CommandType commandType, + string commandText, DataSet dataSet, string[] tableNames, + params SqlParameter[] commandParameters) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (dataSet == null) throw new ArgumentNullException("dataSet"); + // 创建并打开数据库连接对象,操作完成释放对象. + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + + // 调用指定数据库连接字符串重载方法. + FillDataset(connection, commandType, commandText, dataSet, tableNames, commandParameters); + } + } + + /// + /// 执行指定数据库连接字符串的命令,映射数据表并填充数据集,指定存储过程参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// FillDataset(connString, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, 24); + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名称 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + /// 分配给存储过程输入参数的对象数组 + public static void FillDataset(string connectionString, string spName, + DataSet dataSet, string[] tableNames, + params object[] parameterValues) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (dataSet == null) throw new ArgumentNullException("dataSet"); + // 创建并打开数据库连接对象,操作完成释放对象. + using (SqlConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + + // 调用指定数据库连接字符串重载方法. + FillDataset(connection, spName, dataSet, tableNames, parameterValues); + } + } + + /// + /// 执行指定数据库连接对象的命令,映射数据表并填充数据集. + /// + /// + /// 示例: + /// FillDataset(conn, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + public static void FillDataset(SqlConnection connection, CommandType commandType, + string commandText, DataSet dataSet, string[] tableNames) + { + FillDataset(connection, commandType, commandText, dataSet, tableNames, null); + } + + /// + /// 执行指定数据库连接对象的命令,映射数据表并填充数据集,指定参数. + /// + /// + /// 示例: + /// FillDataset(conn, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + /// 分配给命令的SqlParamter参数数组 + public static void FillDataset(SqlConnection connection, CommandType commandType, + string commandText, DataSet dataSet, string[] tableNames, + params SqlParameter[] commandParameters) + { + FillDataset(connection, null, commandType, commandText, dataSet, tableNames, commandParameters); + } + + /// + /// 执行指定数据库连接对象的命令,映射数据表并填充数据集,指定存储过程参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// FillDataset(conn, "GetOrders", ds, new string[] {"orders"}, 24, 36); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + /// 分配给存储过程输入参数的对象数组 + public static void FillDataset(SqlConnection connection, string spName, + DataSet dataSet, string[] tableNames, + params object[] parameterValues) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (dataSet == null) throw new ArgumentNullException("dataSet"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + FillDataset(connection, CommandType.StoredProcedure, spName, dataSet, tableNames, commandParameters); + } + else + { + // 没有参数值 + FillDataset(connection, CommandType.StoredProcedure, spName, dataSet, tableNames); + } + } + + /// + /// 执行指定数据库事务的命令,映射数据表并填充数据集. + /// + /// + /// 示例: + /// FillDataset(trans, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + public static void FillDataset(SqlTransaction transaction, CommandType commandType, + string commandText, + DataSet dataSet, string[] tableNames) + { + FillDataset(transaction, commandType, commandText, dataSet, tableNames, null); + } + + /// + /// 执行指定数据库事务的命令,映射数据表并填充数据集,指定参数. + /// + /// + /// 示例: + /// FillDataset(trans, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, new SqlParameter("@prodid", 24)); + /// + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + /// 分配给命令的SqlParamter参数数组 + public static void FillDataset(SqlTransaction transaction, CommandType commandType, + string commandText, DataSet dataSet, string[] tableNames, + params SqlParameter[] commandParameters) + { + FillDataset(transaction.Connection, transaction, commandType, commandText, dataSet, tableNames, commandParameters); + } + + /// + /// 执行指定数据库事务的命令,映射数据表并填充数据集,指定存储过程参数值. + /// + /// + /// 此方法不提供访问存储过程输出参数和返回值参数. + /// + /// 示例: + /// FillDataset(trans, "GetOrders", ds, new string[]{"orders"}, 24, 36); + /// + /// 一个有效的连接事务 + /// 存储过程名称 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + /// 分配给存储过程输入参数的对象数组 + public static void FillDataset(SqlTransaction transaction, string spName, + DataSet dataSet, string[] tableNames, + params object[] parameterValues) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (dataSet == null) throw new ArgumentNullException("dataSet"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果有参数值 + if ((parameterValues != null) && (parameterValues.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 给存储过程参数赋值 + AssignParameterValues(commandParameters, parameterValues); + + // 调用重载方法 + FillDataset(transaction, CommandType.StoredProcedure, spName, dataSet, tableNames, commandParameters); + } + else + { + // 没有参数值 + FillDataset(transaction, CommandType.StoredProcedure, spName, dataSet, tableNames); + } + } + + /// + /// [私有方法][内部调用]执行指定数据库连接对象/事务的命令,映射数据表并填充数据集,DataSet/TableNames/SqlParameters. + /// + /// + /// 示例: + /// FillDataset(conn, trans, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, new SqlParameter("@prodid", 24)); + /// + /// 一个有效的数据库连接对象 + /// 一个有效的连接事务 + /// 命令类型 (存储过程,命令文本或其它) + /// 存储过程名称或T-SQL语句 + /// 要填充结果集的DataSet实例 + /// 表映射的数据表数组 + /// 用户定义的表名 (可有是实际的表名.) + /// + /// 分配给命令的SqlParamter参数数组 + private static void FillDataset(SqlConnection connection, SqlTransaction transaction, CommandType commandType, + string commandText, DataSet dataSet, string[] tableNames, + params SqlParameter[] commandParameters) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (dataSet == null) throw new ArgumentNullException("dataSet"); + + // 创建SqlCommand命令,并进行预处理 + SqlCommand command = new SqlCommand(); + bool mustCloseConnection = false; + PrepareCommand(command, connection, transaction, commandType, commandText, commandParameters, out mustCloseConnection); + + // 执行命令 + using (SqlDataAdapter dataAdapter = new SqlDataAdapter(command)) + { + + // 追加表映射 + if (tableNames != null && tableNames.Length > 0) + { + string tableName = "Table"; + for (int index = 0; index < tableNames.Length; index++) + { + if (tableNames[index] == null || tableNames[index].Length == 0) throw new ArgumentException("The tableNames parameter must contain a list of tables, a value was provided as null or empty string.", "tableNames"); + dataAdapter.TableMappings.Add(tableName, tableNames[index]); + tableName += (index + 1).ToString(); + } + } + + // 填充数据集使用默认表名称 + dataAdapter.Fill(dataSet); + + // 清除参数,以便再次使用. + command.Parameters.Clear(); + } + + if (mustCloseConnection) + connection.Close(); + } + #endregion + + #region UpdateDataset 更新数据集 + /// + /// 执行数据集更新到数据库,指定inserted, updated, or deleted命令. + /// + /// + /// 示例: + /// UpdateDataset(conn, insertCommand, deleteCommand, updateCommand, dataSet, "Order"); + /// + /// [追加记录]一个有效的T-SQL语句或存储过程 + /// [删除记录]一个有效的T-SQL语句或存储过程 + /// [更新记录]一个有效的T-SQL语句或存储过程 + /// 要更新到数据库的DataSet + /// 要更新到数据库的DataTable + public static void UpdateDataset(SqlCommand insertCommand, SqlCommand deleteCommand, SqlCommand updateCommand, DataSet dataSet, string tableName) + { + if (insertCommand == null) throw new ArgumentNullException("insertCommand"); + if (deleteCommand == null) throw new ArgumentNullException("deleteCommand"); + if (updateCommand == null) throw new ArgumentNullException("updateCommand"); + if (tableName == null || tableName.Length == 0) throw new ArgumentNullException("tableName"); + + // 创建SqlDataAdapter,当操作完成后释放. + using (SqlDataAdapter dataAdapter = new SqlDataAdapter()) + { + // 设置数据适配器命令 + dataAdapter.UpdateCommand = updateCommand; + dataAdapter.InsertCommand = insertCommand; + dataAdapter.DeleteCommand = deleteCommand; + + // 更新数据集改变到数据库 + dataAdapter.Update(dataSet, tableName); + + // 提交所有改变到数据集. + dataSet.AcceptChanges(); + } + } + #endregion + + #region CreateCommand 创建一条SqlCommand命令 + /// + /// 创建SqlCommand命令,指定数据库连接对象,存储过程名和参数. + /// + /// + /// 示例: + /// SqlCommand command = CreateCommand(conn, "AddCustomer", "CustomerID", "CustomerName"); + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 源表的列名称数组 + /// 返回SqlCommand命令 + public static SqlCommand CreateCommand(SqlConnection connection, string spName, params string[] sourceColumns) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 创建命令 + SqlCommand cmd = new SqlCommand(spName, connection); + cmd.CommandType = CommandType.StoredProcedure; + + // 如果有参数值 + if ((sourceColumns != null) && (sourceColumns.Length > 0)) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 将源表的列到映射到DataSet命令中. + for (int index = 0; index < sourceColumns.Length; index++) + commandParameters[index].SourceColumn = sourceColumns[index]; + + // Attach the discovered parameters to the SqlCommand object + AttachParameters(cmd, commandParameters); + } + + return cmd; + } + #endregion + + #region ExecuteNonQueryTypedParams 类型化参数(DataRow) + /// + /// 执行指定连接数据库连接字符串的存储过程,使用DataRow做为参数值,返回受影响的行数. + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回影响的行数 + public static int ExecuteNonQueryTypedParams(String connectionString, String spName, DataRow dataRow) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteNonQuery(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteNonQuery(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库连接对象的存储过程,使用DataRow做为参数值,返回受影响的行数. + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回影响的行数 + public static int ExecuteNonQueryTypedParams(SqlConnection connection, String spName, DataRow dataRow) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteNonQuery(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库事物的存储过程,使用DataRow做为参数值,返回受影响的行数. + /// + /// 一个有效的连接事务 object + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回影响的行数 + public static int ExecuteNonQueryTypedParams(SqlTransaction transaction, String spName, DataRow dataRow) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // Sf the row has values, the store procedure parameters must be initialized + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteNonQuery(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteNonQuery(transaction, CommandType.StoredProcedure, spName); + } + } + #endregion + + #region ExecuteDatasetTypedParams 类型化参数(DataRow) + /// + /// 执行指定连接数据库连接字符串的存储过程,使用DataRow做为参数值,返回DataSet. + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回一个包含结果集的DataSet. + public static DataSet ExecuteDatasetTypedParams(string connectionString, String spName, DataRow dataRow) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + //如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteDataset(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteDataset(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库连接对象的存储过程,使用DataRow做为参数值,返回DataSet. + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回一个包含结果集的DataSet. + /// + public static DataSet ExecuteDatasetTypedParams(SqlConnection connection, String spName, DataRow dataRow) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteDataset(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteDataset(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库事务的存储过程,使用DataRow做为参数值,返回DataSet. + /// + /// 一个有效的连接事务 object + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回一个包含结果集的DataSet. + public static DataSet ExecuteDatasetTypedParams(SqlTransaction transaction, String spName, DataRow dataRow) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteDataset(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteDataset(transaction, CommandType.StoredProcedure, spName); + } + } + + #endregion + + #region ExecuteReaderTypedParams 类型化参数(DataRow) + /// + /// 执行指定连接数据库连接字符串的存储过程,使用DataRow做为参数值,返回DataReader. + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReaderTypedParams(String connectionString, String spName, DataRow dataRow) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteReader(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteReader(connectionString, CommandType.StoredProcedure, spName); + } + } + + + /// + /// 执行指定连接数据库连接对象的存储过程,使用DataRow做为参数值,返回DataReader. + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReaderTypedParams(SqlConnection connection, String spName, DataRow dataRow) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteReader(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteReader(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库事物的存储过程,使用DataRow做为参数值,返回DataReader. + /// + /// 一个有效的连接事务 object + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回包含结果集的SqlDataReader + public static SqlDataReader ExecuteReaderTypedParams(SqlTransaction transaction, String spName, DataRow dataRow) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteReader(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteReader(transaction, CommandType.StoredProcedure, spName); + } + } + #endregion + + #region ExecuteScalarTypedParams 类型化参数(DataRow) + /// + /// 执行指定连接数据库连接字符串的存储过程,使用DataRow做为参数值,返回结果集中的第一行第一列. + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalarTypedParams(String connectionString, String spName, DataRow dataRow) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteScalar(connectionString, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteScalar(connectionString, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库连接对象的存储过程,使用DataRow做为参数值,返回结果集中的第一行第一列. + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalarTypedParams(SqlConnection connection, String spName, DataRow dataRow) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteScalar(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteScalar(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库事务的存储过程,使用DataRow做为参数值,返回结果集中的第一行第一列. + /// + /// 一个有效的连接事务 object + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回结果集中的第一行第一列 + public static object ExecuteScalarTypedParams(SqlTransaction transaction, String spName, DataRow dataRow) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteScalar(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteScalar(transaction, CommandType.StoredProcedure, spName); + } + } + #endregion + + #region ExecuteXmlReaderTypedParams 类型化参数(DataRow) + /// + /// 执行指定连接数据库连接对象的存储过程,使用DataRow做为参数值,返回XmlReader类型的结果集. + /// + /// 一个有效的数据库连接对象 + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReaderTypedParams(SqlConnection connection, String spName, DataRow dataRow) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteXmlReader(connection, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteXmlReader(connection, CommandType.StoredProcedure, spName); + } + } + + /// + /// 执行指定连接数据库事务的存储过程,使用DataRow做为参数值,返回XmlReader类型的结果集. + /// + /// 一个有效的连接事务 object + /// 存储过程名称 + /// 使用DataRow作为参数值 + /// 返回XmlReader结果集对象. + public static XmlReader ExecuteXmlReaderTypedParams(SqlTransaction transaction, String spName, DataRow dataRow) + { + if (transaction == null) throw new ArgumentNullException("transaction"); + if (transaction != null && transaction.Connection == null) throw new ArgumentException("The transaction was rollbacked or commited, please provide an open transaction.", "transaction"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + // 如果row有值,存储过程必须初始化. + if (dataRow != null && dataRow.ItemArray.Length > 0) + { + // 从缓存中加载存储过程参数,如果缓存中不存在则从数据库中检索参数信息并加载到缓存中. () + SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection, spName); + + // 分配参数值 + AssignParameterValues(commandParameters, dataRow); + + return SqlHelper.ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName, commandParameters); + } + else + { + return SqlHelper.ExecuteXmlReader(transaction, CommandType.StoredProcedure, spName); + } + } + #endregion + + public static SqlTransaction BeginTransaction(string con) + { + SqlConnection connection = new SqlConnection(con); + connection.Open(); + SqlTransaction tran = connection.BeginTransaction(); + return tran; + } + + public static string SerialNo(string type) + { + try + { + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@sCode", SqlDbType.VarChar); + param[0].Value = type; + return ExecuteDataset(SqlHelper.GetConnSting(), CommandType.StoredProcedure, "GetSerialNo", param).Tables[0].Rows[0][0].ToString(); + } + catch (Exception) + { + return ""; + } + + } + + + + } + + /// + /// SqlHelperParameterCache提供缓存存储过程参数,并能够在运行时从存储过程中探索参数. + /// + public sealed class SqlHelperParameterCache + { + #region 私有方法,字段,构造函数 + // 私有构造函数,妨止类被实例化. + private SqlHelperParameterCache() { } + + // 这个方法要注意 + private static Hashtable paramCache = Hashtable.Synchronized(new Hashtable()); + + /// + /// 探索运行时的存储过程,返回SqlParameter参数数组. + /// 初始化参数值为 DBNull.Value. + /// + /// 一个有效的数据库连接 + /// 存储过程名称 + /// 是否包含返回值参数 + /// 返回SqlParameter参数数组 + private static SqlParameter[] DiscoverSpParameterSet(SqlConnection connection, string spName, bool includeReturnValueParameter) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + SqlCommand cmd = new SqlCommand(spName, connection); + cmd.CommandType = CommandType.StoredProcedure; + + connection.Open(); + // 检索cmd指定的存储过程的参数信息,并填充到cmd的Parameters参数集中. + SqlCommandBuilder.DeriveParameters(cmd); + connection.Close(); + // 如果不包含返回值参数,将参数集中的每一个参数删除. + if (!includeReturnValueParameter) + { + cmd.Parameters.RemoveAt(0); + } + + // 创建参数数组 + SqlParameter[] discoveredParameters = new SqlParameter[cmd.Parameters.Count]; + // 将cmd的Parameters参数集复制到discoveredParameters数组. + cmd.Parameters.CopyTo(discoveredParameters, 0); + + // 初始化参数值为 DBNull.Value. + foreach (SqlParameter discoveredParameter in discoveredParameters) + { + discoveredParameter.Value = DBNull.Value; + } + return discoveredParameters; + } + + /// + /// SqlParameter参数数组的深层拷贝. + /// + /// 原始参数数组 + /// 返回一个同样的参数数组 + private static SqlParameter[] CloneParameters(SqlParameter[] originalParameters) + { + SqlParameter[] clonedParameters = new SqlParameter[originalParameters.Length]; + + for (int i = 0, j = originalParameters.Length; i < j; i++) + { + clonedParameters[i] = (SqlParameter)((ICloneable)originalParameters[i]).Clone(); + } + + return clonedParameters; + } + + #endregion 私有方法,字段,构造函数结束 + + #region 缓存方法 + + /// + /// 追加参数数组到缓存. + /// + /// 一个有效的数据库连接字符串 + /// 存储过程名或SQL语句 + /// 要缓存的参数数组 + public static void CacheParameterSet(string connectionString, string commandText, params SqlParameter[] commandParameters) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (commandText == null || commandText.Length == 0) throw new ArgumentNullException("commandText"); + + string hashKey = connectionString + ":" + commandText; + + paramCache[hashKey] = commandParameters; + } + + /// + /// 从缓存中获取参数数组. + /// + /// 一个有效的数据库连接字符 + /// 存储过程名或SQL语句 + /// 参数数组 + public static SqlParameter[] GetCachedParameterSet(string connectionString, string commandText) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (commandText == null || commandText.Length == 0) throw new ArgumentNullException("commandText"); + + string hashKey = connectionString + ":" + commandText; + + SqlParameter[] cachedParameters = paramCache[hashKey] as SqlParameter[]; + if (cachedParameters == null) + { + return null; + } + else + { + return CloneParameters(cachedParameters); + } + } + + #endregion 缓存方法结束 + + #region 检索指定的存储过程的参数集 + + /// + /// 返回指定的存储过程的参数集 + /// + /// + /// 这个方法将查询数据库,并将信息存储到缓存. + /// + /// 一个有效的数据库连接字符 + /// 存储过程名 + /// 返回SqlParameter参数数组 + public static SqlParameter[] GetSpParameterSet(string connectionString, string spName) + { + return GetSpParameterSet(connectionString, spName, false); + } + + /// + /// 返回指定的存储过程的参数集 + /// + /// + /// 这个方法将查询数据库,并将信息存储到缓存. + /// + /// 一个有效的数据库连接字符. + /// 存储过程名 + /// 是否包含返回值参数 + /// 返回SqlParameter参数数组 + public static SqlParameter[] GetSpParameterSet(string connectionString, string spName, bool includeReturnValueParameter) + { + if (connectionString == null || connectionString.Length == 0) throw new ArgumentNullException("connectionString"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + using (SqlConnection connection = new SqlConnection(connectionString)) + { + return GetSpParameterSetInternal(connection, spName, includeReturnValueParameter); + } + } + + /// + /// [内部]返回指定的存储过程的参数集(使用连接对象). + /// + /// + /// 这个方法将查询数据库,并将信息存储到缓存. + /// + /// 一个有效的数据库连接字符 + /// 存储过程名 + /// 返回SqlParameter参数数组 + internal static SqlParameter[] GetSpParameterSet(SqlConnection connection, string spName) + { + return GetSpParameterSet(connection, spName, false); + } + + /// + /// [内部]返回指定的存储过程的参数集(使用连接对象) + /// + /// + /// 这个方法将查询数据库,并将信息存储到缓存. + /// + /// 一个有效的数据库连接对象 + /// 存储过程名 + /// + /// 是否包含返回值参数 + /// + /// 返回SqlParameter参数数组 + internal static SqlParameter[] GetSpParameterSet(SqlConnection connection, string spName, bool includeReturnValueParameter) + { + if (connection == null) throw new ArgumentNullException("connection"); + using (SqlConnection clonedConnection = (SqlConnection)((ICloneable)connection).Clone()) + { + return GetSpParameterSetInternal(clonedConnection, spName, includeReturnValueParameter); + } + } + + /// + /// [私有]返回指定的存储过程的参数集(使用连接对象) + /// + /// 一个有效的数据库连接对象 + /// 存储过程名 + /// 是否包含返回值参数 + /// 返回SqlParameter参数数组 + private static SqlParameter[] GetSpParameterSetInternal(SqlConnection connection, string spName, bool includeReturnValueParameter) + { + if (connection == null) throw new ArgumentNullException("connection"); + if (spName == null || spName.Length == 0) throw new ArgumentNullException("spName"); + + string hashKey = connection.ConnectionString + ":" + spName + (includeReturnValueParameter ? ":include ReturnValue Parameter" : ""); + + SqlParameter[] cachedParameters; + + cachedParameters = paramCache[hashKey] as SqlParameter[]; + if (cachedParameters == null) + { + SqlParameter[] spParameters = DiscoverSpParameterSet(connection, spName, includeReturnValueParameter); + paramCache[hashKey] = spParameters; + cachedParameters = spParameters; + } + + return CloneParameters(cachedParameters); + } + + #endregion 参数集检索结束 + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_ButtonsData.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_ButtonsData.cs new file mode 100644 index 0000000..a6003a9 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_ButtonsData.cs @@ -0,0 +1,75 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.DAL.User +{ + /// + /// 用户按钮 + /// lx 2017-06-28 + /// + public class Sys_ButtonsData + { + /// + /// 获取用户有权限的按钮 + /// + /// + /// + /// + public DataTable GetUserButtons(string menuID, string userID) + { + try + { + DataTable dt = new DataTable(); + + string sql = @" + SELECT [BtnID] + ,[BtnName] + ,[ItemPic] + ,[PowerID] + ,[MenuID] + ,[MenuName] + ,[IsEnabled] + ,[BtnCode] + FROM [T_Sys_Buttons] + where PowerID in ( + select e.PowerID + from T_Sys_Users a + join T_Sys_UserRole b + on a.UserID = b.UserID + join T_Sys_Role c + on b.RoleID = c.RoleID + join T_Sys_RoleLinkPower d + on c.RoleID = d.RoleID + join T_Sys_Power e + on d.PowerID = e.PowerID + where a.UserID = @UserID + ) + and MenuID = @MenuID + and IsEnabled = '1' + "; + SqlParameter[] param = new SqlParameter[2]; + param[0] = new SqlParameter("@UserID", SqlDbType.UniqueIdentifier); + param[0].Value = new Guid(userID); + + param[1] = new SqlParameter("@MenuID", SqlDbType.UniqueIdentifier); + param[1].Value = new Guid(menuID); + + dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + return dt; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return new DataTable(); + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_NavMenuData.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_NavMenuData.cs new file mode 100644 index 0000000..1d81b34 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/User/Sys_NavMenuData.cs @@ -0,0 +1,107 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.DAL.User +{ + public class Sys_NavMenuData + { + /// + /// 根据userID查询用户菜单 + /// + /// + /// + public DataTable BuilderLeftMenu(string userID) + { + try + { + List list = new List(); + DataTable dt = new DataTable(); +/* + string sql = @" + SELECT [MenuID] + ,[MenuName] + ,[URLStr] + ,[ItemPic] + ,[PowerID] + ,[ParentMenuID] + ,[IsEnabled] + ,[OrderNum] + FROM [T_Sys_NavMenu] + where PowerID in ( + select e.PowerID + from T_Sys_Users a + join T_Sys_UserRole b + on a.UserID = b.UserID + join T_Sys_Role c + on b.RoleID = c.RoleID + join T_Sys_RoleLinkPower d + on c.RoleID = d.RoleID + join T_Sys_Power e + on d.PowerID = e.PowerID + where a.UserID = @userID + ) + and IsEnabled = '1' + order by OrderNum + "; +*/ + string sql = @" +IF EXISTS(SELECT * from T_Sys_Users where UserID=@userID and UserName='admin') +BEGIN + SELECT m.[MenuID], + m.[MenuName], + m.[URLStr], + m.[ItemPic], + m.[PowerID], + m.[ParentMenuID], + m.[IsEnabled], + m.[OrderNum] + FROM [T_Sys_NavMenu] m +END +ELSE +BEGIN +SELECT m.[MenuID], + m.[MenuName], + m.[URLStr], + m.[ItemPic], + m.[PowerID], + m.[ParentMenuID], + m.[IsEnabled], + m.[OrderNum] + FROM [T_Sys_NavMenu] m + WHERE m.ParentMenuID IS NULL +UNION ALL +SELECT m.[MenuID], + m.[MenuName], + m.[URLStr], + m.[ItemPic], + m.[PowerID], + m.[ParentMenuID], + m.[IsEnabled], + m.[OrderNum] + FROM [T_Sys_NavMenu] m + INNER JOIN T_Sys_Users_NavMenu um ON m.MenuID = um.MenuID + WHERE um.UserID = @userID +END"; + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@userID", SqlDbType.UniqueIdentifier); + param[0].Value = new Guid(userID); + + dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + return dt; + } + catch(Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return new DataTable(); + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/User/UserDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/User/UserDAL.cs new file mode 100644 index 0000000..6958345 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/User/UserDAL.cs @@ -0,0 +1,421 @@ +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace MESClassLibrary.DAL.User +{ + public class UserDAL : BasicDAL + { + public static string TableName = "tb_User"; + public string GetTableName() + { + return TableName; + } + /// + /// 获取全部用户信息 + /// + /// + public DataTable Search_UserInfo() + { + try + { + string sql = @"select * from T_Sys_Users where IsEnabled='1'"; + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 根据登录名密码查询用户信息 + /// + /// + /// + /// + public DataTable Search_UserInfoByUP(string username, string password) + { + try + { + string sql = @"SELECT [UserID] + ,[UserName] + ,[Password] + ,[IsEnabled] + ,[RealName] + ,[Sex] + ,[Tel] + ,[LastLoginTime] + ,[LastLoginIP] + ,[DepartmentID] + ,[OpName] + ,[OpTime] + FROM [T_Sys_Users] + where UserName = @Username and Password = @Password and IsEnabled = '1'"; + + SqlParameter[] param = new SqlParameter[2]; + param[0] = new SqlParameter("@Username", SqlDbType.VarChar); + param[0].Value = username; + + param[1] = new SqlParameter("@Password", SqlDbType.VarChar); + param[1].Value = password; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据id查询用户信息 + /// + /// + /// + public DataTable Search_UserInfoByID(string id) + { + try + { + string sql = @"select c.*,r.RoleName from tb_User c + left join tb_Role r on c.RoleID = r.id where c.IsUseing=1 and c.ID=@ID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = id; + + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 根据id查询用户信息 + /// + /// + /// + public DataTable Search_UserInfoByID_v2(string id) + { + try + { + string sql = @"select * from T_Sys_Users c where c.IsEnabled=1 and c.UserID=@UserID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@UserID", SqlDbType.VarChar); + param[0].Value = id; + + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 根据登录账号查询用户信息 + /// + /// 登录账号 + /// + public DataTable Search_UserInfoByUserName(string username) + { + try + { + string sql = @"SELECT [UserID] + ,[UserName] + ,[Password] + ,[IsEnabled] + ,[RealName] + ,[Sex] + ,[Tel] + ,[LastLoginTime] + ,[LastLoginIP] + ,[DepartmentID] + ,[OpName] + ,[OpTime] + FROM [T_Sys_Users] + where UserName = @Username and IsEnabled = '1'"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@Username", SqlDbType.VarChar); + param[0].Value = username; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 根据角色ID查询该角色的用户信息 + /// + /// 角色主键ID + /// + public DataTable Search_UserInfoByRoleID(string roleID) + { + try + { + string sql = @"select c.*,r.RoleName,r.RoleJurisdiction from tb_User c + left join tb_Role r on c.RoleID = r.id where c.IsUseing=1 and c.RoleID=@RoleID"; + + SqlParameter[] param = new SqlParameter[1]; + param[0] = new SqlParameter("@RoleID", SqlDbType.VarChar); + param[0].Value = roleID; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + + /// + /// 添加用户信息 + /// + /// 用户模型 + /// + public bool Add_UserInfo(UserModel mod) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO tb_User (ID,Username,Password,TrueName,FaceURL,RoleID,CreateUserID"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@Username,"; + sql += "@Password,"; + sql += "@TrueName,"; + sql += "@FaceURL,"; + sql += "@RoleID,"; + sql += "@CreateUserID)"; + + #region 添加参数 + param = new SqlParameter[7]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = mod.ID; + + param[1] = new SqlParameter("@Username", SqlDbType.VarChar); + param[1].Value = mod.Username; + + param[2] = new SqlParameter("@Password", SqlDbType.VarChar); + param[2].Value = mod.Password; + + param[3] = new SqlParameter("@TrueName", SqlDbType.VarChar); + param[3].Value = mod.TrueName; + + param[4] = new SqlParameter("@FaceURL", SqlDbType.VarChar); + param[4].Value = mod.FaceURL; + + param[5] = new SqlParameter("@RoleID", SqlDbType.VarChar); + param[5].Value = mod.RoleID; + + param[6] = new SqlParameter("@CreateUserID", SqlDbType.VarChar); + param[6].Value = mod.CreateUserID; + + + + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 更新用户信息 + /// + /// 用户模型对象 + /// + public bool Update_UserInfo(UserModel md) + { + try + { + string sql = @"update tb_User set + Username = @Username, + Password = @Password, + TrueName = @TrueName, + FaceURL = @FaceURL, + RoleID = @RoleID, + UpdateUserID = @UpdateUserID, + UpdateTime = @UpdateTime + where ID=@ID"; + + SqlParameter[] param = new SqlParameter[8]; + param[0] = new SqlParameter("@Username", SqlDbType.VarChar); + param[0].Value = md.Username; + + param[1] = new SqlParameter("@Password", SqlDbType.VarChar); + param[1].Value = md.Password; + + param[2] = new SqlParameter("@TrueName", SqlDbType.VarChar); + param[2].Value = md.TrueName; + + param[3] = new SqlParameter("@FaceURL", SqlDbType.VarChar); + param[3].Value = md.FaceURL; + + param[4] = new SqlParameter("@RoleID", SqlDbType.VarChar); + param[4].Value = md.RoleID; + + param[5] = new SqlParameter("@UpdateUserID", SqlDbType.VarChar); + param[5].Value = md.UpdateUserID; + + param[6] = new SqlParameter("@UpdateTime", SqlDbType.DateTime); + param[6].Value = DateTime.Now; + + param[7] = new SqlParameter("@ID", SqlDbType.VarChar); + param[7].Value = md.ID; + + if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param) > 0) + { + return true; + } + return false; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + /// + /// 查询用户登录日志 + /// + /// + public DataTable Search_UserLoginInfo() + { + try + { + string sql = @"select l.*,u.TrueName,r.RoleName from tb_UserLoginLog l + left join tb_User u on l.UserID = u.ID + left join tb_Role r on u.RoleID = r.ID order by l.LoginTime desc"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + + } + /// + /// 添加用户登录日志 + /// + /// 用户主键ID + /// + public bool Add_UserLoginInfo(string userid) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO tb_UserLoginLog (ID,UserID"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@UserID)"; + + + #region 添加参数 + param = new SqlParameter[2]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = Guid.NewGuid().ToString(); + + param[1] = new SqlParameter("@UserID", SqlDbType.VarChar); + param[1].Value = userid; + + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + + public bool Update_Password(string userid,string oldpassword,string newpassword) + { + try + { + string sql = @"update T_Sys_Users set + Password = @New_Password + where UserID=@UserID and Password=@Old_Password"; + + SqlParameter[] param = new SqlParameter[3]; + param[0] = new SqlParameter("@New_Password", SqlDbType.VarChar); + param[0].Value = newpassword; + + param[1] = new SqlParameter("@UserID", SqlDbType.VarChar); + param[1].Value = userid; + + param[2] = new SqlParameter("@Old_Password", SqlDbType.VarChar); + param[2].Value = oldpassword; + + + if (SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param) > 0) + { + return true; + } + return false; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + + } + + + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/InspectResultDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/InspectResultDAL.cs new file mode 100644 index 0000000..f714956 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/InspectResultDAL.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.Model; +using MESClassLibrary.BLL.BasicInfo; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.painting +{ + public class InspectResultDAL + { + public static string TableName = "tb_InspectResult"; + public bool AddInfo(InspectResultModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " ([ID] ,[barcode] ,[side],[stationNo],[workClass],[inspectResult],[productInfo],[productOption] ,[InspectTimes],[createTime]"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@barcode,"; + sql += "@side,"; + sql += "@stationNo,"; + sql += "@workClass,"; + sql += "@inspectResult,"; + sql += "@productInfo,"; + sql += "@productOption,"; + sql += "@InspectTimes,"; + sql += "@createTime)"; + + #region 添加参数 + param = new SqlParameter[10]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@barcode", SqlDbType.VarChar); + param[1].Value = md.barcode; + + param[2] = new SqlParameter("@side", SqlDbType.VarChar); + param[2].Value = md.side; + + param[3] = new SqlParameter("@stationNo", SqlDbType.VarChar); + param[3].Value = md.stationNo; + + param[4] = new SqlParameter("@workClass", SqlDbType.VarChar); + param[4].Value = md.workClass; + + param[5] = new SqlParameter("@inspectResult", SqlDbType.VarChar); + param[5].Value = md.inspectResult; + + param[6] = new SqlParameter("@productInfo", SqlDbType.VarChar); + param[6].Value = md.productInfo; + + param[7] = new SqlParameter("@productOption", SqlDbType.VarChar); + param[7].Value = md.productOption; + + param[8] = new SqlParameter("@InspectTimes", SqlDbType.VarChar); + param[8].Value = md.InspectTimes; + + param[9] = new SqlParameter("@createTime", SqlDbType.DateTime); + param[9].Value = md.createTime; + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/PaintBarCodeDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/PaintBarCodeDAL.cs new file mode 100644 index 0000000..e4dab16 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/PaintBarCodeDAL.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; +using MESClassLibrary.Model; + +namespace MESClassLibrary.DAL.painting +{ + public class PaintBarCodeDAL + { + public static string TableName = "tb_PaintBarCode"; + + public DataTable SearchInfoAll(string banci,string productdate) + { + try + { + string sql = @"SELECT dbo.tb_PaintBarCode.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_PaintBarCode.ColorDes, + dbo.tb_PaintBarCode.Side, dbo.tb_PaintBarCode.workClass + FROM dbo.tb_PaintBarCode LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PaintBarCode.ProductID = dbo.tb_Product.ProductID where workClass=@workClass and ProductDate=@ProductDate"; + SqlParameter[] param = new SqlParameter[2]; + + param[0] = new SqlParameter("@workClass", SqlDbType.VarChar); + param[0].Value = banci; + + param[1] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[1].Value = productdate; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + /// + /// 查找当前天、当天班次、当前产品的最后一个流水 + /// + /// + /// + /// + public DataTable SearchBarCode(string banci, string productdate,string productID) + { + try + { + string sql = @"SELECT dbo.tb_PaintBarCode.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_PaintBarCode.ColorDes, + dbo.tb_PaintBarCode.Side, dbo.tb_PaintBarCode.workClass + FROM dbo.tb_PaintBarCode LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_PaintBarCode.ProductID = dbo.tb_Product.ProductID where workClass=@workClass and ProductDate=@ProductDate and dbo.tb_PaintBarCode.ProductID=@ProductID + order by dbo.tb_PaintBarCode.CreateTime desc"; + SqlParameter[] param = new SqlParameter[3]; + + param[0] = new SqlParameter("@workClass", SqlDbType.VarChar); + param[0].Value = banci; + + param[1] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[1].Value = productdate; + + param[2] = new SqlParameter("@ProductID", SqlDbType.VarChar); + param[2].Value = productID; + + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public bool AddInfo(PaintBarCodeModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = "INSERT INTO " + TableName + " ([ID] ,[StationID] ,[ProductID],[OneBarCode],[BarCode],[StockNo],[ColorDes],[workClass],[Side] ,[CreateTime],[ProductDate]"; + sql += ") VALUES ("; + sql += "@ID,"; + sql += "@StationID,"; + sql += "@ProductID,"; + sql += "@OneBarCode,"; + sql += "@BarCode,"; + sql += "@StockNo,"; + sql += "@ColorDes,"; + sql += "@workClass,"; + sql += "@Side,"; + sql += "@CreateTime,"; + sql += "@ProductDate)"; + + #region 添加参数 + param = new SqlParameter[11]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@StationID", SqlDbType.VarChar); + param[1].Value = md.StationID; + + param[2] = new SqlParameter("@ProductID", SqlDbType.VarChar); + param[2].Value = md.ProductID; + + param[3] = new SqlParameter("@OneBarCode", SqlDbType.VarChar); + param[3].Value = md.OneBarCode; + + param[4] = new SqlParameter("@BarCode", SqlDbType.VarChar); + param[4].Value = md.BarCode; + + param[5] = new SqlParameter("@StockNo", SqlDbType.VarChar); + param[5].Value = md.StockNo; + + param[6] = new SqlParameter("@ColorDes", SqlDbType.VarChar); + param[6].Value = md.ColorDes; + + param[7] = new SqlParameter("@workClass", SqlDbType.VarChar); + param[7].Value = md.workClass; + + param[8] = new SqlParameter("@Side", SqlDbType.VarChar); + param[8].Value = md.Side; + + param[9] = new SqlParameter("@CreateTime", SqlDbType.DateTime); + param[9].Value = md.CreateTime; + + param[10] = new SqlParameter("@ProductDate", SqlDbType.VarChar); + param[10].Value = md.ProductDate; + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + + public bool UpdatePrintTime(PaintBarCodeModel md) + { + try + { + #region 添加数据 + string sql = ""; + SqlParameter[] param = null; + sql = @"update " + TableName + " set PrintTime=@PrintTime where ID=@ID"; + + #region 添加参数 + param = new SqlParameter[2]; + param[0] = new SqlParameter("@ID", SqlDbType.VarChar); + param[0].Value = md.ID; + + param[1] = new SqlParameter("@PrintTime", SqlDbType.DateTime); + param[1].Value = md.PrintTime; + + + #endregion + + SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param); + #endregion + return true; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return false; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/StockInDAL.cs b/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/StockInDAL.cs new file mode 100644 index 0000000..784b80e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/DAL/painting/StockInDAL.cs @@ -0,0 +1,596 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using MESClassLibrary.BLL.Log; + +namespace MESClassLibrary.DAL.painting +{ + public class StockInDAL + { + public DataTable SearchInfoA() + { + try + { + string sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime dateTime + + IF OBJECT_ID('TEMPDB..#a') IS NOT NULL + DROP TABLE #a + create table #a (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #a(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + +SELECT COUNT(*) AS c1 , + (SELECT COUNT(*) FROM #a WHERE productInfo LIKE '%槛%' ) c2 + FROM #a WHERE productInfo LIKE '%保%'"; +// SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql1, null); +// string sql = @"SELECT COUNT(*) AS c1 , +// (SELECT COUNT(*) FROM #c WHERE productInfo LIKE '%槛%' ) c2 +// FROM #c WHERE productInfo LIKE '%保%' "; +// string sql = @"select count(*) as c1 , +// (select count(*) from view_stockin where ([createtime] between convert(datetime,substring(convert(nvarchar(50),getdate(),120),1,10)+ ' 07:30:01') and convert(datetime,substring(convert(nvarchar(50),getdate(),120),1,10)+ ' 19:30:00')) and productinfo like '%槛%' and pass=1) c2 +// from view_stockin where ([createtime] between convert(datetime,substring(convert(nvarchar(50),getdate(),120),1,10)+ ' 07:30:01') and convert(datetime,substring(convert(nvarchar(50),getdate(),120),1,10)+ ' 19:30:00')) and productinfo like '%保%' and pass=1 "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoB() + { + try + { + string sql = ""; + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 19:30:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToShortDateString() + " 23:59:59")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime dateTime + + IF OBJECT_ID('TEMPDB..#c') IS NOT NULL + DROP TABLE #c + create table #c (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #c(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + --PRINT '用户ID:'+@productInfo + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + SELECT COUNT(*) AS c1 , + (SELECT COUNT(*) FROM #c WHERE productInfo LIKE '%槛%' ) c2 + FROM #c WHERE productInfo LIKE '%保%'"; +// sql = @"SELECT COUNT(*) AS c1 , +// (SELECT COUNT(*) FROM View_StockIn WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59')) AND productInfo LIKE '%槛%' and pass=1) c2 +// FROM View_StockIn WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59')) AND productInfo LIKE '%保%' and pass=1"; + } + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 00:00:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToShortDateString() + " 07:30:00")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime dateTime + + IF OBJECT_ID('TEMPDB..#c') IS NOT NULL + DROP TABLE #c + create table #c (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:00') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #c(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + --PRINT '用户ID:'+@productInfo + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + SELECT COUNT(*) AS c1 , + (SELECT COUNT(*) FROM #c WHERE productInfo LIKE '%槛%' ) c2 + FROM #c WHERE productInfo LIKE '%保%'"; + // sql = @"SELECT COUNT(*) AS c1 , +// (SELECT COUNT(*) FROM View_StockIn WHERE ([createTime] BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:00')) AND productInfo LIKE '%槛%' and pass=1) c2 +// FROM View_StockIn WHERE ([createTime] BETWEEN DATEADD(day,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59')) AND productInfo LIKE '%保%' and pass=1"; + } + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoAByB() + { + try + { + string sql = ""; + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 19:30:00") && DateTime.Now <= DateTime.Parse(DateTime.Now.ToShortDateString() + " 23:59:59")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime dateTime + + IF OBJECT_ID('TEMPDB..#d') IS NOT NULL + DROP TABLE #d + create table #d (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #d(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + --PRINT '用户ID:'+@productInfo + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + SELECT COUNT(*) AS c1 , + (SELECT COUNT(*) FROM #d WHERE productInfo LIKE '%槛%' ) c2 + FROM #d WHERE productInfo LIKE '%保%'"; +// sql = @"SELECT COUNT(*) AS c1 , +// (SELECT COUNT(*) FROM View_StockIn WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00')) AND productInfo LIKE '%槛%' and pass=1) c2 +// FROM View_StockIn WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00')) AND productInfo LIKE '%保%' and pass=1"; + } + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 00:00:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToShortDateString() + " 07:30:00")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime dateTime + + IF OBJECT_ID('TEMPDB..#d') IS NOT NULL + DROP TABLE #d + create table #d (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01')) AND DATEADD(day,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00')) AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #d(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + --PRINT '用户ID:'+@productInfo + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + SELECT COUNT(*) AS c1 , + (SELECT COUNT(*) FROM #d WHERE productInfo LIKE '%槛%' ) c2 + FROM #d WHERE productInfo LIKE '%保%'"; +// sql = @"SELECT COUNT(*) AS c1 , +// (SELECT COUNT(*) FROM View_StockIn WHERE ([createTime] BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01')) AND DATEADD(day,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00'))) AND productInfo LIKE '%槛%' and pass=1) c2 +// FROM View_StockIn WHERE ([createTime] BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01')) AND DATEADD(day,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00'))) AND productInfo LIKE '%保%' and pass=1 "; + } + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchInfoBByA() + { + try + { + string sql = ""; + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime dateTime + + IF OBJECT_ID('TEMPDB..#b') IS NOT NULL + DROP TABLE #b + create table #b (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:29:59') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #b(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + --PRINT '用户ID:'+@productInfo + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + SELECT COUNT(*) AS c1 , + (SELECT COUNT(*) FROM #b WHERE productInfo LIKE '%槛%' ) c2 + FROM #b WHERE productInfo LIKE '%保%'"; +// sql = @"SELECT COUNT(*) AS c1 , +// (SELECT COUNT(*) FROM View_StockIn WHERE ([createTime] BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:29:59')) AND productInfo LIKE '%槛%' and pass=1) c2 +// FROM View_StockIn WHERE([createTime] BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:29:59')) AND productInfo LIKE '%保%' and pass=1"; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchDetailA() + { + try + { + string sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime DATETIME, + @totle INT , + @ptype NVARCHAR(100), + @color NVARCHAR(100) + + + IF OBJECT_ID('TEMPDB..#a') IS NOT NULL + DROP TABLE #a + create table #a (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:00') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #a(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + IF OBJECT_ID('TEMPDB..#temp') IS NOT NULL + DROP TABLE #temp + create table #temp (id INT IDENTITY(1,1)NOT NULL, totle INT,ptype nvarchar(100),color NVARCHAR(100)) + + DECLARE a1 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%槛%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a1 --打开游标 + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color + END + CLOSE a1 --关闭游标 + DEALLOCATE a1 --释放游标 + + + DECLARE a2 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%保%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a2 --打开游标 + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color + END + CLOSE a2 --关闭游标 + DEALLOCATE a2 --释放游标 + + SELECT * FROM #temp ORDER BY id "; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchDetailB() + { + try + { + string sql = ""; + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 19:30:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToShortDateString() + " 23:59:59")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime DATETIME, + @totle INT , + @ptype NVARCHAR(100), + @color NVARCHAR(100) + + + IF OBJECT_ID('TEMPDB..#a') IS NOT NULL + DROP TABLE #a + create table #a (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #a(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + IF OBJECT_ID('TEMPDB..#temp') IS NOT NULL + DROP TABLE #temp + create table #temp (id INT IDENTITY(1,1)NOT NULL, totle INT,ptype nvarchar(100),color NVARCHAR(100)) + + DECLARE a1 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%槛%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a1 --打开游标 + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color + END + CLOSE a1 --关闭游标 + DEALLOCATE a1 --释放游标 + + + DECLARE a2 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%保%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a2 --打开游标 + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color + END + CLOSE a2 --关闭游标 + DEALLOCATE a2 --释放游标 + + SELECT * FROM #temp ORDER BY id "; + } + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 00:00:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToShortDateString() + " 07:30:00")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime DATETIME, + @totle INT , + @ptype NVARCHAR(100), + @color NVARCHAR(100) + + + IF OBJECT_ID('TEMPDB..#a') IS NOT NULL + DROP TABLE #a + create table #a (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE createTime BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:00') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #a(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + IF OBJECT_ID('TEMPDB..#temp') IS NOT NULL + DROP TABLE #temp + create table #temp (id INT IDENTITY(1,1)NOT NULL, totle INT,ptype nvarchar(100),color NVARCHAR(100)) + + DECLARE a1 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%槛%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a1 --打开游标 + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color + END + CLOSE a1 --关闭游标 + DEALLOCATE a1 --释放游标 + + + DECLARE a2 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%保%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a2 --打开游标 + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color + END + CLOSE a2 --关闭游标 + DEALLOCATE a2 --释放游标 + + SELECT * FROM #temp ORDER BY id "; + } + + if (DateTime.Now > DateTime.Parse(DateTime.Now.ToShortDateString() + " 07:30:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToShortDateString() + " 19:30:00")) + { + sql = @"DECLARE @barcode nvarchar(100), + @productInfo nvarchar(100), + @createTime DATETIME, + @totle INT , + @ptype NVARCHAR(100), + @color NVARCHAR(100) + + + IF OBJECT_ID('TEMPDB..#a') IS NOT NULL + DROP TABLE #a + create table #a (BarCode nvarchar(100),productInfo nvarchar(100),createTime dateTime) + --truncate table #c + DECLARE cursor_name CURSOR FOR --定义游标 + SELECT barcode,CreateTime FROM dbo.tb_StockIn WHERE [createTime] BETWEEN DATEADD(day,-1, CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:30:01')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:30:00') AND pass=1 + ORDER BY createTime DESC + OPEN cursor_name --打开游标 + FETCH NEXT FROM cursor_name INTO @barcode ,@createTime --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + SELECT TOP 1 @productInfo=productInfo FROM dbo.tb_InspectResult WHERE barcode=@barcode ORDER BY createTime DESC + + insert into #a(BarCode,ProductInfo,CreateTime) values(@barcode,@productInfo,@createTime) + FETCH NEXT FROM cursor_name INTO @barcode,@createTime + END + CLOSE cursor_name --关闭游标 + DEALLOCATE cursor_name --释放游标 + + IF OBJECT_ID('TEMPDB..#temp') IS NOT NULL + DROP TABLE #temp + create table #temp (id INT IDENTITY(1,1)NOT NULL, totle INT,ptype nvarchar(100),color NVARCHAR(100)) + + DECLARE a1 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%槛%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a1 --打开游标 + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a1 INTO @totle ,@ptype,@color + END + CLOSE a1 --关闭游标 + DEALLOCATE a1 --释放游标 + + + DECLARE a2 CURSOR FOR --定义游标 + SELECT COUNT(0) totle,SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) AS PType,LEFT(productInfo,CHARINDEX(',',productInfo)-1) AS color + FROM #a WHERE productInfo LIKE '%保%' + GROUP BY LEFT(productInfo,CHARINDEX(',',productInfo)-1),SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + ORDER BY SUBSTRING(productInfo, dbo.fn_find(',',productInfo,3 )+1,LEN(productInfo)-dbo.fn_find(',',productInfo,3 )) + OPEN a2 --打开游标 + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color --抓取下一行游标数据 + WHILE @@FETCH_STATUS = 0 + BEGIN + insert into #temp(totle,ptype,color) values(@totle,@ptype,@color) + FETCH NEXT FROM a2 INTO @totle ,@ptype,@color + END + CLOSE a2 --关闭游标 + DEALLOCATE a2 --释放游标 + + SELECT * FROM #temp ORDER BY id +"; + } + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0]; + + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + + public DataTable SearchColor(string barCode) + { + try + { + string sql = @"select * from dbo.tb_StockIn where barcode=@barcode"; + SqlParameter[] param = new SqlParameter[1]; + + param[0] = new SqlParameter("@barcode", SqlDbType.VarChar); + param[0].Value = barCode; + + return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; + } + catch (Exception ex) + { + LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); + return null; + } + } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.cs new file mode 100644 index 0000000..efc6a38 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.cs @@ -0,0 +1,403 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Data.Entity; + using System.Data.Entity.Infrastructure; + //using System.Data.Entity.Core.Objects; + using System.Linq; + + public partial class BBMPTEntities : DbContext + { + public BBMPTEntities() + : base("name=BBMPTEntities") + { + } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + throw new UnintentionalCodeFirstException(); + } + + public virtual DbSet fine_authority { get; set; } + public virtual DbSet fine_authority_object { get; set; } + public virtual DbSet fine_backup_node { get; set; } + public virtual DbSet fine_base_message { get; set; } + public virtual DbSet fine_base_output { get; set; } + public virtual DbSet fine_block_ip { get; set; } + public virtual DbSet fine_conf_classname { get; set; } + public virtual DbSet fine_conf_entity { get; set; } + public virtual DbSet fine_conf_xmlentity { get; set; } + public virtual DbSet fine_custom_role { get; set; } + public virtual DbSet fine_dep_role { get; set; } + public virtual DbSet fine_department { get; set; } + public virtual DbSet fine_extra_property { get; set; } + public virtual DbSet fine_favorite_entry { get; set; } + public virtual DbSet fine_homepage_expand { get; set; } + public virtual DbSet fine_international { get; set; } + public virtual DbSet fine_last_login { get; set; } + public virtual DbSet fine_login_lock { get; set; } + public virtual DbSet fine_mobile_device { get; set; } + public virtual DbSet fine_mobile_push_message { get; set; } + public virtual DbSet fine_output_class { get; set; } + public virtual DbSet fine_output_client_notice { get; set; } + public virtual DbSet fine_output_email { get; set; } + public virtual DbSet fine_output_ftp { get; set; } + public virtual DbSet fine_output_mount { get; set; } + public virtual DbSet fine_output_platform_msg { get; set; } + public virtual DbSet fine_output_print { get; set; } + public virtual DbSet fine_output_sftp { get; set; } + public virtual DbSet fine_output_sms { get; set; } + public virtual DbSet fine_param_template { get; set; } + public virtual DbSet fine_post { get; set; } + public virtual DbSet fine_print_offset { get; set; } + public virtual DbSet fine_print_offset_ip_relate { get; set; } + public virtual DbSet fine_process_expand { get; set; } + public virtual DbSet fine_process_message { get; set; } + public virtual DbSet fine_remote_design_auth { get; set; } + public virtual DbSet fine_report_expand { get; set; } + public virtual DbSet fine_schedule_output { get; set; } + public virtual DbSet fine_schedule_record { get; set; } + public virtual DbSet fine_schedule_task { get; set; } + public virtual DbSet fine_schedule_task_param { get; set; } + public virtual DbSet fine_swift_cluster_size { get; set; } + public virtual DbSet fine_swift_col_idx_conf { get; set; } + public virtual DbSet fine_swift_config_entity { get; set; } + public virtual DbSet fine_swift_metadata { get; set; } + public virtual DbSet fine_swift_seg_location { get; set; } + public virtual DbSet fine_swift_segments { get; set; } + public virtual DbSet fine_swift_service_info { get; set; } + public virtual DbSet fine_swift_tab_idx_conf { get; set; } + public virtual DbSet fine_swift_table_path { get; set; } + public virtual DbSet fine_system_message { get; set; } + public virtual DbSet fine_user { get; set; } + public virtual DbSet fine_user_role_middle { get; set; } + public virtual DbSet fine_vcs { get; set; } + public virtual DbSet fine_workflow { get; set; } + public virtual DbSet fine_workflow_log { get; set; } + public virtual DbSet fine_workflow_node { get; set; } + public virtual DbSet fine_workflow_stash_data { get; set; } + public virtual DbSet fine_workflow_task { get; set; } + public virtual DbSet fine_workflow_task_impl { get; set; } + public virtual DbSet fine_write_stash { get; set; } + public virtual DbSet LogErr { get; set; } + public virtual DbSet LogSys { get; set; } + public virtual DbSet LogSys_202008 { get; set; } + public virtual DbSet QRTZ_BLOB_TRIGGERS { get; set; } + public virtual DbSet QRTZ_CALENDARS { get; set; } + public virtual DbSet QRTZ_CRON_TRIGGERS { get; set; } + public virtual DbSet QRTZ_FIRED_TRIGGERS { get; set; } + public virtual DbSet QRTZ_JOB_DETAILS { get; set; } + public virtual DbSet QRTZ_LOCKS { get; set; } + public virtual DbSet QRTZ_PAUSED_TRIGGER_GRPS { get; set; } + public virtual DbSet QRTZ_SCHEDULER_STATE { get; set; } + public virtual DbSet QRTZ_SIMPLE_TRIGGERS { get; set; } + public virtual DbSet QRTZ_SIMPROP_TRIGGERS { get; set; } + public virtual DbSet QRTZ_TRIGGERS { get; set; } + public virtual DbSet T_PaintInfo { get; set; } + public virtual DbSet T_Sys_Buttons { get; set; } + public virtual DbSet T_Sys_NavMenu { get; set; } + public virtual DbSet T_Sys_Power { get; set; } + public virtual DbSet T_Sys_Role { get; set; } + public virtual DbSet T_Sys_UserRole { get; set; } + public virtual DbSet T_Sys_Users { get; set; } + public virtual DbSet T_Sys_Users_NavMenu { get; set; } + public virtual DbSet TA_DEPT { get; set; } + public virtual DbSet tb_aa { get; set; } + public virtual DbSet tb_AndonButtonType { get; set; } + public virtual DbSet tb_AndonRecord { get; set; } + public virtual DbSet tb_Bad_Injection { get; set; } + public virtual DbSet tb_BarCode { get; set; } + public virtual DbSet tb_Bom { get; set; } + public virtual DbSet tb_Box_243 { get; set; } + public virtual DbSet tb_Box_Record { get; set; } + public virtual DbSet tb_Box_WheelBrow { get; set; } + public virtual DbSet tb_BucketInfo { get; set; } + public virtual DbSet tb_CheckItem { get; set; } + public virtual DbSet tb_Color { get; set; } + public virtual DbSet tb_CommonlyInspection { get; set; } + public virtual DbSet tb_CommonlyInspectionRecord { get; set; } + public virtual DbSet tb_CommonlyInspectionVersion { get; set; } + public virtual DbSet tb_Config { get; set; } + public virtual DbSet tb_Cylinder { get; set; } + public virtual DbSet tb_CylinderAndRaw { get; set; } + public virtual DbSet tb_Defect { get; set; } + public virtual DbSet tb_Device { get; set; } + public virtual DbSet tb_Factory { get; set; } + public virtual DbSet tb_FinishProduct { get; set; } + public virtual DbSet tb_HybridPlan { get; set; } + public virtual DbSet tb_HybridScanRecord { get; set; } + public virtual DbSet tb_ImgVideo { get; set; } + public virtual DbSet tb_Inhection_DownReason { get; set; } + public virtual DbSet tb_Injection_DownRecord { get; set; } + public virtual DbSet tb_Injection_DownTime { get; set; } + public virtual DbSet tb_Injection_DownType { get; set; } + public virtual DbSet tb_Injection_Record { get; set; } + public virtual DbSet tb_InjectionPlan { get; set; } + public virtual DbSet tb_InspectResult { get; set; } + public virtual DbSet tb_LayerAndBC { get; set; } + public virtual DbSet tb_Line { get; set; } + public virtual DbSet tb_Location { get; set; } + public virtual DbSet tb_Machine { get; set; } + public virtual DbSet tb_Mistake_243 { get; set; } + public virtual DbSet tb_Mistake_247 { get; set; } + public virtual DbSet tb_Model_Product { get; set; } + public virtual DbSet tb_Model_Update { get; set; } + public virtual DbSet tb_ModelCount { get; set; } + public virtual DbSet tb_ModelInfo { get; set; } + public virtual DbSet tb_Operator { get; set; } + public virtual DbSet tb_Paint_Bucket { get; set; } + public virtual DbSet tb_PaintBarCode { get; set; } + public virtual DbSet tb_PaintInfo { get; set; } + public virtual DbSet tb_PaintPerson { get; set; } + public virtual DbSet tb_PaintReason { get; set; } + public virtual DbSet tb_PaintScanRecord { get; set; } + public virtual DbSet tb_PartRecord { get; set; } + public virtual DbSet tb_Place { get; set; } + public virtual DbSet tb_Plan_243 { get; set; } + public virtual DbSet tb_Plan_247 { get; set; } + public virtual DbSet tb_Plan_Punch { get; set; } + public virtual DbSet tb_PlanScreenConfig { get; set; } + public virtual DbSet tb_Plastic { get; set; } + public virtual DbSet tb_PrintConfig { get; set; } + public virtual DbSet tb_Product { get; set; } + public virtual DbSet tb_Product_Injection { get; set; } + public virtual DbSet tb_Product_Injection_w { get; set; } + public virtual DbSet tb_ProductSotckIn { get; set; } + public virtual DbSet tb_ProductType { get; set; } + public virtual DbSet tb_Project { get; set; } + public virtual DbSet tb_Punch_Code_Record { get; set; } + public virtual DbSet tb_Punch_Code_Record2 { get; set; } + public virtual DbSet tb_Punch_Proucting { get; set; } + public virtual DbSet tb_PunchAddress { get; set; } + public virtual DbSet tb_PunchAndStation { get; set; } + public virtual DbSet tb_PunchDevice { get; set; } + public virtual DbSet tb_PunchMFAPlan { get; set; } + public virtual DbSet tb_PunchNGCCPlan { get; set; } + public virtual DbSet tb_PunchPlan { get; set; } + public virtual DbSet tb_PunchRecord { get; set; } + public virtual DbSet tb_PunchResult { get; set; } + public virtual DbSet tb_PunchValueRecord { get; set; } + public virtual DbSet tb_Record_243 { get; set; } + public virtual DbSet tb_Record_243_20220517 { get; set; } + public virtual DbSet tb_Report_FiveScreen { get; set; } + public virtual DbSet tb_Report_FiveScreenConfig { get; set; } + public virtual DbSet tb_Report_FiveScreenLast { get; set; } + public virtual DbSet tb_Report_FiveScreenStandard { get; set; } + public virtual DbSet tb_ReportA1 { get; set; } + public virtual DbSet tb_reportA2 { get; set; } + public virtual DbSet tb_ReportF1 { get; set; } + public virtual DbSet tb_ReportF3 { get; set; } + public virtual DbSet tb_ReportG1 { get; set; } + public virtual DbSet tb_ReportH1 { get; set; } + public virtual DbSet tb_ReportTest { get; set; } + public virtual DbSet tb_ScanAnalysis { get; set; } + public virtual DbSet tb_ScanRecord_Laser { get; set; } + public virtual DbSet tb_SkidInfo { get; set; } + public virtual DbSet tb_SpcialNotFacStockNo { get; set; } + public virtual DbSet tb_SpcialStockNo { get; set; } + public virtual DbSet tb_Station { get; set; } + public virtual DbSet tb_StationAndCylinder { get; set; } + public virtual DbSet tb_StockIn_beif { get; set; } + public virtual DbSet tb_StockInColor { get; set; } + public virtual DbSet tb_test { get; set; } + public virtual DbSet tb_ToVisual_WheelBrow_243 { get; set; } + public virtual DbSet tb_ToVisual_WheelBrow_247 { get; set; } + public virtual DbSet TES_BOM { get; set; } + public virtual DbSet TES_PART_MSTR { get; set; } + public virtual DbSet test2 { get; set; } + public virtual DbSet LogSys_202001_04 { get; set; } + public virtual DbSet LogSys_202003 { get; set; } + public virtual DbSet LogSys_202004 { get; set; } + public virtual DbSet LogSys_202005 { get; set; } + public virtual DbSet LogSys_20200605 { get; set; } + public virtual DbSet LogSys_20200610 { get; set; } + public virtual DbSet LogSys_20210322 { get; set; } + public virtual DbSet T_Sys_RoleLinkPower { get; set; } + public virtual DbSet tb_Assembly_243 { get; set; } + public virtual DbSet tb_Assembly_247 { get; set; } + public virtual DbSet tb_Bom_20190726 { get; set; } + public virtual DbSet tb_Box_247 { get; set; } + public virtual DbSet tb_Color_20191008 { get; set; } + public virtual DbSet tb_Color_20201101 { get; set; } + public virtual DbSet tb_InjectPlanReport { get; set; } + public virtual DbSet tb_InspectResult_20190902 { get; set; } + public virtual DbSet tb_InspectResult_20200717 { get; set; } + public virtual DbSet tb_InspectResult_20201021 { get; set; } + public virtual DbSet tb_InspectResult_20210322 { get; set; } + public virtual DbSet tb_Mistake_243_bak { get; set; } + public virtual DbSet tb_Plan_Punch_20200509 { get; set; } + public virtual DbSet tb_PrintRecord { get; set; } + public virtual DbSet tb_Product_20200513 { get; set; } + public virtual DbSet tb_Product_20201110 { get; set; } + public virtual DbSet tb_Product_Injection_20190726 { get; set; } + public virtual DbSet tb_Product0912 { get; set; } + public virtual DbSet tb_Product20200802 { get; set; } + public virtual DbSet tb_Product20201016 { get; set; } + public virtual DbSet tb_Punch_Code_Record_20200721 { get; set; } + public virtual DbSet tb_Punch_Code_Record_20200907 { get; set; } + public virtual DbSet tb_Punch_Code_Record_BF { get; set; } + public virtual DbSet tb_Record_247 { get; set; } + public virtual DbSet tb_Report_FiveScreen_20191011 { get; set; } + public virtual DbSet tb_Report_FiveScreen_20191014 { get; set; } + public virtual DbSet tb_ReportPaintingScreen { get; set; } + public virtual DbSet tb_ReportPaintingScreen_bak { get; set; } + public virtual DbSet tb_ReportPaintingScreen_pg { get; set; } + public virtual DbSet tb_ReportPaintingScreen_pg_bak { get; set; } + public virtual DbSet tb_SkidInfo_20200904 { get; set; } + public virtual DbSet tb_StockIn { get; set; } + public virtual DbSet tb_StockIn_20200511 { get; set; } + public virtual DbSet tb_StockIn_20210322 { get; set; } + public virtual DbSet test1 { get; set; } + + //public virtual int user_del(Nullable userID, string opName) + //{ + // var userIDParameter = userID.HasValue ? + // new ObjectParameter("UserID", userID) : + // new ObjectParameter("UserID", typeof(System.Guid)); + + // var opNameParameter = opName != null ? + // new ObjectParameter("opName", opName) : + // new ObjectParameter("opName", typeof(string)); + + // return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("user_del", userIDParameter, opNameParameter); + //} + + //public virtual ObjectResult user_department_sel() + //{ + // return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("user_department_sel"); + //} + + //public virtual int user_ins(Nullable userID, string userName, string password, string realName, string sex, string tel, string department, Nullable departmentID, Nullable isEnabled, string menuList, string opName) + //{ + // var userIDParameter = userID.HasValue ? + // new ObjectParameter("UserID", userID) : + // new ObjectParameter("UserID", typeof(System.Guid)); + + // var userNameParameter = userName != null ? + // new ObjectParameter("UserName", userName) : + // new ObjectParameter("UserName", typeof(string)); + + // var passwordParameter = password != null ? + // new ObjectParameter("Password", password) : + // new ObjectParameter("Password", typeof(string)); + + // var realNameParameter = realName != null ? + // new ObjectParameter("RealName", realName) : + // new ObjectParameter("RealName", typeof(string)); + + // var sexParameter = sex != null ? + // new ObjectParameter("Sex", sex) : + // new ObjectParameter("Sex", typeof(string)); + + // var telParameter = tel != null ? + // new ObjectParameter("Tel", tel) : + // new ObjectParameter("Tel", typeof(string)); + + // var departmentParameter = department != null ? + // new ObjectParameter("Department", department) : + // new ObjectParameter("Department", typeof(string)); + + // var departmentIDParameter = departmentID.HasValue ? + // new ObjectParameter("DepartmentID", departmentID) : + // new ObjectParameter("DepartmentID", typeof(System.Guid)); + + // var isEnabledParameter = isEnabled.HasValue ? + // new ObjectParameter("IsEnabled", isEnabled) : + // new ObjectParameter("IsEnabled", typeof(int)); + + // var menuListParameter = menuList != null ? + // new ObjectParameter("MenuList", menuList) : + // new ObjectParameter("MenuList", typeof(string)); + + // var opNameParameter = opName != null ? + // new ObjectParameter("opName", opName) : + // new ObjectParameter("opName", typeof(string)); + + // return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("user_ins", userIDParameter, userNameParameter, passwordParameter, realNameParameter, sexParameter, telParameter, departmentParameter, departmentIDParameter, isEnabledParameter, menuListParameter, opNameParameter); + //} + + //public virtual ObjectResult user_menu_sel(Nullable userID) + //{ + // var userIDParameter = userID.HasValue ? + // new ObjectParameter("UserID", userID) : + // new ObjectParameter("UserID", typeof(System.Guid)); + + // return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("user_menu_sel", userIDParameter); + //} + + //public virtual ObjectResult> user_sel(string userName, Nullable page, Nullable pagesize) + //{ + // var userNameParameter = userName != null ? + // new ObjectParameter("UserName", userName) : + // new ObjectParameter("UserName", typeof(string)); + + // var pageParameter = page.HasValue ? + // new ObjectParameter("page", page) : + // new ObjectParameter("page", typeof(int)); + + // var pagesizeParameter = pagesize.HasValue ? + // new ObjectParameter("pagesize", pagesize) : + // new ObjectParameter("pagesize", typeof(int)); + + // return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("user_sel", userNameParameter, pageParameter, pagesizeParameter); + //} + + //public virtual int user_upd(Nullable userID, string userName, string password, string realName, string sex, string tel, string department, Nullable departmentID, Nullable isEnabled, string menuList, string opName) + //{ + // var userIDParameter = userID.HasValue ? + // new ObjectParameter("UserID", userID) : + // new ObjectParameter("UserID", typeof(System.Guid)); + + // var userNameParameter = userName != null ? + // new ObjectParameter("UserName", userName) : + // new ObjectParameter("UserName", typeof(string)); + + // var passwordParameter = password != null ? + // new ObjectParameter("Password", password) : + // new ObjectParameter("Password", typeof(string)); + + // var realNameParameter = realName != null ? + // new ObjectParameter("RealName", realName) : + // new ObjectParameter("RealName", typeof(string)); + + // var sexParameter = sex != null ? + // new ObjectParameter("Sex", sex) : + // new ObjectParameter("Sex", typeof(string)); + + // var telParameter = tel != null ? + // new ObjectParameter("Tel", tel) : + // new ObjectParameter("Tel", typeof(string)); + + // var departmentParameter = department != null ? + // new ObjectParameter("Department", department) : + // new ObjectParameter("Department", typeof(string)); + + // var departmentIDParameter = departmentID.HasValue ? + // new ObjectParameter("DepartmentID", departmentID) : + // new ObjectParameter("DepartmentID", typeof(System.Guid)); + + // var isEnabledParameter = isEnabled.HasValue ? + // new ObjectParameter("IsEnabled", isEnabled) : + // new ObjectParameter("IsEnabled", typeof(int)); + + // var menuListParameter = menuList != null ? + // new ObjectParameter("MenuList", menuList) : + // new ObjectParameter("MenuList", typeof(string)); + + // var opNameParameter = opName != null ? + // new ObjectParameter("opName", opName) : + // new ObjectParameter("opName", typeof(string)); + + // return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("user_upd", userIDParameter, userNameParameter, passwordParameter, realNameParameter, sexParameter, telParameter, departmentParameter, departmentIDParameter, isEnabledParameter, menuListParameter, opNameParameter); + //} + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.tt b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.tt new file mode 100644 index 0000000..eb83c98 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Context.tt @@ -0,0 +1,636 @@ +<#@ template language="C#" debug="false" hostspecific="true"#> +<#@ include file="EF6.Utility.CS.ttinclude"#><#@ + output extension=".cs"#><# + +const string inputFile = @"BBMPT.edmx"; +var textTransform = DynamicTextTransformation.Create(this); +var code = new CodeGenerationTools(this); +var ef = new MetadataTools(this); +var typeMapper = new TypeMapper(code, ef, textTransform.Errors); +var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors); +var itemCollection = loader.CreateEdmItemCollection(inputFile); +var modelNamespace = loader.GetModelNamespace(inputFile); +var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef); + +var container = itemCollection.OfType().FirstOrDefault(); +if (container == null) +{ + return string.Empty; +} +#> +//------------------------------------------------------------------------------ +// +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#> +// +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#> +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#> +// +//------------------------------------------------------------------------------ + +<# + +var codeNamespace = code.VsNamespaceSuggestion(); +if (!String.IsNullOrEmpty(codeNamespace)) +{ +#> +namespace <#=code.EscapeNamespace(codeNamespace)#> +{ +<# + PushIndent(" "); +} + +#> +using System; +using System.Data.Entity; +using System.Data.Entity.Infrastructure; +<# +if (container.FunctionImports.Any()) +{ +#> +using System.Data.Entity.Core.Objects; +using System.Linq; +<# +} +#> + +<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext +{ + public <#=code.Escape(container)#>() + : base("name=<#=container.Name#>") + { +<# +if (!loader.IsLazyLoadingEnabled(container)) +{ +#> + this.Configuration.LazyLoadingEnabled = false; +<# +} + +foreach (var entitySet in container.BaseEntitySets.OfType()) +{ + // Note: the DbSet members are defined below such that the getter and + // setter always have the same accessibility as the DbSet definition + if (Accessibility.ForReadOnlyProperty(entitySet) != "public") + { +#> + <#=codeStringGenerator.DbSetInitializer(entitySet)#> +<# + } +} +#> + } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + throw new UnintentionalCodeFirstException(); + } + +<# + foreach (var entitySet in container.BaseEntitySets.OfType()) + { +#> + <#=codeStringGenerator.DbSet(entitySet)#> +<# + } + + foreach (var edmFunction in container.FunctionImports) + { + WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false); + } +#> +} +<# + +if (!String.IsNullOrEmpty(codeNamespace)) +{ + PopIndent(); +#> +} +<# +} +#> +<#+ + +private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) +{ + if (typeMapper.IsComposable(edmFunction)) + { +#> + + [DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")] + <#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#> + { +<#+ + codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter); +#> + <#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#> + } +<#+ + } + else + { +#> + + <#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#> + { +<#+ + codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter); +#> + <#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#> + } +<#+ + if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption)) + { + WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true); + } + } +} + +public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit) +{ +#> + var <#=name#> = <#=isNotNull#> ? + <#=notNullInit#> : + <#=nullInit#>; + +<#+ +} + +public const string TemplateId = "CSharp_DbContext_Context_EF6"; + +public class CodeStringGenerator +{ + private readonly CodeGenerationTools _code; + private readonly TypeMapper _typeMapper; + private readonly MetadataTools _ef; + + public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef) + { + ArgumentNotNull(code, "code"); + ArgumentNotNull(typeMapper, "typeMapper"); + ArgumentNotNull(ef, "ef"); + + _code = code; + _typeMapper = typeMapper; + _ef = ef; + } + + public string Property(EdmProperty edmProperty) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2} {{ {3}get; {4}set; }}", + Accessibility.ForProperty(edmProperty), + _typeMapper.GetTypeName(edmProperty.TypeUsage), + _code.Escape(edmProperty), + _code.SpaceAfter(Accessibility.ForGetter(edmProperty)), + _code.SpaceAfter(Accessibility.ForSetter(edmProperty))); + } + + public string NavigationProperty(NavigationProperty navProp) + { + var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType()); + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2} {{ {3}get; {4}set; }}", + AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)), + navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType, + _code.Escape(navProp), + _code.SpaceAfter(Accessibility.ForGetter(navProp)), + _code.SpaceAfter(Accessibility.ForSetter(navProp))); + } + + public string AccessibilityAndVirtual(string accessibility) + { + return accessibility + (accessibility != "private" ? " virtual" : ""); + } + + public string EntityClassOpening(EntityType entity) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1}partial class {2}{3}", + Accessibility.ForType(entity), + _code.SpaceAfter(_code.AbstractOption(entity)), + _code.Escape(entity), + _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType))); + } + + public string EnumOpening(SimpleType enumType) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} enum {1} : {2}", + Accessibility.ForType(enumType), + _code.Escape(enumType), + _code.Escape(_typeMapper.UnderlyingClrType(enumType))); + } + + public void WriteFunctionParameters(EdmFunction edmFunction, Action writeParameter) + { + var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); + foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable)) + { + var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null"; + var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")"; + var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))"; + writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit); + } + } + + public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace) + { + var parameters = _typeMapper.GetParameters(edmFunction); + + return string.Format( + CultureInfo.InvariantCulture, + "{0} IQueryable<{1}> {2}({3})", + AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), + _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), + _code.Escape(edmFunction), + string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray())); + } + + public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace) + { + var parameters = _typeMapper.GetParameters(edmFunction); + + return string.Format( + CultureInfo.InvariantCulture, + "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});", + _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), + edmFunction.NamespaceName, + edmFunction.Name, + string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()), + _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()))); + } + + public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) + { + var parameters = _typeMapper.GetParameters(edmFunction); + var returnType = _typeMapper.GetReturnType(edmFunction); + + var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()); + if (includeMergeOption) + { + paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption"; + } + + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2}({3})", + AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), + returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", + _code.Escape(edmFunction), + paramList); + } + + public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) + { + var parameters = _typeMapper.GetParameters(edmFunction); + var returnType = _typeMapper.GetReturnType(edmFunction); + + var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())); + if (includeMergeOption) + { + callParams = ", mergeOption" + callParams; + } + + return string.Format( + CultureInfo.InvariantCulture, + "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});", + returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", + edmFunction.Name, + callParams); + } + + public string DbSet(EntitySet entitySet) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} virtual DbSet<{1}> {2} {{ get; set; }}", + Accessibility.ForReadOnlyProperty(entitySet), + _typeMapper.GetTypeName(entitySet.ElementType), + _code.Escape(entitySet)); + } + + public string DbSetInitializer(EntitySet entitySet) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} = Set<{1}>();", + _code.Escape(entitySet), + _typeMapper.GetTypeName(entitySet.ElementType)); + } + + public string UsingDirectives(bool inHeader, bool includeCollections = true) + { + return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion()) + ? string.Format( + CultureInfo.InvariantCulture, + "{0}using System;{1}" + + "{2}", + inHeader ? Environment.NewLine : "", + includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "", + inHeader ? "" : Environment.NewLine) + : ""; + } +} + +public class TypeMapper +{ + private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName"; + + private readonly System.Collections.IList _errors; + private readonly CodeGenerationTools _code; + private readonly MetadataTools _ef; + + public static string FixNamespaces(string typeName) + { + return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial."); + } + + public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors) + { + ArgumentNotNull(code, "code"); + ArgumentNotNull(ef, "ef"); + ArgumentNotNull(errors, "errors"); + + _code = code; + _ef = ef; + _errors = errors; + } + + public string GetTypeName(TypeUsage typeUsage) + { + return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null); + } + + public string GetTypeName(EdmType edmType) + { + return GetTypeName(edmType, isNullable: null, modelNamespace: null); + } + + public string GetTypeName(TypeUsage typeUsage, string modelNamespace) + { + return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace); + } + + public string GetTypeName(EdmType edmType, string modelNamespace) + { + return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace); + } + + public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace) + { + if (edmType == null) + { + return null; + } + + var collectionType = edmType as CollectionType; + if (collectionType != null) + { + return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace)); + } + + var typeName = _code.Escape(edmType.MetadataProperties + .Where(p => p.Name == ExternalTypeNameAttributeName) + .Select(p => (string)p.Value) + .FirstOrDefault()) + ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ? + _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) : + _code.Escape(edmType)); + + if (edmType is StructuralType) + { + return typeName; + } + + if (edmType is SimpleType) + { + var clrType = UnderlyingClrType(edmType); + if (!IsEnumType(edmType)) + { + typeName = _code.Escape(clrType); + } + + typeName = FixNamespaces(typeName); + + return clrType.IsValueType && isNullable == true ? + String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) : + typeName; + } + + throw new ArgumentException("edmType"); + } + + public Type UnderlyingClrType(EdmType edmType) + { + ArgumentNotNull(edmType, "edmType"); + + var primitiveType = edmType as PrimitiveType; + if (primitiveType != null) + { + return primitiveType.ClrEquivalentType; + } + + if (IsEnumType(edmType)) + { + return GetEnumUnderlyingType(edmType).ClrEquivalentType; + } + + return typeof(object); + } + + public object GetEnumMemberValue(MetadataItem enumMember) + { + ArgumentNotNull(enumMember, "enumMember"); + + var valueProperty = enumMember.GetType().GetProperty("Value"); + return valueProperty == null ? null : valueProperty.GetValue(enumMember, null); + } + + public string GetEnumMemberName(MetadataItem enumMember) + { + ArgumentNotNull(enumMember, "enumMember"); + + var nameProperty = enumMember.GetType().GetProperty("Name"); + return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null); + } + + public System.Collections.IEnumerable GetEnumMembers(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + var membersProperty = enumType.GetType().GetProperty("Members"); + return membersProperty != null + ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null) + : Enumerable.Empty(); + } + + public bool EnumIsFlags(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + var isFlagsProperty = enumType.GetType().GetProperty("IsFlags"); + return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null); + } + + public bool IsEnumType(GlobalItem edmType) + { + ArgumentNotNull(edmType, "edmType"); + + return edmType.GetType().Name == "EnumType"; + } + + public PrimitiveType GetEnumUnderlyingType(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null); + } + + public string CreateLiteral(object value) + { + if (value == null || value.GetType() != typeof(TimeSpan)) + { + return _code.CreateLiteral(value); + } + + return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks); + } + + public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable types, string sourceFile) + { + ArgumentNotNull(types, "types"); + ArgumentNotNull(sourceFile, "sourceFile"); + + var hash = new HashSet(StringComparer.InvariantCultureIgnoreCase); + if (types.Any(item => !hash.Add(item))) + { + _errors.Add( + new CompilerError(sourceFile, -1, -1, "6023", + String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict")))); + return false; + } + return true; + } + + public IEnumerable GetEnumItemsToGenerate(IEnumerable itemCollection) + { + return GetItemsToGenerate(itemCollection) + .Where(e => IsEnumType(e)); + } + + public IEnumerable GetItemsToGenerate(IEnumerable itemCollection) where T: EdmType + { + return itemCollection + .OfType() + .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName)) + .OrderBy(i => i.Name); + } + + public IEnumerable GetAllGlobalItems(IEnumerable itemCollection) + { + return itemCollection + .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i)) + .Select(g => GetGlobalItemName(g)); + } + + public string GetGlobalItemName(GlobalItem item) + { + if (item is EdmType) + { + return ((EdmType)item).Name; + } + else + { + return ((EntityContainer)item).Name; + } + } + + public IEnumerable GetSimpleProperties(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type); + } + + public IEnumerable GetSimpleProperties(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type); + } + + public IEnumerable GetComplexProperties(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type); + } + + public IEnumerable GetComplexProperties(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type); + } + + public IEnumerable GetPropertiesWithDefaultValues(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null); + } + + public IEnumerable GetPropertiesWithDefaultValues(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null); + } + + public IEnumerable GetNavigationProperties(EntityType type) + { + return type.NavigationProperties.Where(np => np.DeclaringType == type); + } + + public IEnumerable GetCollectionNavigationProperties(EntityType type) + { + return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many); + } + + public FunctionParameter GetReturnParameter(EdmFunction edmFunction) + { + ArgumentNotNull(edmFunction, "edmFunction"); + + var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters"); + return returnParamsProperty == null + ? edmFunction.ReturnParameter + : ((IEnumerable)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault(); + } + + public bool IsComposable(EdmFunction edmFunction) + { + ArgumentNotNull(edmFunction, "edmFunction"); + + var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute"); + return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null); + } + + public IEnumerable GetParameters(EdmFunction edmFunction) + { + return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); + } + + public TypeUsage GetReturnType(EdmFunction edmFunction) + { + var returnParam = GetReturnParameter(edmFunction); + return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage); + } + + public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption) + { + var returnType = GetReturnType(edmFunction); + return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType; + } +} + +public static void ArgumentNotNull(T arg, string name) where T : class +{ + if (arg == null) + { + throw new ArgumentNullException(name); + } +} +#> \ No newline at end of file diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Designer.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Designer.cs new file mode 100644 index 0000000..4f7c5e8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.Designer.cs @@ -0,0 +1,10 @@ +// 为模型“D:\项目\1、北汽模塑二厂\李鑫\Code对接视频后冲孔未增加质检前\Code\MESClassLibrary\EFModel\BBMPT.edmx”启用了 T4 代码生成。 +// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值 +// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时,此属性会出现在 +// “属性”窗口中。 + +// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是 +// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体 +// 类,请在设计器中打开该模型,右键单击设计器图面,然后 +// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成 +// 项...”。 \ No newline at end of file diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.cs new file mode 100644 index 0000000..69c6b92 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.cs @@ -0,0 +1,9 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx new file mode 100644 index 0000000..47aff17 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx @@ -0,0 +1,11035 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT + [LogSys_202001-04].[ID] AS [ID], + [LogSys_202001-04].[SysContent] AS [SysContent], + [LogSys_202001-04].[SysSource] AS [SysSource], + [LogSys_202001-04].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_202001-04] AS [LogSys_202001-04] + + + SELECT + [LogSys_202003].[ID] AS [ID], + [LogSys_202003].[SysContent] AS [SysContent], + [LogSys_202003].[SysSource] AS [SysSource], + [LogSys_202003].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_202003] AS [LogSys_202003] + + + SELECT + [LogSys_202004].[ID] AS [ID], + [LogSys_202004].[SysContent] AS [SysContent], + [LogSys_202004].[SysSource] AS [SysSource], + [LogSys_202004].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_202004] AS [LogSys_202004] + + + SELECT + [LogSys_202005].[ID] AS [ID], + [LogSys_202005].[SysContent] AS [SysContent], + [LogSys_202005].[SysSource] AS [SysSource], + [LogSys_202005].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_202005] AS [LogSys_202005] + + + SELECT + [LogSys_20200605].[ID] AS [ID], + [LogSys_20200605].[SysContent] AS [SysContent], + [LogSys_20200605].[SysSource] AS [SysSource], + [LogSys_20200605].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_20200605] AS [LogSys_20200605] + + + SELECT + [LogSys_20200610].[ID] AS [ID], + [LogSys_20200610].[SysContent] AS [SysContent], + [LogSys_20200610].[SysSource] AS [SysSource], + [LogSys_20200610].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_20200610] AS [LogSys_20200610] + + + SELECT + [LogSys_20210322].[ID] AS [ID], + [LogSys_20210322].[SysContent] AS [SysContent], + [LogSys_20210322].[SysSource] AS [SysSource], + [LogSys_20210322].[CreateTime] AS [CreateTime] + FROM [dbo].[LogSys_20210322] AS [LogSys_20210322] + + + SELECT + [T_Sys_RoleLinkPower].[RoleID] AS [RoleID], + [T_Sys_RoleLinkPower].[PowerID] AS [PowerID], + [T_Sys_RoleLinkPower].[OpTime] AS [OpTime], + [T_Sys_RoleLinkPower].[OpName] AS [OpName] + FROM [dbo].[T_Sys_RoleLinkPower] AS [T_Sys_RoleLinkPower] + + + SELECT + [tb_Assembly_243].[ID] AS [ID], + [tb_Assembly_243].[PartNo] AS [PartNo], + [tb_Assembly_243].[PartName] AS [PartName], + [tb_Assembly_243].[BatchNo] AS [BatchNo], + [tb_Assembly_243].[Color] AS [Color], + [tb_Assembly_243].[ColorNo] AS [ColorNo], + [tb_Assembly_243].[PartType] AS [PartType], + [tb_Assembly_243].[TapeBatchNo] AS [TapeBatchNo], + [tb_Assembly_243].[Validity] AS [Validity], + [tb_Assembly_243].[ValidityDate] AS [ValidityDate], + [tb_Assembly_243].[CreateTime] AS [CreateTime], + [tb_Assembly_243].[PrintTime] AS [PrintTime], + [tb_Assembly_243].[Des] AS [Des], + [tb_Assembly_243].[Flag] AS [Flag], + [tb_Assembly_243].[ToVisual] AS [ToVisual], + [tb_Assembly_243].[FinishTime] AS [FinishTime] + FROM [dbo].[tb_Assembly_243] AS [tb_Assembly_243] + + + SELECT + [tb_Assembly_247].[ID] AS [ID], + [tb_Assembly_247].[PartNo] AS [PartNo], + [tb_Assembly_247].[PartName] AS [PartName], + [tb_Assembly_247].[BatchNo] AS [BatchNo], + [tb_Assembly_247].[Color] AS [Color], + [tb_Assembly_247].[ColorNo] AS [ColorNo], + [tb_Assembly_247].[PartType] AS [PartType], + [tb_Assembly_247].[TapeBatchNo] AS [TapeBatchNo], + [tb_Assembly_247].[Validity] AS [Validity], + [tb_Assembly_247].[ValidityDate] AS [ValidityDate], + [tb_Assembly_247].[CreateTime] AS [CreateTime], + [tb_Assembly_247].[PrintTime] AS [PrintTime], + [tb_Assembly_247].[Des] AS [Des], + [tb_Assembly_247].[Flag] AS [Flag], + [tb_Assembly_247].[ToVisual] AS [ToVisual], + [tb_Assembly_247].[FinishTime] AS [FinishTime], + [tb_Assembly_247].[IsCheck] AS [IsCheck], + [tb_Assembly_247].[DeviceNo] AS [DeviceNo] + FROM [dbo].[tb_Assembly_247] AS [tb_Assembly_247] + + + SELECT + [tb_Bom_20190726].[BomID] AS [BomID], + [tb_Bom_20190726].[PartNo1] AS [PartNo1], + [tb_Bom_20190726].[PartNo2] AS [PartNo2] + FROM [dbo].[tb_Bom_20190726] AS [tb_Bom_20190726] + + + SELECT + [tb_Box_247].[ID] AS [ID], + [tb_Box_247].[BoxNo] AS [BoxNo], + [tb_Box_247].[PartNo] AS [PartNo], + [tb_Box_247].[PartName] AS [PartName], + [tb_Box_247].[BatchNo] AS [BatchNo], + [tb_Box_247].[BoxCount] AS [BoxCount], + [tb_Box_247].[CreateTime] AS [CreateTime], + [tb_Box_247].[PrintTime] AS [PrintTime], + [tb_Box_247].[Des] AS [Des], + [tb_Box_247].[Flag] AS [Flag], + [tb_Box_247].[Validity] AS [Validity], + [tb_Box_247].[ValidityDate] AS [ValidityDate] + FROM [dbo].[tb_Box_247] AS [tb_Box_247] + + + SELECT + [tb_Color_20191008].[ID] AS [ID], + [tb_Color_20191008].[ColorCode] AS [ColorCode], + [tb_Color_20191008].[ColorNo] AS [ColorNo], + [tb_Color_20191008].[Des] AS [Des], + [tb_Color_20191008].[Circle] AS [Circle], + [tb_Color_20191008].[ColorQQCode] AS [ColorQQCode] + FROM [dbo].[tb_Color_20191008] AS [tb_Color_20191008] + + + SELECT + [tb_Color_20201101].[ID] AS [ID], + [tb_Color_20201101].[ColorCode] AS [ColorCode], + [tb_Color_20201101].[ColorNo] AS [ColorNo], + [tb_Color_20201101].[Des] AS [Des], + [tb_Color_20201101].[Circle] AS [Circle], + [tb_Color_20201101].[ColorQQCode] AS [ColorQQCode], + [tb_Color_20201101].[ColorDQCode] AS [ColorDQCode], + [tb_Color_20201101].[CreateTime] AS [CreateTime], + [tb_Color_20201101].[UpdateTime] AS [UpdateTime], + [tb_Color_20201101].[OrderNo] AS [OrderNo] + FROM [dbo].[tb_Color_20201101] AS [tb_Color_20201101] + + + SELECT + [tb_InjectPlanReport].[ID] AS [ID], + [tb_InjectPlanReport].[InjectionPlanID] AS [InjectionPlanID], + [tb_InjectPlanReport].[ProductName] AS [ProductName], + [tb_InjectPlanReport].[MaterialName] AS [MaterialName], + [tb_InjectPlanReport].[Drum] AS [Drum], + [tb_InjectPlanReport].[BatchNo] AS [BatchNo], + [tb_InjectPlanReport].[Time1] AS [Time1] + FROM [dbo].[tb_InjectPlanReport] AS [tb_InjectPlanReport] + + + SELECT + [tb_InspectResult_20190902].[ID] AS [ID], + [tb_InspectResult_20190902].[barcode] AS [barcode], + [tb_InspectResult_20190902].[side] AS [side], + [tb_InspectResult_20190902].[position] AS [position], + [tb_InspectResult_20190902].[stationNo] AS [stationNo], + [tb_InspectResult_20190902].[workClass] AS [workClass], + [tb_InspectResult_20190902].[inspectResult] AS [inspectResult], + [tb_InspectResult_20190902].[damnPosition] AS [damnPosition], + [tb_InspectResult_20190902].[defectID] AS [defectID], + [tb_InspectResult_20190902].[reason] AS [reason], + [tb_InspectResult_20190902].[productInfo] AS [productInfo], + [tb_InspectResult_20190902].[productOption] AS [productOption], + [tb_InspectResult_20190902].[createTime] AS [createTime], + [tb_InspectResult_20190902].[InspectTimes] AS [InspectTimes], + [tb_InspectResult_20190902].[remark1] AS [remark1], + [tb_InspectResult_20190902].[remark2] AS [remark2], + [tb_InspectResult_20190902].[remark3] AS [remark3] + FROM [dbo].[tb_InspectResult_20190902] AS [tb_InspectResult_20190902] + + + SELECT + [tb_InspectResult_20200717].[ID] AS [ID], + [tb_InspectResult_20200717].[barcode] AS [barcode], + [tb_InspectResult_20200717].[side] AS [side], + [tb_InspectResult_20200717].[position] AS [position], + [tb_InspectResult_20200717].[stationNo] AS [stationNo], + [tb_InspectResult_20200717].[workClass] AS [workClass], + [tb_InspectResult_20200717].[inspectResult] AS [inspectResult], + [tb_InspectResult_20200717].[damnPosition] AS [damnPosition], + [tb_InspectResult_20200717].[defectID] AS [defectID], + [tb_InspectResult_20200717].[reason] AS [reason], + [tb_InspectResult_20200717].[productInfo] AS [productInfo], + [tb_InspectResult_20200717].[productOption] AS [productOption], + [tb_InspectResult_20200717].[createTime] AS [createTime], + [tb_InspectResult_20200717].[InspectTimes] AS [InspectTimes], + [tb_InspectResult_20200717].[remark1] AS [remark1], + [tb_InspectResult_20200717].[remark2] AS [remark2], + [tb_InspectResult_20200717].[remark3] AS [remark3] + FROM [dbo].[tb_InspectResult_20200717] AS [tb_InspectResult_20200717] + + + SELECT + [tb_InspectResult_20201021].[ID] AS [ID], + [tb_InspectResult_20201021].[barcode] AS [barcode], + [tb_InspectResult_20201021].[side] AS [side], + [tb_InspectResult_20201021].[position] AS [position], + [tb_InspectResult_20201021].[stationNo] AS [stationNo], + [tb_InspectResult_20201021].[workClass] AS [workClass], + [tb_InspectResult_20201021].[inspectResult] AS [inspectResult], + [tb_InspectResult_20201021].[damnPosition] AS [damnPosition], + [tb_InspectResult_20201021].[defectID] AS [defectID], + [tb_InspectResult_20201021].[reason] AS [reason], + [tb_InspectResult_20201021].[productInfo] AS [productInfo], + [tb_InspectResult_20201021].[productOption] AS [productOption], + [tb_InspectResult_20201021].[createTime] AS [createTime], + [tb_InspectResult_20201021].[InspectTimes] AS [InspectTimes], + [tb_InspectResult_20201021].[remark1] AS [remark1], + [tb_InspectResult_20201021].[remark2] AS [remark2], + [tb_InspectResult_20201021].[remark3] AS [remark3] + FROM [dbo].[tb_InspectResult_20201021] AS [tb_InspectResult_20201021] + + + SELECT + [tb_InspectResult_20210322].[ID] AS [ID], + [tb_InspectResult_20210322].[barcode] AS [barcode], + [tb_InspectResult_20210322].[side] AS [side], + [tb_InspectResult_20210322].[position] AS [position], + [tb_InspectResult_20210322].[stationNo] AS [stationNo], + [tb_InspectResult_20210322].[workClass] AS [workClass], + [tb_InspectResult_20210322].[inspectResult] AS [inspectResult], + [tb_InspectResult_20210322].[damnPosition] AS [damnPosition], + [tb_InspectResult_20210322].[defectID] AS [defectID], + [tb_InspectResult_20210322].[reason] AS [reason], + [tb_InspectResult_20210322].[productInfo] AS [productInfo], + [tb_InspectResult_20210322].[productOption] AS [productOption], + [tb_InspectResult_20210322].[createTime] AS [createTime], + [tb_InspectResult_20210322].[InspectTimes] AS [InspectTimes], + [tb_InspectResult_20210322].[remark1] AS [remark1], + [tb_InspectResult_20210322].[remark2] AS [remark2], + [tb_InspectResult_20210322].[remark3] AS [remark3] + FROM [dbo].[tb_InspectResult_20210322] AS [tb_InspectResult_20210322] + + + SELECT + [tb_Mistake_243_bak].[ID] AS [ID], + [tb_Mistake_243_bak].[PartNo1] AS [PartNo1], + [tb_Mistake_243_bak].[PartName1] AS [PartName1], + [tb_Mistake_243_bak].[PartNo2] AS [PartNo2], + [tb_Mistake_243_bak].[PartName2] AS [PartName2], + [tb_Mistake_243_bak].[PackCount] AS [PackCount], + [tb_Mistake_243_bak].[DeviceNo] AS [DeviceNo] + FROM [dbo].[tb_Mistake_243_bak] AS [tb_Mistake_243_bak] + + + SELECT + [tb_Plan_Punch_20200509].[ID] AS [ID], + [tb_Plan_Punch_20200509].[OrderNo] AS [OrderNo], + [tb_Plan_Punch_20200509].[Item] AS [Item], + [tb_Plan_Punch_20200509].[PartNo] AS [PartNo], + [tb_Plan_Punch_20200509].[OrderCount] AS [OrderCount], + [tb_Plan_Punch_20200509].[LyCount] AS [LyCount], + [tb_Plan_Punch_20200509].[CompleteCount] AS [CompleteCount], + [tb_Plan_Punch_20200509].[BadCount] AS [BadCount], + [tb_Plan_Punch_20200509].[Des] AS [Des], + [tb_Plan_Punch_20200509].[IsFinish] AS [IsFinish], + [tb_Plan_Punch_20200509].[CreateTime] AS [CreateTime] + FROM [dbo].[tb_Plan_Punch_20200509] AS [tb_Plan_Punch_20200509] + + + SELECT + [tb_PrintRecord].[ID] AS [ID], + [tb_PrintRecord].[BarCode] AS [BarCode], + [tb_PrintRecord].[PrintCode] AS [PrintCode], + [tb_PrintRecord].[ColorName] AS [ColorName], + [tb_PrintRecord].[Color] AS [Color], + [tb_PrintRecord].[ColorCode] AS [ColorCode], + [tb_PrintRecord].[ProductName] AS [ProductName], + [tb_PrintRecord].[ProductInfo] AS [ProductInfo], + [tb_PrintRecord].[PrintType] AS [PrintType], + [tb_PrintRecord].[PrintTime] AS [PrintTime] + FROM [dbo].[tb_PrintRecord] AS [tb_PrintRecord] + + + SELECT + [tb_Product_20200513].[ProductID] AS [ProductID], + [tb_Product_20200513].[ProductTypeID] AS [ProductTypeID], + [tb_Product_20200513].[StockNo] AS [StockNo], + [tb_Product_20200513].[PartName] AS [PartName], + [tb_Product_20200513].[ProductName] AS [ProductName], + [tb_Product_20200513].[ColorName] AS [ColorName], + [tb_Product_20200513].[PartNo] AS [PartNo], + [tb_Product_20200513].[Rows] AS [Rows], + [tb_Product_20200513].[Cols] AS [Cols], + [tb_Product_20200513].[Layers] AS [Layers], + [tb_Product_20200513].[PicturePath] AS [PicturePath], + [tb_Product_20200513].[Des] AS [Des], + [tb_Product_20200513].[isImport] AS [isImport] + FROM [dbo].[tb_Product_20200513] AS [tb_Product_20200513] + + + SELECT + [tb_Product_20201110].[ProductID] AS [ProductID], + [tb_Product_20201110].[ProductTypeID] AS [ProductTypeID], + [tb_Product_20201110].[ProjectID] AS [ProjectID], + [tb_Product_20201110].[StockNo] AS [StockNo], + [tb_Product_20201110].[PartName] AS [PartName], + [tb_Product_20201110].[ProductName] AS [ProductName], + [tb_Product_20201110].[ColorName] AS [ColorName], + [tb_Product_20201110].[PartNo] AS [PartNo], + [tb_Product_20201110].[Rows] AS [Rows], + [tb_Product_20201110].[Cols] AS [Cols], + [tb_Product_20201110].[Layers] AS [Layers], + [tb_Product_20201110].[PicturePath] AS [PicturePath], + [tb_Product_20201110].[Des] AS [Des], + [tb_Product_20201110].[isImport] AS [isImport], + [tb_Product_20201110].[DeviceNo] AS [DeviceNo], + [tb_Product_20201110].[IsHigh] AS [IsHigh], + [tb_Product_20201110].[OrderNo] AS [OrderNo] + FROM [dbo].[tb_Product_20201110] AS [tb_Product_20201110] + + + SELECT + [tb_Product_Injection_20190726].[ID] AS [ID], + [tb_Product_Injection_20190726].[StationID] AS [StationID], + [tb_Product_Injection_20190726].[ProductDate] AS [ProductDate], + [tb_Product_Injection_20190726].[ClassName] AS [ClassName], + [tb_Product_Injection_20190726].[StockNo] AS [StockNo], + [tb_Product_Injection_20190726].[PartNo] AS [PartNo], + [tb_Product_Injection_20190726].[ProductCount] AS [ProductCount], + [tb_Product_Injection_20190726].[BadCount] AS [BadCount] + FROM [dbo].[tb_Product_Injection_20190726] AS [tb_Product_Injection_20190726] + + + SELECT + [tb_Product0912].[ProductID] AS [ProductID], + [tb_Product0912].[ProductTypeID] AS [ProductTypeID], + [tb_Product0912].[ProjectID] AS [ProjectID], + [tb_Product0912].[StockNo] AS [StockNo], + [tb_Product0912].[PartName] AS [PartName], + [tb_Product0912].[ProductName] AS [ProductName], + [tb_Product0912].[ColorName] AS [ColorName], + [tb_Product0912].[PartNo] AS [PartNo], + [tb_Product0912].[Rows] AS [Rows], + [tb_Product0912].[Cols] AS [Cols], + [tb_Product0912].[Layers] AS [Layers], + [tb_Product0912].[PicturePath] AS [PicturePath], + [tb_Product0912].[Des] AS [Des], + [tb_Product0912].[isImport] AS [isImport], + [tb_Product0912].[DeviceNo] AS [DeviceNo], + [tb_Product0912].[IsHigh] AS [IsHigh] + FROM [dbo].[tb_Product0912] AS [tb_Product0912] + + + SELECT + [tb_Product20200802].[ProductID] AS [ProductID], + [tb_Product20200802].[ProductTypeID] AS [ProductTypeID], + [tb_Product20200802].[StockNo] AS [StockNo], + [tb_Product20200802].[PartName] AS [PartName], + [tb_Product20200802].[ProductName] AS [ProductName], + [tb_Product20200802].[ColorName] AS [ColorName], + [tb_Product20200802].[PartNo] AS [PartNo], + [tb_Product20200802].[Rows] AS [Rows], + [tb_Product20200802].[Cols] AS [Cols], + [tb_Product20200802].[Layers] AS [Layers], + [tb_Product20200802].[PicturePath] AS [PicturePath], + [tb_Product20200802].[Des] AS [Des], + [tb_Product20200802].[isImport] AS [isImport], + [tb_Product20200802].[DeviceNo] AS [DeviceNo], + [tb_Product20200802].[IsHigh] AS [IsHigh] + FROM [dbo].[tb_Product20200802] AS [tb_Product20200802] + + + SELECT + [tb_Product20201016].[ProductID] AS [ProductID], + [tb_Product20201016].[ProductTypeID] AS [ProductTypeID], + [tb_Product20201016].[ProjectID] AS [ProjectID], + [tb_Product20201016].[StockNo] AS [StockNo], + [tb_Product20201016].[PartName] AS [PartName], + [tb_Product20201016].[ProductName] AS [ProductName], + [tb_Product20201016].[ColorName] AS [ColorName], + [tb_Product20201016].[PartNo] AS [PartNo], + [tb_Product20201016].[Rows] AS [Rows], + [tb_Product20201016].[Cols] AS [Cols], + [tb_Product20201016].[Layers] AS [Layers], + [tb_Product20201016].[PicturePath] AS [PicturePath], + [tb_Product20201016].[Des] AS [Des], + [tb_Product20201016].[isImport] AS [isImport], + [tb_Product20201016].[DeviceNo] AS [DeviceNo], + [tb_Product20201016].[IsHigh] AS [IsHigh] + FROM [dbo].[tb_Product20201016] AS [tb_Product20201016] + + + SELECT + [tb_Punch_Code_Record_20200721].[ID] AS [ID], + [tb_Punch_Code_Record_20200721].[barcode] AS [barcode], + [tb_Punch_Code_Record_20200721].[BcpID] AS [BcpID], + [tb_Punch_Code_Record_20200721].[ZcID] AS [ZcID], + [tb_Punch_Code_Record_20200721].[OrderNo] AS [OrderNo], + [tb_Punch_Code_Record_20200721].[WorkClass] AS [WorkClass], + [tb_Punch_Code_Record_20200721].[CreateTime] AS [CreateTime], + [tb_Punch_Code_Record_20200721].[PlanID] AS [PlanID] + FROM [dbo].[tb_Punch_Code_Record_20200721] AS [tb_Punch_Code_Record_20200721] + + + SELECT + [tb_Punch_Code_Record_20200907].[ID] AS [ID], + [tb_Punch_Code_Record_20200907].[barcode] AS [barcode], + [tb_Punch_Code_Record_20200907].[BcpID] AS [BcpID], + [tb_Punch_Code_Record_20200907].[ZcID] AS [ZcID], + [tb_Punch_Code_Record_20200907].[OrderNo] AS [OrderNo], + [tb_Punch_Code_Record_20200907].[WorkClass] AS [WorkClass], + [tb_Punch_Code_Record_20200907].[CreateTime] AS [CreateTime], + [tb_Punch_Code_Record_20200907].[PlanID] AS [PlanID] + FROM [dbo].[tb_Punch_Code_Record_20200907] AS [tb_Punch_Code_Record_20200907] + + + SELECT + [tb_Punch_Code_Record_BF].[ID] AS [ID], + [tb_Punch_Code_Record_BF].[barcode] AS [barcode], + [tb_Punch_Code_Record_BF].[BcpID] AS [BcpID], + [tb_Punch_Code_Record_BF].[ZcID] AS [ZcID], + [tb_Punch_Code_Record_BF].[OrderNo] AS [OrderNo], + [tb_Punch_Code_Record_BF].[WorkClass] AS [WorkClass], + [tb_Punch_Code_Record_BF].[CreateTime] AS [CreateTime], + [tb_Punch_Code_Record_BF].[PlanID] AS [PlanID] + FROM [dbo].[tb_Punch_Code_Record_BF] AS [tb_Punch_Code_Record_BF] + + + SELECT + [tb_Record_247].[ID] AS [ID], + [tb_Record_247].[PartNo1] AS [PartNo1], + [tb_Record_247].[PartNo2] AS [PartNo2], + [tb_Record_247].[BoxNo] AS [BoxNo], + [tb_Record_247].[OrderNo] AS [OrderNo], + [tb_Record_247].[CreateTime1] AS [CreateTime1], + [tb_Record_247].[CreateTime2] AS [CreateTime2], + [tb_Record_247].[Flag] AS [Flag], + [tb_Record_247].[Type] AS [Type], + [tb_Record_247].[ToVisual] AS [ToVisual], + [tb_Record_247].[FinishTime] AS [FinishTime], + [tb_Record_247].[DeviceNo] AS [DeviceNo] + FROM [dbo].[tb_Record_247] AS [tb_Record_247] + + + SELECT + [tb_Report_FiveScreen_20191011].[ID] AS [ID], + [tb_Report_FiveScreen_20191011].[Name] AS [Name], + [tb_Report_FiveScreen_20191011].[LastYear] AS [LastYear], + [tb_Report_FiveScreen_20191011].[Jan] AS [Jan], + [tb_Report_FiveScreen_20191011].[Feb] AS [Feb], + [tb_Report_FiveScreen_20191011].[Mar] AS [Mar], + [tb_Report_FiveScreen_20191011].[Apr] AS [Apr], + [tb_Report_FiveScreen_20191011].[May] AS [May], + [tb_Report_FiveScreen_20191011].[Jun] AS [Jun], + [tb_Report_FiveScreen_20191011].[Jul] AS [Jul], + [tb_Report_FiveScreen_20191011].[Aug] AS [Aug], + [tb_Report_FiveScreen_20191011].[Sept] AS [Sept], + [tb_Report_FiveScreen_20191011].[Oct] AS [Oct], + [tb_Report_FiveScreen_20191011].[Nov] AS [Nov], + [tb_Report_FiveScreen_20191011].[Dec] AS [Dec], + [tb_Report_FiveScreen_20191011].[day1] AS [day1], + [tb_Report_FiveScreen_20191011].[day2] AS [day2], + [tb_Report_FiveScreen_20191011].[day3] AS [day3], + [tb_Report_FiveScreen_20191011].[day4] AS [day4], + [tb_Report_FiveScreen_20191011].[day5] AS [day5], + [tb_Report_FiveScreen_20191011].[day6] AS [day6], + [tb_Report_FiveScreen_20191011].[day7] AS [day7], + [tb_Report_FiveScreen_20191011].[day8] AS [day8], + [tb_Report_FiveScreen_20191011].[day9] AS [day9], + [tb_Report_FiveScreen_20191011].[day10] AS [day10], + [tb_Report_FiveScreen_20191011].[day11] AS [day11], + [tb_Report_FiveScreen_20191011].[day12] AS [day12], + [tb_Report_FiveScreen_20191011].[day13] AS [day13], + [tb_Report_FiveScreen_20191011].[day14] AS [day14], + [tb_Report_FiveScreen_20191011].[day15] AS [day15], + [tb_Report_FiveScreen_20191011].[day16] AS [day16], + [tb_Report_FiveScreen_20191011].[day17] AS [day17], + [tb_Report_FiveScreen_20191011].[day18] AS [day18], + [tb_Report_FiveScreen_20191011].[day19] AS [day19], + [tb_Report_FiveScreen_20191011].[day20] AS [day20], + [tb_Report_FiveScreen_20191011].[day21] AS [day21], + [tb_Report_FiveScreen_20191011].[day22] AS [day22], + [tb_Report_FiveScreen_20191011].[day23] AS [day23], + [tb_Report_FiveScreen_20191011].[day24] AS [day24], + [tb_Report_FiveScreen_20191011].[day25] AS [day25], + [tb_Report_FiveScreen_20191011].[day26] AS [day26], + [tb_Report_FiveScreen_20191011].[day27] AS [day27], + [tb_Report_FiveScreen_20191011].[day28] AS [day28], + [tb_Report_FiveScreen_20191011].[day29] AS [day29], + [tb_Report_FiveScreen_20191011].[day30] AS [day30], + [tb_Report_FiveScreen_20191011].[day31] AS [day31], + [tb_Report_FiveScreen_20191011].[CreateTime] AS [CreateTime] + FROM [dbo].[tb_Report_FiveScreen_20191011] AS [tb_Report_FiveScreen_20191011] + + + SELECT + [tb_Report_FiveScreen_20191014].[ID] AS [ID], + [tb_Report_FiveScreen_20191014].[Name] AS [Name], + [tb_Report_FiveScreen_20191014].[LastYear] AS [LastYear], + [tb_Report_FiveScreen_20191014].[Jan] AS [Jan], + [tb_Report_FiveScreen_20191014].[Feb] AS [Feb], + [tb_Report_FiveScreen_20191014].[Mar] AS [Mar], + [tb_Report_FiveScreen_20191014].[Apr] AS [Apr], + [tb_Report_FiveScreen_20191014].[May] AS [May], + [tb_Report_FiveScreen_20191014].[Jun] AS [Jun], + [tb_Report_FiveScreen_20191014].[Jul] AS [Jul], + [tb_Report_FiveScreen_20191014].[Aug] AS [Aug], + [tb_Report_FiveScreen_20191014].[Sept] AS [Sept], + [tb_Report_FiveScreen_20191014].[Oct] AS [Oct], + [tb_Report_FiveScreen_20191014].[Nov] AS [Nov], + [tb_Report_FiveScreen_20191014].[Dec] AS [Dec], + [tb_Report_FiveScreen_20191014].[day1] AS [day1], + [tb_Report_FiveScreen_20191014].[day2] AS [day2], + [tb_Report_FiveScreen_20191014].[day3] AS [day3], + [tb_Report_FiveScreen_20191014].[day4] AS [day4], + [tb_Report_FiveScreen_20191014].[day5] AS [day5], + [tb_Report_FiveScreen_20191014].[day6] AS [day6], + [tb_Report_FiveScreen_20191014].[day7] AS [day7], + [tb_Report_FiveScreen_20191014].[day8] AS [day8], + [tb_Report_FiveScreen_20191014].[day9] AS [day9], + [tb_Report_FiveScreen_20191014].[day10] AS [day10], + [tb_Report_FiveScreen_20191014].[day11] AS [day11], + [tb_Report_FiveScreen_20191014].[day12] AS [day12], + [tb_Report_FiveScreen_20191014].[day13] AS [day13], + [tb_Report_FiveScreen_20191014].[day14] AS [day14], + [tb_Report_FiveScreen_20191014].[day15] AS [day15], + [tb_Report_FiveScreen_20191014].[day16] AS [day16], + [tb_Report_FiveScreen_20191014].[day17] AS [day17], + [tb_Report_FiveScreen_20191014].[day18] AS [day18], + [tb_Report_FiveScreen_20191014].[day19] AS [day19], + [tb_Report_FiveScreen_20191014].[day20] AS [day20], + [tb_Report_FiveScreen_20191014].[day21] AS [day21], + [tb_Report_FiveScreen_20191014].[day22] AS [day22], + [tb_Report_FiveScreen_20191014].[day23] AS [day23], + [tb_Report_FiveScreen_20191014].[day24] AS [day24], + [tb_Report_FiveScreen_20191014].[day25] AS [day25], + [tb_Report_FiveScreen_20191014].[day26] AS [day26], + [tb_Report_FiveScreen_20191014].[day27] AS [day27], + [tb_Report_FiveScreen_20191014].[day28] AS [day28], + [tb_Report_FiveScreen_20191014].[day29] AS [day29], + [tb_Report_FiveScreen_20191014].[day30] AS [day30], + [tb_Report_FiveScreen_20191014].[day31] AS [day31], + [tb_Report_FiveScreen_20191014].[CreateTime] AS [CreateTime] + FROM [dbo].[tb_Report_FiveScreen_20191014] AS [tb_Report_FiveScreen_20191014] + + + SELECT + [tb_ReportPaintingScreen].[color] AS [color], + [tb_ReportPaintingScreen].[productInfo] AS [productInfo], + [tb_ReportPaintingScreen].[sumNum] AS [sumNum], + [tb_ReportPaintingScreen].[oncePassNum] AS [oncePassNum], + [tb_ReportPaintingScreen].[oncePassRate] AS [oncePassRate], + [tb_ReportPaintingScreen].[sumPassNum] AS [sumPassNum], + [tb_ReportPaintingScreen].[sumPassRate] AS [sumPassRate] + FROM [dbo].[tb_ReportPaintingScreen] AS [tb_ReportPaintingScreen] + + + SELECT + [tb_ReportPaintingScreen_bak].[color] AS [color], + [tb_ReportPaintingScreen_bak].[productInfo] AS [productInfo], + [tb_ReportPaintingScreen_bak].[sumNum] AS [sumNum], + [tb_ReportPaintingScreen_bak].[oncePassNum] AS [oncePassNum], + [tb_ReportPaintingScreen_bak].[oncePassRate] AS [oncePassRate], + [tb_ReportPaintingScreen_bak].[sumPassNum] AS [sumPassNum], + [tb_ReportPaintingScreen_bak].[sumPassRate] AS [sumPassRate] + FROM [dbo].[tb_ReportPaintingScreen_bak] AS [tb_ReportPaintingScreen_bak] + + + SELECT + [tb_ReportPaintingScreen_pg].[color] AS [color], + [tb_ReportPaintingScreen_pg].[productInfo] AS [productInfo], + [tb_ReportPaintingScreen_pg].[sumNum] AS [sumNum], + [tb_ReportPaintingScreen_pg].[hgNum] AS [hgNum], + [tb_ReportPaintingScreen_pg].[DefectName1] AS [DefectName1], + [tb_ReportPaintingScreen_pg].[defectRate1] AS [defectRate1], + [tb_ReportPaintingScreen_pg].[DefectName2] AS [DefectName2], + [tb_ReportPaintingScreen_pg].[defectRate2] AS [defectRate2], + [tb_ReportPaintingScreen_pg].[DefectName3] AS [DefectName3], + [tb_ReportPaintingScreen_pg].[defectRate3] AS [defectRate3], + [tb_ReportPaintingScreen_pg].[DefectName4] AS [DefectName4], + [tb_ReportPaintingScreen_pg].[defectRate4] AS [defectRate4], + [tb_ReportPaintingScreen_pg].[DefectName5] AS [DefectName5], + [tb_ReportPaintingScreen_pg].[defectRate5] AS [defectRate5] + FROM [dbo].[tb_ReportPaintingScreen_pg] AS [tb_ReportPaintingScreen_pg] + + + SELECT + [tb_ReportPaintingScreen_pg_bak].[color] AS [color], + [tb_ReportPaintingScreen_pg_bak].[productInfo] AS [productInfo], + [tb_ReportPaintingScreen_pg_bak].[sumNum] AS [sumNum], + [tb_ReportPaintingScreen_pg_bak].[hgNum] AS [hgNum], + [tb_ReportPaintingScreen_pg_bak].[DefectName1] AS [DefectName1], + [tb_ReportPaintingScreen_pg_bak].[defectRate1] AS [defectRate1], + [tb_ReportPaintingScreen_pg_bak].[DefectName2] AS [DefectName2], + [tb_ReportPaintingScreen_pg_bak].[defectRate2] AS [defectRate2], + [tb_ReportPaintingScreen_pg_bak].[DefectName3] AS [DefectName3], + [tb_ReportPaintingScreen_pg_bak].[defectRate3] AS [defectRate3], + [tb_ReportPaintingScreen_pg_bak].[DefectName4] AS [DefectName4], + [tb_ReportPaintingScreen_pg_bak].[defectRate4] AS [defectRate4], + [tb_ReportPaintingScreen_pg_bak].[DefectName5] AS [DefectName5], + [tb_ReportPaintingScreen_pg_bak].[defectRate5] AS [defectRate5] + FROM [dbo].[tb_ReportPaintingScreen_pg_bak] AS [tb_ReportPaintingScreen_pg_bak] + + + SELECT + [tb_SkidInfo_20200904].[ID] AS [ID], + [tb_SkidInfo_20200904].[SkidNo] AS [SkidNo], + [tb_SkidInfo_20200904].[BarcodeLeft] AS [BarcodeLeft], + [tb_SkidInfo_20200904].[BarcodeRight] AS [BarcodeRight], + [tb_SkidInfo_20200904].[Layer] AS [Layer], + [tb_SkidInfo_20200904].[ColorInfo] AS [ColorInfo], + [tb_SkidInfo_20200904].[CreateTime] AS [CreateTime], + [tb_SkidInfo_20200904].[Side_1_BC01] AS [Side_1_BC01], + [tb_SkidInfo_20200904].[Side_1_BC02] AS [Side_1_BC02], + [tb_SkidInfo_20200904].[Side_1_BC03] AS [Side_1_BC03], + [tb_SkidInfo_20200904].[Side_1_BC04] AS [Side_1_BC04], + [tb_SkidInfo_20200904].[Side_1_BC05] AS [Side_1_BC05], + [tb_SkidInfo_20200904].[Side_1_BC06] AS [Side_1_BC06], + [tb_SkidInfo_20200904].[Side_1_BC07] AS [Side_1_BC07], + [tb_SkidInfo_20200904].[Side_1_BC08] AS [Side_1_BC08], + [tb_SkidInfo_20200904].[Side_1_BC09] AS [Side_1_BC09], + [tb_SkidInfo_20200904].[Side_1_BC10] AS [Side_1_BC10], + [tb_SkidInfo_20200904].[Side_1_BC11] AS [Side_1_BC11], + [tb_SkidInfo_20200904].[Side_1_BC12] AS [Side_1_BC12], + [tb_SkidInfo_20200904].[Side_2_BC01] AS [Side_2_BC01], + [tb_SkidInfo_20200904].[Side_2_BC02] AS [Side_2_BC02], + [tb_SkidInfo_20200904].[Side_2_BC03] AS [Side_2_BC03], + [tb_SkidInfo_20200904].[Side_2_BC04] AS [Side_2_BC04], + [tb_SkidInfo_20200904].[Side_2_BC05] AS [Side_2_BC05], + [tb_SkidInfo_20200904].[Side_2_BC06] AS [Side_2_BC06], + [tb_SkidInfo_20200904].[Side_2_BC07] AS [Side_2_BC07], + [tb_SkidInfo_20200904].[Side_2_BC08] AS [Side_2_BC08], + [tb_SkidInfo_20200904].[Side_2_BC09] AS [Side_2_BC09], + [tb_SkidInfo_20200904].[Side_2_BC10] AS [Side_2_BC10], + [tb_SkidInfo_20200904].[Side_2_BC11] AS [Side_2_BC11], + [tb_SkidInfo_20200904].[Side_2_BC12] AS [Side_2_BC12] + FROM [dbo].[tb_SkidInfo_20200904] AS [tb_SkidInfo_20200904] + + + SELECT + [tb_StockIn].[ID] AS [ID], + [tb_StockIn].[barcode] AS [barcode], + [tb_StockIn].[pass] AS [pass], + [tb_StockIn].[createTime] AS [createTime], + [tb_StockIn].[paintCode] AS [paintCode], + [tb_StockIn].[ZcCode] AS [ZcCode] + FROM [dbo].[tb_StockIn] AS [tb_StockIn] + + + SELECT + [tb_StockIn_20200511].[ID] AS [ID], + [tb_StockIn_20200511].[barcode] AS [barcode], + [tb_StockIn_20200511].[pass] AS [pass], + [tb_StockIn_20200511].[createTime] AS [createTime], + [tb_StockIn_20200511].[paintCode] AS [paintCode], + [tb_StockIn_20200511].[ZcCode] AS [ZcCode] + FROM [dbo].[tb_StockIn_20200511] AS [tb_StockIn_20200511] + + + SELECT + [tb_StockIn_20210322].[ID] AS [ID], + [tb_StockIn_20210322].[barcode] AS [barcode], + [tb_StockIn_20210322].[pass] AS [pass], + [tb_StockIn_20210322].[createTime] AS [createTime], + [tb_StockIn_20210322].[paintCode] AS [paintCode], + [tb_StockIn_20210322].[ZcCode] AS [ZcCode] + FROM [dbo].[tb_StockIn_20210322] AS [tb_StockIn_20210322] + + + SELECT + [test1].[ID] AS [ID], + [test1].[StationID] AS [StationID], + [test1].[StockNo] AS [StockNo], + [test1].[PrintType] AS [PrintType], + [test1].[OneBarCode] AS [OneBarCode], + [test1].[PlanID] AS [PlanID], + [test1].[CreateTime] AS [CreateTime], + [test1].[ProductName] AS [ProductName], + [test1].[PartNo] AS [PartNo], + [test1].[ProductDate] AS [ProductDate], + [test1].[ClassName] AS [ClassName] + FROM [dbo].[test1] AS [test1] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx.diagram b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx.diagram new file mode 100644 index 0000000..f0be6c5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.edmx.diagram @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.tt b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.tt new file mode 100644 index 0000000..31b3d53 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/BBMPT.tt @@ -0,0 +1,733 @@ +<#@ template language="C#" debug="false" hostspecific="true"#> +<#@ include file="EF6.Utility.CS.ttinclude"#><#@ + output extension=".cs"#><# + +const string inputFile = @"BBMPT.edmx"; +var textTransform = DynamicTextTransformation.Create(this); +var code = new CodeGenerationTools(this); +var ef = new MetadataTools(this); +var typeMapper = new TypeMapper(code, ef, textTransform.Errors); +var fileManager = EntityFrameworkTemplateFileManager.Create(this); +var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile); +var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef); + +if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile)) +{ + return string.Empty; +} + +WriteHeader(codeStringGenerator, fileManager); + +foreach (var entity in typeMapper.GetItemsToGenerate(itemCollection)) +{ + fileManager.StartNewFile(entity.Name + ".cs"); + BeginNamespace(code); +#> +<#=codeStringGenerator.UsingDirectives(inHeader: false)#> +<#=codeStringGenerator.EntityClassOpening(entity)#> +{ +<# + var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity); + var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity); + var complexProperties = typeMapper.GetComplexProperties(entity); + + if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any()) + { +#> + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public <#=code.Escape(entity)#>() + { +<# + foreach (var edmProperty in propertiesWithDefaultValues) + { +#> + this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>; +<# + } + + foreach (var navigationProperty in collectionNavigationProperties) + { +#> + this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>(); +<# + } + + foreach (var complexProperty in complexProperties) + { +#> + this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>(); +<# + } +#> + } + +<# + } + + var simpleProperties = typeMapper.GetSimpleProperties(entity); + if (simpleProperties.Any()) + { + foreach (var edmProperty in simpleProperties) + { +#> + <#=codeStringGenerator.Property(edmProperty)#> +<# + } + } + + if (complexProperties.Any()) + { +#> + +<# + foreach(var complexProperty in complexProperties) + { +#> + <#=codeStringGenerator.Property(complexProperty)#> +<# + } + } + + var navigationProperties = typeMapper.GetNavigationProperties(entity); + if (navigationProperties.Any()) + { +#> + +<# + foreach (var navigationProperty in navigationProperties) + { + if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many) + { +#> + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] +<# + } +#> + <#=codeStringGenerator.NavigationProperty(navigationProperty)#> +<# + } + } +#> +} +<# + EndNamespace(code); +} + +foreach (var complex in typeMapper.GetItemsToGenerate(itemCollection)) +{ + fileManager.StartNewFile(complex.Name + ".cs"); + BeginNamespace(code); +#> +<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#> +<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#> +{ +<# + var complexProperties = typeMapper.GetComplexProperties(complex); + var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex); + + if (propertiesWithDefaultValues.Any() || complexProperties.Any()) + { +#> + public <#=code.Escape(complex)#>() + { +<# + foreach (var edmProperty in propertiesWithDefaultValues) + { +#> + this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>; +<# + } + + foreach (var complexProperty in complexProperties) + { +#> + this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>(); +<# + } +#> + } + +<# + } + + var simpleProperties = typeMapper.GetSimpleProperties(complex); + if (simpleProperties.Any()) + { + foreach(var edmProperty in simpleProperties) + { +#> + <#=codeStringGenerator.Property(edmProperty)#> +<# + } + } + + if (complexProperties.Any()) + { +#> + +<# + foreach(var edmProperty in complexProperties) + { +#> + <#=codeStringGenerator.Property(edmProperty)#> +<# + } + } +#> +} +<# + EndNamespace(code); +} + +foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection)) +{ + fileManager.StartNewFile(enumType.Name + ".cs"); + BeginNamespace(code); +#> +<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#> +<# + if (typeMapper.EnumIsFlags(enumType)) + { +#> +[Flags] +<# + } +#> +<#=codeStringGenerator.EnumOpening(enumType)#> +{ +<# + var foundOne = false; + + foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType)) + { + foundOne = true; +#> + <#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>, +<# + } + + if (foundOne) + { + this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1); + } +#> +} +<# + EndNamespace(code); +} + +fileManager.Process(); + +#> +<#+ + +public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager) +{ + fileManager.StartHeader(); +#> +//------------------------------------------------------------------------------ +// +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#> +// +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#> +// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#> +// +//------------------------------------------------------------------------------ +<#=codeStringGenerator.UsingDirectives(inHeader: true)#> +<#+ + fileManager.EndBlock(); +} + +public void BeginNamespace(CodeGenerationTools code) +{ + var codeNamespace = code.VsNamespaceSuggestion(); + if (!String.IsNullOrEmpty(codeNamespace)) + { +#> +namespace <#=code.EscapeNamespace(codeNamespace)#> +{ +<#+ + PushIndent(" "); + } +} + +public void EndNamespace(CodeGenerationTools code) +{ + if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion())) + { + PopIndent(); +#> +} +<#+ + } +} + +public const string TemplateId = "CSharp_DbContext_Types_EF6"; + +public class CodeStringGenerator +{ + private readonly CodeGenerationTools _code; + private readonly TypeMapper _typeMapper; + private readonly MetadataTools _ef; + + public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef) + { + ArgumentNotNull(code, "code"); + ArgumentNotNull(typeMapper, "typeMapper"); + ArgumentNotNull(ef, "ef"); + + _code = code; + _typeMapper = typeMapper; + _ef = ef; + } + + public string Property(EdmProperty edmProperty) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2} {{ {3}get; {4}set; }}", + Accessibility.ForProperty(edmProperty), + _typeMapper.GetTypeName(edmProperty.TypeUsage), + _code.Escape(edmProperty), + _code.SpaceAfter(Accessibility.ForGetter(edmProperty)), + _code.SpaceAfter(Accessibility.ForSetter(edmProperty))); + } + + public string NavigationProperty(NavigationProperty navProp) + { + var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType()); + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2} {{ {3}get; {4}set; }}", + AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)), + navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType, + _code.Escape(navProp), + _code.SpaceAfter(Accessibility.ForGetter(navProp)), + _code.SpaceAfter(Accessibility.ForSetter(navProp))); + } + + public string AccessibilityAndVirtual(string accessibility) + { + return accessibility + (accessibility != "private" ? " virtual" : ""); + } + + public string EntityClassOpening(EntityType entity) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1}partial class {2}{3}", + Accessibility.ForType(entity), + _code.SpaceAfter(_code.AbstractOption(entity)), + _code.Escape(entity), + _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType))); + } + + public string EnumOpening(SimpleType enumType) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} enum {1} : {2}", + Accessibility.ForType(enumType), + _code.Escape(enumType), + _code.Escape(_typeMapper.UnderlyingClrType(enumType))); + } + + public void WriteFunctionParameters(EdmFunction edmFunction, Action writeParameter) + { + var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); + foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable)) + { + var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null"; + var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")"; + var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))"; + writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit); + } + } + + public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace) + { + var parameters = _typeMapper.GetParameters(edmFunction); + + return string.Format( + CultureInfo.InvariantCulture, + "{0} IQueryable<{1}> {2}({3})", + AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), + _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), + _code.Escape(edmFunction), + string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray())); + } + + public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace) + { + var parameters = _typeMapper.GetParameters(edmFunction); + + return string.Format( + CultureInfo.InvariantCulture, + "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});", + _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), + edmFunction.NamespaceName, + edmFunction.Name, + string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()), + _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()))); + } + + public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) + { + var parameters = _typeMapper.GetParameters(edmFunction); + var returnType = _typeMapper.GetReturnType(edmFunction); + + var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()); + if (includeMergeOption) + { + paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption"; + } + + return string.Format( + CultureInfo.InvariantCulture, + "{0} {1} {2}({3})", + AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), + returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", + _code.Escape(edmFunction), + paramList); + } + + public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) + { + var parameters = _typeMapper.GetParameters(edmFunction); + var returnType = _typeMapper.GetReturnType(edmFunction); + + var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())); + if (includeMergeOption) + { + callParams = ", mergeOption" + callParams; + } + + return string.Format( + CultureInfo.InvariantCulture, + "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});", + returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", + edmFunction.Name, + callParams); + } + + public string DbSet(EntitySet entitySet) + { + return string.Format( + CultureInfo.InvariantCulture, + "{0} virtual DbSet<{1}> {2} {{ get; set; }}", + Accessibility.ForReadOnlyProperty(entitySet), + _typeMapper.GetTypeName(entitySet.ElementType), + _code.Escape(entitySet)); + } + + public string UsingDirectives(bool inHeader, bool includeCollections = true) + { + return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion()) + ? string.Format( + CultureInfo.InvariantCulture, + "{0}using System;{1}" + + "{2}", + inHeader ? Environment.NewLine : "", + includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "", + inHeader ? "" : Environment.NewLine) + : ""; + } +} + +public class TypeMapper +{ + private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName"; + + private readonly System.Collections.IList _errors; + private readonly CodeGenerationTools _code; + private readonly MetadataTools _ef; + + public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors) + { + ArgumentNotNull(code, "code"); + ArgumentNotNull(ef, "ef"); + ArgumentNotNull(errors, "errors"); + + _code = code; + _ef = ef; + _errors = errors; + } + + public static string FixNamespaces(string typeName) + { + return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial."); + } + + public string GetTypeName(TypeUsage typeUsage) + { + return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null); + } + + public string GetTypeName(EdmType edmType) + { + return GetTypeName(edmType, isNullable: null, modelNamespace: null); + } + + public string GetTypeName(TypeUsage typeUsage, string modelNamespace) + { + return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace); + } + + public string GetTypeName(EdmType edmType, string modelNamespace) + { + return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace); + } + + public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace) + { + if (edmType == null) + { + return null; + } + + var collectionType = edmType as CollectionType; + if (collectionType != null) + { + return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace)); + } + + var typeName = _code.Escape(edmType.MetadataProperties + .Where(p => p.Name == ExternalTypeNameAttributeName) + .Select(p => (string)p.Value) + .FirstOrDefault()) + ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ? + _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) : + _code.Escape(edmType)); + + if (edmType is StructuralType) + { + return typeName; + } + + if (edmType is SimpleType) + { + var clrType = UnderlyingClrType(edmType); + if (!IsEnumType(edmType)) + { + typeName = _code.Escape(clrType); + } + + typeName = FixNamespaces(typeName); + + return clrType.IsValueType && isNullable == true ? + String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) : + typeName; + } + + throw new ArgumentException("edmType"); + } + + public Type UnderlyingClrType(EdmType edmType) + { + ArgumentNotNull(edmType, "edmType"); + + var primitiveType = edmType as PrimitiveType; + if (primitiveType != null) + { + return primitiveType.ClrEquivalentType; + } + + if (IsEnumType(edmType)) + { + return GetEnumUnderlyingType(edmType).ClrEquivalentType; + } + + return typeof(object); + } + + public object GetEnumMemberValue(MetadataItem enumMember) + { + ArgumentNotNull(enumMember, "enumMember"); + + var valueProperty = enumMember.GetType().GetProperty("Value"); + return valueProperty == null ? null : valueProperty.GetValue(enumMember, null); + } + + public string GetEnumMemberName(MetadataItem enumMember) + { + ArgumentNotNull(enumMember, "enumMember"); + + var nameProperty = enumMember.GetType().GetProperty("Name"); + return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null); + } + + public System.Collections.IEnumerable GetEnumMembers(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + var membersProperty = enumType.GetType().GetProperty("Members"); + return membersProperty != null + ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null) + : Enumerable.Empty(); + } + + public bool EnumIsFlags(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + var isFlagsProperty = enumType.GetType().GetProperty("IsFlags"); + return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null); + } + + public bool IsEnumType(GlobalItem edmType) + { + ArgumentNotNull(edmType, "edmType"); + + return edmType.GetType().Name == "EnumType"; + } + + public PrimitiveType GetEnumUnderlyingType(EdmType enumType) + { + ArgumentNotNull(enumType, "enumType"); + + return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null); + } + + public string CreateLiteral(object value) + { + if (value == null || value.GetType() != typeof(TimeSpan)) + { + return _code.CreateLiteral(value); + } + + return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks); + } + + public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable types, string sourceFile) + { + ArgumentNotNull(types, "types"); + ArgumentNotNull(sourceFile, "sourceFile"); + + var hash = new HashSet(StringComparer.InvariantCultureIgnoreCase); + if (types.Any(item => !hash.Add(item))) + { + _errors.Add( + new CompilerError(sourceFile, -1, -1, "6023", + String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict")))); + return false; + } + return true; + } + + public IEnumerable GetEnumItemsToGenerate(IEnumerable itemCollection) + { + return GetItemsToGenerate(itemCollection) + .Where(e => IsEnumType(e)); + } + + public IEnumerable GetItemsToGenerate(IEnumerable itemCollection) where T: EdmType + { + return itemCollection + .OfType() + .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName)) + .OrderBy(i => i.Name); + } + + public IEnumerable GetAllGlobalItems(IEnumerable itemCollection) + { + return itemCollection + .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i)) + .Select(g => GetGlobalItemName(g)); + } + + public string GetGlobalItemName(GlobalItem item) + { + if (item is EdmType) + { + return ((EdmType)item).Name; + } + else + { + return ((EntityContainer)item).Name; + } + } + + public IEnumerable GetSimpleProperties(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type); + } + + public IEnumerable GetSimpleProperties(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type); + } + + public IEnumerable GetComplexProperties(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type); + } + + public IEnumerable GetComplexProperties(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type); + } + + public IEnumerable GetPropertiesWithDefaultValues(EntityType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null); + } + + public IEnumerable GetPropertiesWithDefaultValues(ComplexType type) + { + return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null); + } + + public IEnumerable GetNavigationProperties(EntityType type) + { + return type.NavigationProperties.Where(np => np.DeclaringType == type); + } + + public IEnumerable GetCollectionNavigationProperties(EntityType type) + { + return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many); + } + + public FunctionParameter GetReturnParameter(EdmFunction edmFunction) + { + ArgumentNotNull(edmFunction, "edmFunction"); + + var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters"); + return returnParamsProperty == null + ? edmFunction.ReturnParameter + : ((IEnumerable)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault(); + } + + public bool IsComposable(EdmFunction edmFunction) + { + ArgumentNotNull(edmFunction, "edmFunction"); + + var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute"); + return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null); + } + + public IEnumerable GetParameters(EdmFunction edmFunction) + { + return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); + } + + public TypeUsage GetReturnType(EdmFunction edmFunction) + { + var returnParam = GetReturnParameter(edmFunction); + return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage); + } + + public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption) + { + var returnType = GetReturnType(edmFunction); + return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType; + } +} + +public static void ArgumentNotNull(T arg, string name) where T : class +{ + if (arg == null) + { + throw new ArgumentNullException(name); + } +} +#> \ No newline at end of file diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogErr.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogErr.cs new file mode 100644 index 0000000..46390e0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogErr.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogErr + { + public string ID { get; set; } + public string ErrContent { get; set; } + public string ErrSource { get; set; } + public Nullable ErrTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys.cs new file mode 100644 index 0000000..391df06 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202001_04.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202001_04.cs new file mode 100644 index 0000000..51b10fe --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202001_04.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_202001_04 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202003.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202003.cs new file mode 100644 index 0000000..6b645e0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202003.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_202003 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202004.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202004.cs new file mode 100644 index 0000000..88b5472 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202004.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_202004 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202005.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202005.cs new file mode 100644 index 0000000..75648b2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202005.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_202005 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200605.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200605.cs new file mode 100644 index 0000000..6ae55c0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200605.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_20200605 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200610.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200610.cs new file mode 100644 index 0000000..1a1fea5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20200610.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_20200610 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202008.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202008.cs new file mode 100644 index 0000000..fc531ff --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_202008.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_202008 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20210322.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20210322.cs new file mode 100644 index 0000000..3341e4b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/LogSys_20210322.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class LogSys_20210322 + { + public string ID { get; set; } + public string SysContent { get; set; } + public string SysSource { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_BLOB_TRIGGERS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_BLOB_TRIGGERS.cs new file mode 100644 index 0000000..e7a7eb7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_BLOB_TRIGGERS.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_BLOB_TRIGGERS + { + public string SCHED_NAME { get; set; } + public string TRIGGER_GROUP { get; set; } + public string TRIGGER_NAME { get; set; } + public byte[] BLOB_DATA { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CALENDARS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CALENDARS.cs new file mode 100644 index 0000000..a7d0fd3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CALENDARS.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_CALENDARS + { + public string CALENDAR_NAME { get; set; } + public string SCHED_NAME { get; set; } + public byte[] CALENDAR { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CRON_TRIGGERS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CRON_TRIGGERS.cs new file mode 100644 index 0000000..2cd3c31 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_CRON_TRIGGERS.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_CRON_TRIGGERS + { + public string SCHED_NAME { get; set; } + public string TRIGGER_GROUP { get; set; } + public string TRIGGER_NAME { get; set; } + public string CRON_EXPRESSION { get; set; } + public string TIME_ZONE_ID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_FIRED_TRIGGERS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_FIRED_TRIGGERS.cs new file mode 100644 index 0000000..afd93ae --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_FIRED_TRIGGERS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_FIRED_TRIGGERS + { + public string ENTRY_ID { get; set; } + public string SCHED_NAME { get; set; } + public decimal FIRED_TIME { get; set; } + public string INSTANCE_NAME { get; set; } + public bool IS_NONCONCURRENT { get; set; } + public string JOB_GROUP { get; set; } + public string JOB_NAME { get; set; } + public Nullable PRIORITY { get; set; } + public bool REQUESTS_RECOVERY { get; set; } + public decimal SCHED_TIME { get; set; } + public string STATE { get; set; } + public string TRIGGER_GROUP { get; set; } + public string TRIGGER_NAME { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_JOB_DETAILS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_JOB_DETAILS.cs new file mode 100644 index 0000000..b522c6f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_JOB_DETAILS.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_JOB_DETAILS + { + public string JOB_GROUP { get; set; } + public string JOB_NAME { get; set; } + public string SCHED_NAME { get; set; } + public string DESCRIPTION { get; set; } + public bool IS_DURABLE { get; set; } + public bool IS_NONCONCURRENT { get; set; } + public bool IS_UPDATE_DATA { get; set; } + public string JOB_CLASS_NAME { get; set; } + public byte[] JOB_DATA { get; set; } + public bool REQUESTS_RECOVERY { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_LOCKS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_LOCKS.cs new file mode 100644 index 0000000..ce1cc9e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_LOCKS.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_LOCKS + { + public string LOCK_NAME { get; set; } + public string SCHED_NAME { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_PAUSED_TRIGGER_GRPS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_PAUSED_TRIGGER_GRPS.cs new file mode 100644 index 0000000..bd1a628 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_PAUSED_TRIGGER_GRPS.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_PAUSED_TRIGGER_GRPS + { + public string SCHED_NAME { get; set; } + public string TRIGGER_GROUP { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SCHEDULER_STATE.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SCHEDULER_STATE.cs new file mode 100644 index 0000000..9deb060 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SCHEDULER_STATE.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_SCHEDULER_STATE + { + public string INSTANCE_NAME { get; set; } + public string SCHED_NAME { get; set; } + public decimal CHECKIN_INTERVAL { get; set; } + public decimal LAST_CHECKIN_TIME { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPLE_TRIGGERS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPLE_TRIGGERS.cs new file mode 100644 index 0000000..db49c20 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPLE_TRIGGERS.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_SIMPLE_TRIGGERS + { + public string SCHED_NAME { get; set; } + public string TRIGGER_GROUP { get; set; } + public string TRIGGER_NAME { get; set; } + public decimal REPEAT_COUNT { get; set; } + public decimal REPEAT_INTERVAL { get; set; } + public decimal TIMES_TRIGGERED { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPROP_TRIGGERS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPROP_TRIGGERS.cs new file mode 100644 index 0000000..ff2d1f3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_SIMPROP_TRIGGERS.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_SIMPROP_TRIGGERS + { + public string SCHED_NAME { get; set; } + public string TRIGGER_GROUP { get; set; } + public string TRIGGER_NAME { get; set; } + public Nullable BOOL_PROP_1 { get; set; } + public Nullable BOOL_PROP_2 { get; set; } + public Nullable DEC_PROP_1 { get; set; } + public Nullable DEC_PROP_2 { get; set; } + public Nullable INT_PROP_1 { get; set; } + public Nullable INT_PROP_2 { get; set; } + public Nullable LONG_PROP_1 { get; set; } + public Nullable LONG_PROP_2 { get; set; } + public string STR_PROP_1 { get; set; } + public string STR_PROP_2 { get; set; } + public string STR_PROP_3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_TRIGGERS.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_TRIGGERS.cs new file mode 100644 index 0000000..a77231b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/QRTZ_TRIGGERS.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class QRTZ_TRIGGERS + { + public string SCHED_NAME { get; set; } + public string TRIGGER_GROUP { get; set; } + public string TRIGGER_NAME { get; set; } + public string APPOINT_ID { get; set; } + public string CALENDAR_NAME { get; set; } + public string DESCRIPTION { get; set; } + public decimal END_TIME { get; set; } + public byte[] JOB_DATA { get; set; } + public string JOB_GROUP { get; set; } + public string JOB_NAME { get; set; } + public Nullable MISFIRE_INSTR { get; set; } + public Nullable NEXT_FIRE_TIME { get; set; } + public Nullable PREV_FIRE_TIME { get; set; } + public Nullable PRIORITY { get; set; } + public decimal START_TIME { get; set; } + public string TRIGGER_STATE { get; set; } + public string TRIGGER_TYPE { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/TA_DEPT.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/TA_DEPT.cs new file mode 100644 index 0000000..33c41b7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/TA_DEPT.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class TA_DEPT + { + public System.Guid GUID { get; set; } + public string DeptCode { get; set; } + public string DeptName { get; set; } + public string CreateUser { get; set; } + public Nullable CreateTime { get; set; } + public string UpdateUser { get; set; } + public Nullable UpdateTime { get; set; } + public string Remark { get; set; } + public Nullable UID { get; set; } + public Nullable Enable { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_BOM.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_BOM.cs new file mode 100644 index 0000000..43f2212 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_BOM.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class TES_BOM + { + public string ParentPart { get; set; } + public string ComponentPart { get; set; } + public string Reference { get; set; } + public string StartEffective { get; set; } + public string QuantityPer { get; set; } + public string StructureType { get; set; } + public string EndEffective { get; set; } + public string Remarks { get; set; } + public string Scrap { get; set; } + public string LeadTimeOffset { get; set; } + public string Operation { get; set; } + public string SequenceNumber { get; set; } + public string FporecastPercent { get; set; } + public string OptionGroup { get; set; } + public string Process { get; set; } + public string GUID { get; set; } + public string UID { get; set; } + public string CreateUser { get; set; } + public string CreateTime { get; set; } + public string Remark { get; set; } + public string TaskID { get; set; } + public string CommandType { get; set; } + public string DataID { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + public Nullable InsertTime { get; set; } + public Nullable Flag { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_PART_MSTR.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_PART_MSTR.cs new file mode 100644 index 0000000..fdb24e2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/TES_PART_MSTR.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class TES_PART_MSTR + { + public string GUID { get; set; } + public string PartCode { get; set; } + public string Desc1 { get; set; } + public string Desc2 { get; set; } + public string Um { get; set; } + public string ProdLine { get; set; } + public string AddDate { get; set; } + public string PartType { get; set; } + public string Status { get; set; } + public string Qgrade { get; set; } + public string InventoryCode { get; set; } + public string UID { get; set; } + public string Remark { get; set; } + public string TaskID { get; set; } + public string CommandType { get; set; } + public string Domain { get; set; } + public string Site { get; set; } + public Nullable CreatTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_PaintInfo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_PaintInfo.cs new file mode 100644 index 0000000..a7ea1b6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_PaintInfo.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_PaintInfo + { + public int ID { get; set; } + public string PaintCode { get; set; } + public string PaintName { get; set; } + public string PaintModel { get; set; } + public string UnitCode { get; set; } + public string CarModelCode { get; set; } + public int IsUsing { get; set; } + public System.DateTime CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Buttons.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Buttons.cs new file mode 100644 index 0000000..ecb9b81 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Buttons.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_Buttons + { + public System.Guid BtnID { get; set; } + public string BtnName { get; set; } + public string ItemPic { get; set; } + public Nullable PowerID { get; set; } + public Nullable MenuID { get; set; } + public string MenuName { get; set; } + public string IsEnabled { get; set; } + public string BtnCode { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_NavMenu.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_NavMenu.cs new file mode 100644 index 0000000..32fcf66 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_NavMenu.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_NavMenu + { + public System.Guid MenuID { get; set; } + public string MenuName { get; set; } + public string URLStr { get; set; } + public string ItemPic { get; set; } + public Nullable PowerID { get; set; } + public Nullable ParentMenuID { get; set; } + public string IsEnabled { get; set; } + public string OrderNum { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Power.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Power.cs new file mode 100644 index 0000000..40f271d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Power.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_Power + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public T_Sys_Power() + { + this.T_Sys_RoleLinkPower = new HashSet(); + } + + public System.Guid PowerID { get; set; } + public string PowerCode { get; set; } + public string PowerName { get; set; } + public string OpName { get; set; } + public Nullable OpTime { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection T_Sys_RoleLinkPower { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Role.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Role.cs new file mode 100644 index 0000000..c7c5420 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Role.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_Role + { + public System.Guid RoleID { get; set; } + public string RoleName { get; set; } + public string Description { get; set; } + public string OpName { get; set; } + public Nullable OpTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_RoleLinkPower.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_RoleLinkPower.cs new file mode 100644 index 0000000..578e39d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_RoleLinkPower.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_RoleLinkPower + { + public System.Guid RoleID { get; set; } + public System.Guid PowerID { get; set; } + public Nullable OpTime { get; set; } + public string OpName { get; set; } + + public virtual T_Sys_Power T_Sys_Power { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_UserRole.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_UserRole.cs new file mode 100644 index 0000000..bc8f4dc --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_UserRole.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_UserRole + { + public System.Guid UserID { get; set; } + public System.Guid RoleID { get; set; } + public Nullable OpTime { get; set; } + public string OpName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users.cs new file mode 100644 index 0000000..f9989dd --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_Users + { + public System.Guid UserID { get; set; } + public string UserName { get; set; } + public string Password { get; set; } + public string IsEnabled { get; set; } + public string RealName { get; set; } + public string Sex { get; set; } + public string Tel { get; set; } + public Nullable LastLoginTime { get; set; } + public string LastLoginIP { get; set; } + public Nullable DepartmentID { get; set; } + public string OpName { get; set; } + public Nullable OpTime { get; set; } + public string Department { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users_NavMenu.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users_NavMenu.cs new file mode 100644 index 0000000..8b8b008 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/T_Sys_Users_NavMenu.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class T_Sys_Users_NavMenu + { + public int ID { get; set; } + public Nullable UserID { get; set; } + public Nullable MenuID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority.cs new file mode 100644 index 0000000..7d8d87f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_authority + { + public string id { get; set; } + public int authority { get; set; } + public string authorityEntityId { get; set; } + public int authorityEntityType { get; set; } + public int authorityType { get; set; } + public string roleId { get; set; } + public int roleType { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority_object.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority_object.cs new file mode 100644 index 0000000..1504fc8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_authority_object.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_authority_object + { + public string id { get; set; } + public string expandId { get; set; } + public Nullable expandType { get; set; } + public string fullPath { get; set; } + public string parentId { get; set; } + public string coverId { get; set; } + public string description { get; set; } + public Nullable deviceType { get; set; } + public string displayName { get; set; } + public string icon { get; set; } + public string mobileIcon { get; set; } + public string path { get; set; } + public Nullable sortIndex { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_backup_node.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_backup_node.cs new file mode 100644 index 0000000..373170a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_backup_node.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_backup_node + { + public string id { get; set; } + public string backupModule { get; set; } + public string backupName { get; set; } + public Nullable backupTime { get; set; } + public string savePath { get; set; } + public Nullable backupSize { get; set; } + public string type { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_message.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_message.cs new file mode 100644 index 0000000..8b1ecd1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_message.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_base_message + { + public string id { get; set; } + public Nullable createTime { get; set; } + public Nullable datetime { get; set; } + public string message { get; set; } + public Nullable readed { get; set; } + public Nullable toasted { get; set; } + public Nullable type { get; set; } + public string url { get; set; } + public Nullable urlType { get; set; } + public string userId { get; set; } + public string username { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_output.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_output.cs new file mode 100644 index 0000000..3b2d009 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_base_output.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_base_output + { + public string id { get; set; } + public string actionName { get; set; } + public bool executeByUser { get; set; } + public string outputId { get; set; } + public string resultURL { get; set; } + public int runType { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_block_ip.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_block_ip.cs new file mode 100644 index 0000000..a870be3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_block_ip.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_block_ip + { + public string id { get; set; } + public Nullable createTime { get; set; } + public string ip { get; set; } + public Nullable rejectedVisits { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_classname.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_classname.cs new file mode 100644 index 0000000..fea7941 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_classname.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_conf_classname + { + public string id { get; set; } + public string className { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_entity.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_entity.cs new file mode 100644 index 0000000..864ac5d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_entity.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_conf_entity + { + public string id { get; set; } + public string value { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_xmlentity.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_xmlentity.cs new file mode 100644 index 0000000..e949b50 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_conf_xmlentity.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_conf_xmlentity + { + public string id { get; set; } + public byte[] value { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_custom_role.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_custom_role.cs new file mode 100644 index 0000000..ada12b8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_custom_role.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_custom_role + { + public string id { get; set; } + public string alias { get; set; } + public int creationType { get; set; } + public string description { get; set; } + public Nullable enable { get; set; } + public int lastOperationType { get; set; } + public string name { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_dep_role.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_dep_role.cs new file mode 100644 index 0000000..6b46aa5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_dep_role.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_dep_role + { + public string id { get; set; } + public int creationType { get; set; } + public string departmentId { get; set; } + public string fullPath { get; set; } + public int lastOperationType { get; set; } + public string postId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_department.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_department.cs new file mode 100644 index 0000000..c86b048 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_department.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_department + { + public string id { get; set; } + public string alias { get; set; } + public int creationType { get; set; } + public string description { get; set; } + public Nullable enable { get; set; } + public string fullPath { get; set; } + public int lastOperationType { get; set; } + public string name { get; set; } + public string parentId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_extra_property.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_extra_property.cs new file mode 100644 index 0000000..e64c2ec --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_extra_property.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_extra_property + { + public string id { get; set; } + public string name { get; set; } + public string relatedId { get; set; } + public int type { get; set; } + public string value { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_favorite_entry.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_favorite_entry.cs new file mode 100644 index 0000000..748e7f9 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_favorite_entry.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_favorite_entry + { + public string id { get; set; } + public string entryId { get; set; } + public Nullable time { get; set; } + public string userId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_homepage_expand.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_homepage_expand.cs new file mode 100644 index 0000000..5a742ee --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_homepage_expand.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_homepage_expand + { + public string id { get; set; } + public string androidPadHomePage { get; set; } + public string androidPhoneHomePage { get; set; } + public string iPadHomePage { get; set; } + public string iPhoneHomePage { get; set; } + public string pcHomePage { get; set; } + public Nullable type { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_international.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_international.cs new file mode 100644 index 0000000..78f9f29 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_international.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_international + { + public string id { get; set; } + public string description { get; set; } + public string i18nKey { get; set; } + public string language { get; set; } + public string i18nValue { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_last_login.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_last_login.cs new file mode 100644 index 0000000..138191d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_last_login.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_last_login + { + public string id { get; set; } + public string city { get; set; } + public string ip { get; set; } + public Nullable time { get; set; } + public string userId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_login_lock.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_login_lock.cs new file mode 100644 index 0000000..cdd5140 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_login_lock.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_login_lock + { + public string id { get; set; } + public Nullable errorTime { get; set; } + public string lockObject { get; set; } + public string lockObjectValue { get; set; } + public Nullable lockTime { get; set; } + public Nullable locked { get; set; } + public Nullable unlockTime { get; set; } + public string userId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_device.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_device.cs new file mode 100644 index 0000000..3f81126 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_device.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_mobile_device + { + public string id { get; set; } + public Nullable createDate { get; set; } + public string deviceName { get; set; } + public string macAddress { get; set; } + public Nullable passed { get; set; } + public Nullable updateDate { get; set; } + public string username { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_push_message.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_push_message.cs new file mode 100644 index 0000000..0a16307 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_mobile_push_message.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_mobile_push_message + { + public string id { get; set; } + public string groupId { get; set; } + public string mediaId { get; set; } + public Nullable msgType { get; set; } + public Nullable terminal { get; set; } + public string title { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_class.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_class.cs new file mode 100644 index 0000000..0222ba4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_class.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_class + { + public string id { get; set; } + public string className { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_client_notice.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_client_notice.cs new file mode 100644 index 0000000..d38eb59 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_client_notice.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_client_notice + { + public string id { get; set; } + public string addressee { get; set; } + public string content { get; set; } + public string customizeLink { get; set; } + public Nullable linkOpenType { get; set; } + public string mediaId { get; set; } + public string subject { get; set; } + public Nullable terminal { get; set; } + public Nullable type { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_email.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_email.cs new file mode 100644 index 0000000..9bf60d6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_email.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_email + { + public string id { get; set; } + public Nullable addLink { get; set; } + public string bccAddress { get; set; } + public string bodyContent { get; set; } + public string ccAddress { get; set; } + public string customAddress { get; set; } + public string customBccAddress { get; set; } + public string customCcAddress { get; set; } + public Nullable previewAttach { get; set; } + public string subject { get; set; } + public Nullable useAttach { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_ftp.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_ftp.cs new file mode 100644 index 0000000..482eb9c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_ftp.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_ftp + { + public string id { get; set; } + public string ftpMode { get; set; } + public string password { get; set; } + public string port { get; set; } + public string savePath { get; set; } + public string serverAddress { get; set; } + public string username { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_mount.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_mount.cs new file mode 100644 index 0000000..30ef2c9 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_mount.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_mount + { + public string id { get; set; } + public string description { get; set; } + public string folderEntryID { get; set; } + public string folderEntryName { get; set; } + public string folderEntryStr { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_platform_msg.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_platform_msg.cs new file mode 100644 index 0000000..7e3de3a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_platform_msg.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_platform_msg + { + public string id { get; set; } + public string content { get; set; } + public Nullable linkOpenType { get; set; } + public string subject { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_print.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_print.cs new file mode 100644 index 0000000..c3b9a0a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_print.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_print + { + public string id { get; set; } + public string printerName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sftp.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sftp.cs new file mode 100644 index 0000000..71c07af --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sftp.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_sftp + { + public string id { get; set; } + public string password { get; set; } + public string port { get; set; } + public string privateKey { get; set; } + public string savePath { get; set; } + public string serverAddress { get; set; } + public string username { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sms.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sms.cs new file mode 100644 index 0000000..5d695ca --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_output_sms.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_output_sms + { + public string id { get; set; } + public string smsParam { get; set; } + public Nullable templateID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_param_template.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_param_template.cs new file mode 100644 index 0000000..64e857d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_param_template.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_param_template + { + public string id { get; set; } + public string templateid { get; set; } + public string tpgroup { get; set; } + public string username { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_post.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_post.cs new file mode 100644 index 0000000..6ef6eef --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_post.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_post + { + public string id { get; set; } + public string alias { get; set; } + public int creationType { get; set; } + public string description { get; set; } + public Nullable enable { get; set; } + public int lastOperationType { get; set; } + public string name { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset.cs new file mode 100644 index 0000000..f5bb209 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_print_offset + { + public string id { get; set; } + public string cptName { get; set; } + public string ip { get; set; } + public string offsetX { get; set; } + public string offsetY { get; set; } + public string sign { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset_ip_relate.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset_ip_relate.cs new file mode 100644 index 0000000..c88d971 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_print_offset_ip_relate.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_print_offset_ip_relate + { + public string id { get; set; } + public string childIP { get; set; } + public string motherID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_expand.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_expand.cs new file mode 100644 index 0000000..239f104 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_expand.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_process_expand + { + public string id { get; set; } + public int processType { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_message.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_message.cs new file mode 100644 index 0000000..02416f7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_process_message.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_process_message + { + public string id { get; set; } + public string allTaskId { get; set; } + public Nullable deadLine { get; set; } + public Nullable processed { get; set; } + public string taskId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_remote_design_auth.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_remote_design_auth.cs new file mode 100644 index 0000000..d974442 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_remote_design_auth.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_remote_design_auth + { + public string id { get; set; } + public string path { get; set; } + public bool pathType { get; set; } + public int roleType { get; set; } + public string userId { get; set; } + public string userName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_report_expand.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_report_expand.cs new file mode 100644 index 0000000..5cde1b6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_report_expand.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_report_expand + { + public string id { get; set; } + public int showType { get; set; } + public string transmitParameters { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_output.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_output.cs new file mode 100644 index 0000000..6ace611 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_output.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_schedule_output + { + public string id { get; set; } + public string baseName { get; set; } + public Nullable createAttachByUsername { get; set; } + public string formats { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_record.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_record.cs new file mode 100644 index 0000000..399e319 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_record.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_schedule_record + { + public string id { get; set; } + public string creator { get; set; } + public string detailMessage { get; set; } + public string filePath { get; set; } + public string logMessage { get; set; } + public Nullable logTime { get; set; } + public Nullable logType { get; set; } + public Nullable nextFireTime { get; set; } + public Nullable runType { get; set; } + public string taskId { get; set; } + public string taskName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task.cs new file mode 100644 index 0000000..e80829a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_schedule_task + { + public string id { get; set; } + public string backupFilePath { get; set; } + public string conditionParameter { get; set; } + public string creator { get; set; } + public Nullable editable { get; set; } + public Nullable fileClearCount { get; set; } + public Nullable nextFireTime { get; set; } + public string outputStr { get; set; } + public Nullable preFireTime { get; set; } + public Nullable repeatTime { get; set; } + public Nullable repeatTimes { get; set; } + public string scheduleOutput { get; set; } + public Nullable sendBackupFile { get; set; } + public Nullable showType { get; set; } + public string taskCondition { get; set; } + public string taskDescription { get; set; } + public string taskName { get; set; } + public string taskParameter { get; set; } + public Nullable taskState { get; set; } + public Nullable taskType { get; set; } + public string templatePath { get; set; } + public string triggerGroup { get; set; } + public string userGroup { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task_param.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task_param.cs new file mode 100644 index 0000000..524d2fd --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_schedule_task_param.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_schedule_task_param + { + public string id { get; set; } + public string param { get; set; } + public string taskId { get; set; } + public string taskName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_cluster_size.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_cluster_size.cs new file mode 100644 index 0000000..c516130 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_cluster_size.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_cluster_size + { + public string id { get; set; } + public Nullable primary_cluster_size { get; set; } + public string description { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_col_idx_conf.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_col_idx_conf.cs new file mode 100644 index 0000000..3f96f2b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_col_idx_conf.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_col_idx_conf + { + public string columnName { get; set; } + public string tableKey { get; set; } + public Nullable requireGlobalDict { get; set; } + public Nullable requireIndex { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_config_entity.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_config_entity.cs new file mode 100644 index 0000000..c591e41 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_config_entity.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_config_entity + { + public string configKey { get; set; } + public string configValue { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_metadata.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_metadata.cs new file mode 100644 index 0000000..90ec7f4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_metadata.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_metadata + { + public string id { get; set; } + public string fields { get; set; } + public string remark { get; set; } + public string schemaName { get; set; } + public string swiftSchema { get; set; } + public string tableName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_seg_location.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_seg_location.cs new file mode 100644 index 0000000..1caae6f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_seg_location.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_seg_location + { + public string clusterId { get; set; } + public string segmentId { get; set; } + public string sourceKey { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_segments.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_segments.cs new file mode 100644 index 0000000..78b606f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_segments.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_segments + { + public string id { get; set; } + public Nullable segmentOrder { get; set; } + public string segmentOwner { get; set; } + public string segmentUri { get; set; } + public string storeType { get; set; } + public string swiftSchema { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_service_info.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_service_info.cs new file mode 100644 index 0000000..39cbf7c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_service_info.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_service_info + { + public string id { get; set; } + public string cluster_id { get; set; } + public Nullable is_singleton { get; set; } + public string service { get; set; } + public string service_info { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_tab_idx_conf.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_tab_idx_conf.cs new file mode 100644 index 0000000..9cb6fb6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_tab_idx_conf.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_tab_idx_conf + { + public string tableKey { get; set; } + public string allotRule { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_table_path.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_table_path.cs new file mode 100644 index 0000000..a1b9f2b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_swift_table_path.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_swift_table_path + { + public string clusterId { get; set; } + public string tableKey { get; set; } + public Nullable lastPath { get; set; } + public Nullable tablePath { get; set; } + public Nullable tmpDir { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_system_message.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_system_message.cs new file mode 100644 index 0000000..7039ded --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_system_message.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_system_message + { + public string id { get; set; } + public Nullable terminal { get; set; } + public string title { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user.cs new file mode 100644 index 0000000..25f23d7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_user + { + public string id { get; set; } + public Nullable birthday { get; set; } + public int creationType { get; set; } + public string description { get; set; } + public string email { get; set; } + public Nullable enable { get; set; } + public string language { get; set; } + public int lastOperationType { get; set; } + public Nullable male { get; set; } + public string mobile { get; set; } + public string password { get; set; } + public string realAlias { get; set; } + public string realName { get; set; } + public string userAlias { get; set; } + public string userName { get; set; } + public string workPhone { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user_role_middle.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user_role_middle.cs new file mode 100644 index 0000000..2ce0385 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_user_role_middle.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_user_role_middle + { + public string id { get; set; } + public string roleId { get; set; } + public int roleType { get; set; } + public string userId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_vcs.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_vcs.cs new file mode 100644 index 0000000..cf61d32 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_vcs.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_vcs + { + public string id { get; set; } + public string commitCode { get; set; } + public string commitMsg { get; set; } + public string filename { get; set; } + public Nullable time { get; set; } + public string username { get; set; } + public Nullable version { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow.cs new file mode 100644 index 0000000..d972d48 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_workflow + { + public string id { get; set; } + public Nullable createTime { get; set; } + public string creatorId { get; set; } + public string description { get; set; } + public string name { get; set; } + public string nodesId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_log.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_log.cs new file mode 100644 index 0000000..1b8f3d8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_log.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_workflow_log + { + public string id { get; set; } + public Nullable dateTime { get; set; } + public string message { get; set; } + public string operatorName { get; set; } + public string processName { get; set; } + public string taskName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_node.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_node.cs new file mode 100644 index 0000000..7ea2ff2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_node.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_workflow_node + { + public string id { get; set; } + public string alertControl { get; set; } + public string authority { get; set; } + public string description { get; set; } + public string name { get; set; } + public Nullable needAllComplete { get; set; } + public Nullable needOfflineReport { get; set; } + public string processId { get; set; } + public string reportControl { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_stash_data.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_stash_data.cs new file mode 100644 index 0000000..1eda279 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_stash_data.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_workflow_stash_data + { + public string id { get; set; } + public string data { get; set; } + public string reportPath { get; set; } + public string taskId { get; set; } + public string userId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task.cs new file mode 100644 index 0000000..b6cf2c8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_workflow_task + { + public string id { get; set; } + public Nullable createTime { get; set; } + public string creatorId { get; set; } + public string creatorName { get; set; } + public Nullable deadLineDate { get; set; } + public string deadLineType { get; set; } + public string issueControl { get; set; } + public Nullable issueOver { get; set; } + public Nullable leapfrogBack { get; set; } + public string name { get; set; } + public string parentId { get; set; } + public string processId { get; set; } + public string remindControl { get; set; } + public Nullable taskNameCalculateOnce { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task_impl.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task_impl.cs new file mode 100644 index 0000000..f2e6b76 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_workflow_task_impl.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_workflow_task_impl + { + public string id { get; set; } + public Nullable alerted { get; set; } + public string completeState { get; set; } + public Nullable createTime { get; set; } + public Nullable currentNodeIdx { get; set; } + public Nullable deadLine { get; set; } + public string frTaskId { get; set; } + public string name { get; set; } + public Nullable needAllComplete { get; set; } + public string nodeRoute { get; set; } + public string note { get; set; } + public string operatorJSON { get; set; } + public string operatorOffset { get; set; } + public string operatorOffsetName { get; set; } + public string parentId { get; set; } + public string processId { get; set; } + public Nullable reportOffset { get; set; } + public Nullable sendTime { get; set; } + public string sender { get; set; } + public string senderId { get; set; } + public string sonTaskId { get; set; } + public Nullable state { get; set; } + public string taskId { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_write_stash.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_write_stash.cs new file mode 100644 index 0000000..480419d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/fine_write_stash.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class fine_write_stash + { + public string id { get; set; } + public string data { get; set; } + public string reportPath { get; set; } + public string username { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonButtonType.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonButtonType.cs new file mode 100644 index 0000000..fa3a6ef --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonButtonType.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_AndonButtonType + { + public string ID { get; set; } + public Nullable ButtonType { get; set; } + public string ButtonName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonRecord.cs new file mode 100644 index 0000000..81caf76 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_AndonRecord.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_AndonRecord + { + public string ID { get; set; } + public string ButtonTypeID { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable InterVal { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_243.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_243.cs new file mode 100644 index 0000000..1c07fb4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_243.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Assembly_243 + { + public string ID { get; set; } + public string PartNo { get; set; } + public string PartName { get; set; } + public string BatchNo { get; set; } + public string Color { get; set; } + public string ColorNo { get; set; } + public string PartType { get; set; } + public string TapeBatchNo { get; set; } + public string Validity { get; set; } + public string ValidityDate { get; set; } + public Nullable CreateTime { get; set; } + public Nullable PrintTime { get; set; } + public string Des { get; set; } + public Nullable Flag { get; set; } + public Nullable ToVisual { get; set; } + public Nullable FinishTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_247.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_247.cs new file mode 100644 index 0000000..e9d450c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Assembly_247.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Assembly_247 + { + public string ID { get; set; } + public string PartNo { get; set; } + public string PartName { get; set; } + public string BatchNo { get; set; } + public string Color { get; set; } + public string ColorNo { get; set; } + public string PartType { get; set; } + public string TapeBatchNo { get; set; } + public string Validity { get; set; } + public string ValidityDate { get; set; } + public Nullable CreateTime { get; set; } + public Nullable PrintTime { get; set; } + public string Des { get; set; } + public Nullable Flag { get; set; } + public Nullable ToVisual { get; set; } + public Nullable FinishTime { get; set; } + public Nullable IsCheck { get; set; } + public string DeviceNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bad_Injection.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bad_Injection.cs new file mode 100644 index 0000000..a42d774 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bad_Injection.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Bad_Injection + { + public string ID { get; set; } + public string OneBarCode { get; set; } + public string BarCode { get; set; } + public string BadPosition { get; set; } + public string BadReason { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BarCode.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BarCode.cs new file mode 100644 index 0000000..3afe9af --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BarCode.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_BarCode + { + public string ID { get; set; } + public string StationID { get; set; } + public string OneBarCode { get; set; } + public string BarCode { get; set; } + public string StockNo { get; set; } + public Nullable PrintType { get; set; } + public Nullable CreateTime { get; set; } + public Nullable PrintTime { get; set; } + public Nullable IsDel { get; set; } + public string IsImport { get; set; } + public string StationID2 { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom.cs new file mode 100644 index 0000000..176022a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Bom + { + public string BomID { get; set; } + public string PartNo1 { get; set; } + public string PartNo2 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom_20190726.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom_20190726.cs new file mode 100644 index 0000000..5e13751 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Bom_20190726.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Bom_20190726 + { + public string BomID { get; set; } + public string PartNo1 { get; set; } + public string PartNo2 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_243.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_243.cs new file mode 100644 index 0000000..d35f8d3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_243.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Box_243 + { + public string ID { get; set; } + public string BoxNo { get; set; } + public string PartNo { get; set; } + public string PartName { get; set; } + public string BatchNo { get; set; } + public Nullable BoxCount { get; set; } + public Nullable CreateTime { get; set; } + public Nullable PrintTime { get; set; } + public string Des { get; set; } + public Nullable Flag { get; set; } + public string Validity { get; set; } + public string ValidityDate { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_247.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_247.cs new file mode 100644 index 0000000..56481cb --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_247.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Box_247 + { + public string ID { get; set; } + public string BoxNo { get; set; } + public string PartNo { get; set; } + public string PartName { get; set; } + public string BatchNo { get; set; } + public Nullable BoxCount { get; set; } + public Nullable CreateTime { get; set; } + public Nullable PrintTime { get; set; } + public string Des { get; set; } + public Nullable Flag { get; set; } + public string Validity { get; set; } + public string ValidityDate { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_Record.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_Record.cs new file mode 100644 index 0000000..e883357 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_Record.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Box_Record + { + public long ID { get; set; } + public string BarCode { get; set; } + public string BoxNo { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_WheelBrow.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_WheelBrow.cs new file mode 100644 index 0000000..27c9392 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Box_WheelBrow.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Box_WheelBrow + { + public long ID { get; set; } + public string BoxNo { get; set; } + public Nullable Flag { get; set; } + public string PartNo { get; set; } + public string PartName { get; set; } + public string BatchNo { get; set; } + public string Validity { get; set; } + public string ValidityDate { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BucketInfo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BucketInfo.cs new file mode 100644 index 0000000..2d125de --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_BucketInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_BucketInfo + { + public string ID { get; set; } + public string BucketCode { get; set; } + public string BucketName { get; set; } + public Nullable IsUsing { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CheckItem.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CheckItem.cs new file mode 100644 index 0000000..21dac33 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CheckItem.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_CheckItem + { + public string ID { get; set; } + public string DeviceID { get; set; } + public string CheckContent { get; set; } + public string CheckVersion { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color.cs new file mode 100644 index 0000000..cf14a85 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Color + { + public string ID { get; set; } + public string ColorCode { get; set; } + public string ColorNo { get; set; } + public string Des { get; set; } + public Nullable Circle { get; set; } + public string ColorQQCode { get; set; } + public string ColorDQCode { get; set; } + public Nullable CreateTime { get; set; } + public Nullable UpdateTime { get; set; } + public Nullable OrderNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20191008.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20191008.cs new file mode 100644 index 0000000..4c51355 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20191008.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Color_20191008 + { + public string ID { get; set; } + public string ColorCode { get; set; } + public string ColorNo { get; set; } + public string Des { get; set; } + public Nullable Circle { get; set; } + public string ColorQQCode { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20201101.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20201101.cs new file mode 100644 index 0000000..8c69fd7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Color_20201101.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Color_20201101 + { + public string ID { get; set; } + public string ColorCode { get; set; } + public string ColorNo { get; set; } + public string Des { get; set; } + public Nullable Circle { get; set; } + public string ColorQQCode { get; set; } + public string ColorDQCode { get; set; } + public Nullable CreateTime { get; set; } + public Nullable UpdateTime { get; set; } + public Nullable OrderNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspection.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspection.cs new file mode 100644 index 0000000..34687be --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspection.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_CommonlyInspection + { + public string ID { get; set; } + public string VersionID { get; set; } + public string InspectionContentID { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUserID { get; set; } + public Nullable UpdateTime { get; set; } + public string UpdateUserID { get; set; } + public int IsUseing { get; set; } + public Nullable DisableTime { get; set; } + public string DisableUserID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionRecord.cs new file mode 100644 index 0000000..9c531ab --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionRecord.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_CommonlyInspectionRecord + { + public string CommonlyInspectionID { get; set; } + public string CheckResult { get; set; } + public string CheckUser { get; set; } + public System.DateTime CheckDate { get; set; } + public string ConfirmUser { get; set; } + public Nullable ConfirmUserDate { get; set; } + public string GroupLeaderConfirm { get; set; } + public Nullable GroupLeaderConfirmDate { get; set; } + public string DepartmentLeaderConfirm { get; set; } + public Nullable DepartmentLeaderConfirmDate { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUserID { get; set; } + public Nullable UpdateTime { get; set; } + public string UpdateUserID { get; set; } + public int IsUseing { get; set; } + public Nullable DisableTime { get; set; } + public string DisableUserID { get; set; } + public string ID { get; set; } + public string CheckType { get; set; } + public string ErrMes { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionVersion.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionVersion.cs new file mode 100644 index 0000000..77767a8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CommonlyInspectionVersion.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_CommonlyInspectionVersion + { + public string DeviceID { get; set; } + public string Version { get; set; } + public System.DateTime CreateTime { get; set; } + public string CreateUserID { get; set; } + public Nullable UpdateTime { get; set; } + public string UpdateUserID { get; set; } + public int IsUseing { get; set; } + public string Operation { get; set; } + public Nullable DisableTime { get; set; } + public string DisableUserID { get; set; } + public string Description { get; set; } + public string ID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Config.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Config.cs new file mode 100644 index 0000000..de2fbf5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Config.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Config + { + public string ID { get; set; } + public string name { get; set; } + public string value { get; set; } + public string des { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Cylinder.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Cylinder.cs new file mode 100644 index 0000000..5a24aa1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Cylinder.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Cylinder + { + public string CylinderID { get; set; } + public string CylinderNo { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CylinderAndRaw.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CylinderAndRaw.cs new file mode 100644 index 0000000..0bf94c3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_CylinderAndRaw.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_CylinderAndRaw + { + public string ID { get; set; } + public string CylinderID { get; set; } + public string DrumBarCode { get; set; } + public string BarCode { get; set; } + public Nullable Time1 { get; set; } + public Nullable Time2 { get; set; } + public Nullable Flag { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Defect.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Defect.cs new file mode 100644 index 0000000..b72c99a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Defect.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Defect + { + public string ID { get; set; } + public string LineID { get; set; } + public string DefectName { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Device.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Device.cs new file mode 100644 index 0000000..12c60ac --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Device.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Device + { + public string DeviceID { get; set; } + public string StationID { get; set; } + public string DeviceNo { get; set; } + public string DeviceName { get; set; } + public string FixNo { get; set; } + public string Des { get; set; } + public string DeviceModel { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Factory.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Factory.cs new file mode 100644 index 0000000..e942aad --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Factory.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Factory + { + public string FactoryID { get; set; } + public string FactoryName { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_FinishProduct.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_FinishProduct.cs new file mode 100644 index 0000000..3fb3943 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_FinishProduct.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_FinishProduct + { + public string FinishProductID { get; set; } + public string FinishProductNo { get; set; } + public string FinishProductName { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridPlan.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridPlan.cs new file mode 100644 index 0000000..82a7a49 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridPlan.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_HybridPlan + { + public string ID { get; set; } + public string ProductName { get; set; } + public string Color { get; set; } + public Nullable PlanCount { get; set; } + public Nullable Qty { get; set; } + public Nullable IsFinish { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridScanRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridScanRecord.cs new file mode 100644 index 0000000..3e801d5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_HybridScanRecord.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_HybridScanRecord + { + public string ID { get; set; } + public string BarCode { get; set; } + public Nullable CreatTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ImgVideo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ImgVideo.cs new file mode 100644 index 0000000..f2181f8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ImgVideo.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ImgVideo + { + public string ID { get; set; } + public string fileUrl { get; set; } + public string fileName { get; set; } + public string fileType { get; set; } + public Nullable CreateTime { get; set; } + public Nullable UpdateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Inhection_DownReason.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Inhection_DownReason.cs new file mode 100644 index 0000000..e4daed4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Inhection_DownReason.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Inhection_DownReason + { + public string ID { get; set; } + public string Reason { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectPlanReport.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectPlanReport.cs new file mode 100644 index 0000000..b2bb4e5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectPlanReport.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InjectPlanReport + { + public string ID { get; set; } + public string InjectionPlanID { get; set; } + public string ProductName { get; set; } + public string MaterialName { get; set; } + public string Drum { get; set; } + public string BatchNo { get; set; } + public Nullable Time1 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectionPlan.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectionPlan.cs new file mode 100644 index 0000000..b37f260 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InjectionPlan.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InjectionPlan + { + public string InjectionPlanID { get; set; } + public string StationID { get; set; } + public string BeginTime { get; set; } + public string StockNo { get; set; } + public string PartNo { get; set; } + public Nullable PlanCount { get; set; } + public string EndTime { get; set; } + public Nullable PlanDate { get; set; } + public Nullable CompleteCount { get; set; } + public Nullable IsFinish { get; set; } + public Nullable FinishTime { get; set; } + public Nullable RealCycle { get; set; } + public string workClass { get; set; } + public Nullable JK_Weight { get; set; } + public Nullable Waste_Weight { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownRecord.cs new file mode 100644 index 0000000..5a0b9f6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownRecord.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Injection_DownRecord + { + public string ID { get; set; } + public string StationID { get; set; } + public string DownType { get; set; } + public string DownReason { get; set; } + public string Des { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable DownTime { get; set; } + public string Remark1 { get; set; } + public string Remark2 { get; set; } + public string Remark3 { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownTime.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownTime.cs new file mode 100644 index 0000000..4013ce2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownTime.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Injection_DownTime + { + public string ID { get; set; } + public string StationID { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable InterVal { get; set; } + public string DownTypeID { get; set; } + public string Remark1 { get; set; } + public string Remark2 { get; set; } + public string Remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownType.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownType.cs new file mode 100644 index 0000000..10f69e7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_DownType.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Injection_DownType + { + public string ID { get; set; } + public string DownTypeName { get; set; } + public string Remark { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_Record.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_Record.cs new file mode 100644 index 0000000..4129ad8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Injection_Record.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Injection_Record + { + public string ID { get; set; } + public string workClass { get; set; } + public string StationID { get; set; } + public Nullable JK_Weight { get; set; } + public Nullable Waste_Weight { get; set; } + public Nullable RecordDate { get; set; } + public string StockNo { get; set; } + public string PartNo { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult.cs new file mode 100644 index 0000000..c04dd78 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InspectResult + { + public string ID { get; set; } + public string barcode { get; set; } + public string side { get; set; } + public string position { get; set; } + public string stationNo { get; set; } + public string workClass { get; set; } + public string inspectResult { get; set; } + public string damnPosition { get; set; } + public string defectID { get; set; } + public string reason { get; set; } + public string productInfo { get; set; } + public string productOption { get; set; } + public Nullable createTime { get; set; } + public string InspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20190902.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20190902.cs new file mode 100644 index 0000000..277ebb1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20190902.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InspectResult_20190902 + { + public string ID { get; set; } + public string barcode { get; set; } + public string side { get; set; } + public string position { get; set; } + public string stationNo { get; set; } + public string workClass { get; set; } + public string inspectResult { get; set; } + public string damnPosition { get; set; } + public string defectID { get; set; } + public string reason { get; set; } + public string productInfo { get; set; } + public string productOption { get; set; } + public Nullable createTime { get; set; } + public string InspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20200717.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20200717.cs new file mode 100644 index 0000000..2b53aec --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20200717.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InspectResult_20200717 + { + public string ID { get; set; } + public string barcode { get; set; } + public string side { get; set; } + public string position { get; set; } + public string stationNo { get; set; } + public string workClass { get; set; } + public string inspectResult { get; set; } + public string damnPosition { get; set; } + public string defectID { get; set; } + public string reason { get; set; } + public string productInfo { get; set; } + public string productOption { get; set; } + public Nullable createTime { get; set; } + public string InspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20201021.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20201021.cs new file mode 100644 index 0000000..892ec63 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20201021.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InspectResult_20201021 + { + public string ID { get; set; } + public string barcode { get; set; } + public string side { get; set; } + public string position { get; set; } + public string stationNo { get; set; } + public string workClass { get; set; } + public string inspectResult { get; set; } + public string damnPosition { get; set; } + public string defectID { get; set; } + public string reason { get; set; } + public string productInfo { get; set; } + public string productOption { get; set; } + public Nullable createTime { get; set; } + public string InspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20210322.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20210322.cs new file mode 100644 index 0000000..98f1c67 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_InspectResult_20210322.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_InspectResult_20210322 + { + public string ID { get; set; } + public string barcode { get; set; } + public string side { get; set; } + public string position { get; set; } + public string stationNo { get; set; } + public string workClass { get; set; } + public string inspectResult { get; set; } + public string damnPosition { get; set; } + public string defectID { get; set; } + public string reason { get; set; } + public string productInfo { get; set; } + public string productOption { get; set; } + public Nullable createTime { get; set; } + public string InspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string remark3 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_LayerAndBC.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_LayerAndBC.cs new file mode 100644 index 0000000..b515f2e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_LayerAndBC.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_LayerAndBC + { + public string ID { get; set; } + public Nullable layer { get; set; } + public string floor { get; set; } + public string side { get; set; } + public string des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Line.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Line.cs new file mode 100644 index 0000000..d529848 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Line.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Line + { + public string LineID { get; set; } + public string PlaceID { get; set; } + public string LineName { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Location.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Location.cs new file mode 100644 index 0000000..7a66e6b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Location.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Location + { + public string ID { get; set; } + public string Location { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Machine.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Machine.cs new file mode 100644 index 0000000..01c11f8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Machine.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Machine + { + public string MachineID { get; set; } + public string MachineNo { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243.cs new file mode 100644 index 0000000..618cdfa --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Mistake_243 + { + public string ID { get; set; } + public string PartNo1 { get; set; } + public string PartName1 { get; set; } + public string PartNo2 { get; set; } + public string PartName2 { get; set; } + public Nullable PackCount { get; set; } + public string DeviceNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243_bak.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243_bak.cs new file mode 100644 index 0000000..9d0efc6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_243_bak.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Mistake_243_bak + { + public string ID { get; set; } + public string PartNo1 { get; set; } + public string PartName1 { get; set; } + public string PartNo2 { get; set; } + public string PartName2 { get; set; } + public Nullable PackCount { get; set; } + public string DeviceNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_247.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_247.cs new file mode 100644 index 0000000..f460bb4 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Mistake_247.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Mistake_247 + { + public string ID { get; set; } + public string PartNo1 { get; set; } + public string PartName1 { get; set; } + public string PartNo2 { get; set; } + public string PartName2 { get; set; } + public Nullable PackCount { get; set; } + public string DeviceNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelCount.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelCount.cs new file mode 100644 index 0000000..aea5b47 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelCount.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ModelCount + { + public string ID { get; set; } + public string ModelID { get; set; } + public string StationID { get; set; } + public decimal ModelPrintCount { get; set; } + public Nullable PrintDate { get; set; } + public decimal ModelSumCount { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelInfo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelInfo.cs new file mode 100644 index 0000000..0fd9888 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ModelInfo.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ModelInfo + { + public string ID { get; set; } + public string ModelName { get; set; } + public string ModelNo { get; set; } + public string PermanentAssetsNo { get; set; } + public string Tonnage { get; set; } + public string ServiceLife { get; set; } + public string Supplier { get; set; } + public string PartWeight { get; set; } + public string InjectionPeriod { get; set; } + public string LocatingRingSize { get; set; } + public string OutForm { get; set; } + public string ModelWeight { get; set; } + public string RunnerForm { get; set; } + public string ModelCavityNo { get; set; } + public string ModelSize { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Product.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Product.cs new file mode 100644 index 0000000..14497e5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Product.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Model_Product + { + public string ID { get; set; } + public string ModelID { get; set; } + public string ProuctID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Update.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Update.cs new file mode 100644 index 0000000..2908cf8 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Model_Update.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Model_Update + { + public string ID { get; set; } + public string Purpose { get; set; } + public string State { get; set; } + public string Supplier { get; set; } + public string Remarks { get; set; } + public Nullable AddTime { get; set; } + public string ModelID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Operator.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Operator.cs new file mode 100644 index 0000000..a6d6b3a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Operator.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Operator + { + public string OperatorID { get; set; } + public string StationID { get; set; } + public string OperatorNo { get; set; } + public string OperatorName { get; set; } + public string OperatorPsw { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintBarCode.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintBarCode.cs new file mode 100644 index 0000000..1ba6255 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintBarCode.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PaintBarCode + { + public string ID { get; set; } + public string StationID { get; set; } + public string ProductID { get; set; } + public string OneBarCode { get; set; } + public string BarCode { get; set; } + public string StockNo { get; set; } + public string ColorDes { get; set; } + public string workClass { get; set; } + public string Side { get; set; } + public Nullable CreateTime { get; set; } + public Nullable PrintTime { get; set; } + public string ProductDate { get; set; } + public string PrintReason { get; set; } + public string PrintPerson { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintInfo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintInfo.cs new file mode 100644 index 0000000..f1faa61 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintInfo.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PaintInfo + { + public string ID { get; set; } + public string PaintCode { get; set; } + public string PaintName { get; set; } + public string PaintModel { get; set; } + public string UnitCode { get; set; } + public string CarModelCode { get; set; } + public Nullable IsUsing { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintPerson.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintPerson.cs new file mode 100644 index 0000000..b11c6d3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintPerson.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PaintPerson + { + public int ID { get; set; } + public string PrintPerson { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintReason.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintReason.cs new file mode 100644 index 0000000..2535493 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintReason.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PaintReason + { + public int ID { get; set; } + public string PrintReason { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintScanRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintScanRecord.cs new file mode 100644 index 0000000..78cf948 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PaintScanRecord.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PaintScanRecord + { + public long ID { get; set; } + public string OneBarCode { get; set; } + public Nullable ScanTime { get; set; } + public string ScanPosition { get; set; } + public Nullable ScanResult { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Paint_Bucket.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Paint_Bucket.cs new file mode 100644 index 0000000..8897a74 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Paint_Bucket.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Paint_Bucket + { + public string PaintID { get; set; } + public string BucketID { get; set; } + public string ID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PartRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PartRecord.cs new file mode 100644 index 0000000..edc9446 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PartRecord.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PartRecord + { + public string ID { get; set; } + public string PartNo { get; set; } + public string TaskID { get; set; } + public string CommandType { get; set; } + public Nullable CreatTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Place.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Place.cs new file mode 100644 index 0000000..42ccde5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Place.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Place + { + public string PlaceID { get; set; } + public string FactoryID { get; set; } + public string PlaceName { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PlanScreenConfig.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PlanScreenConfig.cs new file mode 100644 index 0000000..4d77370 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PlanScreenConfig.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PlanScreenConfig + { + public string ID { get; set; } + public string IP { get; set; } + public string StationNo { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_243.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_243.cs new file mode 100644 index 0000000..e6a395d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_243.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Plan_243 + { + public string ID { get; set; } + public string OrderNo { get; set; } + public Nullable Item { get; set; } + public string PartNo { get; set; } + public Nullable OrderCount { get; set; } + public Nullable LyCount { get; set; } + public Nullable CompleteCount { get; set; } + public Nullable RepairCount { get; set; } + public Nullable ScrapCount1 { get; set; } + public Nullable ScrapCount2 { get; set; } + public string Des { get; set; } + public Nullable CreateTime { get; set; } + public Nullable IsFinish { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_247.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_247.cs new file mode 100644 index 0000000..adb988b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_247.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Plan_247 + { + public string ID { get; set; } + public string OrderNo { get; set; } + public Nullable Item { get; set; } + public string PartNo { get; set; } + public Nullable OrderCount { get; set; } + public Nullable LyCount { get; set; } + public Nullable CompleteCount { get; set; } + public Nullable RepairCount { get; set; } + public Nullable ScrapCount1 { get; set; } + public Nullable ScrapCount2 { get; set; } + public string Des { get; set; } + public Nullable CreateTime { get; set; } + public Nullable IsFinish { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch.cs new file mode 100644 index 0000000..76bdab2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Plan_Punch + { + public string ID { get; set; } + public string OrderNo { get; set; } + public Nullable Item { get; set; } + public string PartNo { get; set; } + public Nullable OrderCount { get; set; } + public Nullable LyCount { get; set; } + public Nullable CompleteCount { get; set; } + public Nullable BadCount { get; set; } + public string Des { get; set; } + public Nullable IsFinish { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch_20200509.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch_20200509.cs new file mode 100644 index 0000000..aa4e969 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plan_Punch_20200509.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Plan_Punch_20200509 + { + public string ID { get; set; } + public string OrderNo { get; set; } + public Nullable Item { get; set; } + public string PartNo { get; set; } + public Nullable OrderCount { get; set; } + public Nullable LyCount { get; set; } + public Nullable CompleteCount { get; set; } + public Nullable BadCount { get; set; } + public string Des { get; set; } + public Nullable IsFinish { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plastic.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plastic.cs new file mode 100644 index 0000000..41200ff --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Plastic.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Plastic + { + public string StockNo { get; set; } + public Nullable CycleTime { get; set; } + public string StationID { get; set; } + public Nullable IsBackup { get; set; } + public Nullable Weight { get; set; } + public Nullable OpenDebugTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintConfig.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintConfig.cs new file mode 100644 index 0000000..7ef4069 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintConfig.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PrintConfig + { + public int ID { get; set; } + public string StockNo { get; set; } + public string PrintCode { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintRecord.cs new file mode 100644 index 0000000..d015aec --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PrintRecord.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PrintRecord + { + public string ID { get; set; } + public string BarCode { get; set; } + public string PrintCode { get; set; } + public string ColorName { get; set; } + public string Color { get; set; } + public string ColorCode { get; set; } + public string ProductName { get; set; } + public string ProductInfo { get; set; } + public Nullable PrintType { get; set; } + public Nullable PrintTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product.cs new file mode 100644 index 0000000..7a279bf --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product + { + public string ProductID { get; set; } + public string ProductTypeID { get; set; } + public string ProjectID { get; set; } + public string StockNo { get; set; } + public string PartName { get; set; } + public string ProductName { get; set; } + public string ColorName { get; set; } + public string PartNo { get; set; } + public Nullable Rows { get; set; } + public Nullable Cols { get; set; } + public Nullable Layers { get; set; } + public string PicturePath { get; set; } + public string Des { get; set; } + public Nullable isImport { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + public Nullable OrderNo { get; set; } + public Nullable PackQty { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product0912.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product0912.cs new file mode 100644 index 0000000..812d566 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product0912.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product0912 + { + public string ProductID { get; set; } + public string ProductTypeID { get; set; } + public string ProjectID { get; set; } + public string StockNo { get; set; } + public string PartName { get; set; } + public string ProductName { get; set; } + public string ColorName { get; set; } + public string PartNo { get; set; } + public Nullable Rows { get; set; } + public Nullable Cols { get; set; } + public Nullable Layers { get; set; } + public string PicturePath { get; set; } + public string Des { get; set; } + public Nullable isImport { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20200802.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20200802.cs new file mode 100644 index 0000000..f8aec8d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20200802.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product20200802 + { + public string ProductID { get; set; } + public string ProductTypeID { get; set; } + public string StockNo { get; set; } + public string PartName { get; set; } + public string ProductName { get; set; } + public string ColorName { get; set; } + public string PartNo { get; set; } + public Nullable Rows { get; set; } + public Nullable Cols { get; set; } + public Nullable Layers { get; set; } + public string PicturePath { get; set; } + public string Des { get; set; } + public Nullable isImport { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20201016.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20201016.cs new file mode 100644 index 0000000..dd26fa2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product20201016.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product20201016 + { + public string ProductID { get; set; } + public string ProductTypeID { get; set; } + public string ProjectID { get; set; } + public string StockNo { get; set; } + public string PartName { get; set; } + public string ProductName { get; set; } + public string ColorName { get; set; } + public string PartNo { get; set; } + public Nullable Rows { get; set; } + public Nullable Cols { get; set; } + public Nullable Layers { get; set; } + public string PicturePath { get; set; } + public string Des { get; set; } + public Nullable isImport { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductSotckIn.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductSotckIn.cs new file mode 100644 index 0000000..08fe2f3 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductSotckIn.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ProductSotckIn + { + public string ID { get; set; } + public string BarCode { get; set; } + public string ProductName { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductType.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductType.cs new file mode 100644 index 0000000..3fb2293 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ProductType.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ProductType + { + public string ProductTypeID { get; set; } + public string ProductTypeNo { get; set; } + public string ProductTypeName { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20200513.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20200513.cs new file mode 100644 index 0000000..ebef051 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20200513.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product_20200513 + { + public string ProductID { get; set; } + public string ProductTypeID { get; set; } + public string StockNo { get; set; } + public string PartName { get; set; } + public string ProductName { get; set; } + public string ColorName { get; set; } + public string PartNo { get; set; } + public Nullable Rows { get; set; } + public Nullable Cols { get; set; } + public Nullable Layers { get; set; } + public string PicturePath { get; set; } + public string Des { get; set; } + public Nullable isImport { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20201110.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20201110.cs new file mode 100644 index 0000000..582fc5c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_20201110.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product_20201110 + { + public string ProductID { get; set; } + public string ProductTypeID { get; set; } + public string ProjectID { get; set; } + public string StockNo { get; set; } + public string PartName { get; set; } + public string ProductName { get; set; } + public string ColorName { get; set; } + public string PartNo { get; set; } + public Nullable Rows { get; set; } + public Nullable Cols { get; set; } + public Nullable Layers { get; set; } + public string PicturePath { get; set; } + public string Des { get; set; } + public Nullable isImport { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + public Nullable OrderNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection.cs new file mode 100644 index 0000000..a6ba901 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product_Injection + { + public string ID { get; set; } + public string PlanID { get; set; } + public string StationID { get; set; } + public string ProductDate { get; set; } + public string ClassName { get; set; } + public string StockNo { get; set; } + public string PartNo { get; set; } + public Nullable ProductCount { get; set; } + public Nullable BadCount { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_20190726.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_20190726.cs new file mode 100644 index 0000000..a51c95b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_20190726.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product_Injection_20190726 + { + public string ID { get; set; } + public string StationID { get; set; } + public string ProductDate { get; set; } + public string ClassName { get; set; } + public string StockNo { get; set; } + public string PartNo { get; set; } + public Nullable ProductCount { get; set; } + public Nullable BadCount { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_w.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_w.cs new file mode 100644 index 0000000..ffa60be --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Product_Injection_w.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Product_Injection_w + { + public string ID { get; set; } + public Nullable RealCycle { get; set; } + public Nullable Waste_Weight { get; set; } + public Nullable JK_Weight { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Project.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Project.cs new file mode 100644 index 0000000..e898390 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Project.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Project + { + public string ID { get; set; } + public string Project { get; set; } + public string LocationID { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAddress.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAddress.cs new file mode 100644 index 0000000..b540f99 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAddress.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchAddress + { + public int ID { get; set; } + public string DeviceNo { get; set; } + public string Address { get; set; } + public string Des { get; set; } + public Nullable RW { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAndStation.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAndStation.cs new file mode 100644 index 0000000..3dcf630 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchAndStation.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchAndStation + { + public string ID { get; set; } + public string StationID { get; set; } + public string ProductID1 { get; set; } + public string ProductID2 { get; set; } + public string ProductID3 { get; set; } + public string ProductID4 { get; set; } + public string ProductID5 { get; set; } + public Nullable CreateTine { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchDevice.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchDevice.cs new file mode 100644 index 0000000..c5e1738 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchDevice.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchDevice + { + public string ID { get; set; } + public string DeviceNo { get; set; } + public string DeviceName { get; set; } + public string Poject { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchMFAPlan.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchMFAPlan.cs new file mode 100644 index 0000000..0f854d6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchMFAPlan.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchMFAPlan + { + public int ID { get; set; } + public string CarModelCode { get; set; } + public string productionNumber { get; set; } + public string itemNumber { get; set; } + public string description { get; set; } + public Nullable assemblyDate { get; set; } + public string BillNo { get; set; } + public string partType { get; set; } + public string ColorName { get; set; } + public string BarCode { get; set; } + public Nullable Sort { get; set; } + public string ColorCode { get; set; } + public Nullable CheckTime { get; set; } + public Nullable IsFinish { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchNGCCPlan.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchNGCCPlan.cs new file mode 100644 index 0000000..92ba5c9 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchNGCCPlan.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchNGCCPlan + { + public int ID { get; set; } + public string CarModelCode { get; set; } + public string productionNumber { get; set; } + public string itemNumber { get; set; } + public string description { get; set; } + public Nullable assemblyDate { get; set; } + public string BillNo { get; set; } + public string partType { get; set; } + public string ColorName { get; set; } + public string BarCode { get; set; } + public Nullable Sort { get; set; } + public string ColorCode { get; set; } + public Nullable CheckTime { get; set; } + public Nullable IsFinish { get; set; } + public string DeviceNo { get; set; } + public Nullable IsHigh { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchPlan.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchPlan.cs new file mode 100644 index 0000000..c9366b1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchPlan.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchPlan + { + public string ID { get; set; } + public string DeviceNo { get; set; } + public string ProductID { get; set; } + public Nullable PlanCount { get; set; } + public Nullable CompleteCount { get; set; } + public Nullable BadCount { get; set; } + public Nullable IsFinish { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchRecord.cs new file mode 100644 index 0000000..d87151d --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchRecord.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchRecord + { + public string ID { get; set; } + public string BarCode { get; set; } + public Nullable ScanTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchResult.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchResult.cs new file mode 100644 index 0000000..02656d7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchResult.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchResult + { + public long ID { get; set; } + public string barcode { get; set; } + public string stationNo { get; set; } + public string punchResult { get; set; } + public string damnPosition { get; set; } + public string reason { get; set; } + public string productInfo { get; set; } + public Nullable createTime { get; set; } + public string Responsibility { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchValueRecord.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchValueRecord.cs new file mode 100644 index 0000000..6dac164 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_PunchValueRecord.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_PunchValueRecord + { + public string ID { get; set; } + public string DeviceNo { get; set; } + public string Address { get; set; } + public string ItemValue { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record.cs new file mode 100644 index 0000000..4bc96bb --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Punch_Code_Record + { + public string ID { get; set; } + public string barcode { get; set; } + public string BcpID { get; set; } + public string ZcID { get; set; } + public string OrderNo { get; set; } + public string WorkClass { get; set; } + public Nullable CreateTime { get; set; } + public string PlanID { get; set; } + public string SerialNo { get; set; } + public Nullable ToVisual { get; set; } + public Nullable FinishTime { get; set; } + public Nullable PrintTime { get; set; } + public Nullable IsCheck { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record2.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record2.cs new file mode 100644 index 0000000..9e0f92b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record2.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Punch_Code_Record2 + { + public string ID { get; set; } + public string barcode { get; set; } + public string isOK { get; set; } + public string planID { get; set; } + public Nullable createtime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200721.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200721.cs new file mode 100644 index 0000000..396db80 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200721.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Punch_Code_Record_20200721 + { + public string ID { get; set; } + public string barcode { get; set; } + public string BcpID { get; set; } + public string ZcID { get; set; } + public string OrderNo { get; set; } + public string WorkClass { get; set; } + public Nullable CreateTime { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200907.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200907.cs new file mode 100644 index 0000000..2ed4632 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_20200907.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Punch_Code_Record_20200907 + { + public string ID { get; set; } + public string barcode { get; set; } + public string BcpID { get; set; } + public string ZcID { get; set; } + public string OrderNo { get; set; } + public string WorkClass { get; set; } + public Nullable CreateTime { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_BF.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_BF.cs new file mode 100644 index 0000000..dbc971b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Code_Record_BF.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Punch_Code_Record_BF + { + public string ID { get; set; } + public string barcode { get; set; } + public string BcpID { get; set; } + public string ZcID { get; set; } + public string OrderNo { get; set; } + public string WorkClass { get; set; } + public Nullable CreateTime { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Proucting.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Proucting.cs new file mode 100644 index 0000000..419617f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Punch_Proucting.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Punch_Proucting + { + public int ID { get; set; } + public string StationNo { get; set; } + public string PlanID { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243.cs new file mode 100644 index 0000000..90b471c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Record_243 + { + public string ID { get; set; } + public string PartNo1 { get; set; } + public string PartNo2 { get; set; } + public string BoxNo { get; set; } + public string OrderNo { get; set; } + public Nullable CreateTime1 { get; set; } + public Nullable CreateTime2 { get; set; } + public Nullable Flag { get; set; } + public Nullable Type { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243_20220517.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243_20220517.cs new file mode 100644 index 0000000..4b670d2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_243_20220517.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Record_243_20220517 + { + public string ID { get; set; } + public string PartNo1 { get; set; } + public string PartNo2 { get; set; } + public string BoxNo { get; set; } + public string OrderNo { get; set; } + public Nullable CreateTime1 { get; set; } + public Nullable CreateTime2 { get; set; } + public Nullable Flag { get; set; } + public Nullable Type { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_247.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_247.cs new file mode 100644 index 0000000..820369a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Record_247.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Record_247 + { + public string ID { get; set; } + public string PartNo1 { get; set; } + public string PartNo2 { get; set; } + public string BoxNo { get; set; } + public string OrderNo { get; set; } + public Nullable CreateTime1 { get; set; } + public Nullable CreateTime2 { get; set; } + public Nullable Flag { get; set; } + public Nullable Type { get; set; } + public Nullable ToVisual { get; set; } + public Nullable FinishTime { get; set; } + public string DeviceNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportA1.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportA1.cs new file mode 100644 index 0000000..0900b1f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportA1.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportA1 + { + public long ID { get; set; } + public string barCode { get; set; } + public string side { get; set; } + public string inspectResult { get; set; } + public string reason { get; set; } + public Nullable createTime { get; set; } + public string inspectTimes { get; set; } + public string remark1 { get; set; } + public string weizhi { get; set; } + public string station { get; set; } + public string damnPosition { get; set; } + public string remark2 { get; set; } + public string Location { get; set; } + public string Project { get; set; } + public string workClass { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF1.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF1.cs new file mode 100644 index 0000000..a92ebe7 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF1.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportF1 + { + public long ID { get; set; } + public string Location { get; set; } + public string Project { get; set; } + public string barCode { get; set; } + public string side { get; set; } + public string inspectResult { get; set; } + public string reason { get; set; } + public Nullable createTime { get; set; } + public string inspectTimes { get; set; } + public string remark1 { get; set; } + public string weizhi { get; set; } + public string station { get; set; } + public string damnPosition { get; set; } + public string remark2 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF3.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF3.cs new file mode 100644 index 0000000..13eaf7e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportF3.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportF3 + { + public int ID { get; set; } + public string Location { get; set; } + public string Project { get; set; } + public string reason { get; set; } + public Nullable num { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportG1.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportG1.cs new file mode 100644 index 0000000..b575805 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportG1.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportG1 + { + public int ID { get; set; } + public string Location { get; set; } + public string Project { get; set; } + public string barCode { get; set; } + public string side { get; set; } + public string inspectResult { get; set; } + public string reason { get; set; } + public Nullable createTime { get; set; } + public string inspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string weizhi { get; set; } + public string station { get; set; } + public string damnPosition { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportH1.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportH1.cs new file mode 100644 index 0000000..a62255a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportH1.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportH1 + { + public int ID { get; set; } + public string Location { get; set; } + public string Project { get; set; } + public string barCode { get; set; } + public string side { get; set; } + public string inspectResult { get; set; } + public string reason { get; set; } + public Nullable createTime { get; set; } + public string inspectTimes { get; set; } + public string remark1 { get; set; } + public string remark2 { get; set; } + public string weizhi { get; set; } + public string station { get; set; } + public string damnPosition { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen.cs new file mode 100644 index 0000000..1718801 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportPaintingScreen + { + public string color { get; set; } + public string productInfo { get; set; } + public int sumNum { get; set; } + public int oncePassNum { get; set; } + public string oncePassRate { get; set; } + public int sumPassNum { get; set; } + public string sumPassRate { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_bak.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_bak.cs new file mode 100644 index 0000000..a5e571a --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_bak.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportPaintingScreen_bak + { + public string color { get; set; } + public string productInfo { get; set; } + public int sumNum { get; set; } + public int oncePassNum { get; set; } + public string oncePassRate { get; set; } + public int sumPassNum { get; set; } + public string sumPassRate { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg.cs new file mode 100644 index 0000000..2785b9c --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportPaintingScreen_pg + { + public string color { get; set; } + public string productInfo { get; set; } + public int sumNum { get; set; } + public int hgNum { get; set; } + public string DefectName1 { get; set; } + public decimal defectRate1 { get; set; } + public string DefectName2 { get; set; } + public Nullable defectRate2 { get; set; } + public string DefectName3 { get; set; } + public Nullable defectRate3 { get; set; } + public string DefectName4 { get; set; } + public Nullable defectRate4 { get; set; } + public string DefectName5 { get; set; } + public Nullable defectRate5 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg_bak.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg_bak.cs new file mode 100644 index 0000000..f4b0f49 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportPaintingScreen_pg_bak.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportPaintingScreen_pg_bak + { + public string color { get; set; } + public string productInfo { get; set; } + public int sumNum { get; set; } + public int hgNum { get; set; } + public string DefectName1 { get; set; } + public decimal defectRate1 { get; set; } + public string DefectName2 { get; set; } + public Nullable defectRate2 { get; set; } + public string DefectName3 { get; set; } + public Nullable defectRate3 { get; set; } + public string DefectName4 { get; set; } + public Nullable defectRate4 { get; set; } + public string DefectName5 { get; set; } + public Nullable defectRate5 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportTest.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportTest.cs new file mode 100644 index 0000000..2a45db1 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ReportTest.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ReportTest + { + public long ID { get; set; } + public string barCode { get; set; } + public string side { get; set; } + public string inspectResult { get; set; } + public string reason { get; set; } + public Nullable createTime { get; set; } + public string inspectTimes { get; set; } + public string remark1 { get; set; } + public string weizhi { get; set; } + public string station { get; set; } + public string damnPosition { get; set; } + public string remark2 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen.cs new file mode 100644 index 0000000..bd3d4a5 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen.cs @@ -0,0 +1,65 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Report_FiveScreen + { + public string ID { get; set; } + public string Name { get; set; } + public Nullable LastYear { get; set; } + public Nullable Jan { get; set; } + public Nullable Feb { get; set; } + public Nullable Mar { get; set; } + public Nullable Apr { get; set; } + public Nullable May { get; set; } + public Nullable Jun { get; set; } + public Nullable Jul { get; set; } + public Nullable Aug { get; set; } + public Nullable Sept { get; set; } + public Nullable Oct { get; set; } + public Nullable Nov { get; set; } + public Nullable Dec { get; set; } + public Nullable day1 { get; set; } + public Nullable day2 { get; set; } + public Nullable day3 { get; set; } + public Nullable day4 { get; set; } + public Nullable day5 { get; set; } + public Nullable day6 { get; set; } + public Nullable day7 { get; set; } + public Nullable day8 { get; set; } + public Nullable day9 { get; set; } + public Nullable day10 { get; set; } + public Nullable day11 { get; set; } + public Nullable day12 { get; set; } + public Nullable day13 { get; set; } + public Nullable day14 { get; set; } + public Nullable day15 { get; set; } + public Nullable day16 { get; set; } + public Nullable day17 { get; set; } + public Nullable day18 { get; set; } + public Nullable day19 { get; set; } + public Nullable day20 { get; set; } + public Nullable day21 { get; set; } + public Nullable day22 { get; set; } + public Nullable day23 { get; set; } + public Nullable day24 { get; set; } + public Nullable day25 { get; set; } + public Nullable day26 { get; set; } + public Nullable day27 { get; set; } + public Nullable day28 { get; set; } + public Nullable day29 { get; set; } + public Nullable day30 { get; set; } + public Nullable day31 { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenConfig.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenConfig.cs new file mode 100644 index 0000000..9e76b9f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenConfig.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Report_FiveScreenConfig + { + public string ID { get; set; } + public string Name { get; set; } + public Nullable Min { get; set; } + public Nullable Max { get; set; } + public Nullable Scale { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenLast.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenLast.cs new file mode 100644 index 0000000..23bb6d0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenLast.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Report_FiveScreenLast + { + public string ID { get; set; } + public string StationID { get; set; } + public string StationNo { get; set; } + public string UseRate { get; set; } + public string PassRate { get; set; } + public string Remark1 { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenStandard.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenStandard.cs new file mode 100644 index 0000000..0ddeb70 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreenStandard.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Report_FiveScreenStandard + { + public string ID { get; set; } + public string Name { get; set; } + public Nullable LastYear { get; set; } + public Nullable Jan { get; set; } + public Nullable Feb { get; set; } + public Nullable Mar { get; set; } + public Nullable Apr { get; set; } + public Nullable May { get; set; } + public Nullable Jun { get; set; } + public Nullable Jul { get; set; } + public Nullable Aug { get; set; } + public Nullable Sept { get; set; } + public Nullable Oct { get; set; } + public Nullable Nov { get; set; } + public Nullable Dec { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191011.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191011.cs new file mode 100644 index 0000000..4e7cb1f --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191011.cs @@ -0,0 +1,65 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Report_FiveScreen_20191011 + { + public string ID { get; set; } + public string Name { get; set; } + public Nullable LastYear { get; set; } + public Nullable Jan { get; set; } + public Nullable Feb { get; set; } + public Nullable Mar { get; set; } + public Nullable Apr { get; set; } + public Nullable May { get; set; } + public Nullable Jun { get; set; } + public Nullable Jul { get; set; } + public Nullable Aug { get; set; } + public Nullable Sept { get; set; } + public Nullable Oct { get; set; } + public Nullable Nov { get; set; } + public Nullable Dec { get; set; } + public Nullable day1 { get; set; } + public Nullable day2 { get; set; } + public Nullable day3 { get; set; } + public Nullable day4 { get; set; } + public Nullable day5 { get; set; } + public Nullable day6 { get; set; } + public Nullable day7 { get; set; } + public Nullable day8 { get; set; } + public Nullable day9 { get; set; } + public Nullable day10 { get; set; } + public Nullable day11 { get; set; } + public Nullable day12 { get; set; } + public Nullable day13 { get; set; } + public Nullable day14 { get; set; } + public Nullable day15 { get; set; } + public Nullable day16 { get; set; } + public Nullable day17 { get; set; } + public Nullable day18 { get; set; } + public Nullable day19 { get; set; } + public Nullable day20 { get; set; } + public Nullable day21 { get; set; } + public Nullable day22 { get; set; } + public Nullable day23 { get; set; } + public Nullable day24 { get; set; } + public Nullable day25 { get; set; } + public Nullable day26 { get; set; } + public Nullable day27 { get; set; } + public Nullable day28 { get; set; } + public Nullable day29 { get; set; } + public Nullable day30 { get; set; } + public Nullable day31 { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191014.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191014.cs new file mode 100644 index 0000000..f2d26fc --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Report_FiveScreen_20191014.cs @@ -0,0 +1,65 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Report_FiveScreen_20191014 + { + public string ID { get; set; } + public string Name { get; set; } + public Nullable LastYear { get; set; } + public Nullable Jan { get; set; } + public Nullable Feb { get; set; } + public Nullable Mar { get; set; } + public Nullable Apr { get; set; } + public Nullable May { get; set; } + public Nullable Jun { get; set; } + public Nullable Jul { get; set; } + public Nullable Aug { get; set; } + public Nullable Sept { get; set; } + public Nullable Oct { get; set; } + public Nullable Nov { get; set; } + public Nullable Dec { get; set; } + public Nullable day1 { get; set; } + public Nullable day2 { get; set; } + public Nullable day3 { get; set; } + public Nullable day4 { get; set; } + public Nullable day5 { get; set; } + public Nullable day6 { get; set; } + public Nullable day7 { get; set; } + public Nullable day8 { get; set; } + public Nullable day9 { get; set; } + public Nullable day10 { get; set; } + public Nullable day11 { get; set; } + public Nullable day12 { get; set; } + public Nullable day13 { get; set; } + public Nullable day14 { get; set; } + public Nullable day15 { get; set; } + public Nullable day16 { get; set; } + public Nullable day17 { get; set; } + public Nullable day18 { get; set; } + public Nullable day19 { get; set; } + public Nullable day20 { get; set; } + public Nullable day21 { get; set; } + public Nullable day22 { get; set; } + public Nullable day23 { get; set; } + public Nullable day24 { get; set; } + public Nullable day25 { get; set; } + public Nullable day26 { get; set; } + public Nullable day27 { get; set; } + public Nullable day28 { get; set; } + public Nullable day29 { get; set; } + public Nullable day30 { get; set; } + public Nullable day31 { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanAnalysis.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanAnalysis.cs new file mode 100644 index 0000000..b50ca69 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanAnalysis.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ScanAnalysis + { + public long ID { get; set; } + public Nullable ProductDate { get; set; } + public string workClass { get; set; } + public Nullable Qty { get; set; } + public string ScanPosition1 { get; set; } + public Nullable P_Qty1 { get; set; } + public Nullable P_UnScanQty1 { get; set; } + public string ScanPosition2 { get; set; } + public Nullable P_Qty2 { get; set; } + public Nullable P_UnScanQty2 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanRecord_Laser.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanRecord_Laser.cs new file mode 100644 index 0000000..9e67a2e --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ScanRecord_Laser.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ScanRecord_Laser + { + public long ID { get; set; } + public string BarCode { get; set; } + public Nullable ScanTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo.cs new file mode 100644 index 0000000..7c7a8ec --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_SkidInfo + { + public string ID { get; set; } + public string SkidNo { get; set; } + public string BarcodeLeft { get; set; } + public string BarcodeRight { get; set; } + public string Layer { get; set; } + public string ColorInfo { get; set; } + public Nullable CreateTime { get; set; } + public string Side_1_BC01 { get; set; } + public string Side_1_BC02 { get; set; } + public string Side_1_BC03 { get; set; } + public string Side_1_BC04 { get; set; } + public string Side_1_BC05 { get; set; } + public string Side_1_BC06 { get; set; } + public string Side_1_BC07 { get; set; } + public string Side_1_BC08 { get; set; } + public string Side_1_BC09 { get; set; } + public string Side_1_BC10 { get; set; } + public string Side_1_BC11 { get; set; } + public string Side_1_BC12 { get; set; } + public string Side_2_BC01 { get; set; } + public string Side_2_BC02 { get; set; } + public string Side_2_BC03 { get; set; } + public string Side_2_BC04 { get; set; } + public string Side_2_BC05 { get; set; } + public string Side_2_BC06 { get; set; } + public string Side_2_BC07 { get; set; } + public string Side_2_BC08 { get; set; } + public string Side_2_BC09 { get; set; } + public string Side_2_BC10 { get; set; } + public string Side_2_BC11 { get; set; } + public string Side_2_BC12 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo_20200904.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo_20200904.cs new file mode 100644 index 0000000..893fa33 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SkidInfo_20200904.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_SkidInfo_20200904 + { + public string ID { get; set; } + public string SkidNo { get; set; } + public string BarcodeLeft { get; set; } + public string BarcodeRight { get; set; } + public string Layer { get; set; } + public string ColorInfo { get; set; } + public Nullable CreateTime { get; set; } + public string Side_1_BC01 { get; set; } + public string Side_1_BC02 { get; set; } + public string Side_1_BC03 { get; set; } + public string Side_1_BC04 { get; set; } + public string Side_1_BC05 { get; set; } + public string Side_1_BC06 { get; set; } + public string Side_1_BC07 { get; set; } + public string Side_1_BC08 { get; set; } + public string Side_1_BC09 { get; set; } + public string Side_1_BC10 { get; set; } + public string Side_1_BC11 { get; set; } + public string Side_1_BC12 { get; set; } + public string Side_2_BC01 { get; set; } + public string Side_2_BC02 { get; set; } + public string Side_2_BC03 { get; set; } + public string Side_2_BC04 { get; set; } + public string Side_2_BC05 { get; set; } + public string Side_2_BC06 { get; set; } + public string Side_2_BC07 { get; set; } + public string Side_2_BC08 { get; set; } + public string Side_2_BC09 { get; set; } + public string Side_2_BC10 { get; set; } + public string Side_2_BC11 { get; set; } + public string Side_2_BC12 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialNotFacStockNo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialNotFacStockNo.cs new file mode 100644 index 0000000..64d86fa --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialNotFacStockNo.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_SpcialNotFacStockNo + { + public string ID { get; set; } + public string NotFacStockNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialStockNo.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialStockNo.cs new file mode 100644 index 0000000..92933d0 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_SpcialStockNo.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_SpcialStockNo + { + public string ID { get; set; } + public string SpecialStockNo { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Station.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Station.cs new file mode 100644 index 0000000..0188ba6 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_Station.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_Station + { + public string StationID { get; set; } + public string LineID { get; set; } + public string StationNo { get; set; } + public string Des { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StationAndCylinder.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StationAndCylinder.cs new file mode 100644 index 0000000..1ec8efb --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StationAndCylinder.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_StationAndCylinder + { + public string ID { get; set; } + public string StationID { get; set; } + public string CylinderID { get; set; } + public Nullable Time1 { get; set; } + public Nullable Time2 { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn.cs new file mode 100644 index 0000000..8e3790b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_StockIn + { + public string ID { get; set; } + public string barcode { get; set; } + public string pass { get; set; } + public Nullable createTime { get; set; } + public string paintCode { get; set; } + public string ZcCode { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockInColor.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockInColor.cs new file mode 100644 index 0000000..6e3e9d2 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockInColor.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_StockInColor + { + public string ID { get; set; } + public string Barcode { get; set; } + public string ColorInfo { get; set; } + public Nullable CreateTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20200511.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20200511.cs new file mode 100644 index 0000000..8701405 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20200511.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_StockIn_20200511 + { + public string ID { get; set; } + public string barcode { get; set; } + public string pass { get; set; } + public Nullable createTime { get; set; } + public string paintCode { get; set; } + public string ZcCode { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20210322.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20210322.cs new file mode 100644 index 0000000..21f943b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_20210322.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_StockIn_20210322 + { + public string ID { get; set; } + public string barcode { get; set; } + public string pass { get; set; } + public Nullable createTime { get; set; } + public string paintCode { get; set; } + public string ZcCode { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_beif.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_beif.cs new file mode 100644 index 0000000..7d5d609 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_StockIn_beif.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_StockIn_beif + { + public string ID { get; set; } + public string barcode { get; set; } + public string pass { get; set; } + public Nullable createTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_243.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_243.cs new file mode 100644 index 0000000..7c5ab49 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_243.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ToVisual_WheelBrow_243 + { + public long ID { get; set; } + public string PartNo { get; set; } + public Nullable ToVisual { get; set; } + public Nullable CreateTime { get; set; } + public Nullable FinishTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_247.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_247.cs new file mode 100644 index 0000000..cd340dc --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_ToVisual_WheelBrow_247.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_ToVisual_WheelBrow_247 + { + public long ID { get; set; } + public string PartNo { get; set; } + public Nullable ToVisual { get; set; } + public Nullable CreateTime { get; set; } + public Nullable FinishTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_aa.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_aa.cs new file mode 100644 index 0000000..32b5b56 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_aa.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_aa + { + public int ID { get; set; } + public string barcode { get; set; } + public string side { get; set; } + public Nullable createtime { get; set; } + public Nullable ToVisual { get; set; } + public Nullable FinishTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_reportA2.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_reportA2.cs new file mode 100644 index 0000000..4e0fe83 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_reportA2.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_reportA2 + { + public long ID { get; set; } + public string barCode { get; set; } + public string side { get; set; } + public string inspectResult { get; set; } + public string reason { get; set; } + public Nullable createTime { get; set; } + public string inspectTimes { get; set; } + public string remark1 { get; set; } + public string weizhi { get; set; } + public string station { get; set; } + public string damnPosition { get; set; } + public string remark2 { get; set; } + public string workClass { get; set; } + public string Location { get; set; } + public string Project { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_test.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_test.cs new file mode 100644 index 0000000..1fa5d67 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/tb_test.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class tb_test + { + public string ID { get; set; } + public string Reason { get; set; } + public Nullable createTime { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/test1.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/test1.cs new file mode 100644 index 0000000..4149670 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/test1.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class test1 + { + public string ID { get; set; } + public string StationID { get; set; } + public string StockNo { get; set; } + public Nullable PrintType { get; set; } + public string OneBarCode { get; set; } + public string PlanID { get; set; } + public Nullable CreateTime { get; set; } + public string ProductName { get; set; } + public string PartNo { get; set; } + public string ProductDate { get; set; } + public string ClassName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/test2.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/test2.cs new file mode 100644 index 0000000..c92b0ef --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/test2.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + using System.Collections.Generic; + + public partial class test2 + { + public int ID { get; set; } + public string PlanID { get; set; } + public string StationID { get; set; } + public string ProductDate { get; set; } + public string ClassName { get; set; } + public Nullable ProductCount { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/user_department_sel_Result.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/user_department_sel_Result.cs new file mode 100644 index 0000000..93d0c1b --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/user_department_sel_Result.cs @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + + public partial class user_department_sel_Result + { + public Nullable ID { get; set; } + public string Text { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EFModel/user_menu_sel_Result.cs b/SjMes/PunchAssemble/MESClassLibrary/EFModel/user_menu_sel_Result.cs new file mode 100644 index 0000000..e15d257 --- /dev/null +++ b/SjMes/PunchAssemble/MESClassLibrary/EFModel/user_menu_sel_Result.cs @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace MESClassLibrary.EFModel +{ + using System; + + public partial class user_menu_sel_Result + { + public System.Guid MenuID { get; set; } + public string MenuName { get; set; } + } +} diff --git a/SjMes/PunchAssemble/MESClassLibrary/EncryptedDLL/MESClassLibrary.dll b/SjMes/PunchAssemble/MESClassLibrary/EncryptedDLL/MESClassLibrary.dll new file mode 100644 index 0000000000000000000000000000000000000000..a742b053c7ac2131dc59f8d4ba1fcfd9f771f272 GIT binary patch literal 721920 zcmeFa37i~7*+1U9Gt+bI%6 zxkLm!QH&fC5EbQ65D?{55nd0X$e|Ji1VKbWR0M_P_x)CNRaf^MyGigp{(tz8o$BhR ztDbu5x$3EF&qbfKVwPpa@$bF&EbDIk^1nIaZ{t5J@w#=wJ+0Oq>7P!#yJ?S~PTc>v zW#!Vzr+UYpdgO_vqmMl4ByUCOs3oOSPdll!?4;7Xz4t4f=pD0UMlP3`;upPOC(GKS zDQ+FN_6LhqZO>Y*6I+^W%X%wgSt*%&OR>eWN=TRROYE3#mUts2@aM0!67Sg<{1>y1 zxX`lN#s9&tWwpuI;_neCcXy`dv{?NlMD)KSTC6Pc+5p!Zeb?x@q)``8DLn6Dz|UB* zeY_PIvX7WiKIX_3M_Sg)O~_^2(Prx%d}I7K$Fd%naccS0qmd`t zfVK!43|GO;nQ`ip%iaQaC33EDVrJ)a^Kmq7UF9aTh^xWlVJkCmX(~=#C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